<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.expertiza.ncsu.edu/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Npari</id>
	<title>Expertiza_Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.expertiza.ncsu.edu/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Npari"/>
	<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=Special:Contributions/Npari"/>
	<updated>2026-09-20T19:16:37Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.41.0</generator>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch2_0e808_nsv&amp;diff=82228</id>
		<title>CSC/ECE 517 Fall 2013/ch2 0e808 nsv</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch2_0e808_nsv&amp;diff=82228"/>
		<updated>2013-10-31T04:03:11Z</updated>

		<summary type="html">&lt;p&gt;Npari: /* E808: Refactor and test Participant, AssignmentParticipant, &amp;amp; CourseParticipant */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= E808: Refactor and test Participant, AssignmentParticipant, &amp;amp; CourseParticipant =&lt;br /&gt;
The requirements provided for the Open Source System project of Expertiza were as follows : &amp;lt;br&amp;gt;&lt;br /&gt;
'''Classes''': &amp;lt;br&amp;gt;&lt;br /&gt;
''participant.rb'' (197 lines)&amp;lt;br&amp;gt;&lt;br /&gt;
''assignment_participant.rb'' (476 lines)&amp;lt;br&amp;gt;&lt;br /&gt;
''course_participant.rb'' (90 lines)&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''What they do''': &amp;lt;br&amp;gt; &lt;br /&gt;
These classes keep track of a user who is participating in an assignment or a course.  participant.rb is the superclass, and the other two are the subclasses.&lt;br /&gt;
&lt;br /&gt;
'''What is needed''': &amp;lt;br&amp;gt; &lt;br /&gt;
The methods are complex; there are a lot of them (assignment_particpant has 44) and there is a lot of duplicated code.  assignment_participant contains code for detecting cycles of high grades (which can indicate collusion in reviews).  It would be better moved to another class.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
= Introduction =&lt;br /&gt;
&lt;br /&gt;
A cursory analysis of the code of the three model classes showed the existence of code duplication. In a lot of the cases the [http://en.wikipedia.org/wiki/Don%27t_Repeat_Yourself Don't Repeat Yourself] (DRY) principle was violated.&lt;br /&gt;
&lt;br /&gt;
In keeping with the [http://en.wikipedia.org/wiki/Agile_software_development Agile] methodology, which involves having regular discussions with all stakeholders, the design check for the project was performed with a meeting with the Instructor.&lt;br /&gt;
This helped set a direction to the way ahead for the project. The process followed in detail is explained in the following sections.&lt;br /&gt;
&lt;br /&gt;
= Project Design and Approach =&lt;br /&gt;
&lt;br /&gt;
Since the Agile Method of software development was adopted for this project, the first basic principle was accepting the fact that not all the requirements would be known at the onset, but instead would change with time. Also the primary purpose of the project was to get acquainted with the techniques needed to understand a huge application already in place and coded by others. &amp;lt;br&amp;gt;&lt;br /&gt;
With this in mind, there was the freedom to propose an array of changes and then through trial and error perceive their feasibility and impact on the application.&amp;lt;br&amp;gt;&lt;br /&gt;
During the first design check with the Instructor, all the methods in the three models were parsed through and the existing issues were identified. What was also discussed was functionality that could be improved upon or new features that could be added but only if these improved the overall quality of the code or made better design sense.&amp;lt;br&amp;gt;&lt;br /&gt;
The result of this meeting was a spreadsheet with all model methods, their functions and proposed changes. &lt;br /&gt;
This spreadsheet was the used as the baseline for the entire project &lt;br /&gt;
Following through with getting timely feedback from all stakeholders, this proposal was discussed with the Instructor and modified as per comments received.&lt;br /&gt;
With the first set of requirements ready, the code could now be worked upon.&amp;lt;br&amp;gt;&lt;br /&gt;
With the goal being refactoring and testing of the models, before any code changes could be made the existing tests needed to be verified to run successfully. Unit tests deal with models. Therefore the test files participant_test.rb,  assignment_participant_test.rb and course_participant_test.rb were run , but found to have bugs. These were fixed (explained in detail in sections below). The only test that still failed was in assignment_participant_test.rb and dealt with the publishing rights functionality which is not yet working in the expertiza project. Hence this test's failure was expected behavior and thus ignored.&lt;br /&gt;
Certain basic guidelines followed for improving the code design were :&lt;br /&gt;
# Re-use code as much as possible&lt;br /&gt;
# Make the code DRY and remove code duplication&lt;br /&gt;
# Remove redundant or unnecessary methods&lt;br /&gt;
# Redesign the code to make it more object oriented&lt;br /&gt;
# Due to the hierarchy structure of the models, common functionality between the models needed to be moved to the base class&lt;br /&gt;
# Specialized methods not relevant to the super-class should be moved to the sub-class it applies to&lt;br /&gt;
# Any deprecated code must be modified in accordance with the new norms to ensure smooth running of code in future versions of Rails&amp;lt;ref&amp;gt;http://stackoverflow.com/questions/15098961/findfirst-and-findall-are-deprecated&amp;lt;/ref&amp;gt;&lt;br /&gt;
# Rename methods to conform better with Ruby naming conventions&lt;br /&gt;
# Improve the readability of the code&lt;br /&gt;
&lt;br /&gt;
= UML Class Diagram =&lt;br /&gt;
A subset of the [http://en.wikipedia.org/wiki/Unified_Modeling_Language UML] class diagram including only the related classes for this project can be drawn as shown below. [[File:UML_E808.png | UML class diagram]]&lt;br /&gt;
&lt;br /&gt;
Participant is the superclass for subclasses AssignmentParticipant and CourseParticipant. In the database to actually distinguish between these a type attribute is used which can take values as 'AssignmentParticipant' or 'CourseParticipant' while a participant that does not belong to either an assignment nor a course cannot exist in the system as he just becomes a user and not a participant.&amp;lt;br&amp;gt;&lt;br /&gt;
A participant has a user i.e. only a user can become a participant.&amp;lt;br&amp;gt;&lt;br /&gt;
An AssignmentParticipant has an assignment and a CourseParticipant has a course. This relationship is defined by the parent_id attribute of a participant.&lt;br /&gt;
&lt;br /&gt;
=Participant model: participant.rb=&lt;br /&gt;
&lt;br /&gt;
The Participant model class being the base class should only contain code or methods that are relevant or needed by both the subclasses. But instead , it was cluttered with methods that would be better placed in one of the child classes as they are relevant to only that subclass. Such methods were moved to the respective sub-classes. Also certain functionalities that were common between both subclasses were repeated in both leading to code repetition. Such methods were moved to Participant class and will be dealt with in the later sections of this article. Several methods in Participant model required renaming and refactoring to ensure that the change is reflected in the entire project. The names were changed to follow method naming convention. Deprecated code was removed and re-coded to ensure that the code worked in future versions of Rails as well. &lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;width:5%;&amp;quot;|Sr. No.&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;|Method Name&lt;br /&gt;
! style=&amp;quot;width:33%;&amp;quot;|Changes Made &lt;br /&gt;
! style=&amp;quot;width:43%;&amp;quot;|Reason For Change&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
|''''' 1 '''''&lt;br /&gt;
| able_to_submit&lt;br /&gt;
| It has been commented out.&lt;br /&gt;
| Method not called or used anywhere. Also the method just returned the value of the attribute submit_allowed which is already taken care of by attr_accessors.&lt;br /&gt;
|-&lt;br /&gt;
|''''' 2 '''''&lt;br /&gt;
| force_delete&lt;br /&gt;
| The deprecated code in this method has been changed.&lt;br /&gt;
| To ensure the code works in future versions of Rails.&lt;br /&gt;
|-&lt;br /&gt;
|''''' 3 '''''&lt;br /&gt;
| get_average_question_score&lt;br /&gt;
| Renamed to average_question_score and refactored.&lt;br /&gt;
| To conform to method naming convention.&lt;br /&gt;
|-&lt;br /&gt;
|''''' 4 '''''&lt;br /&gt;
| get_average_score&lt;br /&gt;
| Renamed to average_score and refactored also moved to the model assignment_participant.rb. Removed empty parentheses from declaration&lt;br /&gt;
| The new name is more in keeping with method naming conventions. Removal of empty parentheses helps with poetry mode of code. The method was moved because calculation of average score is only relevant to AssignmentParticipant and not to CourseParticipant.&lt;br /&gt;
|-&lt;br /&gt;
|''''' 5 '''''&lt;br /&gt;
| get_current_stage&lt;br /&gt;
| Moved to the model - assignment_participants.rb&lt;br /&gt;
| The method was moved because getting current stage of an assignment is only relevant to AssignmentParticipant and not to CourseParticipant.&lt;br /&gt;
|-&lt;br /&gt;
|''''' 6 '''''&lt;br /&gt;
| get_stage_deadline&lt;br /&gt;
| Moved to model - assignment_participant.rb&lt;br /&gt;
|Just like get_current_stage, this method too is only relevant to AssignmentParticipant and not to CourseParticipant.&lt;br /&gt;
|-&lt;br /&gt;
|''''' 7 '''''&lt;br /&gt;
| get_topic_string&lt;br /&gt;
| Renamed to topic_string and refactored.&lt;br /&gt;
|To follow method naming convention&lt;br /&gt;
|-&lt;br /&gt;
|''''' 8 '''''&lt;br /&gt;
| review_response_maps&lt;br /&gt;
| Moved to model - assignment_participant.rb&lt;br /&gt;
| Reviews are made only on assignments and hence ReviewResponseMaps would only exist for between the participants of an assignment. Thus this method would be better placed in AssignmentParticipant.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
After changes were made, the existing tests ran successfully.&lt;br /&gt;
&lt;br /&gt;
=AssignmentParticipant model: assignment_participant.rb=&lt;br /&gt;
&lt;br /&gt;
Several methods in AssignmentParticipant model class required renaming and refactoring to ensure that the change is reflected in the entire project. The names were changed to follow method naming conventions in Ruby. Deprecated code was removed and re-coded to ensure that the code worked in future version of Rails as well. Duplicate codes were commented out. Methods that are more general in the sub classes were moved to the parent class. Some methods that calculate the collusion in reviews between students were moved to a newly created model class called CollusionCycle in file collusion_cycle.rb .&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;width:5%;&amp;quot;|Sr. No.&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;|Method Name&lt;br /&gt;
! style=&amp;quot;width:33%;&amp;quot;|Changes Made &lt;br /&gt;
! style=&amp;quot;width:43%;&amp;quot;|Reason For Change&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
|''''' 1 '''''&lt;br /&gt;
|get_course_string&lt;br /&gt;
|Renamed to course_string and refactored &lt;br /&gt;
|To follow method naming convention&lt;br /&gt;
|-&lt;br /&gt;
|''''' 2 '''''&lt;br /&gt;
|get_cycle_deviation_score&lt;br /&gt;
|Moved to collusion_cycle.rb model class&lt;br /&gt;
|Related methods that calculate collusion in reviews have been moved to the newly created collusion_cycle.rb model class&lt;br /&gt;
|-&lt;br /&gt;
|''''' 3 '''''&lt;br /&gt;
|get_cycle_similarity_score&lt;br /&gt;
|Moved to collusion_cycle.rb model class&lt;br /&gt;
|Related methods that calculate collusion in reviews have been moved to the newly created collusion_cycle.rb model class&lt;br /&gt;
|-&lt;br /&gt;
|''''' 4 '''''&lt;br /&gt;
|get_feedback&lt;br /&gt;
|Renamed to feedback and refactored&lt;br /&gt;
|To follow method naming convention&lt;br /&gt;
|-&lt;br /&gt;
|''''' 5 '''''&lt;br /&gt;
|get_files&lt;br /&gt;
|Renamed to files_in_directory  and refactored&lt;br /&gt;
|To follow method naming convention&lt;br /&gt;
|-&lt;br /&gt;
|''''' 6 '''''&lt;br /&gt;
|get_four_node_cycles&lt;br /&gt;
|Moved to collusion_cycle.rb model class&lt;br /&gt;
|Related methods that calculate collusion in reviews have been moved to the newly created collusion_cycle.rb model class&lt;br /&gt;
|-&lt;br /&gt;
|''''' 7 '''''&lt;br /&gt;
|fullname&lt;br /&gt;
|Moved to parent model class – participant.rb &lt;br /&gt;
|General methods of the subclass are moved to Parent class&lt;br /&gt;
|-&lt;br /&gt;
|''''' 8 '''''&lt;br /&gt;
|get_metareviews&lt;br /&gt;
|Renamed to metareviews and refactored&lt;br /&gt;
|To follow method naming convention&lt;br /&gt;
|-&lt;br /&gt;
|''''' 9 '''''&lt;br /&gt;
|name&lt;br /&gt;
|Commented the method  &lt;br /&gt;
|The method is already in parent model class – participant.rb and can be used in this subclass through inheritance&lt;br /&gt;
|-&lt;br /&gt;
|''''' 10 '''''&lt;br /&gt;
|name&lt;br /&gt;
|Commented the method  &lt;br /&gt;
|The method is already in parent model class – participant.rb and can be used in this subclass through inheritance. Also it is a duplicate method in patricipant.rb&lt;br /&gt;
|- &lt;br /&gt;
|''''' 11 '''''&lt;br /&gt;
|get_review_score&lt;br /&gt;
|Renamed to review_score and refactored. Deprecated code has been removed and replaced with correct code.&lt;br /&gt;
|To follow method naming convention and ensure the code works in future versions. &lt;br /&gt;
|-&lt;br /&gt;
|''''' 12 '''''&lt;br /&gt;
|get_reviewees&lt;br /&gt;
|Renamed to reviewees and refactored. Deprecated code has been removed and replaced with correct code.&lt;br /&gt;
|To follow method naming convention and ensure the code works in future versions. &lt;br /&gt;
|-&lt;br /&gt;
|''''' 13 '''''&lt;br /&gt;
|get_reviewers&lt;br /&gt;
|Renamed to reviewers and refactored . Deprecated code has been commented and replaced with correct code.&lt;br /&gt;
|To follow method naming convention and ensure the code works in future versions. &lt;br /&gt;
|-&lt;br /&gt;
|''''' 14 '''''&lt;br /&gt;
|get_reviews&lt;br /&gt;
|Renamed to reviews and refactored &lt;br /&gt;
|To follow method naming convention&lt;br /&gt;
|-&lt;br /&gt;
|''''' 15 '''''&lt;br /&gt;
|get_reviews_by_reviewer&lt;br /&gt;
|Renamed to reviews_by_reviewer and refactored &lt;br /&gt;
|To follow method naming convention&lt;br /&gt;
|-&lt;br /&gt;
|''''' 16 '''''&lt;br /&gt;
|get_reviews_by_reviewer&lt;br /&gt;
|Commented the method &lt;br /&gt;
|To remove duplicated method in this class&lt;br /&gt;
|-&lt;br /&gt;
|''''' 17 '''''&lt;br /&gt;
|get_scores&lt;br /&gt;
|Renamed to scores and refactored &lt;br /&gt;
|To follow method naming convention&lt;br /&gt;
|-&lt;br /&gt;
|''''' 18 '''''&lt;br /&gt;
|get_submitted_files&lt;br /&gt;
|Renamed to submitted_files and refactored &lt;br /&gt;
|To follow method naming convention&lt;br /&gt;
|-&lt;br /&gt;
|''''' 19 '''''&lt;br /&gt;
|get_teammate_reviews&lt;br /&gt;
|Renamed to teammate_reviews and refactored &lt;br /&gt;
|To follow method naming convention&lt;br /&gt;
|-&lt;br /&gt;
|''''' 20 '''''&lt;br /&gt;
|get_three_node_cycles&lt;br /&gt;
|Moved to collusion_cycle.rb model class&lt;br /&gt;
|Related methods that calculate collusion in reviews have been moved to the newly created collusion_cycle.rb model class&lt;br /&gt;
|-&lt;br /&gt;
|''''' 21 '''''&lt;br /&gt;
|get_topic_string&lt;br /&gt;
|Method has been Commented&lt;br /&gt;
|It is already present in model super class – participant.rb&lt;br /&gt;
|-&lt;br /&gt;
|''''' 22 '''''&lt;br /&gt;
|get_two_node_cycles&lt;br /&gt;
|Moved to collusion_cycle.rb model class&lt;br /&gt;
|Related methods that calculate collusion in reviews have been moved to the newly created collusion_cycle.rb model class&lt;br /&gt;
|-&lt;br /&gt;
|''''' 23 '''''&lt;br /&gt;
|get_wiki_submissions&lt;br /&gt;
|Renamed to wiki_submissions and refactored&lt;br /&gt;
|To follow method naming convention&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
After changes were made, the existing tests ran successfully.&lt;br /&gt;
&lt;br /&gt;
=CourseParticipant model:course_participant.rb =&lt;br /&gt;
&lt;br /&gt;
The CourseParticipant model has methods like get_path and self.get_export_fields which were present in both assignment_participant.rb and course_participant.rb. Since they had dynamic usages, they could not be deleted from the two subclasses and placed in participant.rb.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;width:5%;&amp;quot;|Sr. No.&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;|Method Name&lt;br /&gt;
! style=&amp;quot;width:33%;&amp;quot;|Changes Made &lt;br /&gt;
! style=&amp;quot;width:43%;&amp;quot;|Reason For Change&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
|''''' 1 '''''&lt;br /&gt;
| get_course_string&lt;br /&gt;
| Renamed to course_string and refactored&lt;br /&gt;
| To follow method naming convention.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Changes to yaml files &amp;lt;ref&amp;gt;http://stackoverflow.com/questions/19442688/when-i-run-rails-server-it-is-showing-error-about-database-yml&amp;lt;/ref&amp;gt;=&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;width:5%;&amp;quot;|Sr. No.&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;|Method Name&lt;br /&gt;
! style=&amp;quot;width:33%;&amp;quot;|Changes Made &lt;br /&gt;
! style=&amp;quot;width:43%;&amp;quot;|Reason For Change&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
|''''' 1 '''''&lt;br /&gt;
|invitation.yml&lt;br /&gt;
|The indentation was corrected. &lt;br /&gt;
|Improper Indentation in invitation.yml was throwing errors. &lt;br /&gt;
|-&lt;br /&gt;
|''''' 2 '''''&lt;br /&gt;
|users.yml&lt;br /&gt;
|1.The symbol ‘:password’ was renamed to ‘:crypted_password’  &lt;br /&gt;
2.‘fullname :last,first’ was added inside ‘student1:’&lt;br /&gt;
|1.Attribute name is crypted_password in user.rb&lt;br /&gt;
2.Fixture was missing definition of fullname which required for the tests.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Testing &amp;lt;ref&amp;gt; http://guides.rubyonrails.org/testing.html &amp;lt;/ref&amp;gt;=&lt;br /&gt;
&lt;br /&gt;
===course_participant_test.rb===&lt;br /&gt;
&lt;br /&gt;
Changed the following line : &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CourseParticipant.import(['luke','Luke Skywalker','luke@gmail.com','darthvader'],{:user=&amp;gt;users(:superadmin)},courses(:course_e_commerce).id)&amp;lt;/pre&amp;gt;&lt;br /&gt;
to&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CourseParticipant.import(['luke','Skywalker,Luke','luke@gmail.com','darthvader'],{:user=&amp;gt;users(:superadmin)},courses(:course_e_commerce).id)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This was done to follow the syntax of fullname i.e.last_name,first_name which is a requirement of the application.&lt;br /&gt;
&lt;br /&gt;
===Rspec tests===&lt;br /&gt;
&lt;br /&gt;
participant_spec.rb&amp;lt;br&amp;gt;&lt;br /&gt;
created to check basic functionality of paticipant.rb&lt;br /&gt;
&lt;br /&gt;
It checks for:&amp;lt;br&amp;gt;&lt;br /&gt;
1.Associations with other tables.&amp;lt;br&amp;gt;&lt;br /&gt;
2.Entry and update of records.&lt;br /&gt;
&lt;br /&gt;
= Changes in routes.rb &amp;lt;ref&amp;gt;http://guides.rubyonrails.org/routing.html&amp;lt;/ref&amp;gt;=&lt;br /&gt;
&lt;br /&gt;
The following missing routes were added to the file routes.rb to make the program flow smoothly. &lt;br /&gt;
&lt;br /&gt;
Routes for submit_hyperlink and remove_hyperlink were added to the submitted_content controller as :&lt;br /&gt;
&lt;br /&gt;
 resources :submitted_content do&lt;br /&gt;
    collection do&lt;br /&gt;
      get :view&lt;br /&gt;
      get :edit&lt;br /&gt;
     ''' post :submit_hyperlink'''&lt;br /&gt;
     ''' get :remove_hyperlink'''&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
Routes for the get and post methods of the export_file controller were added :&lt;br /&gt;
&lt;br /&gt;
 resources :export_file do&lt;br /&gt;
    collection do&lt;br /&gt;
      get :start&lt;br /&gt;
      '''get :export'''&lt;br /&gt;
      '''post :export'''&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
Routes for cancel, accept and decline were added to the invitation controller :&lt;br /&gt;
&lt;br /&gt;
  resources :invitation do&lt;br /&gt;
    collection do&lt;br /&gt;
      '''get :cancel'''&lt;br /&gt;
      '''get :accept'''&lt;br /&gt;
      '''get :decline'''&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
=Scope for future work=&lt;br /&gt;
&lt;br /&gt;
* The tests related to ‘publishing_rights’ method in assignment_participant_test.rb still fail, but this is expected as this feature of publishing_rights has not yet been implemented in Expertiza.&lt;br /&gt;
* The delete hyperlink method needs to be fixed as currently this feature is bugged in the running Expertiza.&lt;br /&gt;
* A test for cycle_collusion.rb proposed as:&lt;br /&gt;
 class CycleCollusionTest &amp;lt; ActiveSupport::TestCase&lt;br /&gt;
 	fixtures :response_maps, :users , :assignments&lt;br /&gt;
           test &amp;quot;collusion&amp;quot; do&lt;br /&gt;
           r = ResponseMap.new&lt;br /&gt;
           r.reviewee_id= response_maps(:response_maps0)  //his work was reviewed by user1&lt;br /&gt;
           r.reviewer_id= response_maps(:response_maps1) //he reviewed user0's work&lt;br /&gt;
           r.reviewee_id1=response_maps(:response_maps1)  //his work was reviewed by user0 &lt;br /&gt;
           r.reviewer_id1=response_maps(:response_maps0)  //he reviewed user1's work&lt;br /&gt;
           !assert_equal r.reviewee_id, r.reviewer_id1&lt;br /&gt;
           end&lt;br /&gt;
&lt;br /&gt;
Could not be tested effectively as cycle_collusion is not used anywhere in the code except in assignment_participant.rb where the methods now belonging to cycle_collusion class were originally present.&lt;br /&gt;
*The feature of sending an email when a user gets registered for an assignment i.e.becomes an assignment participant needs to be implemented.&lt;br /&gt;
&lt;br /&gt;
= Conclusion =&lt;br /&gt;
&lt;br /&gt;
*Renaming and refactoring was performed as per requirements and to follow conventions for the appropriate methods in participant.rb, assignment_participant.rb and course_participant.rb.&lt;br /&gt;
*Bugs in existing tests of model classes’ participant.rb, assignment_participant.rb and course_participant.rb (that were initially not running) were fixed and made to run without errors. &lt;br /&gt;
*All tests in participant.rb, assignment_participant.rb and course_participant.rb- (except those related to publishing_rights due to absence of its functionality) ran successfully after changes were made to the three model files.&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= See Also =&lt;br /&gt;
&lt;br /&gt;
* OSS - E808 project VCL link http://152.7.99.84:3000/ (may be disabled after a month)&lt;br /&gt;
* OSS - E808 project on GitHub https://github.com/npari/expertiza_oss808&lt;br /&gt;
* Expertiza project documentation can be found at http://wikis.lib.ncsu.edu/index.php/Expertiza&lt;br /&gt;
* The working Expertiza site is accessible at link http://expertiza.ncsu.edu/&lt;br /&gt;
* Expertiza on GitHub https://github.com/expertiza/expertiza&lt;/div&gt;</summary>
		<author><name>Npari</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch2_0e808_nsv&amp;diff=81782</id>
		<title>CSC/ECE 517 Fall 2013/ch2 0e808 nsv</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch2_0e808_nsv&amp;diff=81782"/>
		<updated>2013-10-31T01:18:31Z</updated>

		<summary type="html">&lt;p&gt;Npari: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= E808: Refactor and test Participant, AssignmentParticipant, &amp;amp; CourseParticipant =&lt;br /&gt;
The requirements provided for the Open Source System project were as follows : &amp;lt;br&amp;gt;&lt;br /&gt;
'''Classes''': &amp;lt;br&amp;gt;&lt;br /&gt;
''participant.rb'' (197 lines)&amp;lt;br&amp;gt;&lt;br /&gt;
''assignment_participant.rb'' (476 lines)&amp;lt;br&amp;gt;&lt;br /&gt;
''course_participant.rb'' (90 lines)&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''What they do''': &amp;lt;br&amp;gt; &lt;br /&gt;
These classes keep track of a user who is participating in an assignment or a course.  participant.rb is the superclass, and the other two are the subclasses.&lt;br /&gt;
&lt;br /&gt;
'''What is needed''': &amp;lt;br&amp;gt; &lt;br /&gt;
The methods are complex; there are a lot of them (assignment_particpant has 44) and there is a lot of duplicated code.  assignment_participant contains code for detecting cycles of high grades (which can indicate collusion in reviews).  It would be better moved to another class.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
= Introduction =&lt;br /&gt;
&lt;br /&gt;
A cursory analysis of the code of the three model classes showed the existence of code duplication. In a lot of the cases the [http://en.wikipedia.org/wiki/Don%27t_Repeat_Yourself Don't Repeat Yourself] (DRY) principle was violated.&lt;br /&gt;
&lt;br /&gt;
In keeping with the [http://en.wikipedia.org/wiki/Agile_software_development Agile] methodology, which involves having regular discussions with all stakeholders, the design check for the project was performed with a meeting with the Instructor.&lt;br /&gt;
&lt;br /&gt;
= UML Class Diagram =&lt;br /&gt;
A subset of the [[http://en.wikipedia.org/wiki/Unified_Modeling_Language UML]] class diagram including only the related classes for this project can be drawn as shown. [[File:UML_E808.png | UML class diagram]]&lt;br /&gt;
&lt;br /&gt;
The participant is the superclass for subclasses AssignmentParticipant and CourseParticipant. In the database to actually distinguish between these a type attribute is used which can take values as 'AssignmentParticipant' or 'CourseParticipant' while a participant that does not belong to either an assignment nor a course cannot exist in the system as he just becomes a user and not a participant.&amp;lt;br&amp;gt;&lt;br /&gt;
A participant has a user i.e. only a user can become a participant.&amp;lt;br&amp;gt;&lt;br /&gt;
An AssignmentParticipant has an assignment and a CourseParticipant has a course. This relationship is defined by the parent_id attribute of a participant. &lt;br /&gt;
&lt;br /&gt;
=Participant model: participant.rb=&lt;br /&gt;
&lt;br /&gt;
Code deployment is a procedure where the application is transferred onto a production server, so that it is made available for all the other users. It is the part of release management process which involves several activities. These activities are inter-dependent and need to be completed in a specific order for successful code deployment. &lt;br /&gt;
&lt;br /&gt;
'''Code Deployment Activities'''&lt;br /&gt;
&lt;br /&gt;
The various deployment activities include &amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/Software_deployment&amp;lt;/ref&amp;gt;&lt;br /&gt;
* Release : Gathering all system components in preparation for deployment&lt;br /&gt;
* Install and activate : Installing the application components and getting them in the 'ready' state&lt;br /&gt;
* Deactivate : Shutting down components that are out-dated or that may interfere with updating others&lt;br /&gt;
* Adapt : Making changes to application to accommodate changes in environment&lt;br /&gt;
* Update : Having a newer release installed in place of the old one&lt;br /&gt;
* Built-in : There are components built-into some tools for complete/semi-automating updates&lt;br /&gt;
* Version tracking : These systems help the user to know if newer versions of a software are available and if yes, help install them&lt;br /&gt;
* Uninstall : Opposite of installation and involves complete removal of software and its dependencies from the environment&lt;br /&gt;
* Retire : This involves making a software obsolete and is the end of software life cycle&lt;br /&gt;
&lt;br /&gt;
The general guidelines for the deployment process remain the same but there are variations in the specific requirements with each software system.&lt;br /&gt;
&lt;br /&gt;
=AssignmentParticipant model: assignment_participant.rb=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ref&amp;gt;http://searchitchannel.techtarget.com/definition/release-management&amp;lt;/ref&amp;gt;&lt;br /&gt;
Release management is a software process which takes care of the development, testing, deployment and support stages of software releases. The start of release management happens in the development phase, where it requests for new features or changes in the existing application. When the request is accepted, a new release is planned and designed. This design is built and then enters the testing phase, where the release is tested until it is accepted. After the release is accepted as a candidate, it enters the deployment phase where it is implemented. Once deployed, the release is made available and sent to support phase for collection of bug reports. Once the support phase is done, the bugs and other issues lead to requests for changes and the cycle is then repeated.&lt;br /&gt;
&lt;br /&gt;
=CourseParticipant model:course_participant.rb =&lt;br /&gt;
&amp;lt;ref&amp;gt;http://www.urbancode.com/html/solutions/deployment-automation.html&amp;lt;/ref&amp;gt;&lt;br /&gt;
Automation of a process is required when the manual process is more error prone. Also, for large real world applications, the manual process is very complex and time consuming. Incomplete documentation hampers a manual process further. Deployment also has to be done in many environments and involves varied steps to be followed in a specific order. Manual process needs repetition of same procedure to each and every environment which leads to many errors and the process becomes costly.&lt;br /&gt;
In web applications each new release has to be deployed to and tested in development, testing and production environments.The number of software releases in web applications  are more and hence the need to automate release management is also greater.&lt;br /&gt;
&lt;br /&gt;
Automation of deployment delivers applications faster and with fewer errors. The defined software deployment process can be applied across all environments consistently every time. With various automated application deployment platforms now readily available, manual deployments have become a thing of the past.&lt;br /&gt;
&lt;br /&gt;
Lets take a look at the various Deployment Automation tools available to Ruby on Rails applications. For the purposes of this article the process of manual deployment of a Ruby on Rails application is out of scope.&lt;br /&gt;
&lt;br /&gt;
= Tests =&lt;br /&gt;
&lt;br /&gt;
Some of the automated tools that are widely used for the process of deployment with Ruby on Rails are &lt;br /&gt;
&lt;br /&gt;
* Capistrano&lt;br /&gt;
* Heroku&lt;br /&gt;
* Vlad&lt;br /&gt;
* AppFog&lt;br /&gt;
* AWS Elastic Beanstalk&lt;br /&gt;
* OpenShift&lt;br /&gt;
* Cloud 66&lt;br /&gt;
&lt;br /&gt;
= yml files =&lt;br /&gt;
&lt;br /&gt;
[[File:Capistrano.jpg|frame|right|&amp;lt;ref&amp;gt;http://www.capistranorb.com/&amp;lt;/ref&amp;gt;|Capistrano Logo]]&lt;br /&gt;
&lt;br /&gt;
Capistrano is a Ruby tool which helps deploy an application to the server. Capistrano allows deploying to multiple machines at a time. It has many advanced options which help to deploy different kinds of applications. It also supports the scripting and execution of tasks.&lt;br /&gt;
&lt;br /&gt;
Capistrano can be used to:&lt;br /&gt;
&lt;br /&gt;
* Deploy applications onto many machines simultaneously.&lt;br /&gt;
* Automate the audits&lt;br /&gt;
* Automate the common tasks of a team.&lt;br /&gt;
&lt;br /&gt;
Capistrano can be made a part of a larger software by integrating it with another Ruby software.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ref&amp;gt;http://www.capistranorb.com/documentation/getting-started/installation/&amp;lt;/ref&amp;gt;  &lt;br /&gt;
'''General Usage'''&lt;br /&gt;
&lt;br /&gt;
The following commands will clone Capistrano, build the gem and install it locally.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem install capistrano --pre --trust-policy HighSecurity&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Or grab the bleeding edge head from:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ git clone -b v3 https://github.com/capistrano/capistrano.git&lt;br /&gt;
$ cd capistrano&lt;br /&gt;
$ gem build *.gemspec&lt;br /&gt;
$ gem install *.gem&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
'''Signed Rubygems'''&lt;br /&gt;
&lt;br /&gt;
As Capistrano is a signed gem, you should always be careful to use the --trust-policy flag when installing Gems, or since Bundler 1.3 you should use the same flag:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem install capistrano --pre --trust-policy HighSecurity&lt;br /&gt;
$ bundle install --trust-policy HighSecurity&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If you get a message that looks like:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ERROR:  While executing gem ... (Gem::Security::Exception)&lt;br /&gt;
unsigned gems are not allowed by the High Security policy&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then please complain to your Gem author, and have them start signing their Gems.&lt;br /&gt;
&lt;br /&gt;
'''Usage in a Rails project'''&lt;br /&gt;
&lt;br /&gt;
Add the following lines to the Gemfile to the :development group ideally.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
group :development do&lt;br /&gt;
  gem 'capistrano-rails', '~&amp;gt; 0.0.7'&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= routes.rb =&lt;br /&gt;
&lt;br /&gt;
[[File:Heroku.jpg|frame|right|&amp;lt;ref&amp;gt;https://www.heroku.com/&amp;lt;/ref&amp;gt;|Heroku Logo]]&lt;br /&gt;
&lt;br /&gt;
Heroku is a cloud [http://en.wikipedia.org/wiki/Platform_as_a_service Platform as a Service] (PaaS) which supports several programming languages. PaaS is a service model of Cloud computing wherein the provider offers resources like servers, software, database, etc. to the developer. Heroku helps manage environment-specific configurations separately from the source code, which provides greater security.&lt;br /&gt;
Heroku is not just a deployment environment but it also impacts the development process. There are several principles of the development of application on Heroku.&amp;lt;br&amp;gt;&lt;br /&gt;
•	Applications and Codebases : Most of the development of the application is done on application’s codebase which is stored in a [http://en.wikipedia.org/wiki/Version_control_system Version Control System (VCS)] &amp;lt;br&amp;gt;&lt;br /&gt;
•	Dependencies : All the application dependencies such as plugins should be declared explicitly&amp;lt;br&amp;gt;&lt;br /&gt;
•	Configuration : Configuration of an application is all that varies in different deploys&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Getting Started with Heroku'''&lt;br /&gt;
&lt;br /&gt;
1. To get started with Heroku, go to https://id.heroku.com/signup/devcenter, signup for a Heroku account. &lt;br /&gt;
&lt;br /&gt;
2. Then, download and install the Heroku toolbelt at https://toolbelt.heroku.com/ for your development system. You can also use Heroku command line instead of the online Heroku application. &lt;br /&gt;
&lt;br /&gt;
3. After installing one of them, login using the email address and password used when creating the Heroku account:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ref&amp;gt;https://github.com/heroku/heroku&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ heroku login&lt;br /&gt;
Enter your Heroku credentials.&lt;br /&gt;
Email: adam@example.com&lt;br /&gt;
Password:&lt;br /&gt;
Could not find an existing public key.&lt;br /&gt;
Would you like to generate one? [Yn]&lt;br /&gt;
Generating new SSH public key.&lt;br /&gt;
Uploading SSH public key /Users/adam/.ssh/id_rsa.pub&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Deploying Applications'''&lt;br /&gt;
&lt;br /&gt;
Heroku uses [http://en.wikipedia.org/wiki/Git_(software) git] primarily to deploy the applications. When an application is created on Heroku, it associates the new git which is remote with the local git repository.&lt;br /&gt;
&lt;br /&gt;
As a result, deploying code is just the familiar git push, but to the heroku remote instead:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ref&amp;gt;https://devcenter.heroku.com/articles/how-heroku-works#deploying-applications&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ git push heroku master&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Vlad ==&lt;br /&gt;
&lt;br /&gt;
[[File:Vlad.png|frame|right|&amp;lt;ref&amp;gt;http://rubyhitsquad.com/Vlad_the_Deployer.html&amp;lt;/ref&amp;gt;|Vlad Logo]]&lt;br /&gt;
&lt;br /&gt;
Vlad is another automated deployment tool which is simple to use. It integrates with rake and uses standard tools like SSH, rsync etc.&lt;br /&gt;
&lt;br /&gt;
The main features of Vlad include&lt;br /&gt;
* It uses very few dependencies which are simple.&lt;br /&gt;
* It can execute commands on more than one server.&lt;br /&gt;
* It syncs files to one or more servers.&lt;br /&gt;
* It matches local and remote tasks.&lt;br /&gt;
* It runs tests very fast.&lt;br /&gt;
&lt;br /&gt;
'''Getting started with Vlad'''&amp;lt;ref&amp;gt;http://docs.seattlerb.org/vlad/doco/getting_started_txt.html&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create a deploy file, usually in “config/deploy.rb”:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set :application, &amp;quot;project&amp;quot;&lt;br /&gt;
set :domain, &amp;quot;example.com&amp;quot;&lt;br /&gt;
set :deploy_to, &amp;quot;/path/to/install&amp;quot;&lt;br /&gt;
set :repository, 'http://svn.example.com/project/branches/stable/'&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This defaults to using ‘svn export’ from repository, and a single server for app, db, and www.&lt;br /&gt;
&lt;br /&gt;
If you want a multi-config environment, change your config like so:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set :application, &amp;quot;project&amp;quot;&lt;br /&gt;
set :repository, 'http://svn.example.com/project/branches/stable/'&lt;br /&gt;
&lt;br /&gt;
task :beta do&lt;br /&gt;
  set :domain,    &amp;quot;beta.example.com&amp;quot;&lt;br /&gt;
  set :deploy_to, &amp;quot;/path/to/install-beta&amp;quot;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
task :dev do&lt;br /&gt;
  set :domain,    &amp;quot;dev.example.com&amp;quot;&lt;br /&gt;
  set :deploy_to, &amp;quot;/path/to/install-dev&amp;quot;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
task :prod do&lt;br /&gt;
  set :domain,    &amp;quot;example.com&amp;quot;&lt;br /&gt;
  set :deploy_to, &amp;quot;/path/to/install&amp;quot;&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Add the following to your Rakefile:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
begin&lt;br /&gt;
  require 'vlad'&lt;br /&gt;
  Vlad.load&lt;br /&gt;
rescue LoadError&lt;br /&gt;
  # do nothing&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Vlad.load has a lot of flexibility.&lt;br /&gt;
&lt;br /&gt;
You can install vlad via:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;% rake vlad:invoke COMMAND='sudo gem install vlad -y'&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Initial Launch&lt;br /&gt;
&amp;lt;pre&amp;gt;Run rake vlad:setup vlad:update vlad:migrate vlad:start&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ref&amp;gt;http://docs.seattlerb.org/vlad/index.html&amp;lt;/ref&amp;gt;&lt;br /&gt;
'''Running Vlad'''&lt;br /&gt;
&lt;br /&gt;
* Using rake&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
task :shazam! do&lt;br /&gt;
  Rake::Task[:action1].invoke&lt;br /&gt;
  Rake::Task[:action2].invoke&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Using SSH&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Host example.com&lt;br /&gt;
    User fluffy_bunny&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== AppFog == &lt;br /&gt;
&lt;br /&gt;
[[File:AppFog.jpg|frame|right|&amp;lt;ref&amp;gt;https://www.appfog.com/&amp;lt;/ref&amp;gt;|AppFog Logo]]&lt;br /&gt;
&lt;br /&gt;
AppFog is a PaaS built on Cloud Foundry which is another PaaS platform for deploying applications. &lt;br /&gt;
&lt;br /&gt;
Features of AppFog are&lt;br /&gt;
* It launches and runs fast.&lt;br /&gt;
* It does not require configuring servers or installing frameworks.&lt;br /&gt;
* It is compatible with code management systems like git, svn etc.&lt;br /&gt;
&lt;br /&gt;
'''Installing AppFog'''&amp;lt;ref&amp;gt;http://blog.appfog.com/getting-started-with-appfogs-command-line/&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
‘af‘ command line tool is written in Ruby for installation.&lt;br /&gt;
&lt;br /&gt;
Download and install [http://rubyinstaller.org/ Ruby Installer] for Windows. The installer already includes RubyGems.&lt;br /&gt;
&lt;br /&gt;
Be sure you use the Ruby-enabled command prompt window when you later install and use af. You access this command prompt from the Windows Start menu (All Programs &amp;gt; Ruby &amp;gt; Start Command Prompt with Ruby).&lt;br /&gt;
&lt;br /&gt;
Finally, update RubyGems from the Ruby Command Prompt:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem update --system&lt;br /&gt;
$ gem install af&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Login with:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ af login&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Finally from within your source code directory:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ af update hello-node&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Getting Started with AppFog'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
target [url]                                       Reports current target or sets a new target&lt;br /&gt;
login [email] [--email, --password]                Login&lt;br /&gt;
info                                               System and account information&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== AWS Elastic Beanstalk==&lt;br /&gt;
&lt;br /&gt;
[[File:AWSLogo.jpg|frame|right|&amp;lt;ref&amp;gt;https://aws.amazon.com&amp;lt;/ref&amp;gt;|AWS Logo]]&lt;br /&gt;
&lt;br /&gt;
Amazon Wen Services(AWS) offers [http://en.wikipedia.org/wiki/Infrastructure_as_a_service#Infrastructure_as_a_service_.28IaaS.29 Infrastructure as a Service] (IaaS) and provides a complete set of resources for the development of a web application in minutes. AWS Elastic Beanstalk is a deployment tool of the AWS cloud.&lt;br /&gt;
&lt;br /&gt;
With AWS Elastic Beanstalk, applications can be quickly deployed and managed in the AWS cloud without worrying about the infrastructure that runs those applications. AWS Elastic Beanstalk reduces management complexity without restricting choice or control. Once the application is uploaded AWS Elastic Beanstalk automatically handles the details of capacity provisioning, load balancing, scaling, and application health monitoring. AWS Elastic Beanstalk uses highly reliable and scalable services.&lt;br /&gt;
&lt;br /&gt;
'''AWS CLI'''&lt;br /&gt;
&lt;br /&gt;
AWS Elastic Beanstalk uses a command line tool Eb, which helps you to deploy your application easily.&lt;br /&gt;
&lt;br /&gt;
'''Getting Started with Eb'''&amp;lt;ref&amp;gt;http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/command-reference-get-started.html&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To get started with the beanstalk CLI, you will need to download the command line tools at the [http://aws.amazon.com/code/6752709412171743 AWS Sample Code &amp;amp; Libraries] website.&lt;br /&gt;
&lt;br /&gt;
Step 1: Initialize Your Git Repository&lt;br /&gt;
&lt;br /&gt;
Eb is a command line interface that enables you to deploy applications quickly and more easily using Git. Eb is available as part of the Elastic Beanstalk command line tools package. &lt;br /&gt;
&lt;br /&gt;
1. To install eb,install the following software onto your local computer:&lt;br /&gt;
&lt;br /&gt;
* Git 1.6.6 or later. To download Git, go to http://git-scm.com/.&lt;br /&gt;
* PowerShell 2.0.&lt;br /&gt;
&lt;br /&gt;
2. Initialize your Git repository.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git init &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Step 2: Configuring AWS Elastic Beanstalk&lt;br /&gt;
&lt;br /&gt;
1. From your directory where you created your local repository, type the following command.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
eb init&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2. When you are prompted for the access key ID, type your access key ID. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Enter your AWS Access Key ID (current value is &amp;quot;AKIAIOSFODNN7EXAMPLE&amp;quot;): &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3. When you are prompted for the secret access key, type your secret access key.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Enter your AWS Secret Access Key (current value is &amp;quot;wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY&amp;quot;): &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
4. When you are prompted for the AWS Elastic Beanstalk application name, type the name of the application. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Enter an AWS Elastic Beanstalk application name (auto-generated value is &amp;quot;windows&amp;quot;): &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Note:&lt;br /&gt;
If you have a space in your application name, make sure you do not use quotes.&lt;br /&gt;
&lt;br /&gt;
5. When you are prompted for the AWS Elastic Beanstalk environment name, type the name of the environment. AWS Elastic Beanstalk automatically creates an environment name based on your application name. If you want to accept the default, press Enter.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Enter an AWS Elastic Beanstalk environment name (current value is &amp;quot;HelloWorld-env&amp;quot;): &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
6. When you are prompted to create an Amazon RDS DB instance, type y or n. For this example, we'll type y.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Create an RDS DB Instance? [y/n]:&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
7. When you are prompted to enter your RDS user master password, type your password containing from 8 to 16 printable ASCII characters (excluding /, \, and @).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Enter an RDS DB master password: &lt;br /&gt;
Retype password to confirm: &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can now get started with the AWS Elastic Beanstalk.&lt;br /&gt;
&lt;br /&gt;
== OpenShift ==&lt;br /&gt;
&lt;br /&gt;
[[File:OpenShift.png|frame|right|&amp;lt;ref&amp;gt;https://en.wikipedia.org&amp;lt;/ref&amp;gt;|OpenShift Logo]]&lt;br /&gt;
&lt;br /&gt;
Another free and open source PaaS for deploying applications is OpenShift created by [[http://en.wikipedia.org/wiki/RedHat RedHat]]. &lt;br /&gt;
&lt;br /&gt;
'''Considerations'''&lt;br /&gt;
* Databases&lt;br /&gt;
&lt;br /&gt;
To use the application outside the OpenShift environment one needs to change the variables as the application is configured to use database in production mode in OpenShift.&lt;br /&gt;
&lt;br /&gt;
* Assets&lt;br /&gt;
&lt;br /&gt;
The assets are precompiled everytime application is pushed to OpenShift.&lt;br /&gt;
&lt;br /&gt;
* Security&lt;br /&gt;
&lt;br /&gt;
Security related variables are to be unique across the application.&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;ref&amp;gt;https://github.com/openshift/rails-example&amp;lt;/ref&amp;gt;&lt;br /&gt;
'''Installation'''&lt;br /&gt;
&lt;br /&gt;
1.	Create an account at http://openshift.redhat.com/&lt;br /&gt;
&lt;br /&gt;
2.	Create a rails application&lt;br /&gt;
	&amp;lt;pre&amp;gt;rhc app create -a railsapp -t ruby-1.9&amp;lt;/pre&amp;gt;&lt;br /&gt;
3.	Add mysql support to your application&lt;br /&gt;
	&amp;lt;pre&amp;gt;rhc cartridge add -a railsapp -c mysql-5.1&amp;lt;/pre&amp;gt;&lt;br /&gt;
4.	Add this upstream Rails quickstart repository&lt;br /&gt;
&amp;lt;pre&amp;gt;cd railsapp&lt;br /&gt;
git remote add upstream -m master git://github.com/openshift/rails-example.git&lt;br /&gt;
git pull -s recursive -X theirs upstream master&amp;lt;/pre&amp;gt;&lt;br /&gt;
5.	Push your new code&lt;br /&gt;
&amp;lt;pre&amp;gt;git push&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Future scope ==&lt;br /&gt;
&lt;br /&gt;
[[File:Cloud 66.jpg|frame|right|&amp;lt;ref&amp;gt;https://www.cloud66.com/&amp;lt;/ref&amp;gt;|Cloud66 Logo]]&lt;br /&gt;
&lt;br /&gt;
Cloud 66 combines the convenience of Platform-as-a-Service (PaaS) and the flexibility and control of Infrastructure-as-a-Service (IaaS). This platform allows easy deployment of application, so there is no overhead of configuring or monitoring the servers.&lt;br /&gt;
&lt;br /&gt;
'''Cloud 66 Command line Toolbelt'''&lt;br /&gt;
&lt;br /&gt;
Toolbelt is an open source released to deploy the application.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ref&amp;gt;http://blog.cloud66.com/&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Getting Started with Cloud 66'''&lt;br /&gt;
&lt;br /&gt;
1. Go to the [https://www.cloud66.com/users/sign_up sign up] page and create a Cloud 66 account.&lt;br /&gt;
&lt;br /&gt;
2. Go to Cloud 66 Dashboard and [https://www.cloud66.com/help/first_stack build your first stack].&lt;br /&gt;
&lt;br /&gt;
'''Installation'''&lt;br /&gt;
&lt;br /&gt;
Installation of toolbelt uses the following command&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Gem install c66&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This automatically searches the newest version and installs it.&lt;br /&gt;
&lt;br /&gt;
= Model Class : assignment_participant.rb =&lt;br /&gt;
Several methods in AssignmentParticipant model class required renaming and refactoring to ensure that the change is reflected in the entire project. The names were changed to follow method naming conventions in Ruby. Deprecated code was removed and re-coded to ensure that the code worked in future version of Rails as well. Duplicate codes were commented out. Methods that are more general in the sub classes were moved to the parent class. Some methods that calculate the collusion in reviews between students were moved to a newly created model class called CollusionCycle in file collusion_cycle.rb .&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;width:3%;&amp;quot;|S. No&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;|Method Name&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;|Change Made &lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;|Reason For Change&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
|''''' 1 '''''&lt;br /&gt;
|get_course_string&lt;br /&gt;
|Renamed to course_string and refactored &lt;br /&gt;
|To follow method naming convention&lt;br /&gt;
|-&lt;br /&gt;
|''''' 2 '''''&lt;br /&gt;
|get_cycle_deviation_score&lt;br /&gt;
|Moved to collusion_cycle.rb model class&lt;br /&gt;
|Related methods that calculate collusion in reviews have been moved to the newly created collusion_cycle.rb model class&lt;br /&gt;
|-&lt;br /&gt;
|''''' 3 '''''&lt;br /&gt;
|get_cycle_similarity_score&lt;br /&gt;
|Moved to collusion_cycle.rb model class&lt;br /&gt;
|Related methods that calculate collusion in reviews have been moved to the newly created collusion_cycle.rb model class&lt;br /&gt;
|-&lt;br /&gt;
|''''' 4 '''''&lt;br /&gt;
|get_feedback&lt;br /&gt;
|Renamed to feedback and refactored&lt;br /&gt;
|To follow method naming convention&lt;br /&gt;
|-&lt;br /&gt;
|''''' 5 '''''&lt;br /&gt;
|get_files&lt;br /&gt;
|Renamed to files_in_directory  and refactored&lt;br /&gt;
|To follow method naming convention&lt;br /&gt;
|-&lt;br /&gt;
|''''' 6 '''''&lt;br /&gt;
|get_four_node_cycles&lt;br /&gt;
|Moved to collusion_cycle.rb model class&lt;br /&gt;
|Related methods that calculate collusion in reviews have been moved to the newly created collusion_cycle.rb model class&lt;br /&gt;
|-&lt;br /&gt;
|''''' 7 '''''&lt;br /&gt;
|fullname&lt;br /&gt;
|Moved to parent model class – participant.rb &lt;br /&gt;
|General methods of the subclass are moved to Parent class&lt;br /&gt;
|-&lt;br /&gt;
|''''' 8 '''''&lt;br /&gt;
|get_metareviews&lt;br /&gt;
|Renamed to metareviews and refactored&lt;br /&gt;
|To follow method naming convention&lt;br /&gt;
|-&lt;br /&gt;
|''''' 9 '''''&lt;br /&gt;
|name&lt;br /&gt;
|Commented the method  &lt;br /&gt;
|The method is already in parent model class – participant.rb and can be used in this subclass through inheritance&lt;br /&gt;
|-&lt;br /&gt;
|''''' 10 '''''&lt;br /&gt;
|name&lt;br /&gt;
|Commented the method  &lt;br /&gt;
|The method is already in parent model class – participant.rb and can be used in this subclass through inheritance. Also it is a duplicate method in patricipant.rb&lt;br /&gt;
|- &lt;br /&gt;
|''''' 11 '''''&lt;br /&gt;
|get_review_score&lt;br /&gt;
|Renamed to review_score and refactored. Deprecated code has been removed and replaced with correct code.&lt;br /&gt;
|To follow method naming convention and ensure the code works in future versions. &lt;br /&gt;
|-&lt;br /&gt;
|''''' 12 '''''&lt;br /&gt;
|get_reviewees&lt;br /&gt;
|Renamed to reviewees and refactored. Deprecated code has been removed and replaced with correct code.&lt;br /&gt;
|To follow method naming convention and ensure the code works in future versions. &lt;br /&gt;
|-&lt;br /&gt;
|''''' 13 '''''&lt;br /&gt;
|get_reviewers&lt;br /&gt;
|Renamed to reviewers and refactored . Deprecated code has been commented and replaced with correct code.&lt;br /&gt;
|To follow method naming convention and ensure the code works in future versions. &lt;br /&gt;
|-&lt;br /&gt;
|''''' 14 '''''&lt;br /&gt;
|get_reviews&lt;br /&gt;
|Renamed to reviews and refactored &lt;br /&gt;
|To follow method naming convention&lt;br /&gt;
|-&lt;br /&gt;
|''''' 15 '''''&lt;br /&gt;
|get_reviews_by_reviewer&lt;br /&gt;
|Renamed to reviews_by_reviewer and refactored &lt;br /&gt;
|To follow method naming convention&lt;br /&gt;
|-&lt;br /&gt;
|''''' 16 '''''&lt;br /&gt;
|get_reviews_by_reviewer&lt;br /&gt;
|Commented the method &lt;br /&gt;
|To remove duplicated method in this class&lt;br /&gt;
|-&lt;br /&gt;
|''''' 17 '''''&lt;br /&gt;
|get_scores&lt;br /&gt;
|Renamed to scores and refactored &lt;br /&gt;
|To follow method naming convention&lt;br /&gt;
|-&lt;br /&gt;
|''''' 18 '''''&lt;br /&gt;
|get_submitted_files&lt;br /&gt;
|Renamed to submitted_files and refactored &lt;br /&gt;
|To follow method naming convention&lt;br /&gt;
|-&lt;br /&gt;
|''''' 19 '''''&lt;br /&gt;
|get_teammate_reviews&lt;br /&gt;
|Renamed to teammate_reviews and refactored &lt;br /&gt;
|To follow method naming convention&lt;br /&gt;
|-&lt;br /&gt;
|''''' 20 '''''&lt;br /&gt;
|get_three_node_cycles&lt;br /&gt;
|Moved to collusion_cycle.rb model class&lt;br /&gt;
|Related methods that calculate collusion in reviews have been moved to the newly created collusion_cycle.rb model class&lt;br /&gt;
|-&lt;br /&gt;
|''''' 21 '''''&lt;br /&gt;
|get_topic_string&lt;br /&gt;
|Method has been Commented&lt;br /&gt;
|It is already present in model super class – participant.rb&lt;br /&gt;
|-&lt;br /&gt;
|''''' 22 '''''&lt;br /&gt;
|get_two_node_cycles&lt;br /&gt;
|Moved to collusion_cycle.rb model class&lt;br /&gt;
|Related methods that calculate collusion in reviews have been moved to the newly created collusion_cycle.rb model class&lt;br /&gt;
|-&lt;br /&gt;
|''''' 23 '''''&lt;br /&gt;
|get_wiki_submissions&lt;br /&gt;
|Renamed to wiki_submissions and refactored&lt;br /&gt;
|To follow method naming convention&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
After changes were made, the existing tests ran successfully.&lt;br /&gt;
&lt;br /&gt;
= Changes in routes.rb =&lt;br /&gt;
&lt;br /&gt;
The following routes were added to make the code run error free. &lt;br /&gt;
&lt;br /&gt;
Routes for submit_hyperlink and remove_hyperlink were added below&lt;br /&gt;
&lt;br /&gt;
 resources :submitted_content do&lt;br /&gt;
    collection do&lt;br /&gt;
      get :view&lt;br /&gt;
      get :edit&lt;br /&gt;
     ''' post :submit_hyperlink'''&lt;br /&gt;
     ''' get :remove_hyperlink'''&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
Routes for get and post method for export were added here&lt;br /&gt;
&lt;br /&gt;
 resources :export_file do&lt;br /&gt;
    collection do&lt;br /&gt;
      get :start&lt;br /&gt;
      '''get :export'''&lt;br /&gt;
      '''post :export'''&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
Routes for cancel, accept and decline were added here &lt;br /&gt;
&lt;br /&gt;
  resources :invitation do&lt;br /&gt;
    collection do&lt;br /&gt;
      '''get :cancel'''&lt;br /&gt;
      '''get :accept'''&lt;br /&gt;
      '''get :decline'''&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Conclusion =&lt;br /&gt;
&lt;br /&gt;
Comparison and contrast between various deployment automated tools such as Capistrano, Heroku, Vlad, AppFog, OpenShift, Cloud66, AWS Beanstalk shows that each has its own pros and cons. &lt;br /&gt;
For instance, in a client based application where handing over the control of the application to a third party such as the deployment tool provider is impossible, AWS Beanstalk would be the obvious choice for the developer.&lt;br /&gt;
On the other hand, a novice Rails application developer might find all he needs in the starter plan of Heroku with the added bonus of a huge support community available to him for troubleshooting as he stumbles his way across the development of the application.&lt;br /&gt;
One may also choose the tool that provides the specific database support for your application. In case of large scale corporations where budgets are not that limited, the increasing costs with up-scaling of some tools would not be an obstacle.&lt;br /&gt;
Thus, various considerations about the application such as scalability requirement, security concerns, cost, availability of own resources such as servers etc., will help determine which tool is the most suitable for that application.&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= See Also =&lt;br /&gt;
&lt;br /&gt;
* OSS - E808 project VCL link http://152.7.99.84:3000/ (may be disabled after a month)&lt;br /&gt;
* OSS - E808 project on GitHub https://github.com/npari/expertiza_oss808&lt;br /&gt;
* Expertiza project documentation can be found at http://wikis.lib.ncsu.edu/index.php/Expertiza&lt;br /&gt;
* The working Expertiza site is accessible at link http://expertiza.ncsu.edu/&lt;/div&gt;</summary>
		<author><name>Npari</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch2_0e808_nsv&amp;diff=81380</id>
		<title>CSC/ECE 517 Fall 2013/ch2 0e808 nsv</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch2_0e808_nsv&amp;diff=81380"/>
		<updated>2013-10-30T21:36:26Z</updated>

		<summary type="html">&lt;p&gt;Npari: /* Changes in routes.rb */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= E808: Refactor and test Participant, AssignmentParticipant, &amp;amp; CourseParticipant =&lt;br /&gt;
The requirements provided for the Open Source System project were as follows : &amp;lt;br&amp;gt;&lt;br /&gt;
'''Classes''': &amp;lt;br&amp;gt;&lt;br /&gt;
''participant.rb'' (197 lines)&amp;lt;br&amp;gt;&lt;br /&gt;
''assignment_participant.rb'' (476 lines)&amp;lt;br&amp;gt;&lt;br /&gt;
''course_participant.rb'' (90 lines)&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''What they do''': &amp;lt;br&amp;gt; &lt;br /&gt;
These classes keep track of a user who is participating in an assignment or a course.  participant.rb is the superclass, and the other two are the subclasses.&lt;br /&gt;
&lt;br /&gt;
'''What is needed''': &amp;lt;br&amp;gt; &lt;br /&gt;
The methods are complex; there are a lot of them (assignment_particpant has 44) and there is a lot of duplicated code.  assignment_participant contains code for detecting cycles of high grades (which can indicate collusion in reviews).  It would be better moved to another class.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
= Introduction =&lt;br /&gt;
&lt;br /&gt;
A cursory analysis of the code of the three model classes showed the existence of code duplication. In a lot of the cases the [http://en.wikipedia.org/wiki/Don%27t_Repeat_Yourself Don't Repeat Yourself] (DRY) principle was violated.&lt;br /&gt;
&lt;br /&gt;
In keeping with the [http://en.wikipedia.org/wiki/Agile_software_development Agile] methodology, which involves having regular discussions with all stakeholders, the design check for the project was performed with a meeting with the Instructor.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{viewxls:name=sample.xlsx|sheet=Summary|row=13|col=3}&lt;br /&gt;
&lt;br /&gt;
Next the code was analyzed in detail and the following plausible improvements were predicted.[[File:[[Media:Example.jpg]]]]&lt;br /&gt;
&lt;br /&gt;
After the final release of the code in development and testing stage, the master plan is prepared for deployment of components and sites based on the sign-offs provided by the project teams, stakeholders and customers. Then, the stabilization of the deployment is calculated based on some metrics. Once the deployment is stabilized, it is reviewed and the process of deployment is complete. The final sign-off is given by the stakeholders.&lt;br /&gt;
&lt;br /&gt;
=Participant model: participant.rb=&lt;br /&gt;
&lt;br /&gt;
Code deployment is a procedure where the application is transferred onto a production server, so that it is made available for all the other users. It is the part of release management process which involves several activities. These activities are inter-dependent and need to be completed in a specific order for successful code deployment. &lt;br /&gt;
&lt;br /&gt;
'''Code Deployment Activities'''&lt;br /&gt;
&lt;br /&gt;
The various deployment activities include &amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/Software_deployment&amp;lt;/ref&amp;gt;&lt;br /&gt;
* Release : Gathering all system components in preparation for deployment&lt;br /&gt;
* Install and activate : Installing the application components and getting them in the 'ready' state&lt;br /&gt;
* Deactivate : Shutting down components that are out-dated or that may interfere with updating others&lt;br /&gt;
* Adapt : Making changes to application to accommodate changes in environment&lt;br /&gt;
* Update : Having a newer release installed in place of the old one&lt;br /&gt;
* Built-in : There are components built-into some tools for complete/semi-automating updates&lt;br /&gt;
* Version tracking : These systems help the user to know if newer versions of a software are available and if yes, help install them&lt;br /&gt;
* Uninstall : Opposite of installation and involves complete removal of software and its dependencies from the environment&lt;br /&gt;
* Retire : This involves making a software obsolete and is the end of software life cycle&lt;br /&gt;
&lt;br /&gt;
The general guidelines for the deployment process remain the same but there are variations in the specific requirements with each software system.&lt;br /&gt;
&lt;br /&gt;
=AssignmentParticipant model: assignment_participant.rb=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ref&amp;gt;http://searchitchannel.techtarget.com/definition/release-management&amp;lt;/ref&amp;gt;&lt;br /&gt;
Release management is a software process which takes care of the development, testing, deployment and support stages of software releases. The start of release management happens in the development phase, where it requests for new features or changes in the existing application. When the request is accepted, a new release is planned and designed. This design is built and then enters the testing phase, where the release is tested until it is accepted. After the release is accepted as a candidate, it enters the deployment phase where it is implemented. Once deployed, the release is made available and sent to support phase for collection of bug reports. Once the support phase is done, the bugs and other issues lead to requests for changes and the cycle is then repeated.&lt;br /&gt;
&lt;br /&gt;
=CourseParticipant model:course_participant.rb =&lt;br /&gt;
&amp;lt;ref&amp;gt;http://www.urbancode.com/html/solutions/deployment-automation.html&amp;lt;/ref&amp;gt;&lt;br /&gt;
Automation of a process is required when the manual process is more error prone. Also, for large real world applications, the manual process is very complex and time consuming. Incomplete documentation hampers a manual process further. Deployment also has to be done in many environments and involves varied steps to be followed in a specific order. Manual process needs repetition of same procedure to each and every environment which leads to many errors and the process becomes costly.&lt;br /&gt;
In web applications each new release has to be deployed to and tested in development, testing and production environments.The number of software releases in web applications  are more and hence the need to automate release management is also greater.&lt;br /&gt;
&lt;br /&gt;
Automation of deployment delivers applications faster and with fewer errors. The defined software deployment process can be applied across all environments consistently every time. With various automated application deployment platforms now readily available, manual deployments have become a thing of the past.&lt;br /&gt;
&lt;br /&gt;
Lets take a look at the various Deployment Automation tools available to Ruby on Rails applications. For the purposes of this article the process of manual deployment of a Ruby on Rails application is out of scope.&lt;br /&gt;
&lt;br /&gt;
= Tests =&lt;br /&gt;
&lt;br /&gt;
Some of the automated tools that are widely used for the process of deployment with Ruby on Rails are &lt;br /&gt;
&lt;br /&gt;
* Capistrano&lt;br /&gt;
* Heroku&lt;br /&gt;
* Vlad&lt;br /&gt;
* AppFog&lt;br /&gt;
* AWS Elastic Beanstalk&lt;br /&gt;
* OpenShift&lt;br /&gt;
* Cloud 66&lt;br /&gt;
&lt;br /&gt;
= yml files =&lt;br /&gt;
&lt;br /&gt;
[[File:Capistrano.jpg|frame|right|&amp;lt;ref&amp;gt;http://www.capistranorb.com/&amp;lt;/ref&amp;gt;|Capistrano Logo]]&lt;br /&gt;
&lt;br /&gt;
Capistrano is a Ruby tool which helps deploy an application to the server. Capistrano allows deploying to multiple machines at a time. It has many advanced options which help to deploy different kinds of applications. It also supports the scripting and execution of tasks.&lt;br /&gt;
&lt;br /&gt;
Capistrano can be used to:&lt;br /&gt;
&lt;br /&gt;
* Deploy applications onto many machines simultaneously.&lt;br /&gt;
* Automate the audits&lt;br /&gt;
* Automate the common tasks of a team.&lt;br /&gt;
&lt;br /&gt;
Capistrano can be made a part of a larger software by integrating it with another Ruby software.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ref&amp;gt;http://www.capistranorb.com/documentation/getting-started/installation/&amp;lt;/ref&amp;gt;  &lt;br /&gt;
'''General Usage'''&lt;br /&gt;
&lt;br /&gt;
The following commands will clone Capistrano, build the gem and install it locally.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem install capistrano --pre --trust-policy HighSecurity&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Or grab the bleeding edge head from:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ git clone -b v3 https://github.com/capistrano/capistrano.git&lt;br /&gt;
$ cd capistrano&lt;br /&gt;
$ gem build *.gemspec&lt;br /&gt;
$ gem install *.gem&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
'''Signed Rubygems'''&lt;br /&gt;
&lt;br /&gt;
As Capistrano is a signed gem, you should always be careful to use the --trust-policy flag when installing Gems, or since Bundler 1.3 you should use the same flag:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem install capistrano --pre --trust-policy HighSecurity&lt;br /&gt;
$ bundle install --trust-policy HighSecurity&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If you get a message that looks like:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ERROR:  While executing gem ... (Gem::Security::Exception)&lt;br /&gt;
unsigned gems are not allowed by the High Security policy&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then please complain to your Gem author, and have them start signing their Gems.&lt;br /&gt;
&lt;br /&gt;
'''Usage in a Rails project'''&lt;br /&gt;
&lt;br /&gt;
Add the following lines to the Gemfile to the :development group ideally.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
group :development do&lt;br /&gt;
  gem 'capistrano-rails', '~&amp;gt; 0.0.7'&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= routes.rb =&lt;br /&gt;
&lt;br /&gt;
[[File:Heroku.jpg|frame|right|&amp;lt;ref&amp;gt;https://www.heroku.com/&amp;lt;/ref&amp;gt;|Heroku Logo]]&lt;br /&gt;
&lt;br /&gt;
Heroku is a cloud [http://en.wikipedia.org/wiki/Platform_as_a_service Platform as a Service] (PaaS) which supports several programming languages. PaaS is a service model of Cloud computing wherein the provider offers resources like servers, software, database, etc. to the developer. Heroku helps manage environment-specific configurations separately from the source code, which provides greater security.&lt;br /&gt;
Heroku is not just a deployment environment but it also impacts the development process. There are several principles of the development of application on Heroku.&amp;lt;br&amp;gt;&lt;br /&gt;
•	Applications and Codebases : Most of the development of the application is done on application’s codebase which is stored in a [http://en.wikipedia.org/wiki/Version_control_system Version Control System (VCS)] &amp;lt;br&amp;gt;&lt;br /&gt;
•	Dependencies : All the application dependencies such as plugins should be declared explicitly&amp;lt;br&amp;gt;&lt;br /&gt;
•	Configuration : Configuration of an application is all that varies in different deploys&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Getting Started with Heroku'''&lt;br /&gt;
&lt;br /&gt;
1. To get started with Heroku, go to https://id.heroku.com/signup/devcenter, signup for a Heroku account. &lt;br /&gt;
&lt;br /&gt;
2. Then, download and install the Heroku toolbelt at https://toolbelt.heroku.com/ for your development system. You can also use Heroku command line instead of the online Heroku application. &lt;br /&gt;
&lt;br /&gt;
3. After installing one of them, login using the email address and password used when creating the Heroku account:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ref&amp;gt;https://github.com/heroku/heroku&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ heroku login&lt;br /&gt;
Enter your Heroku credentials.&lt;br /&gt;
Email: adam@example.com&lt;br /&gt;
Password:&lt;br /&gt;
Could not find an existing public key.&lt;br /&gt;
Would you like to generate one? [Yn]&lt;br /&gt;
Generating new SSH public key.&lt;br /&gt;
Uploading SSH public key /Users/adam/.ssh/id_rsa.pub&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Deploying Applications'''&lt;br /&gt;
&lt;br /&gt;
Heroku uses [http://en.wikipedia.org/wiki/Git_(software) git] primarily to deploy the applications. When an application is created on Heroku, it associates the new git which is remote with the local git repository.&lt;br /&gt;
&lt;br /&gt;
As a result, deploying code is just the familiar git push, but to the heroku remote instead:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ref&amp;gt;https://devcenter.heroku.com/articles/how-heroku-works#deploying-applications&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ git push heroku master&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Vlad ==&lt;br /&gt;
&lt;br /&gt;
[[File:Vlad.png|frame|right|&amp;lt;ref&amp;gt;http://rubyhitsquad.com/Vlad_the_Deployer.html&amp;lt;/ref&amp;gt;|Vlad Logo]]&lt;br /&gt;
&lt;br /&gt;
Vlad is another automated deployment tool which is simple to use. It integrates with rake and uses standard tools like SSH, rsync etc.&lt;br /&gt;
&lt;br /&gt;
The main features of Vlad include&lt;br /&gt;
* It uses very few dependencies which are simple.&lt;br /&gt;
* It can execute commands on more than one server.&lt;br /&gt;
* It syncs files to one or more servers.&lt;br /&gt;
* It matches local and remote tasks.&lt;br /&gt;
* It runs tests very fast.&lt;br /&gt;
&lt;br /&gt;
'''Getting started with Vlad'''&amp;lt;ref&amp;gt;http://docs.seattlerb.org/vlad/doco/getting_started_txt.html&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create a deploy file, usually in “config/deploy.rb”:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set :application, &amp;quot;project&amp;quot;&lt;br /&gt;
set :domain, &amp;quot;example.com&amp;quot;&lt;br /&gt;
set :deploy_to, &amp;quot;/path/to/install&amp;quot;&lt;br /&gt;
set :repository, 'http://svn.example.com/project/branches/stable/'&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This defaults to using ‘svn export’ from repository, and a single server for app, db, and www.&lt;br /&gt;
&lt;br /&gt;
If you want a multi-config environment, change your config like so:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set :application, &amp;quot;project&amp;quot;&lt;br /&gt;
set :repository, 'http://svn.example.com/project/branches/stable/'&lt;br /&gt;
&lt;br /&gt;
task :beta do&lt;br /&gt;
  set :domain,    &amp;quot;beta.example.com&amp;quot;&lt;br /&gt;
  set :deploy_to, &amp;quot;/path/to/install-beta&amp;quot;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
task :dev do&lt;br /&gt;
  set :domain,    &amp;quot;dev.example.com&amp;quot;&lt;br /&gt;
  set :deploy_to, &amp;quot;/path/to/install-dev&amp;quot;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
task :prod do&lt;br /&gt;
  set :domain,    &amp;quot;example.com&amp;quot;&lt;br /&gt;
  set :deploy_to, &amp;quot;/path/to/install&amp;quot;&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Add the following to your Rakefile:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
begin&lt;br /&gt;
  require 'vlad'&lt;br /&gt;
  Vlad.load&lt;br /&gt;
rescue LoadError&lt;br /&gt;
  # do nothing&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Vlad.load has a lot of flexibility.&lt;br /&gt;
&lt;br /&gt;
You can install vlad via:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;% rake vlad:invoke COMMAND='sudo gem install vlad -y'&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Initial Launch&lt;br /&gt;
&amp;lt;pre&amp;gt;Run rake vlad:setup vlad:update vlad:migrate vlad:start&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ref&amp;gt;http://docs.seattlerb.org/vlad/index.html&amp;lt;/ref&amp;gt;&lt;br /&gt;
'''Running Vlad'''&lt;br /&gt;
&lt;br /&gt;
* Using rake&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
task :shazam! do&lt;br /&gt;
  Rake::Task[:action1].invoke&lt;br /&gt;
  Rake::Task[:action2].invoke&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Using SSH&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Host example.com&lt;br /&gt;
    User fluffy_bunny&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== AppFog == &lt;br /&gt;
&lt;br /&gt;
[[File:AppFog.jpg|frame|right|&amp;lt;ref&amp;gt;https://www.appfog.com/&amp;lt;/ref&amp;gt;|AppFog Logo]]&lt;br /&gt;
&lt;br /&gt;
AppFog is a PaaS built on Cloud Foundry which is another PaaS platform for deploying applications. &lt;br /&gt;
&lt;br /&gt;
Features of AppFog are&lt;br /&gt;
* It launches and runs fast.&lt;br /&gt;
* It does not require configuring servers or installing frameworks.&lt;br /&gt;
* It is compatible with code management systems like git, svn etc.&lt;br /&gt;
&lt;br /&gt;
'''Installing AppFog'''&amp;lt;ref&amp;gt;http://blog.appfog.com/getting-started-with-appfogs-command-line/&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
‘af‘ command line tool is written in Ruby for installation.&lt;br /&gt;
&lt;br /&gt;
Download and install [http://rubyinstaller.org/ Ruby Installer] for Windows. The installer already includes RubyGems.&lt;br /&gt;
&lt;br /&gt;
Be sure you use the Ruby-enabled command prompt window when you later install and use af. You access this command prompt from the Windows Start menu (All Programs &amp;gt; Ruby &amp;gt; Start Command Prompt with Ruby).&lt;br /&gt;
&lt;br /&gt;
Finally, update RubyGems from the Ruby Command Prompt:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem update --system&lt;br /&gt;
$ gem install af&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Login with:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ af login&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Finally from within your source code directory:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ af update hello-node&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Getting Started with AppFog'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
target [url]                                       Reports current target or sets a new target&lt;br /&gt;
login [email] [--email, --password]                Login&lt;br /&gt;
info                                               System and account information&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== AWS Elastic Beanstalk==&lt;br /&gt;
&lt;br /&gt;
[[File:AWSLogo.jpg|frame|right|&amp;lt;ref&amp;gt;https://aws.amazon.com&amp;lt;/ref&amp;gt;|AWS Logo]]&lt;br /&gt;
&lt;br /&gt;
Amazon Wen Services(AWS) offers [http://en.wikipedia.org/wiki/Infrastructure_as_a_service#Infrastructure_as_a_service_.28IaaS.29 Infrastructure as a Service] (IaaS) and provides a complete set of resources for the development of a web application in minutes. AWS Elastic Beanstalk is a deployment tool of the AWS cloud.&lt;br /&gt;
&lt;br /&gt;
With AWS Elastic Beanstalk, applications can be quickly deployed and managed in the AWS cloud without worrying about the infrastructure that runs those applications. AWS Elastic Beanstalk reduces management complexity without restricting choice or control. Once the application is uploaded AWS Elastic Beanstalk automatically handles the details of capacity provisioning, load balancing, scaling, and application health monitoring. AWS Elastic Beanstalk uses highly reliable and scalable services.&lt;br /&gt;
&lt;br /&gt;
'''AWS CLI'''&lt;br /&gt;
&lt;br /&gt;
AWS Elastic Beanstalk uses a command line tool Eb, which helps you to deploy your application easily.&lt;br /&gt;
&lt;br /&gt;
'''Getting Started with Eb'''&amp;lt;ref&amp;gt;http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/command-reference-get-started.html&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To get started with the beanstalk CLI, you will need to download the command line tools at the [http://aws.amazon.com/code/6752709412171743 AWS Sample Code &amp;amp; Libraries] website.&lt;br /&gt;
&lt;br /&gt;
Step 1: Initialize Your Git Repository&lt;br /&gt;
&lt;br /&gt;
Eb is a command line interface that enables you to deploy applications quickly and more easily using Git. Eb is available as part of the Elastic Beanstalk command line tools package. &lt;br /&gt;
&lt;br /&gt;
1. To install eb,install the following software onto your local computer:&lt;br /&gt;
&lt;br /&gt;
* Git 1.6.6 or later. To download Git, go to http://git-scm.com/.&lt;br /&gt;
* PowerShell 2.0.&lt;br /&gt;
&lt;br /&gt;
2. Initialize your Git repository.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git init &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Step 2: Configuring AWS Elastic Beanstalk&lt;br /&gt;
&lt;br /&gt;
1. From your directory where you created your local repository, type the following command.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
eb init&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2. When you are prompted for the access key ID, type your access key ID. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Enter your AWS Access Key ID (current value is &amp;quot;AKIAIOSFODNN7EXAMPLE&amp;quot;): &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3. When you are prompted for the secret access key, type your secret access key.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Enter your AWS Secret Access Key (current value is &amp;quot;wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY&amp;quot;): &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
4. When you are prompted for the AWS Elastic Beanstalk application name, type the name of the application. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Enter an AWS Elastic Beanstalk application name (auto-generated value is &amp;quot;windows&amp;quot;): &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Note:&lt;br /&gt;
If you have a space in your application name, make sure you do not use quotes.&lt;br /&gt;
&lt;br /&gt;
5. When you are prompted for the AWS Elastic Beanstalk environment name, type the name of the environment. AWS Elastic Beanstalk automatically creates an environment name based on your application name. If you want to accept the default, press Enter.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Enter an AWS Elastic Beanstalk environment name (current value is &amp;quot;HelloWorld-env&amp;quot;): &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
6. When you are prompted to create an Amazon RDS DB instance, type y or n. For this example, we'll type y.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Create an RDS DB Instance? [y/n]:&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
7. When you are prompted to enter your RDS user master password, type your password containing from 8 to 16 printable ASCII characters (excluding /, \, and @).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Enter an RDS DB master password: &lt;br /&gt;
Retype password to confirm: &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can now get started with the AWS Elastic Beanstalk.&lt;br /&gt;
&lt;br /&gt;
== OpenShift ==&lt;br /&gt;
&lt;br /&gt;
[[File:OpenShift.png|frame|right|&amp;lt;ref&amp;gt;https://en.wikipedia.org&amp;lt;/ref&amp;gt;|OpenShift Logo]]&lt;br /&gt;
&lt;br /&gt;
Another free and open source PaaS for deploying applications is OpenShift created by [[http://en.wikipedia.org/wiki/RedHat RedHat]]. &lt;br /&gt;
&lt;br /&gt;
'''Considerations'''&lt;br /&gt;
* Databases&lt;br /&gt;
&lt;br /&gt;
To use the application outside the OpenShift environment one needs to change the variables as the application is configured to use database in production mode in OpenShift.&lt;br /&gt;
&lt;br /&gt;
* Assets&lt;br /&gt;
&lt;br /&gt;
The assets are precompiled everytime application is pushed to OpenShift.&lt;br /&gt;
&lt;br /&gt;
* Security&lt;br /&gt;
&lt;br /&gt;
Security related variables are to be unique across the application.&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;ref&amp;gt;https://github.com/openshift/rails-example&amp;lt;/ref&amp;gt;&lt;br /&gt;
'''Installation'''&lt;br /&gt;
&lt;br /&gt;
1.	Create an account at http://openshift.redhat.com/&lt;br /&gt;
&lt;br /&gt;
2.	Create a rails application&lt;br /&gt;
	&amp;lt;pre&amp;gt;rhc app create -a railsapp -t ruby-1.9&amp;lt;/pre&amp;gt;&lt;br /&gt;
3.	Add mysql support to your application&lt;br /&gt;
	&amp;lt;pre&amp;gt;rhc cartridge add -a railsapp -c mysql-5.1&amp;lt;/pre&amp;gt;&lt;br /&gt;
4.	Add this upstream Rails quickstart repository&lt;br /&gt;
&amp;lt;pre&amp;gt;cd railsapp&lt;br /&gt;
git remote add upstream -m master git://github.com/openshift/rails-example.git&lt;br /&gt;
git pull -s recursive -X theirs upstream master&amp;lt;/pre&amp;gt;&lt;br /&gt;
5.	Push your new code&lt;br /&gt;
&amp;lt;pre&amp;gt;git push&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Future scope ==&lt;br /&gt;
&lt;br /&gt;
[[File:Cloud 66.jpg|frame|right|&amp;lt;ref&amp;gt;https://www.cloud66.com/&amp;lt;/ref&amp;gt;|Cloud66 Logo]]&lt;br /&gt;
&lt;br /&gt;
Cloud 66 combines the convenience of Platform-as-a-Service (PaaS) and the flexibility and control of Infrastructure-as-a-Service (IaaS). This platform allows easy deployment of application, so there is no overhead of configuring or monitoring the servers.&lt;br /&gt;
&lt;br /&gt;
'''Cloud 66 Command line Toolbelt'''&lt;br /&gt;
&lt;br /&gt;
Toolbelt is an open source released to deploy the application.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ref&amp;gt;http://blog.cloud66.com/&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Getting Started with Cloud 66'''&lt;br /&gt;
&lt;br /&gt;
1. Go to the [https://www.cloud66.com/users/sign_up sign up] page and create a Cloud 66 account.&lt;br /&gt;
&lt;br /&gt;
2. Go to Cloud 66 Dashboard and [https://www.cloud66.com/help/first_stack build your first stack].&lt;br /&gt;
&lt;br /&gt;
'''Installation'''&lt;br /&gt;
&lt;br /&gt;
Installation of toolbelt uses the following command&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Gem install c66&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This automatically searches the newest version and installs it.&lt;br /&gt;
&lt;br /&gt;
= Model Class : assignment_participant.rb =&lt;br /&gt;
Th AssignmentParticipant model class is a subclass of the participant model class. Several methods in AssignmentParticipant model class required renaming and refactoring to ensure that the change is reflected in the entire project. The names were changed to follow method naming convention. Deprecated code was removed and re-coded to ensure that the code worked in future version as well. Duplicated codes were commented. Methods that are more general in the sub classes were moved to the parent class. Some methods that calculates the collusion in reviews between students were moved to a newly created model class file called collusion_cycle.rb &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;width:3%;&amp;quot;|S. No&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;|Method Name&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;|Change Made &lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;|Reason For Change&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
|''''' 1 '''''&lt;br /&gt;
|get_course_string&lt;br /&gt;
|Renamed to course_string and refactored &lt;br /&gt;
|To follow method naming convention&lt;br /&gt;
|-&lt;br /&gt;
|''''' 2 '''''&lt;br /&gt;
|get_cycle_deviation_score&lt;br /&gt;
|Moved to collusion_cycle.rb model class&lt;br /&gt;
|Related methods that calculate collusion in reviews have been moved to the newly created collusion_cycle.rb model class&lt;br /&gt;
|-&lt;br /&gt;
|''''' 3 '''''&lt;br /&gt;
|get_cycle_similarity_score&lt;br /&gt;
|Moved to collusion_cycle.rb model class&lt;br /&gt;
|Related methods that calculate collusion in reviews have been moved to the newly created collusion_cycle.rb model class&lt;br /&gt;
|-&lt;br /&gt;
|''''' 4 '''''&lt;br /&gt;
|get_feedback&lt;br /&gt;
|Renamed to feedback and refactored&lt;br /&gt;
|To follow method naming convention&lt;br /&gt;
|-&lt;br /&gt;
|''''' 5 '''''&lt;br /&gt;
|get_files&lt;br /&gt;
|Renamed to files_in_directory  and refactored&lt;br /&gt;
|To follow method naming convention&lt;br /&gt;
|-&lt;br /&gt;
|''''' 6 '''''&lt;br /&gt;
|get_four_node_cycles&lt;br /&gt;
|Moved to collusion_cycle.rb model class&lt;br /&gt;
|Related methods that calculate collusion in reviews have been moved to the newly created collusion_cycle.rb model class&lt;br /&gt;
|-&lt;br /&gt;
|''''' 7 '''''&lt;br /&gt;
|fullname&lt;br /&gt;
|Moved to parent model class – participant.rb &lt;br /&gt;
|General methods of the subclass are moved to Parent class&lt;br /&gt;
|-&lt;br /&gt;
|''''' 8 '''''&lt;br /&gt;
|get_metareviews&lt;br /&gt;
|Renamed to metareviews and refactored&lt;br /&gt;
|To follow method naming convention&lt;br /&gt;
|-&lt;br /&gt;
|''''' 9 '''''&lt;br /&gt;
|name&lt;br /&gt;
|Commented the method  &lt;br /&gt;
|The method is already in parent model class – participant.rb and can be used in this subclass through inheritance&lt;br /&gt;
|-&lt;br /&gt;
|''''' 10 '''''&lt;br /&gt;
|name&lt;br /&gt;
|Commented the method  &lt;br /&gt;
|The method is already in parent model class – participant.rb and can be used in this subclass through inheritance. Also it is a duplicate method in patricipant.rb&lt;br /&gt;
|- &lt;br /&gt;
|''''' 11 '''''&lt;br /&gt;
|get_review_score&lt;br /&gt;
|Renamed to review_score and refactored. Deprecated code has been removed and replaced with correct code.&lt;br /&gt;
|To follow method naming convention and ensure the code works in future versions. &lt;br /&gt;
|-&lt;br /&gt;
|''''' 12 '''''&lt;br /&gt;
|get_reviewees&lt;br /&gt;
|Renamed to reviewees and refactored. Deprecated code has been removed and replaced with correct code.&lt;br /&gt;
|To follow method naming convention and ensure the code works in future versions. &lt;br /&gt;
|-&lt;br /&gt;
|''''' 13 '''''&lt;br /&gt;
|get_reviewers&lt;br /&gt;
|Renamed to reviewers and refactored . Deprecated code has been commented and replaced with correct code.&lt;br /&gt;
|To follow method naming convention and ensure the code works in future versions. &lt;br /&gt;
|-&lt;br /&gt;
|''''' 14 '''''&lt;br /&gt;
|get_reviews&lt;br /&gt;
|Renamed to reviews and refactored &lt;br /&gt;
|To follow method naming convention&lt;br /&gt;
|-&lt;br /&gt;
|''''' 15 '''''&lt;br /&gt;
|get_reviews_by_reviewer&lt;br /&gt;
|Renamed to reviews_by_reviewer and refactored &lt;br /&gt;
|To follow method naming convention&lt;br /&gt;
|-&lt;br /&gt;
|''''' 16 '''''&lt;br /&gt;
|get_reviews_by_reviewer&lt;br /&gt;
|Commented the method &lt;br /&gt;
|To remove duplicated method in this class&lt;br /&gt;
|-&lt;br /&gt;
|''''' 17 '''''&lt;br /&gt;
|get_scores&lt;br /&gt;
|Renamed to scores and refactored &lt;br /&gt;
|To follow method naming convention&lt;br /&gt;
|-&lt;br /&gt;
|''''' 18 '''''&lt;br /&gt;
|get_submitted_files&lt;br /&gt;
|Renamed to submitted_files and refactored &lt;br /&gt;
|To follow method naming convention&lt;br /&gt;
|-&lt;br /&gt;
|''''' 19 '''''&lt;br /&gt;
|get_teammate_reviews&lt;br /&gt;
|Renamed to teammate_reviews and refactored &lt;br /&gt;
|To follow method naming convention&lt;br /&gt;
|-&lt;br /&gt;
|''''' 20 '''''&lt;br /&gt;
|get_three_node_cycles&lt;br /&gt;
|Moved to collusion_cycle.rb model class&lt;br /&gt;
|Related methods that calculate collusion in reviews have been moved to the newly created collusion_cycle.rb model class&lt;br /&gt;
|-&lt;br /&gt;
|''''' 21 '''''&lt;br /&gt;
|get_topic_string&lt;br /&gt;
|Method has been Commented&lt;br /&gt;
|It is already present in model super class – participant.rb&lt;br /&gt;
|-&lt;br /&gt;
|''''' 22 '''''&lt;br /&gt;
|get_two_node_cycles&lt;br /&gt;
|Moved to collusion_cycle.rb model class&lt;br /&gt;
|Related methods that calculate collusion in reviews have been moved to the newly created collusion_cycle.rb model class&lt;br /&gt;
|-&lt;br /&gt;
|''''' 23 '''''&lt;br /&gt;
|get_wiki_submissions&lt;br /&gt;
|Renamed to wiki_submissions and refactored&lt;br /&gt;
|To follow method naming convention&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
After changes were made, the existing tests ran successfully.&lt;br /&gt;
&lt;br /&gt;
= Changes in routes.rb =&lt;br /&gt;
&lt;br /&gt;
The following routes were added to make the code run error free. &lt;br /&gt;
&lt;br /&gt;
Routes for submit_hyperlink and remove_hyperlink were added below&lt;br /&gt;
&lt;br /&gt;
 resources :submitted_content do&lt;br /&gt;
    collection do&lt;br /&gt;
      get :view&lt;br /&gt;
      get :edit&lt;br /&gt;
     ''' post :submit_hyperlink'''&lt;br /&gt;
     ''' get :remove_hyperlink'''&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
Routes for get and post method for export were added here&lt;br /&gt;
&lt;br /&gt;
 resources :export_file do&lt;br /&gt;
    collection do&lt;br /&gt;
      get :start&lt;br /&gt;
      '''get :export'''&lt;br /&gt;
      '''post :export'''&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
Routes for cancel, accept and decline were added here &lt;br /&gt;
&lt;br /&gt;
  resources :invitation do&lt;br /&gt;
    collection do&lt;br /&gt;
      '''get :cancel'''&lt;br /&gt;
      '''get :accept'''&lt;br /&gt;
      '''get :decline'''&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
= Comparison between Capistrano/Vlad/Heroku/AppFog/OpenShift/Cloud66/AWS Beanstalk =&lt;br /&gt;
&lt;br /&gt;
With so many automated tools available for Code Deployment and Release Management, the decision on which to use for a particular Ruby on rails application depends on various parameters to be considered.&lt;br /&gt;
Some comparative features of the different tools are as follows :&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;width:9%;&amp;quot;|Criteria for Comparision&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;|Capistrano&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;| Vlad&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;| Heroku&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;| AppFog&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;| OpenShift&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;| Cloud66&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;| AWS Beanstalk&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
|'''''Getting started with the tool'''''&lt;br /&gt;
|It is a framework that allows one to execute commands on a remote server using tools like ssh.&lt;br /&gt;
|Vlad deployment is similar to Capistrano, but less complex.&lt;br /&gt;
|Heroku’s offers a plan with first dyno free i.e. 512 MB that can be paired with Postgres starter DB to start an application with 0 initial cost&lt;br /&gt;
|AppFog’s initial plan offers 2GB of RAM free which is enough for small to medium traffic applications. By managing options provided for DB, queue server, application server, etc all part of the intial package, this is an excellent option to try out an application&lt;br /&gt;
|OpenShift is an open source platform and its free plan for starters has 3 gears for free wherein each gear consists of some RAM and disk space.&lt;br /&gt;
|Free plan provides one server for deployment.&lt;br /&gt;
|Provides an initial free tier. Without free tier no additional cost for Beanstalk. One only needs to pay for the AWS resources used.&lt;br /&gt;
|-&lt;br /&gt;
|'''''Scaling Memory'''''&lt;br /&gt;
|Memory increase would require additional servers/unused space in existing ones.&lt;br /&gt;
|Memory increase depends on additional servers available/unused space in existing ones.&lt;br /&gt;
|Memory increased in terms of dyno each of size 512 MB.&lt;br /&gt;
|Can configure any size for memory allocation&lt;br /&gt;
| -&lt;br /&gt;
| -&lt;br /&gt;
|Can automatically up/down scale the application by adjusting the default auto scaling settings.&lt;br /&gt;
|-&lt;br /&gt;
|'''''Scaling – Cost and Ease'''''&lt;br /&gt;
|While this provides greater flexibility as user is in control of the servers, it also causes additional overhead in terms of user needing to work both on Rails application and web server deployment.&lt;br /&gt;
|It can be integrated with Rake without any hindrances.&lt;br /&gt;
|Can dynamically scale up and down an application and pay as per hourly usages. Each additional dyno costs $35/mo&lt;br /&gt;
|Scaling takes up some time and need to pay for a month at the minimum. Scaling up to 4GB increases cost to $100/mo&lt;br /&gt;
| -&lt;br /&gt;
|Scaling using Cloud66 is relatively easy and hassle free.&lt;br /&gt;
|Scaling is fast and easy.&lt;br /&gt;
|-&lt;br /&gt;
|'''''Special features'''''&lt;br /&gt;
|For sensitive applications where handing over the control to a third party for deployment is not feasible, Capistrano is the way to go.&lt;br /&gt;
|It also provides support for tools like rsync and ssh.&lt;br /&gt;
|Lacks support for cross region deployment i.e. can’t select location of server where application gets deployed&lt;br /&gt;
|Supports cross region deployment i.e. if users of application primarily in Asia, can choose a server in Asia to deploy application, thus making the site faster.&lt;br /&gt;
| -&lt;br /&gt;
| -&lt;br /&gt;
|Provides complete flexibility and control of the resources to the user including the chance to take over control of some or all.&lt;br /&gt;
|-&lt;br /&gt;
|'''''Database support'''''&lt;br /&gt;
|Provides support for DB related to rails applications&lt;br /&gt;
|Provides support for DB related to rails applications&lt;br /&gt;
|It features serious production DB like RDBMS, Postgres, etc. and many Addons such as MongoDB, ClearDB, etc.&lt;br /&gt;
|Features free shared databases such as MongoDB, MySQL, Postgres but for other production DB’s need to use Addons&lt;br /&gt;
|Databases featured are MySQL, MongoDB and Postgres&lt;br /&gt;
| -&lt;br /&gt;
|Supports DB like Amazon SimpleDB, Amazon RDS, Amazon DynamoDB.&lt;br /&gt;
|-&lt;br /&gt;
|'''''Deployment strategy'''''&lt;br /&gt;
|Capistrano provides commands to be executed for automated deployment. It supports git.&lt;br /&gt;
|It is much easier to deploy using Vlad as compared to Capistrano.&lt;br /&gt;
|Deployment as easy as ‘git push’&lt;br /&gt;
|Deployment does not support git. It uses the af tool for deployment.&lt;br /&gt;
| -&lt;br /&gt;
|Since Cloud66 provides the platform in terms of Application Stack Management as a Service, it uses the infrastructure of AWS, Virtual Private Server, etc. for actual deployment. But the user doesn’t have to worry about configuration or monitoring of the servers. Hence provides easy deployment.&lt;br /&gt;
|Deployment options include Git, AWS management console, etc.&lt;br /&gt;
|-&lt;br /&gt;
|'''''Community Support availability'''''&lt;br /&gt;
| As it has been in use for a long time there is a huge community support available for Capistrano.&lt;br /&gt;
| -&lt;br /&gt;
|Heroku also provides a huge community support given the fact that there are a lot of Heroku users.&lt;br /&gt;
|Community is limited.&lt;br /&gt;
|RedHat being a reputed provider for open source solutions, the OpenShift community is gradually increasing and receiving support from a considerable community of users.&lt;br /&gt;
|Limited community support currently&lt;br /&gt;
|Has community forums and documentation.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Conclusion =&lt;br /&gt;
&lt;br /&gt;
Comparison and contrast between various deployment automated tools such as Capistrano, Heroku, Vlad, AppFog, OpenShift, Cloud66, AWS Beanstalk shows that each has its own pros and cons. &lt;br /&gt;
For instance, in a client based application where handing over the control of the application to a third party such as the deployment tool provider is impossible, AWS Beanstalk would be the obvious choice for the developer.&lt;br /&gt;
On the other hand, a novice Rails application developer might find all he needs in the starter plan of Heroku with the added bonus of a huge support community available to him for troubleshooting as he stumbles his way across the development of the application.&lt;br /&gt;
One may also choose the tool that provides the specific database support for your application. In case of large scale corporations where budgets are not that limited, the increasing costs with up-scaling of some tools would not be an obstacle.&lt;br /&gt;
Thus, various considerations about the application such as scalability requirement, security concerns, cost, availability of own resources such as servers etc., will help determine which tool is the most suitable for that application.&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= See Also =&lt;br /&gt;
&lt;br /&gt;
* Rails Solutions: Ruby on Rails Made Easy by Justin Williams&lt;br /&gt;
* http://guides.beanstalkapp.com/deployments/best-practices.html&lt;br /&gt;
* http://www.urbancode.com/anthill3-help-3.7/html/SettingUpDeploymentProcess.html&lt;br /&gt;
* http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=UseFMSGateway_3.html&lt;br /&gt;
* http://pic.dhe.ibm.com/infocenter/tivihelp/v26r1/index.jsp?topic=%2Fcom.ibm.dtm.doc%2Fdeploysoftware%2Fc_deploysw_process.html&lt;/div&gt;</summary>
		<author><name>Npari</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch2_0e808_nsv&amp;diff=81379</id>
		<title>CSC/ECE 517 Fall 2013/ch2 0e808 nsv</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch2_0e808_nsv&amp;diff=81379"/>
		<updated>2013-10-30T21:35:43Z</updated>

		<summary type="html">&lt;p&gt;Npari: /* Changes in routes.rb */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= E808: Refactor and test Participant, AssignmentParticipant, &amp;amp; CourseParticipant =&lt;br /&gt;
The requirements provided for the Open Source System project were as follows : &amp;lt;br&amp;gt;&lt;br /&gt;
'''Classes''': &amp;lt;br&amp;gt;&lt;br /&gt;
''participant.rb'' (197 lines)&amp;lt;br&amp;gt;&lt;br /&gt;
''assignment_participant.rb'' (476 lines)&amp;lt;br&amp;gt;&lt;br /&gt;
''course_participant.rb'' (90 lines)&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''What they do''': &amp;lt;br&amp;gt; &lt;br /&gt;
These classes keep track of a user who is participating in an assignment or a course.  participant.rb is the superclass, and the other two are the subclasses.&lt;br /&gt;
&lt;br /&gt;
'''What is needed''': &amp;lt;br&amp;gt; &lt;br /&gt;
The methods are complex; there are a lot of them (assignment_particpant has 44) and there is a lot of duplicated code.  assignment_participant contains code for detecting cycles of high grades (which can indicate collusion in reviews).  It would be better moved to another class.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
= Introduction =&lt;br /&gt;
&lt;br /&gt;
A cursory analysis of the code of the three model classes showed the existence of code duplication. In a lot of the cases the [http://en.wikipedia.org/wiki/Don%27t_Repeat_Yourself Don't Repeat Yourself] (DRY) principle was violated.&lt;br /&gt;
&lt;br /&gt;
In keeping with the [http://en.wikipedia.org/wiki/Agile_software_development Agile] methodology, which involves having regular discussions with all stakeholders, the design check for the project was performed with a meeting with the Instructor.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{viewxls:name=sample.xlsx|sheet=Summary|row=13|col=3}&lt;br /&gt;
&lt;br /&gt;
Next the code was analyzed in detail and the following plausible improvements were predicted.[[File:[[Media:Example.jpg]]]]&lt;br /&gt;
&lt;br /&gt;
After the final release of the code in development and testing stage, the master plan is prepared for deployment of components and sites based on the sign-offs provided by the project teams, stakeholders and customers. Then, the stabilization of the deployment is calculated based on some metrics. Once the deployment is stabilized, it is reviewed and the process of deployment is complete. The final sign-off is given by the stakeholders.&lt;br /&gt;
&lt;br /&gt;
=Participant model: participant.rb=&lt;br /&gt;
&lt;br /&gt;
Code deployment is a procedure where the application is transferred onto a production server, so that it is made available for all the other users. It is the part of release management process which involves several activities. These activities are inter-dependent and need to be completed in a specific order for successful code deployment. &lt;br /&gt;
&lt;br /&gt;
'''Code Deployment Activities'''&lt;br /&gt;
&lt;br /&gt;
The various deployment activities include &amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/Software_deployment&amp;lt;/ref&amp;gt;&lt;br /&gt;
* Release : Gathering all system components in preparation for deployment&lt;br /&gt;
* Install and activate : Installing the application components and getting them in the 'ready' state&lt;br /&gt;
* Deactivate : Shutting down components that are out-dated or that may interfere with updating others&lt;br /&gt;
* Adapt : Making changes to application to accommodate changes in environment&lt;br /&gt;
* Update : Having a newer release installed in place of the old one&lt;br /&gt;
* Built-in : There are components built-into some tools for complete/semi-automating updates&lt;br /&gt;
* Version tracking : These systems help the user to know if newer versions of a software are available and if yes, help install them&lt;br /&gt;
* Uninstall : Opposite of installation and involves complete removal of software and its dependencies from the environment&lt;br /&gt;
* Retire : This involves making a software obsolete and is the end of software life cycle&lt;br /&gt;
&lt;br /&gt;
The general guidelines for the deployment process remain the same but there are variations in the specific requirements with each software system.&lt;br /&gt;
&lt;br /&gt;
=AssignmentParticipant model: assignment_participant.rb=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ref&amp;gt;http://searchitchannel.techtarget.com/definition/release-management&amp;lt;/ref&amp;gt;&lt;br /&gt;
Release management is a software process which takes care of the development, testing, deployment and support stages of software releases. The start of release management happens in the development phase, where it requests for new features or changes in the existing application. When the request is accepted, a new release is planned and designed. This design is built and then enters the testing phase, where the release is tested until it is accepted. After the release is accepted as a candidate, it enters the deployment phase where it is implemented. Once deployed, the release is made available and sent to support phase for collection of bug reports. Once the support phase is done, the bugs and other issues lead to requests for changes and the cycle is then repeated.&lt;br /&gt;
&lt;br /&gt;
=CourseParticipant model:course_participant.rb =&lt;br /&gt;
&amp;lt;ref&amp;gt;http://www.urbancode.com/html/solutions/deployment-automation.html&amp;lt;/ref&amp;gt;&lt;br /&gt;
Automation of a process is required when the manual process is more error prone. Also, for large real world applications, the manual process is very complex and time consuming. Incomplete documentation hampers a manual process further. Deployment also has to be done in many environments and involves varied steps to be followed in a specific order. Manual process needs repetition of same procedure to each and every environment which leads to many errors and the process becomes costly.&lt;br /&gt;
In web applications each new release has to be deployed to and tested in development, testing and production environments.The number of software releases in web applications  are more and hence the need to automate release management is also greater.&lt;br /&gt;
&lt;br /&gt;
Automation of deployment delivers applications faster and with fewer errors. The defined software deployment process can be applied across all environments consistently every time. With various automated application deployment platforms now readily available, manual deployments have become a thing of the past.&lt;br /&gt;
&lt;br /&gt;
Lets take a look at the various Deployment Automation tools available to Ruby on Rails applications. For the purposes of this article the process of manual deployment of a Ruby on Rails application is out of scope.&lt;br /&gt;
&lt;br /&gt;
= Tests =&lt;br /&gt;
&lt;br /&gt;
Some of the automated tools that are widely used for the process of deployment with Ruby on Rails are &lt;br /&gt;
&lt;br /&gt;
* Capistrano&lt;br /&gt;
* Heroku&lt;br /&gt;
* Vlad&lt;br /&gt;
* AppFog&lt;br /&gt;
* AWS Elastic Beanstalk&lt;br /&gt;
* OpenShift&lt;br /&gt;
* Cloud 66&lt;br /&gt;
&lt;br /&gt;
= yml files =&lt;br /&gt;
&lt;br /&gt;
[[File:Capistrano.jpg|frame|right|&amp;lt;ref&amp;gt;http://www.capistranorb.com/&amp;lt;/ref&amp;gt;|Capistrano Logo]]&lt;br /&gt;
&lt;br /&gt;
Capistrano is a Ruby tool which helps deploy an application to the server. Capistrano allows deploying to multiple machines at a time. It has many advanced options which help to deploy different kinds of applications. It also supports the scripting and execution of tasks.&lt;br /&gt;
&lt;br /&gt;
Capistrano can be used to:&lt;br /&gt;
&lt;br /&gt;
* Deploy applications onto many machines simultaneously.&lt;br /&gt;
* Automate the audits&lt;br /&gt;
* Automate the common tasks of a team.&lt;br /&gt;
&lt;br /&gt;
Capistrano can be made a part of a larger software by integrating it with another Ruby software.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ref&amp;gt;http://www.capistranorb.com/documentation/getting-started/installation/&amp;lt;/ref&amp;gt;  &lt;br /&gt;
'''General Usage'''&lt;br /&gt;
&lt;br /&gt;
The following commands will clone Capistrano, build the gem and install it locally.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem install capistrano --pre --trust-policy HighSecurity&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Or grab the bleeding edge head from:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ git clone -b v3 https://github.com/capistrano/capistrano.git&lt;br /&gt;
$ cd capistrano&lt;br /&gt;
$ gem build *.gemspec&lt;br /&gt;
$ gem install *.gem&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
'''Signed Rubygems'''&lt;br /&gt;
&lt;br /&gt;
As Capistrano is a signed gem, you should always be careful to use the --trust-policy flag when installing Gems, or since Bundler 1.3 you should use the same flag:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem install capistrano --pre --trust-policy HighSecurity&lt;br /&gt;
$ bundle install --trust-policy HighSecurity&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If you get a message that looks like:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ERROR:  While executing gem ... (Gem::Security::Exception)&lt;br /&gt;
unsigned gems are not allowed by the High Security policy&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then please complain to your Gem author, and have them start signing their Gems.&lt;br /&gt;
&lt;br /&gt;
'''Usage in a Rails project'''&lt;br /&gt;
&lt;br /&gt;
Add the following lines to the Gemfile to the :development group ideally.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
group :development do&lt;br /&gt;
  gem 'capistrano-rails', '~&amp;gt; 0.0.7'&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= routes.rb =&lt;br /&gt;
&lt;br /&gt;
[[File:Heroku.jpg|frame|right|&amp;lt;ref&amp;gt;https://www.heroku.com/&amp;lt;/ref&amp;gt;|Heroku Logo]]&lt;br /&gt;
&lt;br /&gt;
Heroku is a cloud [http://en.wikipedia.org/wiki/Platform_as_a_service Platform as a Service] (PaaS) which supports several programming languages. PaaS is a service model of Cloud computing wherein the provider offers resources like servers, software, database, etc. to the developer. Heroku helps manage environment-specific configurations separately from the source code, which provides greater security.&lt;br /&gt;
Heroku is not just a deployment environment but it also impacts the development process. There are several principles of the development of application on Heroku.&amp;lt;br&amp;gt;&lt;br /&gt;
•	Applications and Codebases : Most of the development of the application is done on application’s codebase which is stored in a [http://en.wikipedia.org/wiki/Version_control_system Version Control System (VCS)] &amp;lt;br&amp;gt;&lt;br /&gt;
•	Dependencies : All the application dependencies such as plugins should be declared explicitly&amp;lt;br&amp;gt;&lt;br /&gt;
•	Configuration : Configuration of an application is all that varies in different deploys&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Getting Started with Heroku'''&lt;br /&gt;
&lt;br /&gt;
1. To get started with Heroku, go to https://id.heroku.com/signup/devcenter, signup for a Heroku account. &lt;br /&gt;
&lt;br /&gt;
2. Then, download and install the Heroku toolbelt at https://toolbelt.heroku.com/ for your development system. You can also use Heroku command line instead of the online Heroku application. &lt;br /&gt;
&lt;br /&gt;
3. After installing one of them, login using the email address and password used when creating the Heroku account:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ref&amp;gt;https://github.com/heroku/heroku&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ heroku login&lt;br /&gt;
Enter your Heroku credentials.&lt;br /&gt;
Email: adam@example.com&lt;br /&gt;
Password:&lt;br /&gt;
Could not find an existing public key.&lt;br /&gt;
Would you like to generate one? [Yn]&lt;br /&gt;
Generating new SSH public key.&lt;br /&gt;
Uploading SSH public key /Users/adam/.ssh/id_rsa.pub&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Deploying Applications'''&lt;br /&gt;
&lt;br /&gt;
Heroku uses [http://en.wikipedia.org/wiki/Git_(software) git] primarily to deploy the applications. When an application is created on Heroku, it associates the new git which is remote with the local git repository.&lt;br /&gt;
&lt;br /&gt;
As a result, deploying code is just the familiar git push, but to the heroku remote instead:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ref&amp;gt;https://devcenter.heroku.com/articles/how-heroku-works#deploying-applications&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ git push heroku master&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Vlad ==&lt;br /&gt;
&lt;br /&gt;
[[File:Vlad.png|frame|right|&amp;lt;ref&amp;gt;http://rubyhitsquad.com/Vlad_the_Deployer.html&amp;lt;/ref&amp;gt;|Vlad Logo]]&lt;br /&gt;
&lt;br /&gt;
Vlad is another automated deployment tool which is simple to use. It integrates with rake and uses standard tools like SSH, rsync etc.&lt;br /&gt;
&lt;br /&gt;
The main features of Vlad include&lt;br /&gt;
* It uses very few dependencies which are simple.&lt;br /&gt;
* It can execute commands on more than one server.&lt;br /&gt;
* It syncs files to one or more servers.&lt;br /&gt;
* It matches local and remote tasks.&lt;br /&gt;
* It runs tests very fast.&lt;br /&gt;
&lt;br /&gt;
'''Getting started with Vlad'''&amp;lt;ref&amp;gt;http://docs.seattlerb.org/vlad/doco/getting_started_txt.html&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create a deploy file, usually in “config/deploy.rb”:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set :application, &amp;quot;project&amp;quot;&lt;br /&gt;
set :domain, &amp;quot;example.com&amp;quot;&lt;br /&gt;
set :deploy_to, &amp;quot;/path/to/install&amp;quot;&lt;br /&gt;
set :repository, 'http://svn.example.com/project/branches/stable/'&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This defaults to using ‘svn export’ from repository, and a single server for app, db, and www.&lt;br /&gt;
&lt;br /&gt;
If you want a multi-config environment, change your config like so:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set :application, &amp;quot;project&amp;quot;&lt;br /&gt;
set :repository, 'http://svn.example.com/project/branches/stable/'&lt;br /&gt;
&lt;br /&gt;
task :beta do&lt;br /&gt;
  set :domain,    &amp;quot;beta.example.com&amp;quot;&lt;br /&gt;
  set :deploy_to, &amp;quot;/path/to/install-beta&amp;quot;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
task :dev do&lt;br /&gt;
  set :domain,    &amp;quot;dev.example.com&amp;quot;&lt;br /&gt;
  set :deploy_to, &amp;quot;/path/to/install-dev&amp;quot;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
task :prod do&lt;br /&gt;
  set :domain,    &amp;quot;example.com&amp;quot;&lt;br /&gt;
  set :deploy_to, &amp;quot;/path/to/install&amp;quot;&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Add the following to your Rakefile:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
begin&lt;br /&gt;
  require 'vlad'&lt;br /&gt;
  Vlad.load&lt;br /&gt;
rescue LoadError&lt;br /&gt;
  # do nothing&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Vlad.load has a lot of flexibility.&lt;br /&gt;
&lt;br /&gt;
You can install vlad via:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;% rake vlad:invoke COMMAND='sudo gem install vlad -y'&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Initial Launch&lt;br /&gt;
&amp;lt;pre&amp;gt;Run rake vlad:setup vlad:update vlad:migrate vlad:start&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ref&amp;gt;http://docs.seattlerb.org/vlad/index.html&amp;lt;/ref&amp;gt;&lt;br /&gt;
'''Running Vlad'''&lt;br /&gt;
&lt;br /&gt;
* Using rake&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
task :shazam! do&lt;br /&gt;
  Rake::Task[:action1].invoke&lt;br /&gt;
  Rake::Task[:action2].invoke&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Using SSH&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Host example.com&lt;br /&gt;
    User fluffy_bunny&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== AppFog == &lt;br /&gt;
&lt;br /&gt;
[[File:AppFog.jpg|frame|right|&amp;lt;ref&amp;gt;https://www.appfog.com/&amp;lt;/ref&amp;gt;|AppFog Logo]]&lt;br /&gt;
&lt;br /&gt;
AppFog is a PaaS built on Cloud Foundry which is another PaaS platform for deploying applications. &lt;br /&gt;
&lt;br /&gt;
Features of AppFog are&lt;br /&gt;
* It launches and runs fast.&lt;br /&gt;
* It does not require configuring servers or installing frameworks.&lt;br /&gt;
* It is compatible with code management systems like git, svn etc.&lt;br /&gt;
&lt;br /&gt;
'''Installing AppFog'''&amp;lt;ref&amp;gt;http://blog.appfog.com/getting-started-with-appfogs-command-line/&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
‘af‘ command line tool is written in Ruby for installation.&lt;br /&gt;
&lt;br /&gt;
Download and install [http://rubyinstaller.org/ Ruby Installer] for Windows. The installer already includes RubyGems.&lt;br /&gt;
&lt;br /&gt;
Be sure you use the Ruby-enabled command prompt window when you later install and use af. You access this command prompt from the Windows Start menu (All Programs &amp;gt; Ruby &amp;gt; Start Command Prompt with Ruby).&lt;br /&gt;
&lt;br /&gt;
Finally, update RubyGems from the Ruby Command Prompt:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem update --system&lt;br /&gt;
$ gem install af&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Login with:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ af login&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Finally from within your source code directory:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ af update hello-node&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Getting Started with AppFog'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
target [url]                                       Reports current target or sets a new target&lt;br /&gt;
login [email] [--email, --password]                Login&lt;br /&gt;
info                                               System and account information&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== AWS Elastic Beanstalk==&lt;br /&gt;
&lt;br /&gt;
[[File:AWSLogo.jpg|frame|right|&amp;lt;ref&amp;gt;https://aws.amazon.com&amp;lt;/ref&amp;gt;|AWS Logo]]&lt;br /&gt;
&lt;br /&gt;
Amazon Wen Services(AWS) offers [http://en.wikipedia.org/wiki/Infrastructure_as_a_service#Infrastructure_as_a_service_.28IaaS.29 Infrastructure as a Service] (IaaS) and provides a complete set of resources for the development of a web application in minutes. AWS Elastic Beanstalk is a deployment tool of the AWS cloud.&lt;br /&gt;
&lt;br /&gt;
With AWS Elastic Beanstalk, applications can be quickly deployed and managed in the AWS cloud without worrying about the infrastructure that runs those applications. AWS Elastic Beanstalk reduces management complexity without restricting choice or control. Once the application is uploaded AWS Elastic Beanstalk automatically handles the details of capacity provisioning, load balancing, scaling, and application health monitoring. AWS Elastic Beanstalk uses highly reliable and scalable services.&lt;br /&gt;
&lt;br /&gt;
'''AWS CLI'''&lt;br /&gt;
&lt;br /&gt;
AWS Elastic Beanstalk uses a command line tool Eb, which helps you to deploy your application easily.&lt;br /&gt;
&lt;br /&gt;
'''Getting Started with Eb'''&amp;lt;ref&amp;gt;http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/command-reference-get-started.html&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To get started with the beanstalk CLI, you will need to download the command line tools at the [http://aws.amazon.com/code/6752709412171743 AWS Sample Code &amp;amp; Libraries] website.&lt;br /&gt;
&lt;br /&gt;
Step 1: Initialize Your Git Repository&lt;br /&gt;
&lt;br /&gt;
Eb is a command line interface that enables you to deploy applications quickly and more easily using Git. Eb is available as part of the Elastic Beanstalk command line tools package. &lt;br /&gt;
&lt;br /&gt;
1. To install eb,install the following software onto your local computer:&lt;br /&gt;
&lt;br /&gt;
* Git 1.6.6 or later. To download Git, go to http://git-scm.com/.&lt;br /&gt;
* PowerShell 2.0.&lt;br /&gt;
&lt;br /&gt;
2. Initialize your Git repository.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git init &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Step 2: Configuring AWS Elastic Beanstalk&lt;br /&gt;
&lt;br /&gt;
1. From your directory where you created your local repository, type the following command.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
eb init&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2. When you are prompted for the access key ID, type your access key ID. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Enter your AWS Access Key ID (current value is &amp;quot;AKIAIOSFODNN7EXAMPLE&amp;quot;): &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3. When you are prompted for the secret access key, type your secret access key.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Enter your AWS Secret Access Key (current value is &amp;quot;wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY&amp;quot;): &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
4. When you are prompted for the AWS Elastic Beanstalk application name, type the name of the application. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Enter an AWS Elastic Beanstalk application name (auto-generated value is &amp;quot;windows&amp;quot;): &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Note:&lt;br /&gt;
If you have a space in your application name, make sure you do not use quotes.&lt;br /&gt;
&lt;br /&gt;
5. When you are prompted for the AWS Elastic Beanstalk environment name, type the name of the environment. AWS Elastic Beanstalk automatically creates an environment name based on your application name. If you want to accept the default, press Enter.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Enter an AWS Elastic Beanstalk environment name (current value is &amp;quot;HelloWorld-env&amp;quot;): &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
6. When you are prompted to create an Amazon RDS DB instance, type y or n. For this example, we'll type y.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Create an RDS DB Instance? [y/n]:&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
7. When you are prompted to enter your RDS user master password, type your password containing from 8 to 16 printable ASCII characters (excluding /, \, and @).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Enter an RDS DB master password: &lt;br /&gt;
Retype password to confirm: &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can now get started with the AWS Elastic Beanstalk.&lt;br /&gt;
&lt;br /&gt;
== OpenShift ==&lt;br /&gt;
&lt;br /&gt;
[[File:OpenShift.png|frame|right|&amp;lt;ref&amp;gt;https://en.wikipedia.org&amp;lt;/ref&amp;gt;|OpenShift Logo]]&lt;br /&gt;
&lt;br /&gt;
Another free and open source PaaS for deploying applications is OpenShift created by [[http://en.wikipedia.org/wiki/RedHat RedHat]]. &lt;br /&gt;
&lt;br /&gt;
'''Considerations'''&lt;br /&gt;
* Databases&lt;br /&gt;
&lt;br /&gt;
To use the application outside the OpenShift environment one needs to change the variables as the application is configured to use database in production mode in OpenShift.&lt;br /&gt;
&lt;br /&gt;
* Assets&lt;br /&gt;
&lt;br /&gt;
The assets are precompiled everytime application is pushed to OpenShift.&lt;br /&gt;
&lt;br /&gt;
* Security&lt;br /&gt;
&lt;br /&gt;
Security related variables are to be unique across the application.&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;ref&amp;gt;https://github.com/openshift/rails-example&amp;lt;/ref&amp;gt;&lt;br /&gt;
'''Installation'''&lt;br /&gt;
&lt;br /&gt;
1.	Create an account at http://openshift.redhat.com/&lt;br /&gt;
&lt;br /&gt;
2.	Create a rails application&lt;br /&gt;
	&amp;lt;pre&amp;gt;rhc app create -a railsapp -t ruby-1.9&amp;lt;/pre&amp;gt;&lt;br /&gt;
3.	Add mysql support to your application&lt;br /&gt;
	&amp;lt;pre&amp;gt;rhc cartridge add -a railsapp -c mysql-5.1&amp;lt;/pre&amp;gt;&lt;br /&gt;
4.	Add this upstream Rails quickstart repository&lt;br /&gt;
&amp;lt;pre&amp;gt;cd railsapp&lt;br /&gt;
git remote add upstream -m master git://github.com/openshift/rails-example.git&lt;br /&gt;
git pull -s recursive -X theirs upstream master&amp;lt;/pre&amp;gt;&lt;br /&gt;
5.	Push your new code&lt;br /&gt;
&amp;lt;pre&amp;gt;git push&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Future scope ==&lt;br /&gt;
&lt;br /&gt;
[[File:Cloud 66.jpg|frame|right|&amp;lt;ref&amp;gt;https://www.cloud66.com/&amp;lt;/ref&amp;gt;|Cloud66 Logo]]&lt;br /&gt;
&lt;br /&gt;
Cloud 66 combines the convenience of Platform-as-a-Service (PaaS) and the flexibility and control of Infrastructure-as-a-Service (IaaS). This platform allows easy deployment of application, so there is no overhead of configuring or monitoring the servers.&lt;br /&gt;
&lt;br /&gt;
'''Cloud 66 Command line Toolbelt'''&lt;br /&gt;
&lt;br /&gt;
Toolbelt is an open source released to deploy the application.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ref&amp;gt;http://blog.cloud66.com/&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Getting Started with Cloud 66'''&lt;br /&gt;
&lt;br /&gt;
1. Go to the [https://www.cloud66.com/users/sign_up sign up] page and create a Cloud 66 account.&lt;br /&gt;
&lt;br /&gt;
2. Go to Cloud 66 Dashboard and [https://www.cloud66.com/help/first_stack build your first stack].&lt;br /&gt;
&lt;br /&gt;
'''Installation'''&lt;br /&gt;
&lt;br /&gt;
Installation of toolbelt uses the following command&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Gem install c66&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This automatically searches the newest version and installs it.&lt;br /&gt;
&lt;br /&gt;
= Model Class : assignment_participant.rb =&lt;br /&gt;
Th AssignmentParticipant model class is a subclass of the participant model class. Several methods in AssignmentParticipant model class required renaming and refactoring to ensure that the change is reflected in the entire project. The names were changed to follow method naming convention. Deprecated code was removed and re-coded to ensure that the code worked in future version as well. Duplicated codes were commented. Methods that are more general in the sub classes were moved to the parent class. Some methods that calculates the collusion in reviews between students were moved to a newly created model class file called collusion_cycle.rb &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;width:3%;&amp;quot;|S. No&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;|Method Name&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;|Change Made &lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;|Reason For Change&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
|''''' 1 '''''&lt;br /&gt;
|get_course_string&lt;br /&gt;
|Renamed to course_string and refactored &lt;br /&gt;
|To follow method naming convention&lt;br /&gt;
|-&lt;br /&gt;
|''''' 2 '''''&lt;br /&gt;
|get_cycle_deviation_score&lt;br /&gt;
|Moved to collusion_cycle.rb model class&lt;br /&gt;
|Related methods that calculate collusion in reviews have been moved to the newly created collusion_cycle.rb model class&lt;br /&gt;
|-&lt;br /&gt;
|''''' 3 '''''&lt;br /&gt;
|get_cycle_similarity_score&lt;br /&gt;
|Moved to collusion_cycle.rb model class&lt;br /&gt;
|Related methods that calculate collusion in reviews have been moved to the newly created collusion_cycle.rb model class&lt;br /&gt;
|-&lt;br /&gt;
|''''' 4 '''''&lt;br /&gt;
|get_feedback&lt;br /&gt;
|Renamed to feedback and refactored&lt;br /&gt;
|To follow method naming convention&lt;br /&gt;
|-&lt;br /&gt;
|''''' 5 '''''&lt;br /&gt;
|get_files&lt;br /&gt;
|Renamed to files_in_directory  and refactored&lt;br /&gt;
|To follow method naming convention&lt;br /&gt;
|-&lt;br /&gt;
|''''' 6 '''''&lt;br /&gt;
|get_four_node_cycles&lt;br /&gt;
|Moved to collusion_cycle.rb model class&lt;br /&gt;
|Related methods that calculate collusion in reviews have been moved to the newly created collusion_cycle.rb model class&lt;br /&gt;
|-&lt;br /&gt;
|''''' 7 '''''&lt;br /&gt;
|fullname&lt;br /&gt;
|Moved to parent model class – participant.rb &lt;br /&gt;
|General methods of the subclass are moved to Parent class&lt;br /&gt;
|-&lt;br /&gt;
|''''' 8 '''''&lt;br /&gt;
|get_metareviews&lt;br /&gt;
|Renamed to metareviews and refactored&lt;br /&gt;
|To follow method naming convention&lt;br /&gt;
|-&lt;br /&gt;
|''''' 9 '''''&lt;br /&gt;
|name&lt;br /&gt;
|Commented the method  &lt;br /&gt;
|The method is already in parent model class – participant.rb and can be used in this subclass through inheritance&lt;br /&gt;
|-&lt;br /&gt;
|''''' 10 '''''&lt;br /&gt;
|name&lt;br /&gt;
|Commented the method  &lt;br /&gt;
|The method is already in parent model class – participant.rb and can be used in this subclass through inheritance. Also it is a duplicate method in patricipant.rb&lt;br /&gt;
|- &lt;br /&gt;
|''''' 11 '''''&lt;br /&gt;
|get_review_score&lt;br /&gt;
|Renamed to review_score and refactored. Deprecated code has been removed and replaced with correct code.&lt;br /&gt;
|To follow method naming convention and ensure the code works in future versions. &lt;br /&gt;
|-&lt;br /&gt;
|''''' 12 '''''&lt;br /&gt;
|get_reviewees&lt;br /&gt;
|Renamed to reviewees and refactored. Deprecated code has been removed and replaced with correct code.&lt;br /&gt;
|To follow method naming convention and ensure the code works in future versions. &lt;br /&gt;
|-&lt;br /&gt;
|''''' 13 '''''&lt;br /&gt;
|get_reviewers&lt;br /&gt;
|Renamed to reviewers and refactored . Deprecated code has been commented and replaced with correct code.&lt;br /&gt;
|To follow method naming convention and ensure the code works in future versions. &lt;br /&gt;
|-&lt;br /&gt;
|''''' 14 '''''&lt;br /&gt;
|get_reviews&lt;br /&gt;
|Renamed to reviews and refactored &lt;br /&gt;
|To follow method naming convention&lt;br /&gt;
|-&lt;br /&gt;
|''''' 15 '''''&lt;br /&gt;
|get_reviews_by_reviewer&lt;br /&gt;
|Renamed to reviews_by_reviewer and refactored &lt;br /&gt;
|To follow method naming convention&lt;br /&gt;
|-&lt;br /&gt;
|''''' 16 '''''&lt;br /&gt;
|get_reviews_by_reviewer&lt;br /&gt;
|Commented the method &lt;br /&gt;
|To remove duplicated method in this class&lt;br /&gt;
|-&lt;br /&gt;
|''''' 17 '''''&lt;br /&gt;
|get_scores&lt;br /&gt;
|Renamed to scores and refactored &lt;br /&gt;
|To follow method naming convention&lt;br /&gt;
|-&lt;br /&gt;
|''''' 18 '''''&lt;br /&gt;
|get_submitted_files&lt;br /&gt;
|Renamed to submitted_files and refactored &lt;br /&gt;
|To follow method naming convention&lt;br /&gt;
|-&lt;br /&gt;
|''''' 19 '''''&lt;br /&gt;
|get_teammate_reviews&lt;br /&gt;
|Renamed to teammate_reviews and refactored &lt;br /&gt;
|To follow method naming convention&lt;br /&gt;
|-&lt;br /&gt;
|''''' 20 '''''&lt;br /&gt;
|get_three_node_cycles&lt;br /&gt;
|Moved to collusion_cycle.rb model class&lt;br /&gt;
|Related methods that calculate collusion in reviews have been moved to the newly created collusion_cycle.rb model class&lt;br /&gt;
|-&lt;br /&gt;
|''''' 21 '''''&lt;br /&gt;
|get_topic_string&lt;br /&gt;
|Method has been Commented&lt;br /&gt;
|It is already present in model super class – participant.rb&lt;br /&gt;
|-&lt;br /&gt;
|''''' 22 '''''&lt;br /&gt;
|get_two_node_cycles&lt;br /&gt;
|Moved to collusion_cycle.rb model class&lt;br /&gt;
|Related methods that calculate collusion in reviews have been moved to the newly created collusion_cycle.rb model class&lt;br /&gt;
|-&lt;br /&gt;
|''''' 23 '''''&lt;br /&gt;
|get_wiki_submissions&lt;br /&gt;
|Renamed to wiki_submissions and refactored&lt;br /&gt;
|To follow method naming convention&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
After changes were made, the existing tests ran successfully.&lt;br /&gt;
&lt;br /&gt;
= Changes in routes.rb =&lt;br /&gt;
&lt;br /&gt;
The following routes were added to make the code run error free. &lt;br /&gt;
&lt;br /&gt;
Routes for submit_hyperlink and remove_hyperlink were added below&lt;br /&gt;
&lt;br /&gt;
 resources :submitted_content do&lt;br /&gt;
    collection do&lt;br /&gt;
      get :view&lt;br /&gt;
      get :edit&lt;br /&gt;
     ''' post :submit_hyperlink &lt;br /&gt;
      get :remove_hyperlink'''&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
Routes for get and post method for export were added here&lt;br /&gt;
&lt;br /&gt;
 resources :export_file do&lt;br /&gt;
    collection do&lt;br /&gt;
      get :start&lt;br /&gt;
      '''get :export&lt;br /&gt;
      post :export'''&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
Routes for cancel, accept and decline were added here &lt;br /&gt;
&lt;br /&gt;
  resources :invitation do&lt;br /&gt;
    collection do&lt;br /&gt;
      '''get :cancel&lt;br /&gt;
      get :accept&lt;br /&gt;
      get :decline'''&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
= Comparison between Capistrano/Vlad/Heroku/AppFog/OpenShift/Cloud66/AWS Beanstalk =&lt;br /&gt;
&lt;br /&gt;
With so many automated tools available for Code Deployment and Release Management, the decision on which to use for a particular Ruby on rails application depends on various parameters to be considered.&lt;br /&gt;
Some comparative features of the different tools are as follows :&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;width:9%;&amp;quot;|Criteria for Comparision&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;|Capistrano&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;| Vlad&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;| Heroku&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;| AppFog&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;| OpenShift&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;| Cloud66&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;| AWS Beanstalk&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
|'''''Getting started with the tool'''''&lt;br /&gt;
|It is a framework that allows one to execute commands on a remote server using tools like ssh.&lt;br /&gt;
|Vlad deployment is similar to Capistrano, but less complex.&lt;br /&gt;
|Heroku’s offers a plan with first dyno free i.e. 512 MB that can be paired with Postgres starter DB to start an application with 0 initial cost&lt;br /&gt;
|AppFog’s initial plan offers 2GB of RAM free which is enough for small to medium traffic applications. By managing options provided for DB, queue server, application server, etc all part of the intial package, this is an excellent option to try out an application&lt;br /&gt;
|OpenShift is an open source platform and its free plan for starters has 3 gears for free wherein each gear consists of some RAM and disk space.&lt;br /&gt;
|Free plan provides one server for deployment.&lt;br /&gt;
|Provides an initial free tier. Without free tier no additional cost for Beanstalk. One only needs to pay for the AWS resources used.&lt;br /&gt;
|-&lt;br /&gt;
|'''''Scaling Memory'''''&lt;br /&gt;
|Memory increase would require additional servers/unused space in existing ones.&lt;br /&gt;
|Memory increase depends on additional servers available/unused space in existing ones.&lt;br /&gt;
|Memory increased in terms of dyno each of size 512 MB.&lt;br /&gt;
|Can configure any size for memory allocation&lt;br /&gt;
| -&lt;br /&gt;
| -&lt;br /&gt;
|Can automatically up/down scale the application by adjusting the default auto scaling settings.&lt;br /&gt;
|-&lt;br /&gt;
|'''''Scaling – Cost and Ease'''''&lt;br /&gt;
|While this provides greater flexibility as user is in control of the servers, it also causes additional overhead in terms of user needing to work both on Rails application and web server deployment.&lt;br /&gt;
|It can be integrated with Rake without any hindrances.&lt;br /&gt;
|Can dynamically scale up and down an application and pay as per hourly usages. Each additional dyno costs $35/mo&lt;br /&gt;
|Scaling takes up some time and need to pay for a month at the minimum. Scaling up to 4GB increases cost to $100/mo&lt;br /&gt;
| -&lt;br /&gt;
|Scaling using Cloud66 is relatively easy and hassle free.&lt;br /&gt;
|Scaling is fast and easy.&lt;br /&gt;
|-&lt;br /&gt;
|'''''Special features'''''&lt;br /&gt;
|For sensitive applications where handing over the control to a third party for deployment is not feasible, Capistrano is the way to go.&lt;br /&gt;
|It also provides support for tools like rsync and ssh.&lt;br /&gt;
|Lacks support for cross region deployment i.e. can’t select location of server where application gets deployed&lt;br /&gt;
|Supports cross region deployment i.e. if users of application primarily in Asia, can choose a server in Asia to deploy application, thus making the site faster.&lt;br /&gt;
| -&lt;br /&gt;
| -&lt;br /&gt;
|Provides complete flexibility and control of the resources to the user including the chance to take over control of some or all.&lt;br /&gt;
|-&lt;br /&gt;
|'''''Database support'''''&lt;br /&gt;
|Provides support for DB related to rails applications&lt;br /&gt;
|Provides support for DB related to rails applications&lt;br /&gt;
|It features serious production DB like RDBMS, Postgres, etc. and many Addons such as MongoDB, ClearDB, etc.&lt;br /&gt;
|Features free shared databases such as MongoDB, MySQL, Postgres but for other production DB’s need to use Addons&lt;br /&gt;
|Databases featured are MySQL, MongoDB and Postgres&lt;br /&gt;
| -&lt;br /&gt;
|Supports DB like Amazon SimpleDB, Amazon RDS, Amazon DynamoDB.&lt;br /&gt;
|-&lt;br /&gt;
|'''''Deployment strategy'''''&lt;br /&gt;
|Capistrano provides commands to be executed for automated deployment. It supports git.&lt;br /&gt;
|It is much easier to deploy using Vlad as compared to Capistrano.&lt;br /&gt;
|Deployment as easy as ‘git push’&lt;br /&gt;
|Deployment does not support git. It uses the af tool for deployment.&lt;br /&gt;
| -&lt;br /&gt;
|Since Cloud66 provides the platform in terms of Application Stack Management as a Service, it uses the infrastructure of AWS, Virtual Private Server, etc. for actual deployment. But the user doesn’t have to worry about configuration or monitoring of the servers. Hence provides easy deployment.&lt;br /&gt;
|Deployment options include Git, AWS management console, etc.&lt;br /&gt;
|-&lt;br /&gt;
|'''''Community Support availability'''''&lt;br /&gt;
| As it has been in use for a long time there is a huge community support available for Capistrano.&lt;br /&gt;
| -&lt;br /&gt;
|Heroku also provides a huge community support given the fact that there are a lot of Heroku users.&lt;br /&gt;
|Community is limited.&lt;br /&gt;
|RedHat being a reputed provider for open source solutions, the OpenShift community is gradually increasing and receiving support from a considerable community of users.&lt;br /&gt;
|Limited community support currently&lt;br /&gt;
|Has community forums and documentation.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Conclusion =&lt;br /&gt;
&lt;br /&gt;
Comparison and contrast between various deployment automated tools such as Capistrano, Heroku, Vlad, AppFog, OpenShift, Cloud66, AWS Beanstalk shows that each has its own pros and cons. &lt;br /&gt;
For instance, in a client based application where handing over the control of the application to a third party such as the deployment tool provider is impossible, AWS Beanstalk would be the obvious choice for the developer.&lt;br /&gt;
On the other hand, a novice Rails application developer might find all he needs in the starter plan of Heroku with the added bonus of a huge support community available to him for troubleshooting as he stumbles his way across the development of the application.&lt;br /&gt;
One may also choose the tool that provides the specific database support for your application. In case of large scale corporations where budgets are not that limited, the increasing costs with up-scaling of some tools would not be an obstacle.&lt;br /&gt;
Thus, various considerations about the application such as scalability requirement, security concerns, cost, availability of own resources such as servers etc., will help determine which tool is the most suitable for that application.&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= See Also =&lt;br /&gt;
&lt;br /&gt;
* Rails Solutions: Ruby on Rails Made Easy by Justin Williams&lt;br /&gt;
* http://guides.beanstalkapp.com/deployments/best-practices.html&lt;br /&gt;
* http://www.urbancode.com/anthill3-help-3.7/html/SettingUpDeploymentProcess.html&lt;br /&gt;
* http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=UseFMSGateway_3.html&lt;br /&gt;
* http://pic.dhe.ibm.com/infocenter/tivihelp/v26r1/index.jsp?topic=%2Fcom.ibm.dtm.doc%2Fdeploysoftware%2Fc_deploysw_process.html&lt;/div&gt;</summary>
		<author><name>Npari</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch2_0e808_nsv&amp;diff=81378</id>
		<title>CSC/ECE 517 Fall 2013/ch2 0e808 nsv</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch2_0e808_nsv&amp;diff=81378"/>
		<updated>2013-10-30T21:35:17Z</updated>

		<summary type="html">&lt;p&gt;Npari: /* Changes in routes.rb */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= E808: Refactor and test Participant, AssignmentParticipant, &amp;amp; CourseParticipant =&lt;br /&gt;
The requirements provided for the Open Source System project were as follows : &amp;lt;br&amp;gt;&lt;br /&gt;
'''Classes''': &amp;lt;br&amp;gt;&lt;br /&gt;
''participant.rb'' (197 lines)&amp;lt;br&amp;gt;&lt;br /&gt;
''assignment_participant.rb'' (476 lines)&amp;lt;br&amp;gt;&lt;br /&gt;
''course_participant.rb'' (90 lines)&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''What they do''': &amp;lt;br&amp;gt; &lt;br /&gt;
These classes keep track of a user who is participating in an assignment or a course.  participant.rb is the superclass, and the other two are the subclasses.&lt;br /&gt;
&lt;br /&gt;
'''What is needed''': &amp;lt;br&amp;gt; &lt;br /&gt;
The methods are complex; there are a lot of them (assignment_particpant has 44) and there is a lot of duplicated code.  assignment_participant contains code for detecting cycles of high grades (which can indicate collusion in reviews).  It would be better moved to another class.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
= Introduction =&lt;br /&gt;
&lt;br /&gt;
A cursory analysis of the code of the three model classes showed the existence of code duplication. In a lot of the cases the [http://en.wikipedia.org/wiki/Don%27t_Repeat_Yourself Don't Repeat Yourself] (DRY) principle was violated.&lt;br /&gt;
&lt;br /&gt;
In keeping with the [http://en.wikipedia.org/wiki/Agile_software_development Agile] methodology, which involves having regular discussions with all stakeholders, the design check for the project was performed with a meeting with the Instructor.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{viewxls:name=sample.xlsx|sheet=Summary|row=13|col=3}&lt;br /&gt;
&lt;br /&gt;
Next the code was analyzed in detail and the following plausible improvements were predicted.[[File:[[Media:Example.jpg]]]]&lt;br /&gt;
&lt;br /&gt;
After the final release of the code in development and testing stage, the master plan is prepared for deployment of components and sites based on the sign-offs provided by the project teams, stakeholders and customers. Then, the stabilization of the deployment is calculated based on some metrics. Once the deployment is stabilized, it is reviewed and the process of deployment is complete. The final sign-off is given by the stakeholders.&lt;br /&gt;
&lt;br /&gt;
=Participant model: participant.rb=&lt;br /&gt;
&lt;br /&gt;
Code deployment is a procedure where the application is transferred onto a production server, so that it is made available for all the other users. It is the part of release management process which involves several activities. These activities are inter-dependent and need to be completed in a specific order for successful code deployment. &lt;br /&gt;
&lt;br /&gt;
'''Code Deployment Activities'''&lt;br /&gt;
&lt;br /&gt;
The various deployment activities include &amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/Software_deployment&amp;lt;/ref&amp;gt;&lt;br /&gt;
* Release : Gathering all system components in preparation for deployment&lt;br /&gt;
* Install and activate : Installing the application components and getting them in the 'ready' state&lt;br /&gt;
* Deactivate : Shutting down components that are out-dated or that may interfere with updating others&lt;br /&gt;
* Adapt : Making changes to application to accommodate changes in environment&lt;br /&gt;
* Update : Having a newer release installed in place of the old one&lt;br /&gt;
* Built-in : There are components built-into some tools for complete/semi-automating updates&lt;br /&gt;
* Version tracking : These systems help the user to know if newer versions of a software are available and if yes, help install them&lt;br /&gt;
* Uninstall : Opposite of installation and involves complete removal of software and its dependencies from the environment&lt;br /&gt;
* Retire : This involves making a software obsolete and is the end of software life cycle&lt;br /&gt;
&lt;br /&gt;
The general guidelines for the deployment process remain the same but there are variations in the specific requirements with each software system.&lt;br /&gt;
&lt;br /&gt;
=AssignmentParticipant model: assignment_participant.rb=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ref&amp;gt;http://searchitchannel.techtarget.com/definition/release-management&amp;lt;/ref&amp;gt;&lt;br /&gt;
Release management is a software process which takes care of the development, testing, deployment and support stages of software releases. The start of release management happens in the development phase, where it requests for new features or changes in the existing application. When the request is accepted, a new release is planned and designed. This design is built and then enters the testing phase, where the release is tested until it is accepted. After the release is accepted as a candidate, it enters the deployment phase where it is implemented. Once deployed, the release is made available and sent to support phase for collection of bug reports. Once the support phase is done, the bugs and other issues lead to requests for changes and the cycle is then repeated.&lt;br /&gt;
&lt;br /&gt;
=CourseParticipant model:course_participant.rb =&lt;br /&gt;
&amp;lt;ref&amp;gt;http://www.urbancode.com/html/solutions/deployment-automation.html&amp;lt;/ref&amp;gt;&lt;br /&gt;
Automation of a process is required when the manual process is more error prone. Also, for large real world applications, the manual process is very complex and time consuming. Incomplete documentation hampers a manual process further. Deployment also has to be done in many environments and involves varied steps to be followed in a specific order. Manual process needs repetition of same procedure to each and every environment which leads to many errors and the process becomes costly.&lt;br /&gt;
In web applications each new release has to be deployed to and tested in development, testing and production environments.The number of software releases in web applications  are more and hence the need to automate release management is also greater.&lt;br /&gt;
&lt;br /&gt;
Automation of deployment delivers applications faster and with fewer errors. The defined software deployment process can be applied across all environments consistently every time. With various automated application deployment platforms now readily available, manual deployments have become a thing of the past.&lt;br /&gt;
&lt;br /&gt;
Lets take a look at the various Deployment Automation tools available to Ruby on Rails applications. For the purposes of this article the process of manual deployment of a Ruby on Rails application is out of scope.&lt;br /&gt;
&lt;br /&gt;
= Tests =&lt;br /&gt;
&lt;br /&gt;
Some of the automated tools that are widely used for the process of deployment with Ruby on Rails are &lt;br /&gt;
&lt;br /&gt;
* Capistrano&lt;br /&gt;
* Heroku&lt;br /&gt;
* Vlad&lt;br /&gt;
* AppFog&lt;br /&gt;
* AWS Elastic Beanstalk&lt;br /&gt;
* OpenShift&lt;br /&gt;
* Cloud 66&lt;br /&gt;
&lt;br /&gt;
= yml files =&lt;br /&gt;
&lt;br /&gt;
[[File:Capistrano.jpg|frame|right|&amp;lt;ref&amp;gt;http://www.capistranorb.com/&amp;lt;/ref&amp;gt;|Capistrano Logo]]&lt;br /&gt;
&lt;br /&gt;
Capistrano is a Ruby tool which helps deploy an application to the server. Capistrano allows deploying to multiple machines at a time. It has many advanced options which help to deploy different kinds of applications. It also supports the scripting and execution of tasks.&lt;br /&gt;
&lt;br /&gt;
Capistrano can be used to:&lt;br /&gt;
&lt;br /&gt;
* Deploy applications onto many machines simultaneously.&lt;br /&gt;
* Automate the audits&lt;br /&gt;
* Automate the common tasks of a team.&lt;br /&gt;
&lt;br /&gt;
Capistrano can be made a part of a larger software by integrating it with another Ruby software.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ref&amp;gt;http://www.capistranorb.com/documentation/getting-started/installation/&amp;lt;/ref&amp;gt;  &lt;br /&gt;
'''General Usage'''&lt;br /&gt;
&lt;br /&gt;
The following commands will clone Capistrano, build the gem and install it locally.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem install capistrano --pre --trust-policy HighSecurity&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Or grab the bleeding edge head from:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ git clone -b v3 https://github.com/capistrano/capistrano.git&lt;br /&gt;
$ cd capistrano&lt;br /&gt;
$ gem build *.gemspec&lt;br /&gt;
$ gem install *.gem&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
'''Signed Rubygems'''&lt;br /&gt;
&lt;br /&gt;
As Capistrano is a signed gem, you should always be careful to use the --trust-policy flag when installing Gems, or since Bundler 1.3 you should use the same flag:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem install capistrano --pre --trust-policy HighSecurity&lt;br /&gt;
$ bundle install --trust-policy HighSecurity&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If you get a message that looks like:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ERROR:  While executing gem ... (Gem::Security::Exception)&lt;br /&gt;
unsigned gems are not allowed by the High Security policy&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then please complain to your Gem author, and have them start signing their Gems.&lt;br /&gt;
&lt;br /&gt;
'''Usage in a Rails project'''&lt;br /&gt;
&lt;br /&gt;
Add the following lines to the Gemfile to the :development group ideally.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
group :development do&lt;br /&gt;
  gem 'capistrano-rails', '~&amp;gt; 0.0.7'&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= routes.rb =&lt;br /&gt;
&lt;br /&gt;
[[File:Heroku.jpg|frame|right|&amp;lt;ref&amp;gt;https://www.heroku.com/&amp;lt;/ref&amp;gt;|Heroku Logo]]&lt;br /&gt;
&lt;br /&gt;
Heroku is a cloud [http://en.wikipedia.org/wiki/Platform_as_a_service Platform as a Service] (PaaS) which supports several programming languages. PaaS is a service model of Cloud computing wherein the provider offers resources like servers, software, database, etc. to the developer. Heroku helps manage environment-specific configurations separately from the source code, which provides greater security.&lt;br /&gt;
Heroku is not just a deployment environment but it also impacts the development process. There are several principles of the development of application on Heroku.&amp;lt;br&amp;gt;&lt;br /&gt;
•	Applications and Codebases : Most of the development of the application is done on application’s codebase which is stored in a [http://en.wikipedia.org/wiki/Version_control_system Version Control System (VCS)] &amp;lt;br&amp;gt;&lt;br /&gt;
•	Dependencies : All the application dependencies such as plugins should be declared explicitly&amp;lt;br&amp;gt;&lt;br /&gt;
•	Configuration : Configuration of an application is all that varies in different deploys&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Getting Started with Heroku'''&lt;br /&gt;
&lt;br /&gt;
1. To get started with Heroku, go to https://id.heroku.com/signup/devcenter, signup for a Heroku account. &lt;br /&gt;
&lt;br /&gt;
2. Then, download and install the Heroku toolbelt at https://toolbelt.heroku.com/ for your development system. You can also use Heroku command line instead of the online Heroku application. &lt;br /&gt;
&lt;br /&gt;
3. After installing one of them, login using the email address and password used when creating the Heroku account:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ref&amp;gt;https://github.com/heroku/heroku&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ heroku login&lt;br /&gt;
Enter your Heroku credentials.&lt;br /&gt;
Email: adam@example.com&lt;br /&gt;
Password:&lt;br /&gt;
Could not find an existing public key.&lt;br /&gt;
Would you like to generate one? [Yn]&lt;br /&gt;
Generating new SSH public key.&lt;br /&gt;
Uploading SSH public key /Users/adam/.ssh/id_rsa.pub&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Deploying Applications'''&lt;br /&gt;
&lt;br /&gt;
Heroku uses [http://en.wikipedia.org/wiki/Git_(software) git] primarily to deploy the applications. When an application is created on Heroku, it associates the new git which is remote with the local git repository.&lt;br /&gt;
&lt;br /&gt;
As a result, deploying code is just the familiar git push, but to the heroku remote instead:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ref&amp;gt;https://devcenter.heroku.com/articles/how-heroku-works#deploying-applications&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ git push heroku master&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Vlad ==&lt;br /&gt;
&lt;br /&gt;
[[File:Vlad.png|frame|right|&amp;lt;ref&amp;gt;http://rubyhitsquad.com/Vlad_the_Deployer.html&amp;lt;/ref&amp;gt;|Vlad Logo]]&lt;br /&gt;
&lt;br /&gt;
Vlad is another automated deployment tool which is simple to use. It integrates with rake and uses standard tools like SSH, rsync etc.&lt;br /&gt;
&lt;br /&gt;
The main features of Vlad include&lt;br /&gt;
* It uses very few dependencies which are simple.&lt;br /&gt;
* It can execute commands on more than one server.&lt;br /&gt;
* It syncs files to one or more servers.&lt;br /&gt;
* It matches local and remote tasks.&lt;br /&gt;
* It runs tests very fast.&lt;br /&gt;
&lt;br /&gt;
'''Getting started with Vlad'''&amp;lt;ref&amp;gt;http://docs.seattlerb.org/vlad/doco/getting_started_txt.html&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create a deploy file, usually in “config/deploy.rb”:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set :application, &amp;quot;project&amp;quot;&lt;br /&gt;
set :domain, &amp;quot;example.com&amp;quot;&lt;br /&gt;
set :deploy_to, &amp;quot;/path/to/install&amp;quot;&lt;br /&gt;
set :repository, 'http://svn.example.com/project/branches/stable/'&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This defaults to using ‘svn export’ from repository, and a single server for app, db, and www.&lt;br /&gt;
&lt;br /&gt;
If you want a multi-config environment, change your config like so:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set :application, &amp;quot;project&amp;quot;&lt;br /&gt;
set :repository, 'http://svn.example.com/project/branches/stable/'&lt;br /&gt;
&lt;br /&gt;
task :beta do&lt;br /&gt;
  set :domain,    &amp;quot;beta.example.com&amp;quot;&lt;br /&gt;
  set :deploy_to, &amp;quot;/path/to/install-beta&amp;quot;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
task :dev do&lt;br /&gt;
  set :domain,    &amp;quot;dev.example.com&amp;quot;&lt;br /&gt;
  set :deploy_to, &amp;quot;/path/to/install-dev&amp;quot;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
task :prod do&lt;br /&gt;
  set :domain,    &amp;quot;example.com&amp;quot;&lt;br /&gt;
  set :deploy_to, &amp;quot;/path/to/install&amp;quot;&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Add the following to your Rakefile:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
begin&lt;br /&gt;
  require 'vlad'&lt;br /&gt;
  Vlad.load&lt;br /&gt;
rescue LoadError&lt;br /&gt;
  # do nothing&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Vlad.load has a lot of flexibility.&lt;br /&gt;
&lt;br /&gt;
You can install vlad via:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;% rake vlad:invoke COMMAND='sudo gem install vlad -y'&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Initial Launch&lt;br /&gt;
&amp;lt;pre&amp;gt;Run rake vlad:setup vlad:update vlad:migrate vlad:start&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ref&amp;gt;http://docs.seattlerb.org/vlad/index.html&amp;lt;/ref&amp;gt;&lt;br /&gt;
'''Running Vlad'''&lt;br /&gt;
&lt;br /&gt;
* Using rake&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
task :shazam! do&lt;br /&gt;
  Rake::Task[:action1].invoke&lt;br /&gt;
  Rake::Task[:action2].invoke&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Using SSH&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Host example.com&lt;br /&gt;
    User fluffy_bunny&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== AppFog == &lt;br /&gt;
&lt;br /&gt;
[[File:AppFog.jpg|frame|right|&amp;lt;ref&amp;gt;https://www.appfog.com/&amp;lt;/ref&amp;gt;|AppFog Logo]]&lt;br /&gt;
&lt;br /&gt;
AppFog is a PaaS built on Cloud Foundry which is another PaaS platform for deploying applications. &lt;br /&gt;
&lt;br /&gt;
Features of AppFog are&lt;br /&gt;
* It launches and runs fast.&lt;br /&gt;
* It does not require configuring servers or installing frameworks.&lt;br /&gt;
* It is compatible with code management systems like git, svn etc.&lt;br /&gt;
&lt;br /&gt;
'''Installing AppFog'''&amp;lt;ref&amp;gt;http://blog.appfog.com/getting-started-with-appfogs-command-line/&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
‘af‘ command line tool is written in Ruby for installation.&lt;br /&gt;
&lt;br /&gt;
Download and install [http://rubyinstaller.org/ Ruby Installer] for Windows. The installer already includes RubyGems.&lt;br /&gt;
&lt;br /&gt;
Be sure you use the Ruby-enabled command prompt window when you later install and use af. You access this command prompt from the Windows Start menu (All Programs &amp;gt; Ruby &amp;gt; Start Command Prompt with Ruby).&lt;br /&gt;
&lt;br /&gt;
Finally, update RubyGems from the Ruby Command Prompt:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem update --system&lt;br /&gt;
$ gem install af&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Login with:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ af login&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Finally from within your source code directory:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ af update hello-node&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Getting Started with AppFog'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
target [url]                                       Reports current target or sets a new target&lt;br /&gt;
login [email] [--email, --password]                Login&lt;br /&gt;
info                                               System and account information&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== AWS Elastic Beanstalk==&lt;br /&gt;
&lt;br /&gt;
[[File:AWSLogo.jpg|frame|right|&amp;lt;ref&amp;gt;https://aws.amazon.com&amp;lt;/ref&amp;gt;|AWS Logo]]&lt;br /&gt;
&lt;br /&gt;
Amazon Wen Services(AWS) offers [http://en.wikipedia.org/wiki/Infrastructure_as_a_service#Infrastructure_as_a_service_.28IaaS.29 Infrastructure as a Service] (IaaS) and provides a complete set of resources for the development of a web application in minutes. AWS Elastic Beanstalk is a deployment tool of the AWS cloud.&lt;br /&gt;
&lt;br /&gt;
With AWS Elastic Beanstalk, applications can be quickly deployed and managed in the AWS cloud without worrying about the infrastructure that runs those applications. AWS Elastic Beanstalk reduces management complexity without restricting choice or control. Once the application is uploaded AWS Elastic Beanstalk automatically handles the details of capacity provisioning, load balancing, scaling, and application health monitoring. AWS Elastic Beanstalk uses highly reliable and scalable services.&lt;br /&gt;
&lt;br /&gt;
'''AWS CLI'''&lt;br /&gt;
&lt;br /&gt;
AWS Elastic Beanstalk uses a command line tool Eb, which helps you to deploy your application easily.&lt;br /&gt;
&lt;br /&gt;
'''Getting Started with Eb'''&amp;lt;ref&amp;gt;http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/command-reference-get-started.html&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To get started with the beanstalk CLI, you will need to download the command line tools at the [http://aws.amazon.com/code/6752709412171743 AWS Sample Code &amp;amp; Libraries] website.&lt;br /&gt;
&lt;br /&gt;
Step 1: Initialize Your Git Repository&lt;br /&gt;
&lt;br /&gt;
Eb is a command line interface that enables you to deploy applications quickly and more easily using Git. Eb is available as part of the Elastic Beanstalk command line tools package. &lt;br /&gt;
&lt;br /&gt;
1. To install eb,install the following software onto your local computer:&lt;br /&gt;
&lt;br /&gt;
* Git 1.6.6 or later. To download Git, go to http://git-scm.com/.&lt;br /&gt;
* PowerShell 2.0.&lt;br /&gt;
&lt;br /&gt;
2. Initialize your Git repository.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git init &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Step 2: Configuring AWS Elastic Beanstalk&lt;br /&gt;
&lt;br /&gt;
1. From your directory where you created your local repository, type the following command.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
eb init&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2. When you are prompted for the access key ID, type your access key ID. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Enter your AWS Access Key ID (current value is &amp;quot;AKIAIOSFODNN7EXAMPLE&amp;quot;): &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3. When you are prompted for the secret access key, type your secret access key.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Enter your AWS Secret Access Key (current value is &amp;quot;wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY&amp;quot;): &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
4. When you are prompted for the AWS Elastic Beanstalk application name, type the name of the application. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Enter an AWS Elastic Beanstalk application name (auto-generated value is &amp;quot;windows&amp;quot;): &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Note:&lt;br /&gt;
If you have a space in your application name, make sure you do not use quotes.&lt;br /&gt;
&lt;br /&gt;
5. When you are prompted for the AWS Elastic Beanstalk environment name, type the name of the environment. AWS Elastic Beanstalk automatically creates an environment name based on your application name. If you want to accept the default, press Enter.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Enter an AWS Elastic Beanstalk environment name (current value is &amp;quot;HelloWorld-env&amp;quot;): &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
6. When you are prompted to create an Amazon RDS DB instance, type y or n. For this example, we'll type y.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Create an RDS DB Instance? [y/n]:&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
7. When you are prompted to enter your RDS user master password, type your password containing from 8 to 16 printable ASCII characters (excluding /, \, and @).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Enter an RDS DB master password: &lt;br /&gt;
Retype password to confirm: &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can now get started with the AWS Elastic Beanstalk.&lt;br /&gt;
&lt;br /&gt;
== OpenShift ==&lt;br /&gt;
&lt;br /&gt;
[[File:OpenShift.png|frame|right|&amp;lt;ref&amp;gt;https://en.wikipedia.org&amp;lt;/ref&amp;gt;|OpenShift Logo]]&lt;br /&gt;
&lt;br /&gt;
Another free and open source PaaS for deploying applications is OpenShift created by [[http://en.wikipedia.org/wiki/RedHat RedHat]]. &lt;br /&gt;
&lt;br /&gt;
'''Considerations'''&lt;br /&gt;
* Databases&lt;br /&gt;
&lt;br /&gt;
To use the application outside the OpenShift environment one needs to change the variables as the application is configured to use database in production mode in OpenShift.&lt;br /&gt;
&lt;br /&gt;
* Assets&lt;br /&gt;
&lt;br /&gt;
The assets are precompiled everytime application is pushed to OpenShift.&lt;br /&gt;
&lt;br /&gt;
* Security&lt;br /&gt;
&lt;br /&gt;
Security related variables are to be unique across the application.&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;ref&amp;gt;https://github.com/openshift/rails-example&amp;lt;/ref&amp;gt;&lt;br /&gt;
'''Installation'''&lt;br /&gt;
&lt;br /&gt;
1.	Create an account at http://openshift.redhat.com/&lt;br /&gt;
&lt;br /&gt;
2.	Create a rails application&lt;br /&gt;
	&amp;lt;pre&amp;gt;rhc app create -a railsapp -t ruby-1.9&amp;lt;/pre&amp;gt;&lt;br /&gt;
3.	Add mysql support to your application&lt;br /&gt;
	&amp;lt;pre&amp;gt;rhc cartridge add -a railsapp -c mysql-5.1&amp;lt;/pre&amp;gt;&lt;br /&gt;
4.	Add this upstream Rails quickstart repository&lt;br /&gt;
&amp;lt;pre&amp;gt;cd railsapp&lt;br /&gt;
git remote add upstream -m master git://github.com/openshift/rails-example.git&lt;br /&gt;
git pull -s recursive -X theirs upstream master&amp;lt;/pre&amp;gt;&lt;br /&gt;
5.	Push your new code&lt;br /&gt;
&amp;lt;pre&amp;gt;git push&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Future scope ==&lt;br /&gt;
&lt;br /&gt;
[[File:Cloud 66.jpg|frame|right|&amp;lt;ref&amp;gt;https://www.cloud66.com/&amp;lt;/ref&amp;gt;|Cloud66 Logo]]&lt;br /&gt;
&lt;br /&gt;
Cloud 66 combines the convenience of Platform-as-a-Service (PaaS) and the flexibility and control of Infrastructure-as-a-Service (IaaS). This platform allows easy deployment of application, so there is no overhead of configuring or monitoring the servers.&lt;br /&gt;
&lt;br /&gt;
'''Cloud 66 Command line Toolbelt'''&lt;br /&gt;
&lt;br /&gt;
Toolbelt is an open source released to deploy the application.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ref&amp;gt;http://blog.cloud66.com/&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Getting Started with Cloud 66'''&lt;br /&gt;
&lt;br /&gt;
1. Go to the [https://www.cloud66.com/users/sign_up sign up] page and create a Cloud 66 account.&lt;br /&gt;
&lt;br /&gt;
2. Go to Cloud 66 Dashboard and [https://www.cloud66.com/help/first_stack build your first stack].&lt;br /&gt;
&lt;br /&gt;
'''Installation'''&lt;br /&gt;
&lt;br /&gt;
Installation of toolbelt uses the following command&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Gem install c66&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This automatically searches the newest version and installs it.&lt;br /&gt;
&lt;br /&gt;
= Model Class : assignment_participant.rb =&lt;br /&gt;
Th AssignmentParticipant model class is a subclass of the participant model class. Several methods in AssignmentParticipant model class required renaming and refactoring to ensure that the change is reflected in the entire project. The names were changed to follow method naming convention. Deprecated code was removed and re-coded to ensure that the code worked in future version as well. Duplicated codes were commented. Methods that are more general in the sub classes were moved to the parent class. Some methods that calculates the collusion in reviews between students were moved to a newly created model class file called collusion_cycle.rb &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;width:3%;&amp;quot;|S. No&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;|Method Name&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;|Change Made &lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;|Reason For Change&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
|''''' 1 '''''&lt;br /&gt;
|get_course_string&lt;br /&gt;
|Renamed to course_string and refactored &lt;br /&gt;
|To follow method naming convention&lt;br /&gt;
|-&lt;br /&gt;
|''''' 2 '''''&lt;br /&gt;
|get_cycle_deviation_score&lt;br /&gt;
|Moved to collusion_cycle.rb model class&lt;br /&gt;
|Related methods that calculate collusion in reviews have been moved to the newly created collusion_cycle.rb model class&lt;br /&gt;
|-&lt;br /&gt;
|''''' 3 '''''&lt;br /&gt;
|get_cycle_similarity_score&lt;br /&gt;
|Moved to collusion_cycle.rb model class&lt;br /&gt;
|Related methods that calculate collusion in reviews have been moved to the newly created collusion_cycle.rb model class&lt;br /&gt;
|-&lt;br /&gt;
|''''' 4 '''''&lt;br /&gt;
|get_feedback&lt;br /&gt;
|Renamed to feedback and refactored&lt;br /&gt;
|To follow method naming convention&lt;br /&gt;
|-&lt;br /&gt;
|''''' 5 '''''&lt;br /&gt;
|get_files&lt;br /&gt;
|Renamed to files_in_directory  and refactored&lt;br /&gt;
|To follow method naming convention&lt;br /&gt;
|-&lt;br /&gt;
|''''' 6 '''''&lt;br /&gt;
|get_four_node_cycles&lt;br /&gt;
|Moved to collusion_cycle.rb model class&lt;br /&gt;
|Related methods that calculate collusion in reviews have been moved to the newly created collusion_cycle.rb model class&lt;br /&gt;
|-&lt;br /&gt;
|''''' 7 '''''&lt;br /&gt;
|fullname&lt;br /&gt;
|Moved to parent model class – participant.rb &lt;br /&gt;
|General methods of the subclass are moved to Parent class&lt;br /&gt;
|-&lt;br /&gt;
|''''' 8 '''''&lt;br /&gt;
|get_metareviews&lt;br /&gt;
|Renamed to metareviews and refactored&lt;br /&gt;
|To follow method naming convention&lt;br /&gt;
|-&lt;br /&gt;
|''''' 9 '''''&lt;br /&gt;
|name&lt;br /&gt;
|Commented the method  &lt;br /&gt;
|The method is already in parent model class – participant.rb and can be used in this subclass through inheritance&lt;br /&gt;
|-&lt;br /&gt;
|''''' 10 '''''&lt;br /&gt;
|name&lt;br /&gt;
|Commented the method  &lt;br /&gt;
|The method is already in parent model class – participant.rb and can be used in this subclass through inheritance. Also it is a duplicate method in patricipant.rb&lt;br /&gt;
|- &lt;br /&gt;
|''''' 11 '''''&lt;br /&gt;
|get_review_score&lt;br /&gt;
|Renamed to review_score and refactored. Deprecated code has been removed and replaced with correct code.&lt;br /&gt;
|To follow method naming convention and ensure the code works in future versions. &lt;br /&gt;
|-&lt;br /&gt;
|''''' 12 '''''&lt;br /&gt;
|get_reviewees&lt;br /&gt;
|Renamed to reviewees and refactored. Deprecated code has been removed and replaced with correct code.&lt;br /&gt;
|To follow method naming convention and ensure the code works in future versions. &lt;br /&gt;
|-&lt;br /&gt;
|''''' 13 '''''&lt;br /&gt;
|get_reviewers&lt;br /&gt;
|Renamed to reviewers and refactored . Deprecated code has been commented and replaced with correct code.&lt;br /&gt;
|To follow method naming convention and ensure the code works in future versions. &lt;br /&gt;
|-&lt;br /&gt;
|''''' 14 '''''&lt;br /&gt;
|get_reviews&lt;br /&gt;
|Renamed to reviews and refactored &lt;br /&gt;
|To follow method naming convention&lt;br /&gt;
|-&lt;br /&gt;
|''''' 15 '''''&lt;br /&gt;
|get_reviews_by_reviewer&lt;br /&gt;
|Renamed to reviews_by_reviewer and refactored &lt;br /&gt;
|To follow method naming convention&lt;br /&gt;
|-&lt;br /&gt;
|''''' 16 '''''&lt;br /&gt;
|get_reviews_by_reviewer&lt;br /&gt;
|Commented the method &lt;br /&gt;
|To remove duplicated method in this class&lt;br /&gt;
|-&lt;br /&gt;
|''''' 17 '''''&lt;br /&gt;
|get_scores&lt;br /&gt;
|Renamed to scores and refactored &lt;br /&gt;
|To follow method naming convention&lt;br /&gt;
|-&lt;br /&gt;
|''''' 18 '''''&lt;br /&gt;
|get_submitted_files&lt;br /&gt;
|Renamed to submitted_files and refactored &lt;br /&gt;
|To follow method naming convention&lt;br /&gt;
|-&lt;br /&gt;
|''''' 19 '''''&lt;br /&gt;
|get_teammate_reviews&lt;br /&gt;
|Renamed to teammate_reviews and refactored &lt;br /&gt;
|To follow method naming convention&lt;br /&gt;
|-&lt;br /&gt;
|''''' 20 '''''&lt;br /&gt;
|get_three_node_cycles&lt;br /&gt;
|Moved to collusion_cycle.rb model class&lt;br /&gt;
|Related methods that calculate collusion in reviews have been moved to the newly created collusion_cycle.rb model class&lt;br /&gt;
|-&lt;br /&gt;
|''''' 21 '''''&lt;br /&gt;
|get_topic_string&lt;br /&gt;
|Method has been Commented&lt;br /&gt;
|It is already present in model super class – participant.rb&lt;br /&gt;
|-&lt;br /&gt;
|''''' 22 '''''&lt;br /&gt;
|get_two_node_cycles&lt;br /&gt;
|Moved to collusion_cycle.rb model class&lt;br /&gt;
|Related methods that calculate collusion in reviews have been moved to the newly created collusion_cycle.rb model class&lt;br /&gt;
|-&lt;br /&gt;
|''''' 23 '''''&lt;br /&gt;
|get_wiki_submissions&lt;br /&gt;
|Renamed to wiki_submissions and refactored&lt;br /&gt;
|To follow method naming convention&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
After changes were made, the existing tests ran successfully.&lt;br /&gt;
&lt;br /&gt;
= Changes in routes.rb =&lt;br /&gt;
&lt;br /&gt;
The following routes were added to make the code run error free. &lt;br /&gt;
&lt;br /&gt;
Routes for submit_hyperlink and remove_hyperlink were added below&lt;br /&gt;
&lt;br /&gt;
resources :submitted_content do&lt;br /&gt;
    collection do&lt;br /&gt;
      get :view&lt;br /&gt;
      get :edit&lt;br /&gt;
     ''' post :submit_hyperlink &lt;br /&gt;
      get :remove_hyperlink'''&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
Routes for get and post method for export were added here&lt;br /&gt;
&lt;br /&gt;
 resources :export_file do&lt;br /&gt;
    collection do&lt;br /&gt;
      get :start&lt;br /&gt;
      '''get :export&lt;br /&gt;
      post :export'''&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
Routes for cancel, accept and decline were added here &lt;br /&gt;
&lt;br /&gt;
  resources :invitation do&lt;br /&gt;
    collection do&lt;br /&gt;
      '''get :cancel&lt;br /&gt;
      get :accept&lt;br /&gt;
      get :decline'''&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
= Comparison between Capistrano/Vlad/Heroku/AppFog/OpenShift/Cloud66/AWS Beanstalk =&lt;br /&gt;
&lt;br /&gt;
With so many automated tools available for Code Deployment and Release Management, the decision on which to use for a particular Ruby on rails application depends on various parameters to be considered.&lt;br /&gt;
Some comparative features of the different tools are as follows :&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;width:9%;&amp;quot;|Criteria for Comparision&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;|Capistrano&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;| Vlad&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;| Heroku&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;| AppFog&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;| OpenShift&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;| Cloud66&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;| AWS Beanstalk&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
|'''''Getting started with the tool'''''&lt;br /&gt;
|It is a framework that allows one to execute commands on a remote server using tools like ssh.&lt;br /&gt;
|Vlad deployment is similar to Capistrano, but less complex.&lt;br /&gt;
|Heroku’s offers a plan with first dyno free i.e. 512 MB that can be paired with Postgres starter DB to start an application with 0 initial cost&lt;br /&gt;
|AppFog’s initial plan offers 2GB of RAM free which is enough for small to medium traffic applications. By managing options provided for DB, queue server, application server, etc all part of the intial package, this is an excellent option to try out an application&lt;br /&gt;
|OpenShift is an open source platform and its free plan for starters has 3 gears for free wherein each gear consists of some RAM and disk space.&lt;br /&gt;
|Free plan provides one server for deployment.&lt;br /&gt;
|Provides an initial free tier. Without free tier no additional cost for Beanstalk. One only needs to pay for the AWS resources used.&lt;br /&gt;
|-&lt;br /&gt;
|'''''Scaling Memory'''''&lt;br /&gt;
|Memory increase would require additional servers/unused space in existing ones.&lt;br /&gt;
|Memory increase depends on additional servers available/unused space in existing ones.&lt;br /&gt;
|Memory increased in terms of dyno each of size 512 MB.&lt;br /&gt;
|Can configure any size for memory allocation&lt;br /&gt;
| -&lt;br /&gt;
| -&lt;br /&gt;
|Can automatically up/down scale the application by adjusting the default auto scaling settings.&lt;br /&gt;
|-&lt;br /&gt;
|'''''Scaling – Cost and Ease'''''&lt;br /&gt;
|While this provides greater flexibility as user is in control of the servers, it also causes additional overhead in terms of user needing to work both on Rails application and web server deployment.&lt;br /&gt;
|It can be integrated with Rake without any hindrances.&lt;br /&gt;
|Can dynamically scale up and down an application and pay as per hourly usages. Each additional dyno costs $35/mo&lt;br /&gt;
|Scaling takes up some time and need to pay for a month at the minimum. Scaling up to 4GB increases cost to $100/mo&lt;br /&gt;
| -&lt;br /&gt;
|Scaling using Cloud66 is relatively easy and hassle free.&lt;br /&gt;
|Scaling is fast and easy.&lt;br /&gt;
|-&lt;br /&gt;
|'''''Special features'''''&lt;br /&gt;
|For sensitive applications where handing over the control to a third party for deployment is not feasible, Capistrano is the way to go.&lt;br /&gt;
|It also provides support for tools like rsync and ssh.&lt;br /&gt;
|Lacks support for cross region deployment i.e. can’t select location of server where application gets deployed&lt;br /&gt;
|Supports cross region deployment i.e. if users of application primarily in Asia, can choose a server in Asia to deploy application, thus making the site faster.&lt;br /&gt;
| -&lt;br /&gt;
| -&lt;br /&gt;
|Provides complete flexibility and control of the resources to the user including the chance to take over control of some or all.&lt;br /&gt;
|-&lt;br /&gt;
|'''''Database support'''''&lt;br /&gt;
|Provides support for DB related to rails applications&lt;br /&gt;
|Provides support for DB related to rails applications&lt;br /&gt;
|It features serious production DB like RDBMS, Postgres, etc. and many Addons such as MongoDB, ClearDB, etc.&lt;br /&gt;
|Features free shared databases such as MongoDB, MySQL, Postgres but for other production DB’s need to use Addons&lt;br /&gt;
|Databases featured are MySQL, MongoDB and Postgres&lt;br /&gt;
| -&lt;br /&gt;
|Supports DB like Amazon SimpleDB, Amazon RDS, Amazon DynamoDB.&lt;br /&gt;
|-&lt;br /&gt;
|'''''Deployment strategy'''''&lt;br /&gt;
|Capistrano provides commands to be executed for automated deployment. It supports git.&lt;br /&gt;
|It is much easier to deploy using Vlad as compared to Capistrano.&lt;br /&gt;
|Deployment as easy as ‘git push’&lt;br /&gt;
|Deployment does not support git. It uses the af tool for deployment.&lt;br /&gt;
| -&lt;br /&gt;
|Since Cloud66 provides the platform in terms of Application Stack Management as a Service, it uses the infrastructure of AWS, Virtual Private Server, etc. for actual deployment. But the user doesn’t have to worry about configuration or monitoring of the servers. Hence provides easy deployment.&lt;br /&gt;
|Deployment options include Git, AWS management console, etc.&lt;br /&gt;
|-&lt;br /&gt;
|'''''Community Support availability'''''&lt;br /&gt;
| As it has been in use for a long time there is a huge community support available for Capistrano.&lt;br /&gt;
| -&lt;br /&gt;
|Heroku also provides a huge community support given the fact that there are a lot of Heroku users.&lt;br /&gt;
|Community is limited.&lt;br /&gt;
|RedHat being a reputed provider for open source solutions, the OpenShift community is gradually increasing and receiving support from a considerable community of users.&lt;br /&gt;
|Limited community support currently&lt;br /&gt;
|Has community forums and documentation.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Conclusion =&lt;br /&gt;
&lt;br /&gt;
Comparison and contrast between various deployment automated tools such as Capistrano, Heroku, Vlad, AppFog, OpenShift, Cloud66, AWS Beanstalk shows that each has its own pros and cons. &lt;br /&gt;
For instance, in a client based application where handing over the control of the application to a third party such as the deployment tool provider is impossible, AWS Beanstalk would be the obvious choice for the developer.&lt;br /&gt;
On the other hand, a novice Rails application developer might find all he needs in the starter plan of Heroku with the added bonus of a huge support community available to him for troubleshooting as he stumbles his way across the development of the application.&lt;br /&gt;
One may also choose the tool that provides the specific database support for your application. In case of large scale corporations where budgets are not that limited, the increasing costs with up-scaling of some tools would not be an obstacle.&lt;br /&gt;
Thus, various considerations about the application such as scalability requirement, security concerns, cost, availability of own resources such as servers etc., will help determine which tool is the most suitable for that application.&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= See Also =&lt;br /&gt;
&lt;br /&gt;
* Rails Solutions: Ruby on Rails Made Easy by Justin Williams&lt;br /&gt;
* http://guides.beanstalkapp.com/deployments/best-practices.html&lt;br /&gt;
* http://www.urbancode.com/anthill3-help-3.7/html/SettingUpDeploymentProcess.html&lt;br /&gt;
* http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=UseFMSGateway_3.html&lt;br /&gt;
* http://pic.dhe.ibm.com/infocenter/tivihelp/v26r1/index.jsp?topic=%2Fcom.ibm.dtm.doc%2Fdeploysoftware%2Fc_deploysw_process.html&lt;/div&gt;</summary>
		<author><name>Npari</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch2_0e808_nsv&amp;diff=81376</id>
		<title>CSC/ECE 517 Fall 2013/ch2 0e808 nsv</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch2_0e808_nsv&amp;diff=81376"/>
		<updated>2013-10-30T21:34:34Z</updated>

		<summary type="html">&lt;p&gt;Npari: /* Changes in routes.rb */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= E808: Refactor and test Participant, AssignmentParticipant, &amp;amp; CourseParticipant =&lt;br /&gt;
The requirements provided for the Open Source System project were as follows : &amp;lt;br&amp;gt;&lt;br /&gt;
'''Classes''': &amp;lt;br&amp;gt;&lt;br /&gt;
''participant.rb'' (197 lines)&amp;lt;br&amp;gt;&lt;br /&gt;
''assignment_participant.rb'' (476 lines)&amp;lt;br&amp;gt;&lt;br /&gt;
''course_participant.rb'' (90 lines)&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''What they do''': &amp;lt;br&amp;gt; &lt;br /&gt;
These classes keep track of a user who is participating in an assignment or a course.  participant.rb is the superclass, and the other two are the subclasses.&lt;br /&gt;
&lt;br /&gt;
'''What is needed''': &amp;lt;br&amp;gt; &lt;br /&gt;
The methods are complex; there are a lot of them (assignment_particpant has 44) and there is a lot of duplicated code.  assignment_participant contains code for detecting cycles of high grades (which can indicate collusion in reviews).  It would be better moved to another class.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
= Introduction =&lt;br /&gt;
&lt;br /&gt;
A cursory analysis of the code of the three model classes showed the existence of code duplication. In a lot of the cases the [http://en.wikipedia.org/wiki/Don%27t_Repeat_Yourself Don't Repeat Yourself] (DRY) principle was violated.&lt;br /&gt;
&lt;br /&gt;
In keeping with the [http://en.wikipedia.org/wiki/Agile_software_development Agile] methodology, which involves having regular discussions with all stakeholders, the design check for the project was performed with a meeting with the Instructor.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{viewxls:name=sample.xlsx|sheet=Summary|row=13|col=3}&lt;br /&gt;
&lt;br /&gt;
Next the code was analyzed in detail and the following plausible improvements were predicted.[[File:[[Media:Example.jpg]]]]&lt;br /&gt;
&lt;br /&gt;
After the final release of the code in development and testing stage, the master plan is prepared for deployment of components and sites based on the sign-offs provided by the project teams, stakeholders and customers. Then, the stabilization of the deployment is calculated based on some metrics. Once the deployment is stabilized, it is reviewed and the process of deployment is complete. The final sign-off is given by the stakeholders.&lt;br /&gt;
&lt;br /&gt;
=Participant model: participant.rb=&lt;br /&gt;
&lt;br /&gt;
Code deployment is a procedure where the application is transferred onto a production server, so that it is made available for all the other users. It is the part of release management process which involves several activities. These activities are inter-dependent and need to be completed in a specific order for successful code deployment. &lt;br /&gt;
&lt;br /&gt;
'''Code Deployment Activities'''&lt;br /&gt;
&lt;br /&gt;
The various deployment activities include &amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/Software_deployment&amp;lt;/ref&amp;gt;&lt;br /&gt;
* Release : Gathering all system components in preparation for deployment&lt;br /&gt;
* Install and activate : Installing the application components and getting them in the 'ready' state&lt;br /&gt;
* Deactivate : Shutting down components that are out-dated or that may interfere with updating others&lt;br /&gt;
* Adapt : Making changes to application to accommodate changes in environment&lt;br /&gt;
* Update : Having a newer release installed in place of the old one&lt;br /&gt;
* Built-in : There are components built-into some tools for complete/semi-automating updates&lt;br /&gt;
* Version tracking : These systems help the user to know if newer versions of a software are available and if yes, help install them&lt;br /&gt;
* Uninstall : Opposite of installation and involves complete removal of software and its dependencies from the environment&lt;br /&gt;
* Retire : This involves making a software obsolete and is the end of software life cycle&lt;br /&gt;
&lt;br /&gt;
The general guidelines for the deployment process remain the same but there are variations in the specific requirements with each software system.&lt;br /&gt;
&lt;br /&gt;
=AssignmentParticipant model: assignment_participant.rb=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ref&amp;gt;http://searchitchannel.techtarget.com/definition/release-management&amp;lt;/ref&amp;gt;&lt;br /&gt;
Release management is a software process which takes care of the development, testing, deployment and support stages of software releases. The start of release management happens in the development phase, where it requests for new features or changes in the existing application. When the request is accepted, a new release is planned and designed. This design is built and then enters the testing phase, where the release is tested until it is accepted. After the release is accepted as a candidate, it enters the deployment phase where it is implemented. Once deployed, the release is made available and sent to support phase for collection of bug reports. Once the support phase is done, the bugs and other issues lead to requests for changes and the cycle is then repeated.&lt;br /&gt;
&lt;br /&gt;
=CourseParticipant model:course_participant.rb =&lt;br /&gt;
&amp;lt;ref&amp;gt;http://www.urbancode.com/html/solutions/deployment-automation.html&amp;lt;/ref&amp;gt;&lt;br /&gt;
Automation of a process is required when the manual process is more error prone. Also, for large real world applications, the manual process is very complex and time consuming. Incomplete documentation hampers a manual process further. Deployment also has to be done in many environments and involves varied steps to be followed in a specific order. Manual process needs repetition of same procedure to each and every environment which leads to many errors and the process becomes costly.&lt;br /&gt;
In web applications each new release has to be deployed to and tested in development, testing and production environments.The number of software releases in web applications  are more and hence the need to automate release management is also greater.&lt;br /&gt;
&lt;br /&gt;
Automation of deployment delivers applications faster and with fewer errors. The defined software deployment process can be applied across all environments consistently every time. With various automated application deployment platforms now readily available, manual deployments have become a thing of the past.&lt;br /&gt;
&lt;br /&gt;
Lets take a look at the various Deployment Automation tools available to Ruby on Rails applications. For the purposes of this article the process of manual deployment of a Ruby on Rails application is out of scope.&lt;br /&gt;
&lt;br /&gt;
= Tests =&lt;br /&gt;
&lt;br /&gt;
Some of the automated tools that are widely used for the process of deployment with Ruby on Rails are &lt;br /&gt;
&lt;br /&gt;
* Capistrano&lt;br /&gt;
* Heroku&lt;br /&gt;
* Vlad&lt;br /&gt;
* AppFog&lt;br /&gt;
* AWS Elastic Beanstalk&lt;br /&gt;
* OpenShift&lt;br /&gt;
* Cloud 66&lt;br /&gt;
&lt;br /&gt;
= yml files =&lt;br /&gt;
&lt;br /&gt;
[[File:Capistrano.jpg|frame|right|&amp;lt;ref&amp;gt;http://www.capistranorb.com/&amp;lt;/ref&amp;gt;|Capistrano Logo]]&lt;br /&gt;
&lt;br /&gt;
Capistrano is a Ruby tool which helps deploy an application to the server. Capistrano allows deploying to multiple machines at a time. It has many advanced options which help to deploy different kinds of applications. It also supports the scripting and execution of tasks.&lt;br /&gt;
&lt;br /&gt;
Capistrano can be used to:&lt;br /&gt;
&lt;br /&gt;
* Deploy applications onto many machines simultaneously.&lt;br /&gt;
* Automate the audits&lt;br /&gt;
* Automate the common tasks of a team.&lt;br /&gt;
&lt;br /&gt;
Capistrano can be made a part of a larger software by integrating it with another Ruby software.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ref&amp;gt;http://www.capistranorb.com/documentation/getting-started/installation/&amp;lt;/ref&amp;gt;  &lt;br /&gt;
'''General Usage'''&lt;br /&gt;
&lt;br /&gt;
The following commands will clone Capistrano, build the gem and install it locally.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem install capistrano --pre --trust-policy HighSecurity&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Or grab the bleeding edge head from:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ git clone -b v3 https://github.com/capistrano/capistrano.git&lt;br /&gt;
$ cd capistrano&lt;br /&gt;
$ gem build *.gemspec&lt;br /&gt;
$ gem install *.gem&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
'''Signed Rubygems'''&lt;br /&gt;
&lt;br /&gt;
As Capistrano is a signed gem, you should always be careful to use the --trust-policy flag when installing Gems, or since Bundler 1.3 you should use the same flag:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem install capistrano --pre --trust-policy HighSecurity&lt;br /&gt;
$ bundle install --trust-policy HighSecurity&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If you get a message that looks like:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ERROR:  While executing gem ... (Gem::Security::Exception)&lt;br /&gt;
unsigned gems are not allowed by the High Security policy&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then please complain to your Gem author, and have them start signing their Gems.&lt;br /&gt;
&lt;br /&gt;
'''Usage in a Rails project'''&lt;br /&gt;
&lt;br /&gt;
Add the following lines to the Gemfile to the :development group ideally.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
group :development do&lt;br /&gt;
  gem 'capistrano-rails', '~&amp;gt; 0.0.7'&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= routes.rb =&lt;br /&gt;
&lt;br /&gt;
[[File:Heroku.jpg|frame|right|&amp;lt;ref&amp;gt;https://www.heroku.com/&amp;lt;/ref&amp;gt;|Heroku Logo]]&lt;br /&gt;
&lt;br /&gt;
Heroku is a cloud [http://en.wikipedia.org/wiki/Platform_as_a_service Platform as a Service] (PaaS) which supports several programming languages. PaaS is a service model of Cloud computing wherein the provider offers resources like servers, software, database, etc. to the developer. Heroku helps manage environment-specific configurations separately from the source code, which provides greater security.&lt;br /&gt;
Heroku is not just a deployment environment but it also impacts the development process. There are several principles of the development of application on Heroku.&amp;lt;br&amp;gt;&lt;br /&gt;
•	Applications and Codebases : Most of the development of the application is done on application’s codebase which is stored in a [http://en.wikipedia.org/wiki/Version_control_system Version Control System (VCS)] &amp;lt;br&amp;gt;&lt;br /&gt;
•	Dependencies : All the application dependencies such as plugins should be declared explicitly&amp;lt;br&amp;gt;&lt;br /&gt;
•	Configuration : Configuration of an application is all that varies in different deploys&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Getting Started with Heroku'''&lt;br /&gt;
&lt;br /&gt;
1. To get started with Heroku, go to https://id.heroku.com/signup/devcenter, signup for a Heroku account. &lt;br /&gt;
&lt;br /&gt;
2. Then, download and install the Heroku toolbelt at https://toolbelt.heroku.com/ for your development system. You can also use Heroku command line instead of the online Heroku application. &lt;br /&gt;
&lt;br /&gt;
3. After installing one of them, login using the email address and password used when creating the Heroku account:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ref&amp;gt;https://github.com/heroku/heroku&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ heroku login&lt;br /&gt;
Enter your Heroku credentials.&lt;br /&gt;
Email: adam@example.com&lt;br /&gt;
Password:&lt;br /&gt;
Could not find an existing public key.&lt;br /&gt;
Would you like to generate one? [Yn]&lt;br /&gt;
Generating new SSH public key.&lt;br /&gt;
Uploading SSH public key /Users/adam/.ssh/id_rsa.pub&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Deploying Applications'''&lt;br /&gt;
&lt;br /&gt;
Heroku uses [http://en.wikipedia.org/wiki/Git_(software) git] primarily to deploy the applications. When an application is created on Heroku, it associates the new git which is remote with the local git repository.&lt;br /&gt;
&lt;br /&gt;
As a result, deploying code is just the familiar git push, but to the heroku remote instead:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ref&amp;gt;https://devcenter.heroku.com/articles/how-heroku-works#deploying-applications&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ git push heroku master&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Vlad ==&lt;br /&gt;
&lt;br /&gt;
[[File:Vlad.png|frame|right|&amp;lt;ref&amp;gt;http://rubyhitsquad.com/Vlad_the_Deployer.html&amp;lt;/ref&amp;gt;|Vlad Logo]]&lt;br /&gt;
&lt;br /&gt;
Vlad is another automated deployment tool which is simple to use. It integrates with rake and uses standard tools like SSH, rsync etc.&lt;br /&gt;
&lt;br /&gt;
The main features of Vlad include&lt;br /&gt;
* It uses very few dependencies which are simple.&lt;br /&gt;
* It can execute commands on more than one server.&lt;br /&gt;
* It syncs files to one or more servers.&lt;br /&gt;
* It matches local and remote tasks.&lt;br /&gt;
* It runs tests very fast.&lt;br /&gt;
&lt;br /&gt;
'''Getting started with Vlad'''&amp;lt;ref&amp;gt;http://docs.seattlerb.org/vlad/doco/getting_started_txt.html&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create a deploy file, usually in “config/deploy.rb”:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set :application, &amp;quot;project&amp;quot;&lt;br /&gt;
set :domain, &amp;quot;example.com&amp;quot;&lt;br /&gt;
set :deploy_to, &amp;quot;/path/to/install&amp;quot;&lt;br /&gt;
set :repository, 'http://svn.example.com/project/branches/stable/'&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This defaults to using ‘svn export’ from repository, and a single server for app, db, and www.&lt;br /&gt;
&lt;br /&gt;
If you want a multi-config environment, change your config like so:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set :application, &amp;quot;project&amp;quot;&lt;br /&gt;
set :repository, 'http://svn.example.com/project/branches/stable/'&lt;br /&gt;
&lt;br /&gt;
task :beta do&lt;br /&gt;
  set :domain,    &amp;quot;beta.example.com&amp;quot;&lt;br /&gt;
  set :deploy_to, &amp;quot;/path/to/install-beta&amp;quot;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
task :dev do&lt;br /&gt;
  set :domain,    &amp;quot;dev.example.com&amp;quot;&lt;br /&gt;
  set :deploy_to, &amp;quot;/path/to/install-dev&amp;quot;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
task :prod do&lt;br /&gt;
  set :domain,    &amp;quot;example.com&amp;quot;&lt;br /&gt;
  set :deploy_to, &amp;quot;/path/to/install&amp;quot;&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Add the following to your Rakefile:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
begin&lt;br /&gt;
  require 'vlad'&lt;br /&gt;
  Vlad.load&lt;br /&gt;
rescue LoadError&lt;br /&gt;
  # do nothing&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Vlad.load has a lot of flexibility.&lt;br /&gt;
&lt;br /&gt;
You can install vlad via:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;% rake vlad:invoke COMMAND='sudo gem install vlad -y'&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Initial Launch&lt;br /&gt;
&amp;lt;pre&amp;gt;Run rake vlad:setup vlad:update vlad:migrate vlad:start&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ref&amp;gt;http://docs.seattlerb.org/vlad/index.html&amp;lt;/ref&amp;gt;&lt;br /&gt;
'''Running Vlad'''&lt;br /&gt;
&lt;br /&gt;
* Using rake&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
task :shazam! do&lt;br /&gt;
  Rake::Task[:action1].invoke&lt;br /&gt;
  Rake::Task[:action2].invoke&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Using SSH&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Host example.com&lt;br /&gt;
    User fluffy_bunny&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== AppFog == &lt;br /&gt;
&lt;br /&gt;
[[File:AppFog.jpg|frame|right|&amp;lt;ref&amp;gt;https://www.appfog.com/&amp;lt;/ref&amp;gt;|AppFog Logo]]&lt;br /&gt;
&lt;br /&gt;
AppFog is a PaaS built on Cloud Foundry which is another PaaS platform for deploying applications. &lt;br /&gt;
&lt;br /&gt;
Features of AppFog are&lt;br /&gt;
* It launches and runs fast.&lt;br /&gt;
* It does not require configuring servers or installing frameworks.&lt;br /&gt;
* It is compatible with code management systems like git, svn etc.&lt;br /&gt;
&lt;br /&gt;
'''Installing AppFog'''&amp;lt;ref&amp;gt;http://blog.appfog.com/getting-started-with-appfogs-command-line/&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
‘af‘ command line tool is written in Ruby for installation.&lt;br /&gt;
&lt;br /&gt;
Download and install [http://rubyinstaller.org/ Ruby Installer] for Windows. The installer already includes RubyGems.&lt;br /&gt;
&lt;br /&gt;
Be sure you use the Ruby-enabled command prompt window when you later install and use af. You access this command prompt from the Windows Start menu (All Programs &amp;gt; Ruby &amp;gt; Start Command Prompt with Ruby).&lt;br /&gt;
&lt;br /&gt;
Finally, update RubyGems from the Ruby Command Prompt:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem update --system&lt;br /&gt;
$ gem install af&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Login with:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ af login&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Finally from within your source code directory:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ af update hello-node&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Getting Started with AppFog'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
target [url]                                       Reports current target or sets a new target&lt;br /&gt;
login [email] [--email, --password]                Login&lt;br /&gt;
info                                               System and account information&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== AWS Elastic Beanstalk==&lt;br /&gt;
&lt;br /&gt;
[[File:AWSLogo.jpg|frame|right|&amp;lt;ref&amp;gt;https://aws.amazon.com&amp;lt;/ref&amp;gt;|AWS Logo]]&lt;br /&gt;
&lt;br /&gt;
Amazon Wen Services(AWS) offers [http://en.wikipedia.org/wiki/Infrastructure_as_a_service#Infrastructure_as_a_service_.28IaaS.29 Infrastructure as a Service] (IaaS) and provides a complete set of resources for the development of a web application in minutes. AWS Elastic Beanstalk is a deployment tool of the AWS cloud.&lt;br /&gt;
&lt;br /&gt;
With AWS Elastic Beanstalk, applications can be quickly deployed and managed in the AWS cloud without worrying about the infrastructure that runs those applications. AWS Elastic Beanstalk reduces management complexity without restricting choice or control. Once the application is uploaded AWS Elastic Beanstalk automatically handles the details of capacity provisioning, load balancing, scaling, and application health monitoring. AWS Elastic Beanstalk uses highly reliable and scalable services.&lt;br /&gt;
&lt;br /&gt;
'''AWS CLI'''&lt;br /&gt;
&lt;br /&gt;
AWS Elastic Beanstalk uses a command line tool Eb, which helps you to deploy your application easily.&lt;br /&gt;
&lt;br /&gt;
'''Getting Started with Eb'''&amp;lt;ref&amp;gt;http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/command-reference-get-started.html&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To get started with the beanstalk CLI, you will need to download the command line tools at the [http://aws.amazon.com/code/6752709412171743 AWS Sample Code &amp;amp; Libraries] website.&lt;br /&gt;
&lt;br /&gt;
Step 1: Initialize Your Git Repository&lt;br /&gt;
&lt;br /&gt;
Eb is a command line interface that enables you to deploy applications quickly and more easily using Git. Eb is available as part of the Elastic Beanstalk command line tools package. &lt;br /&gt;
&lt;br /&gt;
1. To install eb,install the following software onto your local computer:&lt;br /&gt;
&lt;br /&gt;
* Git 1.6.6 or later. To download Git, go to http://git-scm.com/.&lt;br /&gt;
* PowerShell 2.0.&lt;br /&gt;
&lt;br /&gt;
2. Initialize your Git repository.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git init &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Step 2: Configuring AWS Elastic Beanstalk&lt;br /&gt;
&lt;br /&gt;
1. From your directory where you created your local repository, type the following command.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
eb init&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2. When you are prompted for the access key ID, type your access key ID. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Enter your AWS Access Key ID (current value is &amp;quot;AKIAIOSFODNN7EXAMPLE&amp;quot;): &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3. When you are prompted for the secret access key, type your secret access key.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Enter your AWS Secret Access Key (current value is &amp;quot;wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY&amp;quot;): &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
4. When you are prompted for the AWS Elastic Beanstalk application name, type the name of the application. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Enter an AWS Elastic Beanstalk application name (auto-generated value is &amp;quot;windows&amp;quot;): &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Note:&lt;br /&gt;
If you have a space in your application name, make sure you do not use quotes.&lt;br /&gt;
&lt;br /&gt;
5. When you are prompted for the AWS Elastic Beanstalk environment name, type the name of the environment. AWS Elastic Beanstalk automatically creates an environment name based on your application name. If you want to accept the default, press Enter.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Enter an AWS Elastic Beanstalk environment name (current value is &amp;quot;HelloWorld-env&amp;quot;): &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
6. When you are prompted to create an Amazon RDS DB instance, type y or n. For this example, we'll type y.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Create an RDS DB Instance? [y/n]:&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
7. When you are prompted to enter your RDS user master password, type your password containing from 8 to 16 printable ASCII characters (excluding /, \, and @).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Enter an RDS DB master password: &lt;br /&gt;
Retype password to confirm: &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can now get started with the AWS Elastic Beanstalk.&lt;br /&gt;
&lt;br /&gt;
== OpenShift ==&lt;br /&gt;
&lt;br /&gt;
[[File:OpenShift.png|frame|right|&amp;lt;ref&amp;gt;https://en.wikipedia.org&amp;lt;/ref&amp;gt;|OpenShift Logo]]&lt;br /&gt;
&lt;br /&gt;
Another free and open source PaaS for deploying applications is OpenShift created by [[http://en.wikipedia.org/wiki/RedHat RedHat]]. &lt;br /&gt;
&lt;br /&gt;
'''Considerations'''&lt;br /&gt;
* Databases&lt;br /&gt;
&lt;br /&gt;
To use the application outside the OpenShift environment one needs to change the variables as the application is configured to use database in production mode in OpenShift.&lt;br /&gt;
&lt;br /&gt;
* Assets&lt;br /&gt;
&lt;br /&gt;
The assets are precompiled everytime application is pushed to OpenShift.&lt;br /&gt;
&lt;br /&gt;
* Security&lt;br /&gt;
&lt;br /&gt;
Security related variables are to be unique across the application.&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;ref&amp;gt;https://github.com/openshift/rails-example&amp;lt;/ref&amp;gt;&lt;br /&gt;
'''Installation'''&lt;br /&gt;
&lt;br /&gt;
1.	Create an account at http://openshift.redhat.com/&lt;br /&gt;
&lt;br /&gt;
2.	Create a rails application&lt;br /&gt;
	&amp;lt;pre&amp;gt;rhc app create -a railsapp -t ruby-1.9&amp;lt;/pre&amp;gt;&lt;br /&gt;
3.	Add mysql support to your application&lt;br /&gt;
	&amp;lt;pre&amp;gt;rhc cartridge add -a railsapp -c mysql-5.1&amp;lt;/pre&amp;gt;&lt;br /&gt;
4.	Add this upstream Rails quickstart repository&lt;br /&gt;
&amp;lt;pre&amp;gt;cd railsapp&lt;br /&gt;
git remote add upstream -m master git://github.com/openshift/rails-example.git&lt;br /&gt;
git pull -s recursive -X theirs upstream master&amp;lt;/pre&amp;gt;&lt;br /&gt;
5.	Push your new code&lt;br /&gt;
&amp;lt;pre&amp;gt;git push&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Future scope ==&lt;br /&gt;
&lt;br /&gt;
[[File:Cloud 66.jpg|frame|right|&amp;lt;ref&amp;gt;https://www.cloud66.com/&amp;lt;/ref&amp;gt;|Cloud66 Logo]]&lt;br /&gt;
&lt;br /&gt;
Cloud 66 combines the convenience of Platform-as-a-Service (PaaS) and the flexibility and control of Infrastructure-as-a-Service (IaaS). This platform allows easy deployment of application, so there is no overhead of configuring or monitoring the servers.&lt;br /&gt;
&lt;br /&gt;
'''Cloud 66 Command line Toolbelt'''&lt;br /&gt;
&lt;br /&gt;
Toolbelt is an open source released to deploy the application.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ref&amp;gt;http://blog.cloud66.com/&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Getting Started with Cloud 66'''&lt;br /&gt;
&lt;br /&gt;
1. Go to the [https://www.cloud66.com/users/sign_up sign up] page and create a Cloud 66 account.&lt;br /&gt;
&lt;br /&gt;
2. Go to Cloud 66 Dashboard and [https://www.cloud66.com/help/first_stack build your first stack].&lt;br /&gt;
&lt;br /&gt;
'''Installation'''&lt;br /&gt;
&lt;br /&gt;
Installation of toolbelt uses the following command&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Gem install c66&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This automatically searches the newest version and installs it.&lt;br /&gt;
&lt;br /&gt;
= Model Class : assignment_participant.rb =&lt;br /&gt;
Th AssignmentParticipant model class is a subclass of the participant model class. Several methods in AssignmentParticipant model class required renaming and refactoring to ensure that the change is reflected in the entire project. The names were changed to follow method naming convention. Deprecated code was removed and re-coded to ensure that the code worked in future version as well. Duplicated codes were commented. Methods that are more general in the sub classes were moved to the parent class. Some methods that calculates the collusion in reviews between students were moved to a newly created model class file called collusion_cycle.rb &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;width:3%;&amp;quot;|S. No&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;|Method Name&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;|Change Made &lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;|Reason For Change&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
|''''' 1 '''''&lt;br /&gt;
|get_course_string&lt;br /&gt;
|Renamed to course_string and refactored &lt;br /&gt;
|To follow method naming convention&lt;br /&gt;
|-&lt;br /&gt;
|''''' 2 '''''&lt;br /&gt;
|get_cycle_deviation_score&lt;br /&gt;
|Moved to collusion_cycle.rb model class&lt;br /&gt;
|Related methods that calculate collusion in reviews have been moved to the newly created collusion_cycle.rb model class&lt;br /&gt;
|-&lt;br /&gt;
|''''' 3 '''''&lt;br /&gt;
|get_cycle_similarity_score&lt;br /&gt;
|Moved to collusion_cycle.rb model class&lt;br /&gt;
|Related methods that calculate collusion in reviews have been moved to the newly created collusion_cycle.rb model class&lt;br /&gt;
|-&lt;br /&gt;
|''''' 4 '''''&lt;br /&gt;
|get_feedback&lt;br /&gt;
|Renamed to feedback and refactored&lt;br /&gt;
|To follow method naming convention&lt;br /&gt;
|-&lt;br /&gt;
|''''' 5 '''''&lt;br /&gt;
|get_files&lt;br /&gt;
|Renamed to files_in_directory  and refactored&lt;br /&gt;
|To follow method naming convention&lt;br /&gt;
|-&lt;br /&gt;
|''''' 6 '''''&lt;br /&gt;
|get_four_node_cycles&lt;br /&gt;
|Moved to collusion_cycle.rb model class&lt;br /&gt;
|Related methods that calculate collusion in reviews have been moved to the newly created collusion_cycle.rb model class&lt;br /&gt;
|-&lt;br /&gt;
|''''' 7 '''''&lt;br /&gt;
|fullname&lt;br /&gt;
|Moved to parent model class – participant.rb &lt;br /&gt;
|General methods of the subclass are moved to Parent class&lt;br /&gt;
|-&lt;br /&gt;
|''''' 8 '''''&lt;br /&gt;
|get_metareviews&lt;br /&gt;
|Renamed to metareviews and refactored&lt;br /&gt;
|To follow method naming convention&lt;br /&gt;
|-&lt;br /&gt;
|''''' 9 '''''&lt;br /&gt;
|name&lt;br /&gt;
|Commented the method  &lt;br /&gt;
|The method is already in parent model class – participant.rb and can be used in this subclass through inheritance&lt;br /&gt;
|-&lt;br /&gt;
|''''' 10 '''''&lt;br /&gt;
|name&lt;br /&gt;
|Commented the method  &lt;br /&gt;
|The method is already in parent model class – participant.rb and can be used in this subclass through inheritance. Also it is a duplicate method in patricipant.rb&lt;br /&gt;
|- &lt;br /&gt;
|''''' 11 '''''&lt;br /&gt;
|get_review_score&lt;br /&gt;
|Renamed to review_score and refactored. Deprecated code has been removed and replaced with correct code.&lt;br /&gt;
|To follow method naming convention and ensure the code works in future versions. &lt;br /&gt;
|-&lt;br /&gt;
|''''' 12 '''''&lt;br /&gt;
|get_reviewees&lt;br /&gt;
|Renamed to reviewees and refactored. Deprecated code has been removed and replaced with correct code.&lt;br /&gt;
|To follow method naming convention and ensure the code works in future versions. &lt;br /&gt;
|-&lt;br /&gt;
|''''' 13 '''''&lt;br /&gt;
|get_reviewers&lt;br /&gt;
|Renamed to reviewers and refactored . Deprecated code has been commented and replaced with correct code.&lt;br /&gt;
|To follow method naming convention and ensure the code works in future versions. &lt;br /&gt;
|-&lt;br /&gt;
|''''' 14 '''''&lt;br /&gt;
|get_reviews&lt;br /&gt;
|Renamed to reviews and refactored &lt;br /&gt;
|To follow method naming convention&lt;br /&gt;
|-&lt;br /&gt;
|''''' 15 '''''&lt;br /&gt;
|get_reviews_by_reviewer&lt;br /&gt;
|Renamed to reviews_by_reviewer and refactored &lt;br /&gt;
|To follow method naming convention&lt;br /&gt;
|-&lt;br /&gt;
|''''' 16 '''''&lt;br /&gt;
|get_reviews_by_reviewer&lt;br /&gt;
|Commented the method &lt;br /&gt;
|To remove duplicated method in this class&lt;br /&gt;
|-&lt;br /&gt;
|''''' 17 '''''&lt;br /&gt;
|get_scores&lt;br /&gt;
|Renamed to scores and refactored &lt;br /&gt;
|To follow method naming convention&lt;br /&gt;
|-&lt;br /&gt;
|''''' 18 '''''&lt;br /&gt;
|get_submitted_files&lt;br /&gt;
|Renamed to submitted_files and refactored &lt;br /&gt;
|To follow method naming convention&lt;br /&gt;
|-&lt;br /&gt;
|''''' 19 '''''&lt;br /&gt;
|get_teammate_reviews&lt;br /&gt;
|Renamed to teammate_reviews and refactored &lt;br /&gt;
|To follow method naming convention&lt;br /&gt;
|-&lt;br /&gt;
|''''' 20 '''''&lt;br /&gt;
|get_three_node_cycles&lt;br /&gt;
|Moved to collusion_cycle.rb model class&lt;br /&gt;
|Related methods that calculate collusion in reviews have been moved to the newly created collusion_cycle.rb model class&lt;br /&gt;
|-&lt;br /&gt;
|''''' 21 '''''&lt;br /&gt;
|get_topic_string&lt;br /&gt;
|Method has been Commented&lt;br /&gt;
|It is already present in model super class – participant.rb&lt;br /&gt;
|-&lt;br /&gt;
|''''' 22 '''''&lt;br /&gt;
|get_two_node_cycles&lt;br /&gt;
|Moved to collusion_cycle.rb model class&lt;br /&gt;
|Related methods that calculate collusion in reviews have been moved to the newly created collusion_cycle.rb model class&lt;br /&gt;
|-&lt;br /&gt;
|''''' 23 '''''&lt;br /&gt;
|get_wiki_submissions&lt;br /&gt;
|Renamed to wiki_submissions and refactored&lt;br /&gt;
|To follow method naming convention&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
After changes were made, the existing tests ran successfully.&lt;br /&gt;
&lt;br /&gt;
= Changes in routes.rb =&lt;br /&gt;
&lt;br /&gt;
The following routes were added to make the code run error free. &lt;br /&gt;
&lt;br /&gt;
Routes for submit_hyperlink and remove_hyperlink were added below&lt;br /&gt;
&lt;br /&gt;
resources :submitted_content do&lt;br /&gt;
    collection do&lt;br /&gt;
      get :view&lt;br /&gt;
      get :edit&lt;br /&gt;
      post :submit_hyperlink &lt;br /&gt;
      get :remove_hyperlink&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
 Routes for get and post method for export were added here&lt;br /&gt;
&lt;br /&gt;
 resources :export_file do&lt;br /&gt;
    collection do&lt;br /&gt;
      get :start&lt;br /&gt;
      get :export&lt;br /&gt;
      post :export&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
Routes for cancel, accept and decline were added here &lt;br /&gt;
&lt;br /&gt;
  resources :invitation do&lt;br /&gt;
    collection do&lt;br /&gt;
      get :cancel&lt;br /&gt;
      get :accept&lt;br /&gt;
      get :decline&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
= Comparison between Capistrano/Vlad/Heroku/AppFog/OpenShift/Cloud66/AWS Beanstalk =&lt;br /&gt;
&lt;br /&gt;
With so many automated tools available for Code Deployment and Release Management, the decision on which to use for a particular Ruby on rails application depends on various parameters to be considered.&lt;br /&gt;
Some comparative features of the different tools are as follows :&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;width:9%;&amp;quot;|Criteria for Comparision&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;|Capistrano&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;| Vlad&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;| Heroku&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;| AppFog&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;| OpenShift&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;| Cloud66&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;| AWS Beanstalk&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
|'''''Getting started with the tool'''''&lt;br /&gt;
|It is a framework that allows one to execute commands on a remote server using tools like ssh.&lt;br /&gt;
|Vlad deployment is similar to Capistrano, but less complex.&lt;br /&gt;
|Heroku’s offers a plan with first dyno free i.e. 512 MB that can be paired with Postgres starter DB to start an application with 0 initial cost&lt;br /&gt;
|AppFog’s initial plan offers 2GB of RAM free which is enough for small to medium traffic applications. By managing options provided for DB, queue server, application server, etc all part of the intial package, this is an excellent option to try out an application&lt;br /&gt;
|OpenShift is an open source platform and its free plan for starters has 3 gears for free wherein each gear consists of some RAM and disk space.&lt;br /&gt;
|Free plan provides one server for deployment.&lt;br /&gt;
|Provides an initial free tier. Without free tier no additional cost for Beanstalk. One only needs to pay for the AWS resources used.&lt;br /&gt;
|-&lt;br /&gt;
|'''''Scaling Memory'''''&lt;br /&gt;
|Memory increase would require additional servers/unused space in existing ones.&lt;br /&gt;
|Memory increase depends on additional servers available/unused space in existing ones.&lt;br /&gt;
|Memory increased in terms of dyno each of size 512 MB.&lt;br /&gt;
|Can configure any size for memory allocation&lt;br /&gt;
| -&lt;br /&gt;
| -&lt;br /&gt;
|Can automatically up/down scale the application by adjusting the default auto scaling settings.&lt;br /&gt;
|-&lt;br /&gt;
|'''''Scaling – Cost and Ease'''''&lt;br /&gt;
|While this provides greater flexibility as user is in control of the servers, it also causes additional overhead in terms of user needing to work both on Rails application and web server deployment.&lt;br /&gt;
|It can be integrated with Rake without any hindrances.&lt;br /&gt;
|Can dynamically scale up and down an application and pay as per hourly usages. Each additional dyno costs $35/mo&lt;br /&gt;
|Scaling takes up some time and need to pay for a month at the minimum. Scaling up to 4GB increases cost to $100/mo&lt;br /&gt;
| -&lt;br /&gt;
|Scaling using Cloud66 is relatively easy and hassle free.&lt;br /&gt;
|Scaling is fast and easy.&lt;br /&gt;
|-&lt;br /&gt;
|'''''Special features'''''&lt;br /&gt;
|For sensitive applications where handing over the control to a third party for deployment is not feasible, Capistrano is the way to go.&lt;br /&gt;
|It also provides support for tools like rsync and ssh.&lt;br /&gt;
|Lacks support for cross region deployment i.e. can’t select location of server where application gets deployed&lt;br /&gt;
|Supports cross region deployment i.e. if users of application primarily in Asia, can choose a server in Asia to deploy application, thus making the site faster.&lt;br /&gt;
| -&lt;br /&gt;
| -&lt;br /&gt;
|Provides complete flexibility and control of the resources to the user including the chance to take over control of some or all.&lt;br /&gt;
|-&lt;br /&gt;
|'''''Database support'''''&lt;br /&gt;
|Provides support for DB related to rails applications&lt;br /&gt;
|Provides support for DB related to rails applications&lt;br /&gt;
|It features serious production DB like RDBMS, Postgres, etc. and many Addons such as MongoDB, ClearDB, etc.&lt;br /&gt;
|Features free shared databases such as MongoDB, MySQL, Postgres but for other production DB’s need to use Addons&lt;br /&gt;
|Databases featured are MySQL, MongoDB and Postgres&lt;br /&gt;
| -&lt;br /&gt;
|Supports DB like Amazon SimpleDB, Amazon RDS, Amazon DynamoDB.&lt;br /&gt;
|-&lt;br /&gt;
|'''''Deployment strategy'''''&lt;br /&gt;
|Capistrano provides commands to be executed for automated deployment. It supports git.&lt;br /&gt;
|It is much easier to deploy using Vlad as compared to Capistrano.&lt;br /&gt;
|Deployment as easy as ‘git push’&lt;br /&gt;
|Deployment does not support git. It uses the af tool for deployment.&lt;br /&gt;
| -&lt;br /&gt;
|Since Cloud66 provides the platform in terms of Application Stack Management as a Service, it uses the infrastructure of AWS, Virtual Private Server, etc. for actual deployment. But the user doesn’t have to worry about configuration or monitoring of the servers. Hence provides easy deployment.&lt;br /&gt;
|Deployment options include Git, AWS management console, etc.&lt;br /&gt;
|-&lt;br /&gt;
|'''''Community Support availability'''''&lt;br /&gt;
| As it has been in use for a long time there is a huge community support available for Capistrano.&lt;br /&gt;
| -&lt;br /&gt;
|Heroku also provides a huge community support given the fact that there are a lot of Heroku users.&lt;br /&gt;
|Community is limited.&lt;br /&gt;
|RedHat being a reputed provider for open source solutions, the OpenShift community is gradually increasing and receiving support from a considerable community of users.&lt;br /&gt;
|Limited community support currently&lt;br /&gt;
|Has community forums and documentation.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Conclusion =&lt;br /&gt;
&lt;br /&gt;
Comparison and contrast between various deployment automated tools such as Capistrano, Heroku, Vlad, AppFog, OpenShift, Cloud66, AWS Beanstalk shows that each has its own pros and cons. &lt;br /&gt;
For instance, in a client based application where handing over the control of the application to a third party such as the deployment tool provider is impossible, AWS Beanstalk would be the obvious choice for the developer.&lt;br /&gt;
On the other hand, a novice Rails application developer might find all he needs in the starter plan of Heroku with the added bonus of a huge support community available to him for troubleshooting as he stumbles his way across the development of the application.&lt;br /&gt;
One may also choose the tool that provides the specific database support for your application. In case of large scale corporations where budgets are not that limited, the increasing costs with up-scaling of some tools would not be an obstacle.&lt;br /&gt;
Thus, various considerations about the application such as scalability requirement, security concerns, cost, availability of own resources such as servers etc., will help determine which tool is the most suitable for that application.&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= See Also =&lt;br /&gt;
&lt;br /&gt;
* Rails Solutions: Ruby on Rails Made Easy by Justin Williams&lt;br /&gt;
* http://guides.beanstalkapp.com/deployments/best-practices.html&lt;br /&gt;
* http://www.urbancode.com/anthill3-help-3.7/html/SettingUpDeploymentProcess.html&lt;br /&gt;
* http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=UseFMSGateway_3.html&lt;br /&gt;
* http://pic.dhe.ibm.com/infocenter/tivihelp/v26r1/index.jsp?topic=%2Fcom.ibm.dtm.doc%2Fdeploysoftware%2Fc_deploysw_process.html&lt;/div&gt;</summary>
		<author><name>Npari</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch2_0e808_nsv&amp;diff=81375</id>
		<title>CSC/ECE 517 Fall 2013/ch2 0e808 nsv</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch2_0e808_nsv&amp;diff=81375"/>
		<updated>2013-10-30T21:33:05Z</updated>

		<summary type="html">&lt;p&gt;Npari: /* Changes in routes.rb = */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= E808: Refactor and test Participant, AssignmentParticipant, &amp;amp; CourseParticipant =&lt;br /&gt;
The requirements provided for the Open Source System project were as follows : &amp;lt;br&amp;gt;&lt;br /&gt;
'''Classes''': &amp;lt;br&amp;gt;&lt;br /&gt;
''participant.rb'' (197 lines)&amp;lt;br&amp;gt;&lt;br /&gt;
''assignment_participant.rb'' (476 lines)&amp;lt;br&amp;gt;&lt;br /&gt;
''course_participant.rb'' (90 lines)&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''What they do''': &amp;lt;br&amp;gt; &lt;br /&gt;
These classes keep track of a user who is participating in an assignment or a course.  participant.rb is the superclass, and the other two are the subclasses.&lt;br /&gt;
&lt;br /&gt;
'''What is needed''': &amp;lt;br&amp;gt; &lt;br /&gt;
The methods are complex; there are a lot of them (assignment_particpant has 44) and there is a lot of duplicated code.  assignment_participant contains code for detecting cycles of high grades (which can indicate collusion in reviews).  It would be better moved to another class.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
= Introduction =&lt;br /&gt;
&lt;br /&gt;
A cursory analysis of the code of the three model classes showed the existence of code duplication. In a lot of the cases the [http://en.wikipedia.org/wiki/Don%27t_Repeat_Yourself Don't Repeat Yourself] (DRY) principle was violated.&lt;br /&gt;
&lt;br /&gt;
In keeping with the [http://en.wikipedia.org/wiki/Agile_software_development Agile] methodology, which involves having regular discussions with all stakeholders, the design check for the project was performed with a meeting with the Instructor.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{viewxls:name=sample.xlsx|sheet=Summary|row=13|col=3}&lt;br /&gt;
&lt;br /&gt;
Next the code was analyzed in detail and the following plausible improvements were predicted.[[File:[[Media:Example.jpg]]]]&lt;br /&gt;
&lt;br /&gt;
After the final release of the code in development and testing stage, the master plan is prepared for deployment of components and sites based on the sign-offs provided by the project teams, stakeholders and customers. Then, the stabilization of the deployment is calculated based on some metrics. Once the deployment is stabilized, it is reviewed and the process of deployment is complete. The final sign-off is given by the stakeholders.&lt;br /&gt;
&lt;br /&gt;
=Participant model: participant.rb=&lt;br /&gt;
&lt;br /&gt;
Code deployment is a procedure where the application is transferred onto a production server, so that it is made available for all the other users. It is the part of release management process which involves several activities. These activities are inter-dependent and need to be completed in a specific order for successful code deployment. &lt;br /&gt;
&lt;br /&gt;
'''Code Deployment Activities'''&lt;br /&gt;
&lt;br /&gt;
The various deployment activities include &amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/Software_deployment&amp;lt;/ref&amp;gt;&lt;br /&gt;
* Release : Gathering all system components in preparation for deployment&lt;br /&gt;
* Install and activate : Installing the application components and getting them in the 'ready' state&lt;br /&gt;
* Deactivate : Shutting down components that are out-dated or that may interfere with updating others&lt;br /&gt;
* Adapt : Making changes to application to accommodate changes in environment&lt;br /&gt;
* Update : Having a newer release installed in place of the old one&lt;br /&gt;
* Built-in : There are components built-into some tools for complete/semi-automating updates&lt;br /&gt;
* Version tracking : These systems help the user to know if newer versions of a software are available and if yes, help install them&lt;br /&gt;
* Uninstall : Opposite of installation and involves complete removal of software and its dependencies from the environment&lt;br /&gt;
* Retire : This involves making a software obsolete and is the end of software life cycle&lt;br /&gt;
&lt;br /&gt;
The general guidelines for the deployment process remain the same but there are variations in the specific requirements with each software system.&lt;br /&gt;
&lt;br /&gt;
=AssignmentParticipant model: assignment_participant.rb=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ref&amp;gt;http://searchitchannel.techtarget.com/definition/release-management&amp;lt;/ref&amp;gt;&lt;br /&gt;
Release management is a software process which takes care of the development, testing, deployment and support stages of software releases. The start of release management happens in the development phase, where it requests for new features or changes in the existing application. When the request is accepted, a new release is planned and designed. This design is built and then enters the testing phase, where the release is tested until it is accepted. After the release is accepted as a candidate, it enters the deployment phase where it is implemented. Once deployed, the release is made available and sent to support phase for collection of bug reports. Once the support phase is done, the bugs and other issues lead to requests for changes and the cycle is then repeated.&lt;br /&gt;
&lt;br /&gt;
=CourseParticipant model:course_participant.rb =&lt;br /&gt;
&amp;lt;ref&amp;gt;http://www.urbancode.com/html/solutions/deployment-automation.html&amp;lt;/ref&amp;gt;&lt;br /&gt;
Automation of a process is required when the manual process is more error prone. Also, for large real world applications, the manual process is very complex and time consuming. Incomplete documentation hampers a manual process further. Deployment also has to be done in many environments and involves varied steps to be followed in a specific order. Manual process needs repetition of same procedure to each and every environment which leads to many errors and the process becomes costly.&lt;br /&gt;
In web applications each new release has to be deployed to and tested in development, testing and production environments.The number of software releases in web applications  are more and hence the need to automate release management is also greater.&lt;br /&gt;
&lt;br /&gt;
Automation of deployment delivers applications faster and with fewer errors. The defined software deployment process can be applied across all environments consistently every time. With various automated application deployment platforms now readily available, manual deployments have become a thing of the past.&lt;br /&gt;
&lt;br /&gt;
Lets take a look at the various Deployment Automation tools available to Ruby on Rails applications. For the purposes of this article the process of manual deployment of a Ruby on Rails application is out of scope.&lt;br /&gt;
&lt;br /&gt;
= Tests =&lt;br /&gt;
&lt;br /&gt;
Some of the automated tools that are widely used for the process of deployment with Ruby on Rails are &lt;br /&gt;
&lt;br /&gt;
* Capistrano&lt;br /&gt;
* Heroku&lt;br /&gt;
* Vlad&lt;br /&gt;
* AppFog&lt;br /&gt;
* AWS Elastic Beanstalk&lt;br /&gt;
* OpenShift&lt;br /&gt;
* Cloud 66&lt;br /&gt;
&lt;br /&gt;
= yml files =&lt;br /&gt;
&lt;br /&gt;
[[File:Capistrano.jpg|frame|right|&amp;lt;ref&amp;gt;http://www.capistranorb.com/&amp;lt;/ref&amp;gt;|Capistrano Logo]]&lt;br /&gt;
&lt;br /&gt;
Capistrano is a Ruby tool which helps deploy an application to the server. Capistrano allows deploying to multiple machines at a time. It has many advanced options which help to deploy different kinds of applications. It also supports the scripting and execution of tasks.&lt;br /&gt;
&lt;br /&gt;
Capistrano can be used to:&lt;br /&gt;
&lt;br /&gt;
* Deploy applications onto many machines simultaneously.&lt;br /&gt;
* Automate the audits&lt;br /&gt;
* Automate the common tasks of a team.&lt;br /&gt;
&lt;br /&gt;
Capistrano can be made a part of a larger software by integrating it with another Ruby software.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ref&amp;gt;http://www.capistranorb.com/documentation/getting-started/installation/&amp;lt;/ref&amp;gt;  &lt;br /&gt;
'''General Usage'''&lt;br /&gt;
&lt;br /&gt;
The following commands will clone Capistrano, build the gem and install it locally.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem install capistrano --pre --trust-policy HighSecurity&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Or grab the bleeding edge head from:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ git clone -b v3 https://github.com/capistrano/capistrano.git&lt;br /&gt;
$ cd capistrano&lt;br /&gt;
$ gem build *.gemspec&lt;br /&gt;
$ gem install *.gem&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
'''Signed Rubygems'''&lt;br /&gt;
&lt;br /&gt;
As Capistrano is a signed gem, you should always be careful to use the --trust-policy flag when installing Gems, or since Bundler 1.3 you should use the same flag:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem install capistrano --pre --trust-policy HighSecurity&lt;br /&gt;
$ bundle install --trust-policy HighSecurity&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If you get a message that looks like:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ERROR:  While executing gem ... (Gem::Security::Exception)&lt;br /&gt;
unsigned gems are not allowed by the High Security policy&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then please complain to your Gem author, and have them start signing their Gems.&lt;br /&gt;
&lt;br /&gt;
'''Usage in a Rails project'''&lt;br /&gt;
&lt;br /&gt;
Add the following lines to the Gemfile to the :development group ideally.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
group :development do&lt;br /&gt;
  gem 'capistrano-rails', '~&amp;gt; 0.0.7'&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= routes.rb =&lt;br /&gt;
&lt;br /&gt;
[[File:Heroku.jpg|frame|right|&amp;lt;ref&amp;gt;https://www.heroku.com/&amp;lt;/ref&amp;gt;|Heroku Logo]]&lt;br /&gt;
&lt;br /&gt;
Heroku is a cloud [http://en.wikipedia.org/wiki/Platform_as_a_service Platform as a Service] (PaaS) which supports several programming languages. PaaS is a service model of Cloud computing wherein the provider offers resources like servers, software, database, etc. to the developer. Heroku helps manage environment-specific configurations separately from the source code, which provides greater security.&lt;br /&gt;
Heroku is not just a deployment environment but it also impacts the development process. There are several principles of the development of application on Heroku.&amp;lt;br&amp;gt;&lt;br /&gt;
•	Applications and Codebases : Most of the development of the application is done on application’s codebase which is stored in a [http://en.wikipedia.org/wiki/Version_control_system Version Control System (VCS)] &amp;lt;br&amp;gt;&lt;br /&gt;
•	Dependencies : All the application dependencies such as plugins should be declared explicitly&amp;lt;br&amp;gt;&lt;br /&gt;
•	Configuration : Configuration of an application is all that varies in different deploys&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Getting Started with Heroku'''&lt;br /&gt;
&lt;br /&gt;
1. To get started with Heroku, go to https://id.heroku.com/signup/devcenter, signup for a Heroku account. &lt;br /&gt;
&lt;br /&gt;
2. Then, download and install the Heroku toolbelt at https://toolbelt.heroku.com/ for your development system. You can also use Heroku command line instead of the online Heroku application. &lt;br /&gt;
&lt;br /&gt;
3. After installing one of them, login using the email address and password used when creating the Heroku account:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ref&amp;gt;https://github.com/heroku/heroku&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ heroku login&lt;br /&gt;
Enter your Heroku credentials.&lt;br /&gt;
Email: adam@example.com&lt;br /&gt;
Password:&lt;br /&gt;
Could not find an existing public key.&lt;br /&gt;
Would you like to generate one? [Yn]&lt;br /&gt;
Generating new SSH public key.&lt;br /&gt;
Uploading SSH public key /Users/adam/.ssh/id_rsa.pub&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Deploying Applications'''&lt;br /&gt;
&lt;br /&gt;
Heroku uses [http://en.wikipedia.org/wiki/Git_(software) git] primarily to deploy the applications. When an application is created on Heroku, it associates the new git which is remote with the local git repository.&lt;br /&gt;
&lt;br /&gt;
As a result, deploying code is just the familiar git push, but to the heroku remote instead:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ref&amp;gt;https://devcenter.heroku.com/articles/how-heroku-works#deploying-applications&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ git push heroku master&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Vlad ==&lt;br /&gt;
&lt;br /&gt;
[[File:Vlad.png|frame|right|&amp;lt;ref&amp;gt;http://rubyhitsquad.com/Vlad_the_Deployer.html&amp;lt;/ref&amp;gt;|Vlad Logo]]&lt;br /&gt;
&lt;br /&gt;
Vlad is another automated deployment tool which is simple to use. It integrates with rake and uses standard tools like SSH, rsync etc.&lt;br /&gt;
&lt;br /&gt;
The main features of Vlad include&lt;br /&gt;
* It uses very few dependencies which are simple.&lt;br /&gt;
* It can execute commands on more than one server.&lt;br /&gt;
* It syncs files to one or more servers.&lt;br /&gt;
* It matches local and remote tasks.&lt;br /&gt;
* It runs tests very fast.&lt;br /&gt;
&lt;br /&gt;
'''Getting started with Vlad'''&amp;lt;ref&amp;gt;http://docs.seattlerb.org/vlad/doco/getting_started_txt.html&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create a deploy file, usually in “config/deploy.rb”:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set :application, &amp;quot;project&amp;quot;&lt;br /&gt;
set :domain, &amp;quot;example.com&amp;quot;&lt;br /&gt;
set :deploy_to, &amp;quot;/path/to/install&amp;quot;&lt;br /&gt;
set :repository, 'http://svn.example.com/project/branches/stable/'&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This defaults to using ‘svn export’ from repository, and a single server for app, db, and www.&lt;br /&gt;
&lt;br /&gt;
If you want a multi-config environment, change your config like so:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set :application, &amp;quot;project&amp;quot;&lt;br /&gt;
set :repository, 'http://svn.example.com/project/branches/stable/'&lt;br /&gt;
&lt;br /&gt;
task :beta do&lt;br /&gt;
  set :domain,    &amp;quot;beta.example.com&amp;quot;&lt;br /&gt;
  set :deploy_to, &amp;quot;/path/to/install-beta&amp;quot;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
task :dev do&lt;br /&gt;
  set :domain,    &amp;quot;dev.example.com&amp;quot;&lt;br /&gt;
  set :deploy_to, &amp;quot;/path/to/install-dev&amp;quot;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
task :prod do&lt;br /&gt;
  set :domain,    &amp;quot;example.com&amp;quot;&lt;br /&gt;
  set :deploy_to, &amp;quot;/path/to/install&amp;quot;&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Add the following to your Rakefile:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
begin&lt;br /&gt;
  require 'vlad'&lt;br /&gt;
  Vlad.load&lt;br /&gt;
rescue LoadError&lt;br /&gt;
  # do nothing&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Vlad.load has a lot of flexibility.&lt;br /&gt;
&lt;br /&gt;
You can install vlad via:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;% rake vlad:invoke COMMAND='sudo gem install vlad -y'&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Initial Launch&lt;br /&gt;
&amp;lt;pre&amp;gt;Run rake vlad:setup vlad:update vlad:migrate vlad:start&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ref&amp;gt;http://docs.seattlerb.org/vlad/index.html&amp;lt;/ref&amp;gt;&lt;br /&gt;
'''Running Vlad'''&lt;br /&gt;
&lt;br /&gt;
* Using rake&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
task :shazam! do&lt;br /&gt;
  Rake::Task[:action1].invoke&lt;br /&gt;
  Rake::Task[:action2].invoke&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Using SSH&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Host example.com&lt;br /&gt;
    User fluffy_bunny&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== AppFog == &lt;br /&gt;
&lt;br /&gt;
[[File:AppFog.jpg|frame|right|&amp;lt;ref&amp;gt;https://www.appfog.com/&amp;lt;/ref&amp;gt;|AppFog Logo]]&lt;br /&gt;
&lt;br /&gt;
AppFog is a PaaS built on Cloud Foundry which is another PaaS platform for deploying applications. &lt;br /&gt;
&lt;br /&gt;
Features of AppFog are&lt;br /&gt;
* It launches and runs fast.&lt;br /&gt;
* It does not require configuring servers or installing frameworks.&lt;br /&gt;
* It is compatible with code management systems like git, svn etc.&lt;br /&gt;
&lt;br /&gt;
'''Installing AppFog'''&amp;lt;ref&amp;gt;http://blog.appfog.com/getting-started-with-appfogs-command-line/&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
‘af‘ command line tool is written in Ruby for installation.&lt;br /&gt;
&lt;br /&gt;
Download and install [http://rubyinstaller.org/ Ruby Installer] for Windows. The installer already includes RubyGems.&lt;br /&gt;
&lt;br /&gt;
Be sure you use the Ruby-enabled command prompt window when you later install and use af. You access this command prompt from the Windows Start menu (All Programs &amp;gt; Ruby &amp;gt; Start Command Prompt with Ruby).&lt;br /&gt;
&lt;br /&gt;
Finally, update RubyGems from the Ruby Command Prompt:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem update --system&lt;br /&gt;
$ gem install af&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Login with:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ af login&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Finally from within your source code directory:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ af update hello-node&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Getting Started with AppFog'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
target [url]                                       Reports current target or sets a new target&lt;br /&gt;
login [email] [--email, --password]                Login&lt;br /&gt;
info                                               System and account information&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== AWS Elastic Beanstalk==&lt;br /&gt;
&lt;br /&gt;
[[File:AWSLogo.jpg|frame|right|&amp;lt;ref&amp;gt;https://aws.amazon.com&amp;lt;/ref&amp;gt;|AWS Logo]]&lt;br /&gt;
&lt;br /&gt;
Amazon Wen Services(AWS) offers [http://en.wikipedia.org/wiki/Infrastructure_as_a_service#Infrastructure_as_a_service_.28IaaS.29 Infrastructure as a Service] (IaaS) and provides a complete set of resources for the development of a web application in minutes. AWS Elastic Beanstalk is a deployment tool of the AWS cloud.&lt;br /&gt;
&lt;br /&gt;
With AWS Elastic Beanstalk, applications can be quickly deployed and managed in the AWS cloud without worrying about the infrastructure that runs those applications. AWS Elastic Beanstalk reduces management complexity without restricting choice or control. Once the application is uploaded AWS Elastic Beanstalk automatically handles the details of capacity provisioning, load balancing, scaling, and application health monitoring. AWS Elastic Beanstalk uses highly reliable and scalable services.&lt;br /&gt;
&lt;br /&gt;
'''AWS CLI'''&lt;br /&gt;
&lt;br /&gt;
AWS Elastic Beanstalk uses a command line tool Eb, which helps you to deploy your application easily.&lt;br /&gt;
&lt;br /&gt;
'''Getting Started with Eb'''&amp;lt;ref&amp;gt;http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/command-reference-get-started.html&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To get started with the beanstalk CLI, you will need to download the command line tools at the [http://aws.amazon.com/code/6752709412171743 AWS Sample Code &amp;amp; Libraries] website.&lt;br /&gt;
&lt;br /&gt;
Step 1: Initialize Your Git Repository&lt;br /&gt;
&lt;br /&gt;
Eb is a command line interface that enables you to deploy applications quickly and more easily using Git. Eb is available as part of the Elastic Beanstalk command line tools package. &lt;br /&gt;
&lt;br /&gt;
1. To install eb,install the following software onto your local computer:&lt;br /&gt;
&lt;br /&gt;
* Git 1.6.6 or later. To download Git, go to http://git-scm.com/.&lt;br /&gt;
* PowerShell 2.0.&lt;br /&gt;
&lt;br /&gt;
2. Initialize your Git repository.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git init &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Step 2: Configuring AWS Elastic Beanstalk&lt;br /&gt;
&lt;br /&gt;
1. From your directory where you created your local repository, type the following command.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
eb init&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2. When you are prompted for the access key ID, type your access key ID. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Enter your AWS Access Key ID (current value is &amp;quot;AKIAIOSFODNN7EXAMPLE&amp;quot;): &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3. When you are prompted for the secret access key, type your secret access key.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Enter your AWS Secret Access Key (current value is &amp;quot;wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY&amp;quot;): &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
4. When you are prompted for the AWS Elastic Beanstalk application name, type the name of the application. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Enter an AWS Elastic Beanstalk application name (auto-generated value is &amp;quot;windows&amp;quot;): &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Note:&lt;br /&gt;
If you have a space in your application name, make sure you do not use quotes.&lt;br /&gt;
&lt;br /&gt;
5. When you are prompted for the AWS Elastic Beanstalk environment name, type the name of the environment. AWS Elastic Beanstalk automatically creates an environment name based on your application name. If you want to accept the default, press Enter.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Enter an AWS Elastic Beanstalk environment name (current value is &amp;quot;HelloWorld-env&amp;quot;): &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
6. When you are prompted to create an Amazon RDS DB instance, type y or n. For this example, we'll type y.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Create an RDS DB Instance? [y/n]:&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
7. When you are prompted to enter your RDS user master password, type your password containing from 8 to 16 printable ASCII characters (excluding /, \, and @).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Enter an RDS DB master password: &lt;br /&gt;
Retype password to confirm: &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can now get started with the AWS Elastic Beanstalk.&lt;br /&gt;
&lt;br /&gt;
== OpenShift ==&lt;br /&gt;
&lt;br /&gt;
[[File:OpenShift.png|frame|right|&amp;lt;ref&amp;gt;https://en.wikipedia.org&amp;lt;/ref&amp;gt;|OpenShift Logo]]&lt;br /&gt;
&lt;br /&gt;
Another free and open source PaaS for deploying applications is OpenShift created by [[http://en.wikipedia.org/wiki/RedHat RedHat]]. &lt;br /&gt;
&lt;br /&gt;
'''Considerations'''&lt;br /&gt;
* Databases&lt;br /&gt;
&lt;br /&gt;
To use the application outside the OpenShift environment one needs to change the variables as the application is configured to use database in production mode in OpenShift.&lt;br /&gt;
&lt;br /&gt;
* Assets&lt;br /&gt;
&lt;br /&gt;
The assets are precompiled everytime application is pushed to OpenShift.&lt;br /&gt;
&lt;br /&gt;
* Security&lt;br /&gt;
&lt;br /&gt;
Security related variables are to be unique across the application.&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;ref&amp;gt;https://github.com/openshift/rails-example&amp;lt;/ref&amp;gt;&lt;br /&gt;
'''Installation'''&lt;br /&gt;
&lt;br /&gt;
1.	Create an account at http://openshift.redhat.com/&lt;br /&gt;
&lt;br /&gt;
2.	Create a rails application&lt;br /&gt;
	&amp;lt;pre&amp;gt;rhc app create -a railsapp -t ruby-1.9&amp;lt;/pre&amp;gt;&lt;br /&gt;
3.	Add mysql support to your application&lt;br /&gt;
	&amp;lt;pre&amp;gt;rhc cartridge add -a railsapp -c mysql-5.1&amp;lt;/pre&amp;gt;&lt;br /&gt;
4.	Add this upstream Rails quickstart repository&lt;br /&gt;
&amp;lt;pre&amp;gt;cd railsapp&lt;br /&gt;
git remote add upstream -m master git://github.com/openshift/rails-example.git&lt;br /&gt;
git pull -s recursive -X theirs upstream master&amp;lt;/pre&amp;gt;&lt;br /&gt;
5.	Push your new code&lt;br /&gt;
&amp;lt;pre&amp;gt;git push&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Future scope ==&lt;br /&gt;
&lt;br /&gt;
[[File:Cloud 66.jpg|frame|right|&amp;lt;ref&amp;gt;https://www.cloud66.com/&amp;lt;/ref&amp;gt;|Cloud66 Logo]]&lt;br /&gt;
&lt;br /&gt;
Cloud 66 combines the convenience of Platform-as-a-Service (PaaS) and the flexibility and control of Infrastructure-as-a-Service (IaaS). This platform allows easy deployment of application, so there is no overhead of configuring or monitoring the servers.&lt;br /&gt;
&lt;br /&gt;
'''Cloud 66 Command line Toolbelt'''&lt;br /&gt;
&lt;br /&gt;
Toolbelt is an open source released to deploy the application.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ref&amp;gt;http://blog.cloud66.com/&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Getting Started with Cloud 66'''&lt;br /&gt;
&lt;br /&gt;
1. Go to the [https://www.cloud66.com/users/sign_up sign up] page and create a Cloud 66 account.&lt;br /&gt;
&lt;br /&gt;
2. Go to Cloud 66 Dashboard and [https://www.cloud66.com/help/first_stack build your first stack].&lt;br /&gt;
&lt;br /&gt;
'''Installation'''&lt;br /&gt;
&lt;br /&gt;
Installation of toolbelt uses the following command&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Gem install c66&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This automatically searches the newest version and installs it.&lt;br /&gt;
&lt;br /&gt;
= Model Class : assignment_participant.rb =&lt;br /&gt;
Th AssignmentParticipant model class is a subclass of the participant model class. Several methods in AssignmentParticipant model class required renaming and refactoring to ensure that the change is reflected in the entire project. The names were changed to follow method naming convention. Deprecated code was removed and re-coded to ensure that the code worked in future version as well. Duplicated codes were commented. Methods that are more general in the sub classes were moved to the parent class. Some methods that calculates the collusion in reviews between students were moved to a newly created model class file called collusion_cycle.rb &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;width:3%;&amp;quot;|S. No&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;|Method Name&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;|Change Made &lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;|Reason For Change&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
|''''' 1 '''''&lt;br /&gt;
|get_course_string&lt;br /&gt;
|Renamed to course_string and refactored &lt;br /&gt;
|To follow method naming convention&lt;br /&gt;
|-&lt;br /&gt;
|''''' 2 '''''&lt;br /&gt;
|get_cycle_deviation_score&lt;br /&gt;
|Moved to collusion_cycle.rb model class&lt;br /&gt;
|Related methods that calculate collusion in reviews have been moved to the newly created collusion_cycle.rb model class&lt;br /&gt;
|-&lt;br /&gt;
|''''' 3 '''''&lt;br /&gt;
|get_cycle_similarity_score&lt;br /&gt;
|Moved to collusion_cycle.rb model class&lt;br /&gt;
|Related methods that calculate collusion in reviews have been moved to the newly created collusion_cycle.rb model class&lt;br /&gt;
|-&lt;br /&gt;
|''''' 4 '''''&lt;br /&gt;
|get_feedback&lt;br /&gt;
|Renamed to feedback and refactored&lt;br /&gt;
|To follow method naming convention&lt;br /&gt;
|-&lt;br /&gt;
|''''' 5 '''''&lt;br /&gt;
|get_files&lt;br /&gt;
|Renamed to files_in_directory  and refactored&lt;br /&gt;
|To follow method naming convention&lt;br /&gt;
|-&lt;br /&gt;
|''''' 6 '''''&lt;br /&gt;
|get_four_node_cycles&lt;br /&gt;
|Moved to collusion_cycle.rb model class&lt;br /&gt;
|Related methods that calculate collusion in reviews have been moved to the newly created collusion_cycle.rb model class&lt;br /&gt;
|-&lt;br /&gt;
|''''' 7 '''''&lt;br /&gt;
|fullname&lt;br /&gt;
|Moved to parent model class – participant.rb &lt;br /&gt;
|General methods of the subclass are moved to Parent class&lt;br /&gt;
|-&lt;br /&gt;
|''''' 8 '''''&lt;br /&gt;
|get_metareviews&lt;br /&gt;
|Renamed to metareviews and refactored&lt;br /&gt;
|To follow method naming convention&lt;br /&gt;
|-&lt;br /&gt;
|''''' 9 '''''&lt;br /&gt;
|name&lt;br /&gt;
|Commented the method  &lt;br /&gt;
|The method is already in parent model class – participant.rb and can be used in this subclass through inheritance&lt;br /&gt;
|-&lt;br /&gt;
|''''' 10 '''''&lt;br /&gt;
|name&lt;br /&gt;
|Commented the method  &lt;br /&gt;
|The method is already in parent model class – participant.rb and can be used in this subclass through inheritance. Also it is a duplicate method in patricipant.rb&lt;br /&gt;
|- &lt;br /&gt;
|''''' 11 '''''&lt;br /&gt;
|get_review_score&lt;br /&gt;
|Renamed to review_score and refactored. Deprecated code has been removed and replaced with correct code.&lt;br /&gt;
|To follow method naming convention and ensure the code works in future versions. &lt;br /&gt;
|-&lt;br /&gt;
|''''' 12 '''''&lt;br /&gt;
|get_reviewees&lt;br /&gt;
|Renamed to reviewees and refactored. Deprecated code has been removed and replaced with correct code.&lt;br /&gt;
|To follow method naming convention and ensure the code works in future versions. &lt;br /&gt;
|-&lt;br /&gt;
|''''' 13 '''''&lt;br /&gt;
|get_reviewers&lt;br /&gt;
|Renamed to reviewers and refactored . Deprecated code has been commented and replaced with correct code.&lt;br /&gt;
|To follow method naming convention and ensure the code works in future versions. &lt;br /&gt;
|-&lt;br /&gt;
|''''' 14 '''''&lt;br /&gt;
|get_reviews&lt;br /&gt;
|Renamed to reviews and refactored &lt;br /&gt;
|To follow method naming convention&lt;br /&gt;
|-&lt;br /&gt;
|''''' 15 '''''&lt;br /&gt;
|get_reviews_by_reviewer&lt;br /&gt;
|Renamed to reviews_by_reviewer and refactored &lt;br /&gt;
|To follow method naming convention&lt;br /&gt;
|-&lt;br /&gt;
|''''' 16 '''''&lt;br /&gt;
|get_reviews_by_reviewer&lt;br /&gt;
|Commented the method &lt;br /&gt;
|To remove duplicated method in this class&lt;br /&gt;
|-&lt;br /&gt;
|''''' 17 '''''&lt;br /&gt;
|get_scores&lt;br /&gt;
|Renamed to scores and refactored &lt;br /&gt;
|To follow method naming convention&lt;br /&gt;
|-&lt;br /&gt;
|''''' 18 '''''&lt;br /&gt;
|get_submitted_files&lt;br /&gt;
|Renamed to submitted_files and refactored &lt;br /&gt;
|To follow method naming convention&lt;br /&gt;
|-&lt;br /&gt;
|''''' 19 '''''&lt;br /&gt;
|get_teammate_reviews&lt;br /&gt;
|Renamed to teammate_reviews and refactored &lt;br /&gt;
|To follow method naming convention&lt;br /&gt;
|-&lt;br /&gt;
|''''' 20 '''''&lt;br /&gt;
|get_three_node_cycles&lt;br /&gt;
|Moved to collusion_cycle.rb model class&lt;br /&gt;
|Related methods that calculate collusion in reviews have been moved to the newly created collusion_cycle.rb model class&lt;br /&gt;
|-&lt;br /&gt;
|''''' 21 '''''&lt;br /&gt;
|get_topic_string&lt;br /&gt;
|Method has been Commented&lt;br /&gt;
|It is already present in model super class – participant.rb&lt;br /&gt;
|-&lt;br /&gt;
|''''' 22 '''''&lt;br /&gt;
|get_two_node_cycles&lt;br /&gt;
|Moved to collusion_cycle.rb model class&lt;br /&gt;
|Related methods that calculate collusion in reviews have been moved to the newly created collusion_cycle.rb model class&lt;br /&gt;
|-&lt;br /&gt;
|''''' 23 '''''&lt;br /&gt;
|get_wiki_submissions&lt;br /&gt;
|Renamed to wiki_submissions and refactored&lt;br /&gt;
|To follow method naming convention&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
After changes were made, the existing tests ran successfully.&lt;br /&gt;
&lt;br /&gt;
= Changes in routes.rb =&lt;br /&gt;
&lt;br /&gt;
The following routes were added to make the code run error free. &lt;br /&gt;
resources :submitted_content do&lt;br /&gt;
    collection do&lt;br /&gt;
      get :view&lt;br /&gt;
      get :edit&lt;br /&gt;
      post :submit_hyperlink #OSS808&lt;br /&gt;
      get :remove_hyperlink #OSS808&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
 resources :export_file do&lt;br /&gt;
    collection do&lt;br /&gt;
      get :start&lt;br /&gt;
      # OSS808 Change 27/10/2013&lt;br /&gt;
      # Added missing routes&lt;br /&gt;
      get :export&lt;br /&gt;
      post :export&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  resources :invitation do&lt;br /&gt;
    collection do&lt;br /&gt;
      get :cancel&lt;br /&gt;
      get :accept&lt;br /&gt;
      get :decline&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
= Comparison between Capistrano/Vlad/Heroku/AppFog/OpenShift/Cloud66/AWS Beanstalk =&lt;br /&gt;
&lt;br /&gt;
With so many automated tools available for Code Deployment and Release Management, the decision on which to use for a particular Ruby on rails application depends on various parameters to be considered.&lt;br /&gt;
Some comparative features of the different tools are as follows :&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;width:9%;&amp;quot;|Criteria for Comparision&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;|Capistrano&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;| Vlad&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;| Heroku&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;| AppFog&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;| OpenShift&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;| Cloud66&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;| AWS Beanstalk&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
|'''''Getting started with the tool'''''&lt;br /&gt;
|It is a framework that allows one to execute commands on a remote server using tools like ssh.&lt;br /&gt;
|Vlad deployment is similar to Capistrano, but less complex.&lt;br /&gt;
|Heroku’s offers a plan with first dyno free i.e. 512 MB that can be paired with Postgres starter DB to start an application with 0 initial cost&lt;br /&gt;
|AppFog’s initial plan offers 2GB of RAM free which is enough for small to medium traffic applications. By managing options provided for DB, queue server, application server, etc all part of the intial package, this is an excellent option to try out an application&lt;br /&gt;
|OpenShift is an open source platform and its free plan for starters has 3 gears for free wherein each gear consists of some RAM and disk space.&lt;br /&gt;
|Free plan provides one server for deployment.&lt;br /&gt;
|Provides an initial free tier. Without free tier no additional cost for Beanstalk. One only needs to pay for the AWS resources used.&lt;br /&gt;
|-&lt;br /&gt;
|'''''Scaling Memory'''''&lt;br /&gt;
|Memory increase would require additional servers/unused space in existing ones.&lt;br /&gt;
|Memory increase depends on additional servers available/unused space in existing ones.&lt;br /&gt;
|Memory increased in terms of dyno each of size 512 MB.&lt;br /&gt;
|Can configure any size for memory allocation&lt;br /&gt;
| -&lt;br /&gt;
| -&lt;br /&gt;
|Can automatically up/down scale the application by adjusting the default auto scaling settings.&lt;br /&gt;
|-&lt;br /&gt;
|'''''Scaling – Cost and Ease'''''&lt;br /&gt;
|While this provides greater flexibility as user is in control of the servers, it also causes additional overhead in terms of user needing to work both on Rails application and web server deployment.&lt;br /&gt;
|It can be integrated with Rake without any hindrances.&lt;br /&gt;
|Can dynamically scale up and down an application and pay as per hourly usages. Each additional dyno costs $35/mo&lt;br /&gt;
|Scaling takes up some time and need to pay for a month at the minimum. Scaling up to 4GB increases cost to $100/mo&lt;br /&gt;
| -&lt;br /&gt;
|Scaling using Cloud66 is relatively easy and hassle free.&lt;br /&gt;
|Scaling is fast and easy.&lt;br /&gt;
|-&lt;br /&gt;
|'''''Special features'''''&lt;br /&gt;
|For sensitive applications where handing over the control to a third party for deployment is not feasible, Capistrano is the way to go.&lt;br /&gt;
|It also provides support for tools like rsync and ssh.&lt;br /&gt;
|Lacks support for cross region deployment i.e. can’t select location of server where application gets deployed&lt;br /&gt;
|Supports cross region deployment i.e. if users of application primarily in Asia, can choose a server in Asia to deploy application, thus making the site faster.&lt;br /&gt;
| -&lt;br /&gt;
| -&lt;br /&gt;
|Provides complete flexibility and control of the resources to the user including the chance to take over control of some or all.&lt;br /&gt;
|-&lt;br /&gt;
|'''''Database support'''''&lt;br /&gt;
|Provides support for DB related to rails applications&lt;br /&gt;
|Provides support for DB related to rails applications&lt;br /&gt;
|It features serious production DB like RDBMS, Postgres, etc. and many Addons such as MongoDB, ClearDB, etc.&lt;br /&gt;
|Features free shared databases such as MongoDB, MySQL, Postgres but for other production DB’s need to use Addons&lt;br /&gt;
|Databases featured are MySQL, MongoDB and Postgres&lt;br /&gt;
| -&lt;br /&gt;
|Supports DB like Amazon SimpleDB, Amazon RDS, Amazon DynamoDB.&lt;br /&gt;
|-&lt;br /&gt;
|'''''Deployment strategy'''''&lt;br /&gt;
|Capistrano provides commands to be executed for automated deployment. It supports git.&lt;br /&gt;
|It is much easier to deploy using Vlad as compared to Capistrano.&lt;br /&gt;
|Deployment as easy as ‘git push’&lt;br /&gt;
|Deployment does not support git. It uses the af tool for deployment.&lt;br /&gt;
| -&lt;br /&gt;
|Since Cloud66 provides the platform in terms of Application Stack Management as a Service, it uses the infrastructure of AWS, Virtual Private Server, etc. for actual deployment. But the user doesn’t have to worry about configuration or monitoring of the servers. Hence provides easy deployment.&lt;br /&gt;
|Deployment options include Git, AWS management console, etc.&lt;br /&gt;
|-&lt;br /&gt;
|'''''Community Support availability'''''&lt;br /&gt;
| As it has been in use for a long time there is a huge community support available for Capistrano.&lt;br /&gt;
| -&lt;br /&gt;
|Heroku also provides a huge community support given the fact that there are a lot of Heroku users.&lt;br /&gt;
|Community is limited.&lt;br /&gt;
|RedHat being a reputed provider for open source solutions, the OpenShift community is gradually increasing and receiving support from a considerable community of users.&lt;br /&gt;
|Limited community support currently&lt;br /&gt;
|Has community forums and documentation.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Conclusion =&lt;br /&gt;
&lt;br /&gt;
Comparison and contrast between various deployment automated tools such as Capistrano, Heroku, Vlad, AppFog, OpenShift, Cloud66, AWS Beanstalk shows that each has its own pros and cons. &lt;br /&gt;
For instance, in a client based application where handing over the control of the application to a third party such as the deployment tool provider is impossible, AWS Beanstalk would be the obvious choice for the developer.&lt;br /&gt;
On the other hand, a novice Rails application developer might find all he needs in the starter plan of Heroku with the added bonus of a huge support community available to him for troubleshooting as he stumbles his way across the development of the application.&lt;br /&gt;
One may also choose the tool that provides the specific database support for your application. In case of large scale corporations where budgets are not that limited, the increasing costs with up-scaling of some tools would not be an obstacle.&lt;br /&gt;
Thus, various considerations about the application such as scalability requirement, security concerns, cost, availability of own resources such as servers etc., will help determine which tool is the most suitable for that application.&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= See Also =&lt;br /&gt;
&lt;br /&gt;
* Rails Solutions: Ruby on Rails Made Easy by Justin Williams&lt;br /&gt;
* http://guides.beanstalkapp.com/deployments/best-practices.html&lt;br /&gt;
* http://www.urbancode.com/anthill3-help-3.7/html/SettingUpDeploymentProcess.html&lt;br /&gt;
* http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=UseFMSGateway_3.html&lt;br /&gt;
* http://pic.dhe.ibm.com/infocenter/tivihelp/v26r1/index.jsp?topic=%2Fcom.ibm.dtm.doc%2Fdeploysoftware%2Fc_deploysw_process.html&lt;/div&gt;</summary>
		<author><name>Npari</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch2_0e808_nsv&amp;diff=81374</id>
		<title>CSC/ECE 517 Fall 2013/ch2 0e808 nsv</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch2_0e808_nsv&amp;diff=81374"/>
		<updated>2013-10-30T21:32:25Z</updated>

		<summary type="html">&lt;p&gt;Npari: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= E808: Refactor and test Participant, AssignmentParticipant, &amp;amp; CourseParticipant =&lt;br /&gt;
The requirements provided for the Open Source System project were as follows : &amp;lt;br&amp;gt;&lt;br /&gt;
'''Classes''': &amp;lt;br&amp;gt;&lt;br /&gt;
''participant.rb'' (197 lines)&amp;lt;br&amp;gt;&lt;br /&gt;
''assignment_participant.rb'' (476 lines)&amp;lt;br&amp;gt;&lt;br /&gt;
''course_participant.rb'' (90 lines)&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''What they do''': &amp;lt;br&amp;gt; &lt;br /&gt;
These classes keep track of a user who is participating in an assignment or a course.  participant.rb is the superclass, and the other two are the subclasses.&lt;br /&gt;
&lt;br /&gt;
'''What is needed''': &amp;lt;br&amp;gt; &lt;br /&gt;
The methods are complex; there are a lot of them (assignment_particpant has 44) and there is a lot of duplicated code.  assignment_participant contains code for detecting cycles of high grades (which can indicate collusion in reviews).  It would be better moved to another class.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
= Introduction =&lt;br /&gt;
&lt;br /&gt;
A cursory analysis of the code of the three model classes showed the existence of code duplication. In a lot of the cases the [http://en.wikipedia.org/wiki/Don%27t_Repeat_Yourself Don't Repeat Yourself] (DRY) principle was violated.&lt;br /&gt;
&lt;br /&gt;
In keeping with the [http://en.wikipedia.org/wiki/Agile_software_development Agile] methodology, which involves having regular discussions with all stakeholders, the design check for the project was performed with a meeting with the Instructor.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{viewxls:name=sample.xlsx|sheet=Summary|row=13|col=3}&lt;br /&gt;
&lt;br /&gt;
Next the code was analyzed in detail and the following plausible improvements were predicted.[[File:[[Media:Example.jpg]]]]&lt;br /&gt;
&lt;br /&gt;
After the final release of the code in development and testing stage, the master plan is prepared for deployment of components and sites based on the sign-offs provided by the project teams, stakeholders and customers. Then, the stabilization of the deployment is calculated based on some metrics. Once the deployment is stabilized, it is reviewed and the process of deployment is complete. The final sign-off is given by the stakeholders.&lt;br /&gt;
&lt;br /&gt;
=Participant model: participant.rb=&lt;br /&gt;
&lt;br /&gt;
Code deployment is a procedure where the application is transferred onto a production server, so that it is made available for all the other users. It is the part of release management process which involves several activities. These activities are inter-dependent and need to be completed in a specific order for successful code deployment. &lt;br /&gt;
&lt;br /&gt;
'''Code Deployment Activities'''&lt;br /&gt;
&lt;br /&gt;
The various deployment activities include &amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/Software_deployment&amp;lt;/ref&amp;gt;&lt;br /&gt;
* Release : Gathering all system components in preparation for deployment&lt;br /&gt;
* Install and activate : Installing the application components and getting them in the 'ready' state&lt;br /&gt;
* Deactivate : Shutting down components that are out-dated or that may interfere with updating others&lt;br /&gt;
* Adapt : Making changes to application to accommodate changes in environment&lt;br /&gt;
* Update : Having a newer release installed in place of the old one&lt;br /&gt;
* Built-in : There are components built-into some tools for complete/semi-automating updates&lt;br /&gt;
* Version tracking : These systems help the user to know if newer versions of a software are available and if yes, help install them&lt;br /&gt;
* Uninstall : Opposite of installation and involves complete removal of software and its dependencies from the environment&lt;br /&gt;
* Retire : This involves making a software obsolete and is the end of software life cycle&lt;br /&gt;
&lt;br /&gt;
The general guidelines for the deployment process remain the same but there are variations in the specific requirements with each software system.&lt;br /&gt;
&lt;br /&gt;
=AssignmentParticipant model: assignment_participant.rb=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ref&amp;gt;http://searchitchannel.techtarget.com/definition/release-management&amp;lt;/ref&amp;gt;&lt;br /&gt;
Release management is a software process which takes care of the development, testing, deployment and support stages of software releases. The start of release management happens in the development phase, where it requests for new features or changes in the existing application. When the request is accepted, a new release is planned and designed. This design is built and then enters the testing phase, where the release is tested until it is accepted. After the release is accepted as a candidate, it enters the deployment phase where it is implemented. Once deployed, the release is made available and sent to support phase for collection of bug reports. Once the support phase is done, the bugs and other issues lead to requests for changes and the cycle is then repeated.&lt;br /&gt;
&lt;br /&gt;
=CourseParticipant model:course_participant.rb =&lt;br /&gt;
&amp;lt;ref&amp;gt;http://www.urbancode.com/html/solutions/deployment-automation.html&amp;lt;/ref&amp;gt;&lt;br /&gt;
Automation of a process is required when the manual process is more error prone. Also, for large real world applications, the manual process is very complex and time consuming. Incomplete documentation hampers a manual process further. Deployment also has to be done in many environments and involves varied steps to be followed in a specific order. Manual process needs repetition of same procedure to each and every environment which leads to many errors and the process becomes costly.&lt;br /&gt;
In web applications each new release has to be deployed to and tested in development, testing and production environments.The number of software releases in web applications  are more and hence the need to automate release management is also greater.&lt;br /&gt;
&lt;br /&gt;
Automation of deployment delivers applications faster and with fewer errors. The defined software deployment process can be applied across all environments consistently every time. With various automated application deployment platforms now readily available, manual deployments have become a thing of the past.&lt;br /&gt;
&lt;br /&gt;
Lets take a look at the various Deployment Automation tools available to Ruby on Rails applications. For the purposes of this article the process of manual deployment of a Ruby on Rails application is out of scope.&lt;br /&gt;
&lt;br /&gt;
= Tests =&lt;br /&gt;
&lt;br /&gt;
Some of the automated tools that are widely used for the process of deployment with Ruby on Rails are &lt;br /&gt;
&lt;br /&gt;
* Capistrano&lt;br /&gt;
* Heroku&lt;br /&gt;
* Vlad&lt;br /&gt;
* AppFog&lt;br /&gt;
* AWS Elastic Beanstalk&lt;br /&gt;
* OpenShift&lt;br /&gt;
* Cloud 66&lt;br /&gt;
&lt;br /&gt;
= yml files =&lt;br /&gt;
&lt;br /&gt;
[[File:Capistrano.jpg|frame|right|&amp;lt;ref&amp;gt;http://www.capistranorb.com/&amp;lt;/ref&amp;gt;|Capistrano Logo]]&lt;br /&gt;
&lt;br /&gt;
Capistrano is a Ruby tool which helps deploy an application to the server. Capistrano allows deploying to multiple machines at a time. It has many advanced options which help to deploy different kinds of applications. It also supports the scripting and execution of tasks.&lt;br /&gt;
&lt;br /&gt;
Capistrano can be used to:&lt;br /&gt;
&lt;br /&gt;
* Deploy applications onto many machines simultaneously.&lt;br /&gt;
* Automate the audits&lt;br /&gt;
* Automate the common tasks of a team.&lt;br /&gt;
&lt;br /&gt;
Capistrano can be made a part of a larger software by integrating it with another Ruby software.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ref&amp;gt;http://www.capistranorb.com/documentation/getting-started/installation/&amp;lt;/ref&amp;gt;  &lt;br /&gt;
'''General Usage'''&lt;br /&gt;
&lt;br /&gt;
The following commands will clone Capistrano, build the gem and install it locally.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem install capistrano --pre --trust-policy HighSecurity&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Or grab the bleeding edge head from:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ git clone -b v3 https://github.com/capistrano/capistrano.git&lt;br /&gt;
$ cd capistrano&lt;br /&gt;
$ gem build *.gemspec&lt;br /&gt;
$ gem install *.gem&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
'''Signed Rubygems'''&lt;br /&gt;
&lt;br /&gt;
As Capistrano is a signed gem, you should always be careful to use the --trust-policy flag when installing Gems, or since Bundler 1.3 you should use the same flag:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem install capistrano --pre --trust-policy HighSecurity&lt;br /&gt;
$ bundle install --trust-policy HighSecurity&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If you get a message that looks like:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ERROR:  While executing gem ... (Gem::Security::Exception)&lt;br /&gt;
unsigned gems are not allowed by the High Security policy&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then please complain to your Gem author, and have them start signing their Gems.&lt;br /&gt;
&lt;br /&gt;
'''Usage in a Rails project'''&lt;br /&gt;
&lt;br /&gt;
Add the following lines to the Gemfile to the :development group ideally.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
group :development do&lt;br /&gt;
  gem 'capistrano-rails', '~&amp;gt; 0.0.7'&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= routes.rb =&lt;br /&gt;
&lt;br /&gt;
[[File:Heroku.jpg|frame|right|&amp;lt;ref&amp;gt;https://www.heroku.com/&amp;lt;/ref&amp;gt;|Heroku Logo]]&lt;br /&gt;
&lt;br /&gt;
Heroku is a cloud [http://en.wikipedia.org/wiki/Platform_as_a_service Platform as a Service] (PaaS) which supports several programming languages. PaaS is a service model of Cloud computing wherein the provider offers resources like servers, software, database, etc. to the developer. Heroku helps manage environment-specific configurations separately from the source code, which provides greater security.&lt;br /&gt;
Heroku is not just a deployment environment but it also impacts the development process. There are several principles of the development of application on Heroku.&amp;lt;br&amp;gt;&lt;br /&gt;
•	Applications and Codebases : Most of the development of the application is done on application’s codebase which is stored in a [http://en.wikipedia.org/wiki/Version_control_system Version Control System (VCS)] &amp;lt;br&amp;gt;&lt;br /&gt;
•	Dependencies : All the application dependencies such as plugins should be declared explicitly&amp;lt;br&amp;gt;&lt;br /&gt;
•	Configuration : Configuration of an application is all that varies in different deploys&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Getting Started with Heroku'''&lt;br /&gt;
&lt;br /&gt;
1. To get started with Heroku, go to https://id.heroku.com/signup/devcenter, signup for a Heroku account. &lt;br /&gt;
&lt;br /&gt;
2. Then, download and install the Heroku toolbelt at https://toolbelt.heroku.com/ for your development system. You can also use Heroku command line instead of the online Heroku application. &lt;br /&gt;
&lt;br /&gt;
3. After installing one of them, login using the email address and password used when creating the Heroku account:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ref&amp;gt;https://github.com/heroku/heroku&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ heroku login&lt;br /&gt;
Enter your Heroku credentials.&lt;br /&gt;
Email: adam@example.com&lt;br /&gt;
Password:&lt;br /&gt;
Could not find an existing public key.&lt;br /&gt;
Would you like to generate one? [Yn]&lt;br /&gt;
Generating new SSH public key.&lt;br /&gt;
Uploading SSH public key /Users/adam/.ssh/id_rsa.pub&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Deploying Applications'''&lt;br /&gt;
&lt;br /&gt;
Heroku uses [http://en.wikipedia.org/wiki/Git_(software) git] primarily to deploy the applications. When an application is created on Heroku, it associates the new git which is remote with the local git repository.&lt;br /&gt;
&lt;br /&gt;
As a result, deploying code is just the familiar git push, but to the heroku remote instead:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ref&amp;gt;https://devcenter.heroku.com/articles/how-heroku-works#deploying-applications&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ git push heroku master&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Vlad ==&lt;br /&gt;
&lt;br /&gt;
[[File:Vlad.png|frame|right|&amp;lt;ref&amp;gt;http://rubyhitsquad.com/Vlad_the_Deployer.html&amp;lt;/ref&amp;gt;|Vlad Logo]]&lt;br /&gt;
&lt;br /&gt;
Vlad is another automated deployment tool which is simple to use. It integrates with rake and uses standard tools like SSH, rsync etc.&lt;br /&gt;
&lt;br /&gt;
The main features of Vlad include&lt;br /&gt;
* It uses very few dependencies which are simple.&lt;br /&gt;
* It can execute commands on more than one server.&lt;br /&gt;
* It syncs files to one or more servers.&lt;br /&gt;
* It matches local and remote tasks.&lt;br /&gt;
* It runs tests very fast.&lt;br /&gt;
&lt;br /&gt;
'''Getting started with Vlad'''&amp;lt;ref&amp;gt;http://docs.seattlerb.org/vlad/doco/getting_started_txt.html&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create a deploy file, usually in “config/deploy.rb”:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set :application, &amp;quot;project&amp;quot;&lt;br /&gt;
set :domain, &amp;quot;example.com&amp;quot;&lt;br /&gt;
set :deploy_to, &amp;quot;/path/to/install&amp;quot;&lt;br /&gt;
set :repository, 'http://svn.example.com/project/branches/stable/'&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This defaults to using ‘svn export’ from repository, and a single server for app, db, and www.&lt;br /&gt;
&lt;br /&gt;
If you want a multi-config environment, change your config like so:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set :application, &amp;quot;project&amp;quot;&lt;br /&gt;
set :repository, 'http://svn.example.com/project/branches/stable/'&lt;br /&gt;
&lt;br /&gt;
task :beta do&lt;br /&gt;
  set :domain,    &amp;quot;beta.example.com&amp;quot;&lt;br /&gt;
  set :deploy_to, &amp;quot;/path/to/install-beta&amp;quot;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
task :dev do&lt;br /&gt;
  set :domain,    &amp;quot;dev.example.com&amp;quot;&lt;br /&gt;
  set :deploy_to, &amp;quot;/path/to/install-dev&amp;quot;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
task :prod do&lt;br /&gt;
  set :domain,    &amp;quot;example.com&amp;quot;&lt;br /&gt;
  set :deploy_to, &amp;quot;/path/to/install&amp;quot;&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Add the following to your Rakefile:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
begin&lt;br /&gt;
  require 'vlad'&lt;br /&gt;
  Vlad.load&lt;br /&gt;
rescue LoadError&lt;br /&gt;
  # do nothing&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Vlad.load has a lot of flexibility.&lt;br /&gt;
&lt;br /&gt;
You can install vlad via:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;% rake vlad:invoke COMMAND='sudo gem install vlad -y'&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Initial Launch&lt;br /&gt;
&amp;lt;pre&amp;gt;Run rake vlad:setup vlad:update vlad:migrate vlad:start&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ref&amp;gt;http://docs.seattlerb.org/vlad/index.html&amp;lt;/ref&amp;gt;&lt;br /&gt;
'''Running Vlad'''&lt;br /&gt;
&lt;br /&gt;
* Using rake&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
task :shazam! do&lt;br /&gt;
  Rake::Task[:action1].invoke&lt;br /&gt;
  Rake::Task[:action2].invoke&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Using SSH&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Host example.com&lt;br /&gt;
    User fluffy_bunny&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== AppFog == &lt;br /&gt;
&lt;br /&gt;
[[File:AppFog.jpg|frame|right|&amp;lt;ref&amp;gt;https://www.appfog.com/&amp;lt;/ref&amp;gt;|AppFog Logo]]&lt;br /&gt;
&lt;br /&gt;
AppFog is a PaaS built on Cloud Foundry which is another PaaS platform for deploying applications. &lt;br /&gt;
&lt;br /&gt;
Features of AppFog are&lt;br /&gt;
* It launches and runs fast.&lt;br /&gt;
* It does not require configuring servers or installing frameworks.&lt;br /&gt;
* It is compatible with code management systems like git, svn etc.&lt;br /&gt;
&lt;br /&gt;
'''Installing AppFog'''&amp;lt;ref&amp;gt;http://blog.appfog.com/getting-started-with-appfogs-command-line/&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
‘af‘ command line tool is written in Ruby for installation.&lt;br /&gt;
&lt;br /&gt;
Download and install [http://rubyinstaller.org/ Ruby Installer] for Windows. The installer already includes RubyGems.&lt;br /&gt;
&lt;br /&gt;
Be sure you use the Ruby-enabled command prompt window when you later install and use af. You access this command prompt from the Windows Start menu (All Programs &amp;gt; Ruby &amp;gt; Start Command Prompt with Ruby).&lt;br /&gt;
&lt;br /&gt;
Finally, update RubyGems from the Ruby Command Prompt:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem update --system&lt;br /&gt;
$ gem install af&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Login with:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ af login&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Finally from within your source code directory:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ af update hello-node&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Getting Started with AppFog'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
target [url]                                       Reports current target or sets a new target&lt;br /&gt;
login [email] [--email, --password]                Login&lt;br /&gt;
info                                               System and account information&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== AWS Elastic Beanstalk==&lt;br /&gt;
&lt;br /&gt;
[[File:AWSLogo.jpg|frame|right|&amp;lt;ref&amp;gt;https://aws.amazon.com&amp;lt;/ref&amp;gt;|AWS Logo]]&lt;br /&gt;
&lt;br /&gt;
Amazon Wen Services(AWS) offers [http://en.wikipedia.org/wiki/Infrastructure_as_a_service#Infrastructure_as_a_service_.28IaaS.29 Infrastructure as a Service] (IaaS) and provides a complete set of resources for the development of a web application in minutes. AWS Elastic Beanstalk is a deployment tool of the AWS cloud.&lt;br /&gt;
&lt;br /&gt;
With AWS Elastic Beanstalk, applications can be quickly deployed and managed in the AWS cloud without worrying about the infrastructure that runs those applications. AWS Elastic Beanstalk reduces management complexity without restricting choice or control. Once the application is uploaded AWS Elastic Beanstalk automatically handles the details of capacity provisioning, load balancing, scaling, and application health monitoring. AWS Elastic Beanstalk uses highly reliable and scalable services.&lt;br /&gt;
&lt;br /&gt;
'''AWS CLI'''&lt;br /&gt;
&lt;br /&gt;
AWS Elastic Beanstalk uses a command line tool Eb, which helps you to deploy your application easily.&lt;br /&gt;
&lt;br /&gt;
'''Getting Started with Eb'''&amp;lt;ref&amp;gt;http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/command-reference-get-started.html&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To get started with the beanstalk CLI, you will need to download the command line tools at the [http://aws.amazon.com/code/6752709412171743 AWS Sample Code &amp;amp; Libraries] website.&lt;br /&gt;
&lt;br /&gt;
Step 1: Initialize Your Git Repository&lt;br /&gt;
&lt;br /&gt;
Eb is a command line interface that enables you to deploy applications quickly and more easily using Git. Eb is available as part of the Elastic Beanstalk command line tools package. &lt;br /&gt;
&lt;br /&gt;
1. To install eb,install the following software onto your local computer:&lt;br /&gt;
&lt;br /&gt;
* Git 1.6.6 or later. To download Git, go to http://git-scm.com/.&lt;br /&gt;
* PowerShell 2.0.&lt;br /&gt;
&lt;br /&gt;
2. Initialize your Git repository.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git init &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Step 2: Configuring AWS Elastic Beanstalk&lt;br /&gt;
&lt;br /&gt;
1. From your directory where you created your local repository, type the following command.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
eb init&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2. When you are prompted for the access key ID, type your access key ID. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Enter your AWS Access Key ID (current value is &amp;quot;AKIAIOSFODNN7EXAMPLE&amp;quot;): &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3. When you are prompted for the secret access key, type your secret access key.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Enter your AWS Secret Access Key (current value is &amp;quot;wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY&amp;quot;): &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
4. When you are prompted for the AWS Elastic Beanstalk application name, type the name of the application. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Enter an AWS Elastic Beanstalk application name (auto-generated value is &amp;quot;windows&amp;quot;): &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Note:&lt;br /&gt;
If you have a space in your application name, make sure you do not use quotes.&lt;br /&gt;
&lt;br /&gt;
5. When you are prompted for the AWS Elastic Beanstalk environment name, type the name of the environment. AWS Elastic Beanstalk automatically creates an environment name based on your application name. If you want to accept the default, press Enter.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Enter an AWS Elastic Beanstalk environment name (current value is &amp;quot;HelloWorld-env&amp;quot;): &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
6. When you are prompted to create an Amazon RDS DB instance, type y or n. For this example, we'll type y.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Create an RDS DB Instance? [y/n]:&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
7. When you are prompted to enter your RDS user master password, type your password containing from 8 to 16 printable ASCII characters (excluding /, \, and @).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Enter an RDS DB master password: &lt;br /&gt;
Retype password to confirm: &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can now get started with the AWS Elastic Beanstalk.&lt;br /&gt;
&lt;br /&gt;
== OpenShift ==&lt;br /&gt;
&lt;br /&gt;
[[File:OpenShift.png|frame|right|&amp;lt;ref&amp;gt;https://en.wikipedia.org&amp;lt;/ref&amp;gt;|OpenShift Logo]]&lt;br /&gt;
&lt;br /&gt;
Another free and open source PaaS for deploying applications is OpenShift created by [[http://en.wikipedia.org/wiki/RedHat RedHat]]. &lt;br /&gt;
&lt;br /&gt;
'''Considerations'''&lt;br /&gt;
* Databases&lt;br /&gt;
&lt;br /&gt;
To use the application outside the OpenShift environment one needs to change the variables as the application is configured to use database in production mode in OpenShift.&lt;br /&gt;
&lt;br /&gt;
* Assets&lt;br /&gt;
&lt;br /&gt;
The assets are precompiled everytime application is pushed to OpenShift.&lt;br /&gt;
&lt;br /&gt;
* Security&lt;br /&gt;
&lt;br /&gt;
Security related variables are to be unique across the application.&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;ref&amp;gt;https://github.com/openshift/rails-example&amp;lt;/ref&amp;gt;&lt;br /&gt;
'''Installation'''&lt;br /&gt;
&lt;br /&gt;
1.	Create an account at http://openshift.redhat.com/&lt;br /&gt;
&lt;br /&gt;
2.	Create a rails application&lt;br /&gt;
	&amp;lt;pre&amp;gt;rhc app create -a railsapp -t ruby-1.9&amp;lt;/pre&amp;gt;&lt;br /&gt;
3.	Add mysql support to your application&lt;br /&gt;
	&amp;lt;pre&amp;gt;rhc cartridge add -a railsapp -c mysql-5.1&amp;lt;/pre&amp;gt;&lt;br /&gt;
4.	Add this upstream Rails quickstart repository&lt;br /&gt;
&amp;lt;pre&amp;gt;cd railsapp&lt;br /&gt;
git remote add upstream -m master git://github.com/openshift/rails-example.git&lt;br /&gt;
git pull -s recursive -X theirs upstream master&amp;lt;/pre&amp;gt;&lt;br /&gt;
5.	Push your new code&lt;br /&gt;
&amp;lt;pre&amp;gt;git push&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Future scope ==&lt;br /&gt;
&lt;br /&gt;
[[File:Cloud 66.jpg|frame|right|&amp;lt;ref&amp;gt;https://www.cloud66.com/&amp;lt;/ref&amp;gt;|Cloud66 Logo]]&lt;br /&gt;
&lt;br /&gt;
Cloud 66 combines the convenience of Platform-as-a-Service (PaaS) and the flexibility and control of Infrastructure-as-a-Service (IaaS). This platform allows easy deployment of application, so there is no overhead of configuring or monitoring the servers.&lt;br /&gt;
&lt;br /&gt;
'''Cloud 66 Command line Toolbelt'''&lt;br /&gt;
&lt;br /&gt;
Toolbelt is an open source released to deploy the application.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ref&amp;gt;http://blog.cloud66.com/&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Getting Started with Cloud 66'''&lt;br /&gt;
&lt;br /&gt;
1. Go to the [https://www.cloud66.com/users/sign_up sign up] page and create a Cloud 66 account.&lt;br /&gt;
&lt;br /&gt;
2. Go to Cloud 66 Dashboard and [https://www.cloud66.com/help/first_stack build your first stack].&lt;br /&gt;
&lt;br /&gt;
'''Installation'''&lt;br /&gt;
&lt;br /&gt;
Installation of toolbelt uses the following command&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Gem install c66&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This automatically searches the newest version and installs it.&lt;br /&gt;
&lt;br /&gt;
= Model Class : assignment_participant.rb =&lt;br /&gt;
Th AssignmentParticipant model class is a subclass of the participant model class. Several methods in AssignmentParticipant model class required renaming and refactoring to ensure that the change is reflected in the entire project. The names were changed to follow method naming convention. Deprecated code was removed and re-coded to ensure that the code worked in future version as well. Duplicated codes were commented. Methods that are more general in the sub classes were moved to the parent class. Some methods that calculates the collusion in reviews between students were moved to a newly created model class file called collusion_cycle.rb &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;width:3%;&amp;quot;|S. No&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;|Method Name&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;|Change Made &lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;|Reason For Change&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
|''''' 1 '''''&lt;br /&gt;
|get_course_string&lt;br /&gt;
|Renamed to course_string and refactored &lt;br /&gt;
|To follow method naming convention&lt;br /&gt;
|-&lt;br /&gt;
|''''' 2 '''''&lt;br /&gt;
|get_cycle_deviation_score&lt;br /&gt;
|Moved to collusion_cycle.rb model class&lt;br /&gt;
|Related methods that calculate collusion in reviews have been moved to the newly created collusion_cycle.rb model class&lt;br /&gt;
|-&lt;br /&gt;
|''''' 3 '''''&lt;br /&gt;
|get_cycle_similarity_score&lt;br /&gt;
|Moved to collusion_cycle.rb model class&lt;br /&gt;
|Related methods that calculate collusion in reviews have been moved to the newly created collusion_cycle.rb model class&lt;br /&gt;
|-&lt;br /&gt;
|''''' 4 '''''&lt;br /&gt;
|get_feedback&lt;br /&gt;
|Renamed to feedback and refactored&lt;br /&gt;
|To follow method naming convention&lt;br /&gt;
|-&lt;br /&gt;
|''''' 5 '''''&lt;br /&gt;
|get_files&lt;br /&gt;
|Renamed to files_in_directory  and refactored&lt;br /&gt;
|To follow method naming convention&lt;br /&gt;
|-&lt;br /&gt;
|''''' 6 '''''&lt;br /&gt;
|get_four_node_cycles&lt;br /&gt;
|Moved to collusion_cycle.rb model class&lt;br /&gt;
|Related methods that calculate collusion in reviews have been moved to the newly created collusion_cycle.rb model class&lt;br /&gt;
|-&lt;br /&gt;
|''''' 7 '''''&lt;br /&gt;
|fullname&lt;br /&gt;
|Moved to parent model class – participant.rb &lt;br /&gt;
|General methods of the subclass are moved to Parent class&lt;br /&gt;
|-&lt;br /&gt;
|''''' 8 '''''&lt;br /&gt;
|get_metareviews&lt;br /&gt;
|Renamed to metareviews and refactored&lt;br /&gt;
|To follow method naming convention&lt;br /&gt;
|-&lt;br /&gt;
|''''' 9 '''''&lt;br /&gt;
|name&lt;br /&gt;
|Commented the method  &lt;br /&gt;
|The method is already in parent model class – participant.rb and can be used in this subclass through inheritance&lt;br /&gt;
|-&lt;br /&gt;
|''''' 10 '''''&lt;br /&gt;
|name&lt;br /&gt;
|Commented the method  &lt;br /&gt;
|The method is already in parent model class – participant.rb and can be used in this subclass through inheritance. Also it is a duplicate method in patricipant.rb&lt;br /&gt;
|- &lt;br /&gt;
|''''' 11 '''''&lt;br /&gt;
|get_review_score&lt;br /&gt;
|Renamed to review_score and refactored. Deprecated code has been removed and replaced with correct code.&lt;br /&gt;
|To follow method naming convention and ensure the code works in future versions. &lt;br /&gt;
|-&lt;br /&gt;
|''''' 12 '''''&lt;br /&gt;
|get_reviewees&lt;br /&gt;
|Renamed to reviewees and refactored. Deprecated code has been removed and replaced with correct code.&lt;br /&gt;
|To follow method naming convention and ensure the code works in future versions. &lt;br /&gt;
|-&lt;br /&gt;
|''''' 13 '''''&lt;br /&gt;
|get_reviewers&lt;br /&gt;
|Renamed to reviewers and refactored . Deprecated code has been commented and replaced with correct code.&lt;br /&gt;
|To follow method naming convention and ensure the code works in future versions. &lt;br /&gt;
|-&lt;br /&gt;
|''''' 14 '''''&lt;br /&gt;
|get_reviews&lt;br /&gt;
|Renamed to reviews and refactored &lt;br /&gt;
|To follow method naming convention&lt;br /&gt;
|-&lt;br /&gt;
|''''' 15 '''''&lt;br /&gt;
|get_reviews_by_reviewer&lt;br /&gt;
|Renamed to reviews_by_reviewer and refactored &lt;br /&gt;
|To follow method naming convention&lt;br /&gt;
|-&lt;br /&gt;
|''''' 16 '''''&lt;br /&gt;
|get_reviews_by_reviewer&lt;br /&gt;
|Commented the method &lt;br /&gt;
|To remove duplicated method in this class&lt;br /&gt;
|-&lt;br /&gt;
|''''' 17 '''''&lt;br /&gt;
|get_scores&lt;br /&gt;
|Renamed to scores and refactored &lt;br /&gt;
|To follow method naming convention&lt;br /&gt;
|-&lt;br /&gt;
|''''' 18 '''''&lt;br /&gt;
|get_submitted_files&lt;br /&gt;
|Renamed to submitted_files and refactored &lt;br /&gt;
|To follow method naming convention&lt;br /&gt;
|-&lt;br /&gt;
|''''' 19 '''''&lt;br /&gt;
|get_teammate_reviews&lt;br /&gt;
|Renamed to teammate_reviews and refactored &lt;br /&gt;
|To follow method naming convention&lt;br /&gt;
|-&lt;br /&gt;
|''''' 20 '''''&lt;br /&gt;
|get_three_node_cycles&lt;br /&gt;
|Moved to collusion_cycle.rb model class&lt;br /&gt;
|Related methods that calculate collusion in reviews have been moved to the newly created collusion_cycle.rb model class&lt;br /&gt;
|-&lt;br /&gt;
|''''' 21 '''''&lt;br /&gt;
|get_topic_string&lt;br /&gt;
|Method has been Commented&lt;br /&gt;
|It is already present in model super class – participant.rb&lt;br /&gt;
|-&lt;br /&gt;
|''''' 22 '''''&lt;br /&gt;
|get_two_node_cycles&lt;br /&gt;
|Moved to collusion_cycle.rb model class&lt;br /&gt;
|Related methods that calculate collusion in reviews have been moved to the newly created collusion_cycle.rb model class&lt;br /&gt;
|-&lt;br /&gt;
|''''' 23 '''''&lt;br /&gt;
|get_wiki_submissions&lt;br /&gt;
|Renamed to wiki_submissions and refactored&lt;br /&gt;
|To follow method naming convention&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
After changes were made, the existing tests ran successfully.&lt;br /&gt;
&lt;br /&gt;
= Changes in routes.rb ==&lt;br /&gt;
&lt;br /&gt;
The following routes were added to make the code run error free. &lt;br /&gt;
resources :submitted_content do&lt;br /&gt;
    collection do&lt;br /&gt;
      get :view&lt;br /&gt;
      get :edit&lt;br /&gt;
      post :submit_hyperlink #OSS808&lt;br /&gt;
      get :remove_hyperlink #OSS808&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
 resources :export_file do&lt;br /&gt;
    collection do&lt;br /&gt;
      get :start&lt;br /&gt;
      # OSS808 Change 27/10/2013&lt;br /&gt;
      # Added missing routes&lt;br /&gt;
      get :export&lt;br /&gt;
      post :export&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
#OSS808&lt;br /&gt;
  resources :invitation do&lt;br /&gt;
    collection do&lt;br /&gt;
      get :cancel&lt;br /&gt;
      get :accept&lt;br /&gt;
      get :decline&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
= Comparison between Capistrano/Vlad/Heroku/AppFog/OpenShift/Cloud66/AWS Beanstalk =&lt;br /&gt;
&lt;br /&gt;
With so many automated tools available for Code Deployment and Release Management, the decision on which to use for a particular Ruby on rails application depends on various parameters to be considered.&lt;br /&gt;
Some comparative features of the different tools are as follows :&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;width:9%;&amp;quot;|Criteria for Comparision&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;|Capistrano&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;| Vlad&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;| Heroku&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;| AppFog&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;| OpenShift&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;| Cloud66&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;| AWS Beanstalk&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
|'''''Getting started with the tool'''''&lt;br /&gt;
|It is a framework that allows one to execute commands on a remote server using tools like ssh.&lt;br /&gt;
|Vlad deployment is similar to Capistrano, but less complex.&lt;br /&gt;
|Heroku’s offers a plan with first dyno free i.e. 512 MB that can be paired with Postgres starter DB to start an application with 0 initial cost&lt;br /&gt;
|AppFog’s initial plan offers 2GB of RAM free which is enough for small to medium traffic applications. By managing options provided for DB, queue server, application server, etc all part of the intial package, this is an excellent option to try out an application&lt;br /&gt;
|OpenShift is an open source platform and its free plan for starters has 3 gears for free wherein each gear consists of some RAM and disk space.&lt;br /&gt;
|Free plan provides one server for deployment.&lt;br /&gt;
|Provides an initial free tier. Without free tier no additional cost for Beanstalk. One only needs to pay for the AWS resources used.&lt;br /&gt;
|-&lt;br /&gt;
|'''''Scaling Memory'''''&lt;br /&gt;
|Memory increase would require additional servers/unused space in existing ones.&lt;br /&gt;
|Memory increase depends on additional servers available/unused space in existing ones.&lt;br /&gt;
|Memory increased in terms of dyno each of size 512 MB.&lt;br /&gt;
|Can configure any size for memory allocation&lt;br /&gt;
| -&lt;br /&gt;
| -&lt;br /&gt;
|Can automatically up/down scale the application by adjusting the default auto scaling settings.&lt;br /&gt;
|-&lt;br /&gt;
|'''''Scaling – Cost and Ease'''''&lt;br /&gt;
|While this provides greater flexibility as user is in control of the servers, it also causes additional overhead in terms of user needing to work both on Rails application and web server deployment.&lt;br /&gt;
|It can be integrated with Rake without any hindrances.&lt;br /&gt;
|Can dynamically scale up and down an application and pay as per hourly usages. Each additional dyno costs $35/mo&lt;br /&gt;
|Scaling takes up some time and need to pay for a month at the minimum. Scaling up to 4GB increases cost to $100/mo&lt;br /&gt;
| -&lt;br /&gt;
|Scaling using Cloud66 is relatively easy and hassle free.&lt;br /&gt;
|Scaling is fast and easy.&lt;br /&gt;
|-&lt;br /&gt;
|'''''Special features'''''&lt;br /&gt;
|For sensitive applications where handing over the control to a third party for deployment is not feasible, Capistrano is the way to go.&lt;br /&gt;
|It also provides support for tools like rsync and ssh.&lt;br /&gt;
|Lacks support for cross region deployment i.e. can’t select location of server where application gets deployed&lt;br /&gt;
|Supports cross region deployment i.e. if users of application primarily in Asia, can choose a server in Asia to deploy application, thus making the site faster.&lt;br /&gt;
| -&lt;br /&gt;
| -&lt;br /&gt;
|Provides complete flexibility and control of the resources to the user including the chance to take over control of some or all.&lt;br /&gt;
|-&lt;br /&gt;
|'''''Database support'''''&lt;br /&gt;
|Provides support for DB related to rails applications&lt;br /&gt;
|Provides support for DB related to rails applications&lt;br /&gt;
|It features serious production DB like RDBMS, Postgres, etc. and many Addons such as MongoDB, ClearDB, etc.&lt;br /&gt;
|Features free shared databases such as MongoDB, MySQL, Postgres but for other production DB’s need to use Addons&lt;br /&gt;
|Databases featured are MySQL, MongoDB and Postgres&lt;br /&gt;
| -&lt;br /&gt;
|Supports DB like Amazon SimpleDB, Amazon RDS, Amazon DynamoDB.&lt;br /&gt;
|-&lt;br /&gt;
|'''''Deployment strategy'''''&lt;br /&gt;
|Capistrano provides commands to be executed for automated deployment. It supports git.&lt;br /&gt;
|It is much easier to deploy using Vlad as compared to Capistrano.&lt;br /&gt;
|Deployment as easy as ‘git push’&lt;br /&gt;
|Deployment does not support git. It uses the af tool for deployment.&lt;br /&gt;
| -&lt;br /&gt;
|Since Cloud66 provides the platform in terms of Application Stack Management as a Service, it uses the infrastructure of AWS, Virtual Private Server, etc. for actual deployment. But the user doesn’t have to worry about configuration or monitoring of the servers. Hence provides easy deployment.&lt;br /&gt;
|Deployment options include Git, AWS management console, etc.&lt;br /&gt;
|-&lt;br /&gt;
|'''''Community Support availability'''''&lt;br /&gt;
| As it has been in use for a long time there is a huge community support available for Capistrano.&lt;br /&gt;
| -&lt;br /&gt;
|Heroku also provides a huge community support given the fact that there are a lot of Heroku users.&lt;br /&gt;
|Community is limited.&lt;br /&gt;
|RedHat being a reputed provider for open source solutions, the OpenShift community is gradually increasing and receiving support from a considerable community of users.&lt;br /&gt;
|Limited community support currently&lt;br /&gt;
|Has community forums and documentation.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Conclusion =&lt;br /&gt;
&lt;br /&gt;
Comparison and contrast between various deployment automated tools such as Capistrano, Heroku, Vlad, AppFog, OpenShift, Cloud66, AWS Beanstalk shows that each has its own pros and cons. &lt;br /&gt;
For instance, in a client based application where handing over the control of the application to a third party such as the deployment tool provider is impossible, AWS Beanstalk would be the obvious choice for the developer.&lt;br /&gt;
On the other hand, a novice Rails application developer might find all he needs in the starter plan of Heroku with the added bonus of a huge support community available to him for troubleshooting as he stumbles his way across the development of the application.&lt;br /&gt;
One may also choose the tool that provides the specific database support for your application. In case of large scale corporations where budgets are not that limited, the increasing costs with up-scaling of some tools would not be an obstacle.&lt;br /&gt;
Thus, various considerations about the application such as scalability requirement, security concerns, cost, availability of own resources such as servers etc., will help determine which tool is the most suitable for that application.&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= See Also =&lt;br /&gt;
&lt;br /&gt;
* Rails Solutions: Ruby on Rails Made Easy by Justin Williams&lt;br /&gt;
* http://guides.beanstalkapp.com/deployments/best-practices.html&lt;br /&gt;
* http://www.urbancode.com/anthill3-help-3.7/html/SettingUpDeploymentProcess.html&lt;br /&gt;
* http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=UseFMSGateway_3.html&lt;br /&gt;
* http://pic.dhe.ibm.com/infocenter/tivihelp/v26r1/index.jsp?topic=%2Fcom.ibm.dtm.doc%2Fdeploysoftware%2Fc_deploysw_process.html&lt;/div&gt;</summary>
		<author><name>Npari</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch2_0e808_nsv&amp;diff=81370</id>
		<title>CSC/ECE 517 Fall 2013/ch2 0e808 nsv</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch2_0e808_nsv&amp;diff=81370"/>
		<updated>2013-10-30T21:27:52Z</updated>

		<summary type="html">&lt;p&gt;Npari: /* Model Class : assignment_participant.rb */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= E808: Refactor and test Participant, AssignmentParticipant, &amp;amp; CourseParticipant =&lt;br /&gt;
The requirements provided for the Open Source System project were as follows : &amp;lt;br&amp;gt;&lt;br /&gt;
'''Classes''': &amp;lt;br&amp;gt;&lt;br /&gt;
''participant.rb'' (197 lines)&amp;lt;br&amp;gt;&lt;br /&gt;
''assignment_participant.rb'' (476 lines)&amp;lt;br&amp;gt;&lt;br /&gt;
''course_participant.rb'' (90 lines)&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''What they do''': &amp;lt;br&amp;gt; &lt;br /&gt;
These classes keep track of a user who is participating in an assignment or a course.  participant.rb is the superclass, and the other two are the subclasses.&lt;br /&gt;
&lt;br /&gt;
'''What is needed''': &amp;lt;br&amp;gt; &lt;br /&gt;
The methods are complex; there are a lot of them (assignment_particpant has 44) and there is a lot of duplicated code.  assignment_participant contains code for detecting cycles of high grades (which can indicate collusion in reviews).  It would be better moved to another class.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
= Introduction =&lt;br /&gt;
&lt;br /&gt;
A cursory analysis of the code of the three model classes showed the existence of code duplication. In a lot of the cases the [http://en.wikipedia.org/wiki/Don%27t_Repeat_Yourself Don't Repeat Yourself] (DRY) principle was violated.&lt;br /&gt;
&lt;br /&gt;
In keeping with the [http://en.wikipedia.org/wiki/Agile_software_development Agile] methodology, which involves having regular discussions with all stakeholders, the design check for the project was performed with a meeting with the Instructor.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{viewxls:name=sample.xlsx|sheet=Summary|row=13|col=3}&lt;br /&gt;
&lt;br /&gt;
Next the code was analyzed in detail and the following plausible improvements were predicted.[[File:[[Media:Example.jpg]]]]&lt;br /&gt;
&lt;br /&gt;
After the final release of the code in development and testing stage, the master plan is prepared for deployment of components and sites based on the sign-offs provided by the project teams, stakeholders and customers. Then, the stabilization of the deployment is calculated based on some metrics. Once the deployment is stabilized, it is reviewed and the process of deployment is complete. The final sign-off is given by the stakeholders.&lt;br /&gt;
&lt;br /&gt;
=Participant model: participant.rb=&lt;br /&gt;
&lt;br /&gt;
Code deployment is a procedure where the application is transferred onto a production server, so that it is made available for all the other users. It is the part of release management process which involves several activities. These activities are inter-dependent and need to be completed in a specific order for successful code deployment. &lt;br /&gt;
&lt;br /&gt;
'''Code Deployment Activities'''&lt;br /&gt;
&lt;br /&gt;
The various deployment activities include &amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/Software_deployment&amp;lt;/ref&amp;gt;&lt;br /&gt;
* Release : Gathering all system components in preparation for deployment&lt;br /&gt;
* Install and activate : Installing the application components and getting them in the 'ready' state&lt;br /&gt;
* Deactivate : Shutting down components that are out-dated or that may interfere with updating others&lt;br /&gt;
* Adapt : Making changes to application to accommodate changes in environment&lt;br /&gt;
* Update : Having a newer release installed in place of the old one&lt;br /&gt;
* Built-in : There are components built-into some tools for complete/semi-automating updates&lt;br /&gt;
* Version tracking : These systems help the user to know if newer versions of a software are available and if yes, help install them&lt;br /&gt;
* Uninstall : Opposite of installation and involves complete removal of software and its dependencies from the environment&lt;br /&gt;
* Retire : This involves making a software obsolete and is the end of software life cycle&lt;br /&gt;
&lt;br /&gt;
The general guidelines for the deployment process remain the same but there are variations in the specific requirements with each software system.&lt;br /&gt;
&lt;br /&gt;
=AssignmentParticipant model: assignment_participant.rb=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ref&amp;gt;http://searchitchannel.techtarget.com/definition/release-management&amp;lt;/ref&amp;gt;&lt;br /&gt;
Release management is a software process which takes care of the development, testing, deployment and support stages of software releases. The start of release management happens in the development phase, where it requests for new features or changes in the existing application. When the request is accepted, a new release is planned and designed. This design is built and then enters the testing phase, where the release is tested until it is accepted. After the release is accepted as a candidate, it enters the deployment phase where it is implemented. Once deployed, the release is made available and sent to support phase for collection of bug reports. Once the support phase is done, the bugs and other issues lead to requests for changes and the cycle is then repeated.&lt;br /&gt;
&lt;br /&gt;
=CourseParticipant model:course_participant.rb =&lt;br /&gt;
&amp;lt;ref&amp;gt;http://www.urbancode.com/html/solutions/deployment-automation.html&amp;lt;/ref&amp;gt;&lt;br /&gt;
Automation of a process is required when the manual process is more error prone. Also, for large real world applications, the manual process is very complex and time consuming. Incomplete documentation hampers a manual process further. Deployment also has to be done in many environments and involves varied steps to be followed in a specific order. Manual process needs repetition of same procedure to each and every environment which leads to many errors and the process becomes costly.&lt;br /&gt;
In web applications each new release has to be deployed to and tested in development, testing and production environments.The number of software releases in web applications  are more and hence the need to automate release management is also greater.&lt;br /&gt;
&lt;br /&gt;
Automation of deployment delivers applications faster and with fewer errors. The defined software deployment process can be applied across all environments consistently every time. With various automated application deployment platforms now readily available, manual deployments have become a thing of the past.&lt;br /&gt;
&lt;br /&gt;
Lets take a look at the various Deployment Automation tools available to Ruby on Rails applications. For the purposes of this article the process of manual deployment of a Ruby on Rails application is out of scope.&lt;br /&gt;
&lt;br /&gt;
= Tests =&lt;br /&gt;
&lt;br /&gt;
Some of the automated tools that are widely used for the process of deployment with Ruby on Rails are &lt;br /&gt;
&lt;br /&gt;
* Capistrano&lt;br /&gt;
* Heroku&lt;br /&gt;
* Vlad&lt;br /&gt;
* AppFog&lt;br /&gt;
* AWS Elastic Beanstalk&lt;br /&gt;
* OpenShift&lt;br /&gt;
* Cloud 66&lt;br /&gt;
&lt;br /&gt;
= yml files =&lt;br /&gt;
&lt;br /&gt;
[[File:Capistrano.jpg|frame|right|&amp;lt;ref&amp;gt;http://www.capistranorb.com/&amp;lt;/ref&amp;gt;|Capistrano Logo]]&lt;br /&gt;
&lt;br /&gt;
Capistrano is a Ruby tool which helps deploy an application to the server. Capistrano allows deploying to multiple machines at a time. It has many advanced options which help to deploy different kinds of applications. It also supports the scripting and execution of tasks.&lt;br /&gt;
&lt;br /&gt;
Capistrano can be used to:&lt;br /&gt;
&lt;br /&gt;
* Deploy applications onto many machines simultaneously.&lt;br /&gt;
* Automate the audits&lt;br /&gt;
* Automate the common tasks of a team.&lt;br /&gt;
&lt;br /&gt;
Capistrano can be made a part of a larger software by integrating it with another Ruby software.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ref&amp;gt;http://www.capistranorb.com/documentation/getting-started/installation/&amp;lt;/ref&amp;gt;  &lt;br /&gt;
'''General Usage'''&lt;br /&gt;
&lt;br /&gt;
The following commands will clone Capistrano, build the gem and install it locally.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem install capistrano --pre --trust-policy HighSecurity&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Or grab the bleeding edge head from:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ git clone -b v3 https://github.com/capistrano/capistrano.git&lt;br /&gt;
$ cd capistrano&lt;br /&gt;
$ gem build *.gemspec&lt;br /&gt;
$ gem install *.gem&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
'''Signed Rubygems'''&lt;br /&gt;
&lt;br /&gt;
As Capistrano is a signed gem, you should always be careful to use the --trust-policy flag when installing Gems, or since Bundler 1.3 you should use the same flag:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem install capistrano --pre --trust-policy HighSecurity&lt;br /&gt;
$ bundle install --trust-policy HighSecurity&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If you get a message that looks like:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ERROR:  While executing gem ... (Gem::Security::Exception)&lt;br /&gt;
unsigned gems are not allowed by the High Security policy&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then please complain to your Gem author, and have them start signing their Gems.&lt;br /&gt;
&lt;br /&gt;
'''Usage in a Rails project'''&lt;br /&gt;
&lt;br /&gt;
Add the following lines to the Gemfile to the :development group ideally.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
group :development do&lt;br /&gt;
  gem 'capistrano-rails', '~&amp;gt; 0.0.7'&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= routes.rb =&lt;br /&gt;
&lt;br /&gt;
[[File:Heroku.jpg|frame|right|&amp;lt;ref&amp;gt;https://www.heroku.com/&amp;lt;/ref&amp;gt;|Heroku Logo]]&lt;br /&gt;
&lt;br /&gt;
Heroku is a cloud [http://en.wikipedia.org/wiki/Platform_as_a_service Platform as a Service] (PaaS) which supports several programming languages. PaaS is a service model of Cloud computing wherein the provider offers resources like servers, software, database, etc. to the developer. Heroku helps manage environment-specific configurations separately from the source code, which provides greater security.&lt;br /&gt;
Heroku is not just a deployment environment but it also impacts the development process. There are several principles of the development of application on Heroku.&amp;lt;br&amp;gt;&lt;br /&gt;
•	Applications and Codebases : Most of the development of the application is done on application’s codebase which is stored in a [http://en.wikipedia.org/wiki/Version_control_system Version Control System (VCS)] &amp;lt;br&amp;gt;&lt;br /&gt;
•	Dependencies : All the application dependencies such as plugins should be declared explicitly&amp;lt;br&amp;gt;&lt;br /&gt;
•	Configuration : Configuration of an application is all that varies in different deploys&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Getting Started with Heroku'''&lt;br /&gt;
&lt;br /&gt;
1. To get started with Heroku, go to https://id.heroku.com/signup/devcenter, signup for a Heroku account. &lt;br /&gt;
&lt;br /&gt;
2. Then, download and install the Heroku toolbelt at https://toolbelt.heroku.com/ for your development system. You can also use Heroku command line instead of the online Heroku application. &lt;br /&gt;
&lt;br /&gt;
3. After installing one of them, login using the email address and password used when creating the Heroku account:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ref&amp;gt;https://github.com/heroku/heroku&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ heroku login&lt;br /&gt;
Enter your Heroku credentials.&lt;br /&gt;
Email: adam@example.com&lt;br /&gt;
Password:&lt;br /&gt;
Could not find an existing public key.&lt;br /&gt;
Would you like to generate one? [Yn]&lt;br /&gt;
Generating new SSH public key.&lt;br /&gt;
Uploading SSH public key /Users/adam/.ssh/id_rsa.pub&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Deploying Applications'''&lt;br /&gt;
&lt;br /&gt;
Heroku uses [http://en.wikipedia.org/wiki/Git_(software) git] primarily to deploy the applications. When an application is created on Heroku, it associates the new git which is remote with the local git repository.&lt;br /&gt;
&lt;br /&gt;
As a result, deploying code is just the familiar git push, but to the heroku remote instead:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ref&amp;gt;https://devcenter.heroku.com/articles/how-heroku-works#deploying-applications&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ git push heroku master&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Vlad ==&lt;br /&gt;
&lt;br /&gt;
[[File:Vlad.png|frame|right|&amp;lt;ref&amp;gt;http://rubyhitsquad.com/Vlad_the_Deployer.html&amp;lt;/ref&amp;gt;|Vlad Logo]]&lt;br /&gt;
&lt;br /&gt;
Vlad is another automated deployment tool which is simple to use. It integrates with rake and uses standard tools like SSH, rsync etc.&lt;br /&gt;
&lt;br /&gt;
The main features of Vlad include&lt;br /&gt;
* It uses very few dependencies which are simple.&lt;br /&gt;
* It can execute commands on more than one server.&lt;br /&gt;
* It syncs files to one or more servers.&lt;br /&gt;
* It matches local and remote tasks.&lt;br /&gt;
* It runs tests very fast.&lt;br /&gt;
&lt;br /&gt;
'''Getting started with Vlad'''&amp;lt;ref&amp;gt;http://docs.seattlerb.org/vlad/doco/getting_started_txt.html&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create a deploy file, usually in “config/deploy.rb”:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set :application, &amp;quot;project&amp;quot;&lt;br /&gt;
set :domain, &amp;quot;example.com&amp;quot;&lt;br /&gt;
set :deploy_to, &amp;quot;/path/to/install&amp;quot;&lt;br /&gt;
set :repository, 'http://svn.example.com/project/branches/stable/'&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This defaults to using ‘svn export’ from repository, and a single server for app, db, and www.&lt;br /&gt;
&lt;br /&gt;
If you want a multi-config environment, change your config like so:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set :application, &amp;quot;project&amp;quot;&lt;br /&gt;
set :repository, 'http://svn.example.com/project/branches/stable/'&lt;br /&gt;
&lt;br /&gt;
task :beta do&lt;br /&gt;
  set :domain,    &amp;quot;beta.example.com&amp;quot;&lt;br /&gt;
  set :deploy_to, &amp;quot;/path/to/install-beta&amp;quot;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
task :dev do&lt;br /&gt;
  set :domain,    &amp;quot;dev.example.com&amp;quot;&lt;br /&gt;
  set :deploy_to, &amp;quot;/path/to/install-dev&amp;quot;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
task :prod do&lt;br /&gt;
  set :domain,    &amp;quot;example.com&amp;quot;&lt;br /&gt;
  set :deploy_to, &amp;quot;/path/to/install&amp;quot;&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Add the following to your Rakefile:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
begin&lt;br /&gt;
  require 'vlad'&lt;br /&gt;
  Vlad.load&lt;br /&gt;
rescue LoadError&lt;br /&gt;
  # do nothing&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Vlad.load has a lot of flexibility.&lt;br /&gt;
&lt;br /&gt;
You can install vlad via:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;% rake vlad:invoke COMMAND='sudo gem install vlad -y'&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Initial Launch&lt;br /&gt;
&amp;lt;pre&amp;gt;Run rake vlad:setup vlad:update vlad:migrate vlad:start&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ref&amp;gt;http://docs.seattlerb.org/vlad/index.html&amp;lt;/ref&amp;gt;&lt;br /&gt;
'''Running Vlad'''&lt;br /&gt;
&lt;br /&gt;
* Using rake&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
task :shazam! do&lt;br /&gt;
  Rake::Task[:action1].invoke&lt;br /&gt;
  Rake::Task[:action2].invoke&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Using SSH&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Host example.com&lt;br /&gt;
    User fluffy_bunny&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== AppFog == &lt;br /&gt;
&lt;br /&gt;
[[File:AppFog.jpg|frame|right|&amp;lt;ref&amp;gt;https://www.appfog.com/&amp;lt;/ref&amp;gt;|AppFog Logo]]&lt;br /&gt;
&lt;br /&gt;
AppFog is a PaaS built on Cloud Foundry which is another PaaS platform for deploying applications. &lt;br /&gt;
&lt;br /&gt;
Features of AppFog are&lt;br /&gt;
* It launches and runs fast.&lt;br /&gt;
* It does not require configuring servers or installing frameworks.&lt;br /&gt;
* It is compatible with code management systems like git, svn etc.&lt;br /&gt;
&lt;br /&gt;
'''Installing AppFog'''&amp;lt;ref&amp;gt;http://blog.appfog.com/getting-started-with-appfogs-command-line/&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
‘af‘ command line tool is written in Ruby for installation.&lt;br /&gt;
&lt;br /&gt;
Download and install [http://rubyinstaller.org/ Ruby Installer] for Windows. The installer already includes RubyGems.&lt;br /&gt;
&lt;br /&gt;
Be sure you use the Ruby-enabled command prompt window when you later install and use af. You access this command prompt from the Windows Start menu (All Programs &amp;gt; Ruby &amp;gt; Start Command Prompt with Ruby).&lt;br /&gt;
&lt;br /&gt;
Finally, update RubyGems from the Ruby Command Prompt:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem update --system&lt;br /&gt;
$ gem install af&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Login with:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ af login&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Finally from within your source code directory:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ af update hello-node&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Getting Started with AppFog'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
target [url]                                       Reports current target or sets a new target&lt;br /&gt;
login [email] [--email, --password]                Login&lt;br /&gt;
info                                               System and account information&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== AWS Elastic Beanstalk==&lt;br /&gt;
&lt;br /&gt;
[[File:AWSLogo.jpg|frame|right|&amp;lt;ref&amp;gt;https://aws.amazon.com&amp;lt;/ref&amp;gt;|AWS Logo]]&lt;br /&gt;
&lt;br /&gt;
Amazon Wen Services(AWS) offers [http://en.wikipedia.org/wiki/Infrastructure_as_a_service#Infrastructure_as_a_service_.28IaaS.29 Infrastructure as a Service] (IaaS) and provides a complete set of resources for the development of a web application in minutes. AWS Elastic Beanstalk is a deployment tool of the AWS cloud.&lt;br /&gt;
&lt;br /&gt;
With AWS Elastic Beanstalk, applications can be quickly deployed and managed in the AWS cloud without worrying about the infrastructure that runs those applications. AWS Elastic Beanstalk reduces management complexity without restricting choice or control. Once the application is uploaded AWS Elastic Beanstalk automatically handles the details of capacity provisioning, load balancing, scaling, and application health monitoring. AWS Elastic Beanstalk uses highly reliable and scalable services.&lt;br /&gt;
&lt;br /&gt;
'''AWS CLI'''&lt;br /&gt;
&lt;br /&gt;
AWS Elastic Beanstalk uses a command line tool Eb, which helps you to deploy your application easily.&lt;br /&gt;
&lt;br /&gt;
'''Getting Started with Eb'''&amp;lt;ref&amp;gt;http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/command-reference-get-started.html&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To get started with the beanstalk CLI, you will need to download the command line tools at the [http://aws.amazon.com/code/6752709412171743 AWS Sample Code &amp;amp; Libraries] website.&lt;br /&gt;
&lt;br /&gt;
Step 1: Initialize Your Git Repository&lt;br /&gt;
&lt;br /&gt;
Eb is a command line interface that enables you to deploy applications quickly and more easily using Git. Eb is available as part of the Elastic Beanstalk command line tools package. &lt;br /&gt;
&lt;br /&gt;
1. To install eb,install the following software onto your local computer:&lt;br /&gt;
&lt;br /&gt;
* Git 1.6.6 or later. To download Git, go to http://git-scm.com/.&lt;br /&gt;
* PowerShell 2.0.&lt;br /&gt;
&lt;br /&gt;
2. Initialize your Git repository.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git init &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Step 2: Configuring AWS Elastic Beanstalk&lt;br /&gt;
&lt;br /&gt;
1. From your directory where you created your local repository, type the following command.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
eb init&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2. When you are prompted for the access key ID, type your access key ID. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Enter your AWS Access Key ID (current value is &amp;quot;AKIAIOSFODNN7EXAMPLE&amp;quot;): &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3. When you are prompted for the secret access key, type your secret access key.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Enter your AWS Secret Access Key (current value is &amp;quot;wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY&amp;quot;): &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
4. When you are prompted for the AWS Elastic Beanstalk application name, type the name of the application. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Enter an AWS Elastic Beanstalk application name (auto-generated value is &amp;quot;windows&amp;quot;): &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Note:&lt;br /&gt;
If you have a space in your application name, make sure you do not use quotes.&lt;br /&gt;
&lt;br /&gt;
5. When you are prompted for the AWS Elastic Beanstalk environment name, type the name of the environment. AWS Elastic Beanstalk automatically creates an environment name based on your application name. If you want to accept the default, press Enter.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Enter an AWS Elastic Beanstalk environment name (current value is &amp;quot;HelloWorld-env&amp;quot;): &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
6. When you are prompted to create an Amazon RDS DB instance, type y or n. For this example, we'll type y.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Create an RDS DB Instance? [y/n]:&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
7. When you are prompted to enter your RDS user master password, type your password containing from 8 to 16 printable ASCII characters (excluding /, \, and @).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Enter an RDS DB master password: &lt;br /&gt;
Retype password to confirm: &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can now get started with the AWS Elastic Beanstalk.&lt;br /&gt;
&lt;br /&gt;
== OpenShift ==&lt;br /&gt;
&lt;br /&gt;
[[File:OpenShift.png|frame|right|&amp;lt;ref&amp;gt;https://en.wikipedia.org&amp;lt;/ref&amp;gt;|OpenShift Logo]]&lt;br /&gt;
&lt;br /&gt;
Another free and open source PaaS for deploying applications is OpenShift created by [[http://en.wikipedia.org/wiki/RedHat RedHat]]. &lt;br /&gt;
&lt;br /&gt;
'''Considerations'''&lt;br /&gt;
* Databases&lt;br /&gt;
&lt;br /&gt;
To use the application outside the OpenShift environment one needs to change the variables as the application is configured to use database in production mode in OpenShift.&lt;br /&gt;
&lt;br /&gt;
* Assets&lt;br /&gt;
&lt;br /&gt;
The assets are precompiled everytime application is pushed to OpenShift.&lt;br /&gt;
&lt;br /&gt;
* Security&lt;br /&gt;
&lt;br /&gt;
Security related variables are to be unique across the application.&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;ref&amp;gt;https://github.com/openshift/rails-example&amp;lt;/ref&amp;gt;&lt;br /&gt;
'''Installation'''&lt;br /&gt;
&lt;br /&gt;
1.	Create an account at http://openshift.redhat.com/&lt;br /&gt;
&lt;br /&gt;
2.	Create a rails application&lt;br /&gt;
	&amp;lt;pre&amp;gt;rhc app create -a railsapp -t ruby-1.9&amp;lt;/pre&amp;gt;&lt;br /&gt;
3.	Add mysql support to your application&lt;br /&gt;
	&amp;lt;pre&amp;gt;rhc cartridge add -a railsapp -c mysql-5.1&amp;lt;/pre&amp;gt;&lt;br /&gt;
4.	Add this upstream Rails quickstart repository&lt;br /&gt;
&amp;lt;pre&amp;gt;cd railsapp&lt;br /&gt;
git remote add upstream -m master git://github.com/openshift/rails-example.git&lt;br /&gt;
git pull -s recursive -X theirs upstream master&amp;lt;/pre&amp;gt;&lt;br /&gt;
5.	Push your new code&lt;br /&gt;
&amp;lt;pre&amp;gt;git push&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Future scope ==&lt;br /&gt;
&lt;br /&gt;
[[File:Cloud 66.jpg|frame|right|&amp;lt;ref&amp;gt;https://www.cloud66.com/&amp;lt;/ref&amp;gt;|Cloud66 Logo]]&lt;br /&gt;
&lt;br /&gt;
Cloud 66 combines the convenience of Platform-as-a-Service (PaaS) and the flexibility and control of Infrastructure-as-a-Service (IaaS). This platform allows easy deployment of application, so there is no overhead of configuring or monitoring the servers.&lt;br /&gt;
&lt;br /&gt;
'''Cloud 66 Command line Toolbelt'''&lt;br /&gt;
&lt;br /&gt;
Toolbelt is an open source released to deploy the application.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ref&amp;gt;http://blog.cloud66.com/&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Getting Started with Cloud 66'''&lt;br /&gt;
&lt;br /&gt;
1. Go to the [https://www.cloud66.com/users/sign_up sign up] page and create a Cloud 66 account.&lt;br /&gt;
&lt;br /&gt;
2. Go to Cloud 66 Dashboard and [https://www.cloud66.com/help/first_stack build your first stack].&lt;br /&gt;
&lt;br /&gt;
'''Installation'''&lt;br /&gt;
&lt;br /&gt;
Installation of toolbelt uses the following command&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Gem install c66&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This automatically searches the newest version and installs it.&lt;br /&gt;
&lt;br /&gt;
= Model Class : assignment_participant.rb =&lt;br /&gt;
Th AssignmentParticipant model class is a subclass of the participant model class. Several methods in AssignmentParticipant model class required renaming and refactoring to ensure that the change is reflected in the entire project. The names were changed to follow method naming convention. Deprecated code was removed and re-coded to ensure that the code worked in future version as well. Duplicated codes were commented. Methods that are more general in the sub classes were moved to the parent class. Some methods that calculates the collusion in reviews between students were moved to a newly created model class file called collusion_cycle.rb &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;width:3%;&amp;quot;|S. No&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;|Method Name&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;|Change Made &lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;|Reason For Change&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
|''''' 1 '''''&lt;br /&gt;
|get_course_string&lt;br /&gt;
|Renamed to course_string and refactored &lt;br /&gt;
|To follow method naming convention&lt;br /&gt;
|-&lt;br /&gt;
|''''' 2 '''''&lt;br /&gt;
|get_cycle_deviation_score&lt;br /&gt;
|Moved to collusion_cycle.rb model class&lt;br /&gt;
|Related methods that calculate collusion in reviews have been moved to the newly created collusion_cycle.rb model class&lt;br /&gt;
|-&lt;br /&gt;
|''''' 3 '''''&lt;br /&gt;
|get_cycle_similarity_score&lt;br /&gt;
|Moved to collusion_cycle.rb model class&lt;br /&gt;
|Related methods that calculate collusion in reviews have been moved to the newly created collusion_cycle.rb model class&lt;br /&gt;
|-&lt;br /&gt;
|''''' 4 '''''&lt;br /&gt;
|get_feedback&lt;br /&gt;
|Renamed to feedback and refactored&lt;br /&gt;
|To follow method naming convention&lt;br /&gt;
|-&lt;br /&gt;
|''''' 5 '''''&lt;br /&gt;
|get_files&lt;br /&gt;
|Renamed to files_in_directory  and refactored&lt;br /&gt;
|To follow method naming convention&lt;br /&gt;
|-&lt;br /&gt;
|''''' 6 '''''&lt;br /&gt;
|get_four_node_cycles&lt;br /&gt;
|Moved to collusion_cycle.rb model class&lt;br /&gt;
|Related methods that calculate collusion in reviews have been moved to the newly created collusion_cycle.rb model class&lt;br /&gt;
|-&lt;br /&gt;
|''''' 7 '''''&lt;br /&gt;
|fullname&lt;br /&gt;
|Moved to parent model class – participant.rb &lt;br /&gt;
|General methods of the subclass are moved to Parent class&lt;br /&gt;
|-&lt;br /&gt;
|''''' 8 '''''&lt;br /&gt;
|get_metareviews&lt;br /&gt;
|Renamed to metareviews and refactored&lt;br /&gt;
|To follow method naming convention&lt;br /&gt;
|-&lt;br /&gt;
|''''' 9 '''''&lt;br /&gt;
|name&lt;br /&gt;
|Commented the method  &lt;br /&gt;
|The method is already in parent model class – participant.rb and can be used in this subclass through inheritance&lt;br /&gt;
|-&lt;br /&gt;
|''''' 10 '''''&lt;br /&gt;
|name&lt;br /&gt;
|Commented the method  &lt;br /&gt;
|The method is already in parent model class – participant.rb and can be used in this subclass through inheritance. Also it is a duplicate method in patricipant.rb&lt;br /&gt;
|- &lt;br /&gt;
|''''' 11 '''''&lt;br /&gt;
|get_review_score&lt;br /&gt;
|Renamed to review_score and refactored. Deprecated code has been removed and replaced with correct code.&lt;br /&gt;
|To follow method naming convention and ensure the code works in future versions. &lt;br /&gt;
|-&lt;br /&gt;
|''''' 12 '''''&lt;br /&gt;
|get_reviewees&lt;br /&gt;
|Renamed to reviewees and refactored. Deprecated code has been removed and replaced with correct code.&lt;br /&gt;
|To follow method naming convention and ensure the code works in future versions. &lt;br /&gt;
|-&lt;br /&gt;
|''''' 13 '''''&lt;br /&gt;
|get_reviewers&lt;br /&gt;
|Renamed to reviewers and refactored . Deprecated code has been commented and replaced with correct code.&lt;br /&gt;
|To follow method naming convention and ensure the code works in future versions. &lt;br /&gt;
|-&lt;br /&gt;
|''''' 14 '''''&lt;br /&gt;
|get_reviews&lt;br /&gt;
|Renamed to reviews and refactored &lt;br /&gt;
|To follow method naming convention&lt;br /&gt;
|-&lt;br /&gt;
|''''' 15 '''''&lt;br /&gt;
|get_reviews_by_reviewer&lt;br /&gt;
|Renamed to reviews_by_reviewer and refactored &lt;br /&gt;
|To follow method naming convention&lt;br /&gt;
|-&lt;br /&gt;
|''''' 16 '''''&lt;br /&gt;
|get_reviews_by_reviewer&lt;br /&gt;
|Commented the method &lt;br /&gt;
|To remove duplicated method in this class&lt;br /&gt;
|-&lt;br /&gt;
|''''' 17 '''''&lt;br /&gt;
|get_scores&lt;br /&gt;
|Renamed to scores and refactored &lt;br /&gt;
|To follow method naming convention&lt;br /&gt;
|-&lt;br /&gt;
|''''' 18 '''''&lt;br /&gt;
|get_submitted_files&lt;br /&gt;
|Renamed to submitted_files and refactored &lt;br /&gt;
|To follow method naming convention&lt;br /&gt;
|-&lt;br /&gt;
|''''' 19 '''''&lt;br /&gt;
|get_teammate_reviews&lt;br /&gt;
|Renamed to teammate_reviews and refactored &lt;br /&gt;
|To follow method naming convention&lt;br /&gt;
|-&lt;br /&gt;
|''''' 20 '''''&lt;br /&gt;
|get_three_node_cycles&lt;br /&gt;
|Moved to collusion_cycle.rb model class&lt;br /&gt;
|Related methods that calculate collusion in reviews have been moved to the newly created collusion_cycle.rb model class&lt;br /&gt;
|-&lt;br /&gt;
|''''' 21 '''''&lt;br /&gt;
|get_topic_string&lt;br /&gt;
|Method has been Commented&lt;br /&gt;
|It is already present in model super class – participant.rb&lt;br /&gt;
|-&lt;br /&gt;
|''''' 22 '''''&lt;br /&gt;
|get_two_node_cycles&lt;br /&gt;
|Moved to collusion_cycle.rb model class&lt;br /&gt;
|Related methods that calculate collusion in reviews have been moved to the newly created collusion_cycle.rb model class&lt;br /&gt;
|-&lt;br /&gt;
|''''' 23 '''''&lt;br /&gt;
|get_wiki_submissions&lt;br /&gt;
|Renamed to wiki_submissions and refactored&lt;br /&gt;
|To follow method naming convention&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
After changes were made, the existing tests ran successfully.&lt;br /&gt;
&lt;br /&gt;
= Comparison between Capistrano/Vlad/Heroku/AppFog/OpenShift/Cloud66/AWS Beanstalk =&lt;br /&gt;
&lt;br /&gt;
With so many automated tools available for Code Deployment and Release Management, the decision on which to use for a particular Ruby on rails application depends on various parameters to be considered.&lt;br /&gt;
Some comparative features of the different tools are as follows :&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;width:9%;&amp;quot;|Criteria for Comparision&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;|Capistrano&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;| Vlad&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;| Heroku&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;| AppFog&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;| OpenShift&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;| Cloud66&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;| AWS Beanstalk&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
|'''''Getting started with the tool'''''&lt;br /&gt;
|It is a framework that allows one to execute commands on a remote server using tools like ssh.&lt;br /&gt;
|Vlad deployment is similar to Capistrano, but less complex.&lt;br /&gt;
|Heroku’s offers a plan with first dyno free i.e. 512 MB that can be paired with Postgres starter DB to start an application with 0 initial cost&lt;br /&gt;
|AppFog’s initial plan offers 2GB of RAM free which is enough for small to medium traffic applications. By managing options provided for DB, queue server, application server, etc all part of the intial package, this is an excellent option to try out an application&lt;br /&gt;
|OpenShift is an open source platform and its free plan for starters has 3 gears for free wherein each gear consists of some RAM and disk space.&lt;br /&gt;
|Free plan provides one server for deployment.&lt;br /&gt;
|Provides an initial free tier. Without free tier no additional cost for Beanstalk. One only needs to pay for the AWS resources used.&lt;br /&gt;
|-&lt;br /&gt;
|'''''Scaling Memory'''''&lt;br /&gt;
|Memory increase would require additional servers/unused space in existing ones.&lt;br /&gt;
|Memory increase depends on additional servers available/unused space in existing ones.&lt;br /&gt;
|Memory increased in terms of dyno each of size 512 MB.&lt;br /&gt;
|Can configure any size for memory allocation&lt;br /&gt;
| -&lt;br /&gt;
| -&lt;br /&gt;
|Can automatically up/down scale the application by adjusting the default auto scaling settings.&lt;br /&gt;
|-&lt;br /&gt;
|'''''Scaling – Cost and Ease'''''&lt;br /&gt;
|While this provides greater flexibility as user is in control of the servers, it also causes additional overhead in terms of user needing to work both on Rails application and web server deployment.&lt;br /&gt;
|It can be integrated with Rake without any hindrances.&lt;br /&gt;
|Can dynamically scale up and down an application and pay as per hourly usages. Each additional dyno costs $35/mo&lt;br /&gt;
|Scaling takes up some time and need to pay for a month at the minimum. Scaling up to 4GB increases cost to $100/mo&lt;br /&gt;
| -&lt;br /&gt;
|Scaling using Cloud66 is relatively easy and hassle free.&lt;br /&gt;
|Scaling is fast and easy.&lt;br /&gt;
|-&lt;br /&gt;
|'''''Special features'''''&lt;br /&gt;
|For sensitive applications where handing over the control to a third party for deployment is not feasible, Capistrano is the way to go.&lt;br /&gt;
|It also provides support for tools like rsync and ssh.&lt;br /&gt;
|Lacks support for cross region deployment i.e. can’t select location of server where application gets deployed&lt;br /&gt;
|Supports cross region deployment i.e. if users of application primarily in Asia, can choose a server in Asia to deploy application, thus making the site faster.&lt;br /&gt;
| -&lt;br /&gt;
| -&lt;br /&gt;
|Provides complete flexibility and control of the resources to the user including the chance to take over control of some or all.&lt;br /&gt;
|-&lt;br /&gt;
|'''''Database support'''''&lt;br /&gt;
|Provides support for DB related to rails applications&lt;br /&gt;
|Provides support for DB related to rails applications&lt;br /&gt;
|It features serious production DB like RDBMS, Postgres, etc. and many Addons such as MongoDB, ClearDB, etc.&lt;br /&gt;
|Features free shared databases such as MongoDB, MySQL, Postgres but for other production DB’s need to use Addons&lt;br /&gt;
|Databases featured are MySQL, MongoDB and Postgres&lt;br /&gt;
| -&lt;br /&gt;
|Supports DB like Amazon SimpleDB, Amazon RDS, Amazon DynamoDB.&lt;br /&gt;
|-&lt;br /&gt;
|'''''Deployment strategy'''''&lt;br /&gt;
|Capistrano provides commands to be executed for automated deployment. It supports git.&lt;br /&gt;
|It is much easier to deploy using Vlad as compared to Capistrano.&lt;br /&gt;
|Deployment as easy as ‘git push’&lt;br /&gt;
|Deployment does not support git. It uses the af tool for deployment.&lt;br /&gt;
| -&lt;br /&gt;
|Since Cloud66 provides the platform in terms of Application Stack Management as a Service, it uses the infrastructure of AWS, Virtual Private Server, etc. for actual deployment. But the user doesn’t have to worry about configuration or monitoring of the servers. Hence provides easy deployment.&lt;br /&gt;
|Deployment options include Git, AWS management console, etc.&lt;br /&gt;
|-&lt;br /&gt;
|'''''Community Support availability'''''&lt;br /&gt;
| As it has been in use for a long time there is a huge community support available for Capistrano.&lt;br /&gt;
| -&lt;br /&gt;
|Heroku also provides a huge community support given the fact that there are a lot of Heroku users.&lt;br /&gt;
|Community is limited.&lt;br /&gt;
|RedHat being a reputed provider for open source solutions, the OpenShift community is gradually increasing and receiving support from a considerable community of users.&lt;br /&gt;
|Limited community support currently&lt;br /&gt;
|Has community forums and documentation.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Conclusion =&lt;br /&gt;
&lt;br /&gt;
Comparison and contrast between various deployment automated tools such as Capistrano, Heroku, Vlad, AppFog, OpenShift, Cloud66, AWS Beanstalk shows that each has its own pros and cons. &lt;br /&gt;
For instance, in a client based application where handing over the control of the application to a third party such as the deployment tool provider is impossible, AWS Beanstalk would be the obvious choice for the developer.&lt;br /&gt;
On the other hand, a novice Rails application developer might find all he needs in the starter plan of Heroku with the added bonus of a huge support community available to him for troubleshooting as he stumbles his way across the development of the application.&lt;br /&gt;
One may also choose the tool that provides the specific database support for your application. In case of large scale corporations where budgets are not that limited, the increasing costs with up-scaling of some tools would not be an obstacle.&lt;br /&gt;
Thus, various considerations about the application such as scalability requirement, security concerns, cost, availability of own resources such as servers etc., will help determine which tool is the most suitable for that application.&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= See Also =&lt;br /&gt;
&lt;br /&gt;
* Rails Solutions: Ruby on Rails Made Easy by Justin Williams&lt;br /&gt;
* http://guides.beanstalkapp.com/deployments/best-practices.html&lt;br /&gt;
* http://www.urbancode.com/anthill3-help-3.7/html/SettingUpDeploymentProcess.html&lt;br /&gt;
* http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=UseFMSGateway_3.html&lt;br /&gt;
* http://pic.dhe.ibm.com/infocenter/tivihelp/v26r1/index.jsp?topic=%2Fcom.ibm.dtm.doc%2Fdeploysoftware%2Fc_deploysw_process.html&lt;/div&gt;</summary>
		<author><name>Npari</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch2_0e808_nsv&amp;diff=81368</id>
		<title>CSC/ECE 517 Fall 2013/ch2 0e808 nsv</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch2_0e808_nsv&amp;diff=81368"/>
		<updated>2013-10-30T21:26:59Z</updated>

		<summary type="html">&lt;p&gt;Npari: /* Model Class : assignment_participant.rb */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= E808: Refactor and test Participant, AssignmentParticipant, &amp;amp; CourseParticipant =&lt;br /&gt;
The requirements provided for the Open Source System project were as follows : &amp;lt;br&amp;gt;&lt;br /&gt;
'''Classes''': &amp;lt;br&amp;gt;&lt;br /&gt;
''participant.rb'' (197 lines)&amp;lt;br&amp;gt;&lt;br /&gt;
''assignment_participant.rb'' (476 lines)&amp;lt;br&amp;gt;&lt;br /&gt;
''course_participant.rb'' (90 lines)&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''What they do''': &amp;lt;br&amp;gt; &lt;br /&gt;
These classes keep track of a user who is participating in an assignment or a course.  participant.rb is the superclass, and the other two are the subclasses.&lt;br /&gt;
&lt;br /&gt;
'''What is needed''': &amp;lt;br&amp;gt; &lt;br /&gt;
The methods are complex; there are a lot of them (assignment_particpant has 44) and there is a lot of duplicated code.  assignment_participant contains code for detecting cycles of high grades (which can indicate collusion in reviews).  It would be better moved to another class.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
= Introduction =&lt;br /&gt;
&lt;br /&gt;
A cursory analysis of the code of the three model classes showed the existence of code duplication. In a lot of the cases the [http://en.wikipedia.org/wiki/Don%27t_Repeat_Yourself Don't Repeat Yourself] (DRY) principle was violated.&lt;br /&gt;
&lt;br /&gt;
In keeping with the [http://en.wikipedia.org/wiki/Agile_software_development Agile] methodology, which involves having regular discussions with all stakeholders, the design check for the project was performed with a meeting with the Instructor.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{viewxls:name=sample.xlsx|sheet=Summary|row=13|col=3}&lt;br /&gt;
&lt;br /&gt;
Next the code was analyzed in detail and the following plausible improvements were predicted.[[File:[[Media:Example.jpg]]]]&lt;br /&gt;
&lt;br /&gt;
After the final release of the code in development and testing stage, the master plan is prepared for deployment of components and sites based on the sign-offs provided by the project teams, stakeholders and customers. Then, the stabilization of the deployment is calculated based on some metrics. Once the deployment is stabilized, it is reviewed and the process of deployment is complete. The final sign-off is given by the stakeholders.&lt;br /&gt;
&lt;br /&gt;
=Participant model: participant.rb=&lt;br /&gt;
&lt;br /&gt;
Code deployment is a procedure where the application is transferred onto a production server, so that it is made available for all the other users. It is the part of release management process which involves several activities. These activities are inter-dependent and need to be completed in a specific order for successful code deployment. &lt;br /&gt;
&lt;br /&gt;
'''Code Deployment Activities'''&lt;br /&gt;
&lt;br /&gt;
The various deployment activities include &amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/Software_deployment&amp;lt;/ref&amp;gt;&lt;br /&gt;
* Release : Gathering all system components in preparation for deployment&lt;br /&gt;
* Install and activate : Installing the application components and getting them in the 'ready' state&lt;br /&gt;
* Deactivate : Shutting down components that are out-dated or that may interfere with updating others&lt;br /&gt;
* Adapt : Making changes to application to accommodate changes in environment&lt;br /&gt;
* Update : Having a newer release installed in place of the old one&lt;br /&gt;
* Built-in : There are components built-into some tools for complete/semi-automating updates&lt;br /&gt;
* Version tracking : These systems help the user to know if newer versions of a software are available and if yes, help install them&lt;br /&gt;
* Uninstall : Opposite of installation and involves complete removal of software and its dependencies from the environment&lt;br /&gt;
* Retire : This involves making a software obsolete and is the end of software life cycle&lt;br /&gt;
&lt;br /&gt;
The general guidelines for the deployment process remain the same but there are variations in the specific requirements with each software system.&lt;br /&gt;
&lt;br /&gt;
=AssignmentParticipant model: assignment_participant.rb=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ref&amp;gt;http://searchitchannel.techtarget.com/definition/release-management&amp;lt;/ref&amp;gt;&lt;br /&gt;
Release management is a software process which takes care of the development, testing, deployment and support stages of software releases. The start of release management happens in the development phase, where it requests for new features or changes in the existing application. When the request is accepted, a new release is planned and designed. This design is built and then enters the testing phase, where the release is tested until it is accepted. After the release is accepted as a candidate, it enters the deployment phase where it is implemented. Once deployed, the release is made available and sent to support phase for collection of bug reports. Once the support phase is done, the bugs and other issues lead to requests for changes and the cycle is then repeated.&lt;br /&gt;
&lt;br /&gt;
=CourseParticipant model:course_participant.rb =&lt;br /&gt;
&amp;lt;ref&amp;gt;http://www.urbancode.com/html/solutions/deployment-automation.html&amp;lt;/ref&amp;gt;&lt;br /&gt;
Automation of a process is required when the manual process is more error prone. Also, for large real world applications, the manual process is very complex and time consuming. Incomplete documentation hampers a manual process further. Deployment also has to be done in many environments and involves varied steps to be followed in a specific order. Manual process needs repetition of same procedure to each and every environment which leads to many errors and the process becomes costly.&lt;br /&gt;
In web applications each new release has to be deployed to and tested in development, testing and production environments.The number of software releases in web applications  are more and hence the need to automate release management is also greater.&lt;br /&gt;
&lt;br /&gt;
Automation of deployment delivers applications faster and with fewer errors. The defined software deployment process can be applied across all environments consistently every time. With various automated application deployment platforms now readily available, manual deployments have become a thing of the past.&lt;br /&gt;
&lt;br /&gt;
Lets take a look at the various Deployment Automation tools available to Ruby on Rails applications. For the purposes of this article the process of manual deployment of a Ruby on Rails application is out of scope.&lt;br /&gt;
&lt;br /&gt;
= Tests =&lt;br /&gt;
&lt;br /&gt;
Some of the automated tools that are widely used for the process of deployment with Ruby on Rails are &lt;br /&gt;
&lt;br /&gt;
* Capistrano&lt;br /&gt;
* Heroku&lt;br /&gt;
* Vlad&lt;br /&gt;
* AppFog&lt;br /&gt;
* AWS Elastic Beanstalk&lt;br /&gt;
* OpenShift&lt;br /&gt;
* Cloud 66&lt;br /&gt;
&lt;br /&gt;
= yml files =&lt;br /&gt;
&lt;br /&gt;
[[File:Capistrano.jpg|frame|right|&amp;lt;ref&amp;gt;http://www.capistranorb.com/&amp;lt;/ref&amp;gt;|Capistrano Logo]]&lt;br /&gt;
&lt;br /&gt;
Capistrano is a Ruby tool which helps deploy an application to the server. Capistrano allows deploying to multiple machines at a time. It has many advanced options which help to deploy different kinds of applications. It also supports the scripting and execution of tasks.&lt;br /&gt;
&lt;br /&gt;
Capistrano can be used to:&lt;br /&gt;
&lt;br /&gt;
* Deploy applications onto many machines simultaneously.&lt;br /&gt;
* Automate the audits&lt;br /&gt;
* Automate the common tasks of a team.&lt;br /&gt;
&lt;br /&gt;
Capistrano can be made a part of a larger software by integrating it with another Ruby software.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ref&amp;gt;http://www.capistranorb.com/documentation/getting-started/installation/&amp;lt;/ref&amp;gt;  &lt;br /&gt;
'''General Usage'''&lt;br /&gt;
&lt;br /&gt;
The following commands will clone Capistrano, build the gem and install it locally.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem install capistrano --pre --trust-policy HighSecurity&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Or grab the bleeding edge head from:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ git clone -b v3 https://github.com/capistrano/capistrano.git&lt;br /&gt;
$ cd capistrano&lt;br /&gt;
$ gem build *.gemspec&lt;br /&gt;
$ gem install *.gem&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
'''Signed Rubygems'''&lt;br /&gt;
&lt;br /&gt;
As Capistrano is a signed gem, you should always be careful to use the --trust-policy flag when installing Gems, or since Bundler 1.3 you should use the same flag:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem install capistrano --pre --trust-policy HighSecurity&lt;br /&gt;
$ bundle install --trust-policy HighSecurity&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If you get a message that looks like:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ERROR:  While executing gem ... (Gem::Security::Exception)&lt;br /&gt;
unsigned gems are not allowed by the High Security policy&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then please complain to your Gem author, and have them start signing their Gems.&lt;br /&gt;
&lt;br /&gt;
'''Usage in a Rails project'''&lt;br /&gt;
&lt;br /&gt;
Add the following lines to the Gemfile to the :development group ideally.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
group :development do&lt;br /&gt;
  gem 'capistrano-rails', '~&amp;gt; 0.0.7'&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= routes.rb =&lt;br /&gt;
&lt;br /&gt;
[[File:Heroku.jpg|frame|right|&amp;lt;ref&amp;gt;https://www.heroku.com/&amp;lt;/ref&amp;gt;|Heroku Logo]]&lt;br /&gt;
&lt;br /&gt;
Heroku is a cloud [http://en.wikipedia.org/wiki/Platform_as_a_service Platform as a Service] (PaaS) which supports several programming languages. PaaS is a service model of Cloud computing wherein the provider offers resources like servers, software, database, etc. to the developer. Heroku helps manage environment-specific configurations separately from the source code, which provides greater security.&lt;br /&gt;
Heroku is not just a deployment environment but it also impacts the development process. There are several principles of the development of application on Heroku.&amp;lt;br&amp;gt;&lt;br /&gt;
•	Applications and Codebases : Most of the development of the application is done on application’s codebase which is stored in a [http://en.wikipedia.org/wiki/Version_control_system Version Control System (VCS)] &amp;lt;br&amp;gt;&lt;br /&gt;
•	Dependencies : All the application dependencies such as plugins should be declared explicitly&amp;lt;br&amp;gt;&lt;br /&gt;
•	Configuration : Configuration of an application is all that varies in different deploys&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Getting Started with Heroku'''&lt;br /&gt;
&lt;br /&gt;
1. To get started with Heroku, go to https://id.heroku.com/signup/devcenter, signup for a Heroku account. &lt;br /&gt;
&lt;br /&gt;
2. Then, download and install the Heroku toolbelt at https://toolbelt.heroku.com/ for your development system. You can also use Heroku command line instead of the online Heroku application. &lt;br /&gt;
&lt;br /&gt;
3. After installing one of them, login using the email address and password used when creating the Heroku account:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ref&amp;gt;https://github.com/heroku/heroku&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ heroku login&lt;br /&gt;
Enter your Heroku credentials.&lt;br /&gt;
Email: adam@example.com&lt;br /&gt;
Password:&lt;br /&gt;
Could not find an existing public key.&lt;br /&gt;
Would you like to generate one? [Yn]&lt;br /&gt;
Generating new SSH public key.&lt;br /&gt;
Uploading SSH public key /Users/adam/.ssh/id_rsa.pub&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Deploying Applications'''&lt;br /&gt;
&lt;br /&gt;
Heroku uses [http://en.wikipedia.org/wiki/Git_(software) git] primarily to deploy the applications. When an application is created on Heroku, it associates the new git which is remote with the local git repository.&lt;br /&gt;
&lt;br /&gt;
As a result, deploying code is just the familiar git push, but to the heroku remote instead:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ref&amp;gt;https://devcenter.heroku.com/articles/how-heroku-works#deploying-applications&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ git push heroku master&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Vlad ==&lt;br /&gt;
&lt;br /&gt;
[[File:Vlad.png|frame|right|&amp;lt;ref&amp;gt;http://rubyhitsquad.com/Vlad_the_Deployer.html&amp;lt;/ref&amp;gt;|Vlad Logo]]&lt;br /&gt;
&lt;br /&gt;
Vlad is another automated deployment tool which is simple to use. It integrates with rake and uses standard tools like SSH, rsync etc.&lt;br /&gt;
&lt;br /&gt;
The main features of Vlad include&lt;br /&gt;
* It uses very few dependencies which are simple.&lt;br /&gt;
* It can execute commands on more than one server.&lt;br /&gt;
* It syncs files to one or more servers.&lt;br /&gt;
* It matches local and remote tasks.&lt;br /&gt;
* It runs tests very fast.&lt;br /&gt;
&lt;br /&gt;
'''Getting started with Vlad'''&amp;lt;ref&amp;gt;http://docs.seattlerb.org/vlad/doco/getting_started_txt.html&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create a deploy file, usually in “config/deploy.rb”:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set :application, &amp;quot;project&amp;quot;&lt;br /&gt;
set :domain, &amp;quot;example.com&amp;quot;&lt;br /&gt;
set :deploy_to, &amp;quot;/path/to/install&amp;quot;&lt;br /&gt;
set :repository, 'http://svn.example.com/project/branches/stable/'&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This defaults to using ‘svn export’ from repository, and a single server for app, db, and www.&lt;br /&gt;
&lt;br /&gt;
If you want a multi-config environment, change your config like so:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set :application, &amp;quot;project&amp;quot;&lt;br /&gt;
set :repository, 'http://svn.example.com/project/branches/stable/'&lt;br /&gt;
&lt;br /&gt;
task :beta do&lt;br /&gt;
  set :domain,    &amp;quot;beta.example.com&amp;quot;&lt;br /&gt;
  set :deploy_to, &amp;quot;/path/to/install-beta&amp;quot;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
task :dev do&lt;br /&gt;
  set :domain,    &amp;quot;dev.example.com&amp;quot;&lt;br /&gt;
  set :deploy_to, &amp;quot;/path/to/install-dev&amp;quot;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
task :prod do&lt;br /&gt;
  set :domain,    &amp;quot;example.com&amp;quot;&lt;br /&gt;
  set :deploy_to, &amp;quot;/path/to/install&amp;quot;&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Add the following to your Rakefile:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
begin&lt;br /&gt;
  require 'vlad'&lt;br /&gt;
  Vlad.load&lt;br /&gt;
rescue LoadError&lt;br /&gt;
  # do nothing&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Vlad.load has a lot of flexibility.&lt;br /&gt;
&lt;br /&gt;
You can install vlad via:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;% rake vlad:invoke COMMAND='sudo gem install vlad -y'&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Initial Launch&lt;br /&gt;
&amp;lt;pre&amp;gt;Run rake vlad:setup vlad:update vlad:migrate vlad:start&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ref&amp;gt;http://docs.seattlerb.org/vlad/index.html&amp;lt;/ref&amp;gt;&lt;br /&gt;
'''Running Vlad'''&lt;br /&gt;
&lt;br /&gt;
* Using rake&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
task :shazam! do&lt;br /&gt;
  Rake::Task[:action1].invoke&lt;br /&gt;
  Rake::Task[:action2].invoke&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Using SSH&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Host example.com&lt;br /&gt;
    User fluffy_bunny&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== AppFog == &lt;br /&gt;
&lt;br /&gt;
[[File:AppFog.jpg|frame|right|&amp;lt;ref&amp;gt;https://www.appfog.com/&amp;lt;/ref&amp;gt;|AppFog Logo]]&lt;br /&gt;
&lt;br /&gt;
AppFog is a PaaS built on Cloud Foundry which is another PaaS platform for deploying applications. &lt;br /&gt;
&lt;br /&gt;
Features of AppFog are&lt;br /&gt;
* It launches and runs fast.&lt;br /&gt;
* It does not require configuring servers or installing frameworks.&lt;br /&gt;
* It is compatible with code management systems like git, svn etc.&lt;br /&gt;
&lt;br /&gt;
'''Installing AppFog'''&amp;lt;ref&amp;gt;http://blog.appfog.com/getting-started-with-appfogs-command-line/&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
‘af‘ command line tool is written in Ruby for installation.&lt;br /&gt;
&lt;br /&gt;
Download and install [http://rubyinstaller.org/ Ruby Installer] for Windows. The installer already includes RubyGems.&lt;br /&gt;
&lt;br /&gt;
Be sure you use the Ruby-enabled command prompt window when you later install and use af. You access this command prompt from the Windows Start menu (All Programs &amp;gt; Ruby &amp;gt; Start Command Prompt with Ruby).&lt;br /&gt;
&lt;br /&gt;
Finally, update RubyGems from the Ruby Command Prompt:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem update --system&lt;br /&gt;
$ gem install af&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Login with:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ af login&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Finally from within your source code directory:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ af update hello-node&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Getting Started with AppFog'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
target [url]                                       Reports current target or sets a new target&lt;br /&gt;
login [email] [--email, --password]                Login&lt;br /&gt;
info                                               System and account information&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== AWS Elastic Beanstalk==&lt;br /&gt;
&lt;br /&gt;
[[File:AWSLogo.jpg|frame|right|&amp;lt;ref&amp;gt;https://aws.amazon.com&amp;lt;/ref&amp;gt;|AWS Logo]]&lt;br /&gt;
&lt;br /&gt;
Amazon Wen Services(AWS) offers [http://en.wikipedia.org/wiki/Infrastructure_as_a_service#Infrastructure_as_a_service_.28IaaS.29 Infrastructure as a Service] (IaaS) and provides a complete set of resources for the development of a web application in minutes. AWS Elastic Beanstalk is a deployment tool of the AWS cloud.&lt;br /&gt;
&lt;br /&gt;
With AWS Elastic Beanstalk, applications can be quickly deployed and managed in the AWS cloud without worrying about the infrastructure that runs those applications. AWS Elastic Beanstalk reduces management complexity without restricting choice or control. Once the application is uploaded AWS Elastic Beanstalk automatically handles the details of capacity provisioning, load balancing, scaling, and application health monitoring. AWS Elastic Beanstalk uses highly reliable and scalable services.&lt;br /&gt;
&lt;br /&gt;
'''AWS CLI'''&lt;br /&gt;
&lt;br /&gt;
AWS Elastic Beanstalk uses a command line tool Eb, which helps you to deploy your application easily.&lt;br /&gt;
&lt;br /&gt;
'''Getting Started with Eb'''&amp;lt;ref&amp;gt;http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/command-reference-get-started.html&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To get started with the beanstalk CLI, you will need to download the command line tools at the [http://aws.amazon.com/code/6752709412171743 AWS Sample Code &amp;amp; Libraries] website.&lt;br /&gt;
&lt;br /&gt;
Step 1: Initialize Your Git Repository&lt;br /&gt;
&lt;br /&gt;
Eb is a command line interface that enables you to deploy applications quickly and more easily using Git. Eb is available as part of the Elastic Beanstalk command line tools package. &lt;br /&gt;
&lt;br /&gt;
1. To install eb,install the following software onto your local computer:&lt;br /&gt;
&lt;br /&gt;
* Git 1.6.6 or later. To download Git, go to http://git-scm.com/.&lt;br /&gt;
* PowerShell 2.0.&lt;br /&gt;
&lt;br /&gt;
2. Initialize your Git repository.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git init &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Step 2: Configuring AWS Elastic Beanstalk&lt;br /&gt;
&lt;br /&gt;
1. From your directory where you created your local repository, type the following command.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
eb init&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2. When you are prompted for the access key ID, type your access key ID. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Enter your AWS Access Key ID (current value is &amp;quot;AKIAIOSFODNN7EXAMPLE&amp;quot;): &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3. When you are prompted for the secret access key, type your secret access key.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Enter your AWS Secret Access Key (current value is &amp;quot;wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY&amp;quot;): &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
4. When you are prompted for the AWS Elastic Beanstalk application name, type the name of the application. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Enter an AWS Elastic Beanstalk application name (auto-generated value is &amp;quot;windows&amp;quot;): &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Note:&lt;br /&gt;
If you have a space in your application name, make sure you do not use quotes.&lt;br /&gt;
&lt;br /&gt;
5. When you are prompted for the AWS Elastic Beanstalk environment name, type the name of the environment. AWS Elastic Beanstalk automatically creates an environment name based on your application name. If you want to accept the default, press Enter.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Enter an AWS Elastic Beanstalk environment name (current value is &amp;quot;HelloWorld-env&amp;quot;): &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
6. When you are prompted to create an Amazon RDS DB instance, type y or n. For this example, we'll type y.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Create an RDS DB Instance? [y/n]:&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
7. When you are prompted to enter your RDS user master password, type your password containing from 8 to 16 printable ASCII characters (excluding /, \, and @).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Enter an RDS DB master password: &lt;br /&gt;
Retype password to confirm: &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can now get started with the AWS Elastic Beanstalk.&lt;br /&gt;
&lt;br /&gt;
== OpenShift ==&lt;br /&gt;
&lt;br /&gt;
[[File:OpenShift.png|frame|right|&amp;lt;ref&amp;gt;https://en.wikipedia.org&amp;lt;/ref&amp;gt;|OpenShift Logo]]&lt;br /&gt;
&lt;br /&gt;
Another free and open source PaaS for deploying applications is OpenShift created by [[http://en.wikipedia.org/wiki/RedHat RedHat]]. &lt;br /&gt;
&lt;br /&gt;
'''Considerations'''&lt;br /&gt;
* Databases&lt;br /&gt;
&lt;br /&gt;
To use the application outside the OpenShift environment one needs to change the variables as the application is configured to use database in production mode in OpenShift.&lt;br /&gt;
&lt;br /&gt;
* Assets&lt;br /&gt;
&lt;br /&gt;
The assets are precompiled everytime application is pushed to OpenShift.&lt;br /&gt;
&lt;br /&gt;
* Security&lt;br /&gt;
&lt;br /&gt;
Security related variables are to be unique across the application.&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;ref&amp;gt;https://github.com/openshift/rails-example&amp;lt;/ref&amp;gt;&lt;br /&gt;
'''Installation'''&lt;br /&gt;
&lt;br /&gt;
1.	Create an account at http://openshift.redhat.com/&lt;br /&gt;
&lt;br /&gt;
2.	Create a rails application&lt;br /&gt;
	&amp;lt;pre&amp;gt;rhc app create -a railsapp -t ruby-1.9&amp;lt;/pre&amp;gt;&lt;br /&gt;
3.	Add mysql support to your application&lt;br /&gt;
	&amp;lt;pre&amp;gt;rhc cartridge add -a railsapp -c mysql-5.1&amp;lt;/pre&amp;gt;&lt;br /&gt;
4.	Add this upstream Rails quickstart repository&lt;br /&gt;
&amp;lt;pre&amp;gt;cd railsapp&lt;br /&gt;
git remote add upstream -m master git://github.com/openshift/rails-example.git&lt;br /&gt;
git pull -s recursive -X theirs upstream master&amp;lt;/pre&amp;gt;&lt;br /&gt;
5.	Push your new code&lt;br /&gt;
&amp;lt;pre&amp;gt;git push&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Future scope ==&lt;br /&gt;
&lt;br /&gt;
[[File:Cloud 66.jpg|frame|right|&amp;lt;ref&amp;gt;https://www.cloud66.com/&amp;lt;/ref&amp;gt;|Cloud66 Logo]]&lt;br /&gt;
&lt;br /&gt;
Cloud 66 combines the convenience of Platform-as-a-Service (PaaS) and the flexibility and control of Infrastructure-as-a-Service (IaaS). This platform allows easy deployment of application, so there is no overhead of configuring or monitoring the servers.&lt;br /&gt;
&lt;br /&gt;
'''Cloud 66 Command line Toolbelt'''&lt;br /&gt;
&lt;br /&gt;
Toolbelt is an open source released to deploy the application.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ref&amp;gt;http://blog.cloud66.com/&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Getting Started with Cloud 66'''&lt;br /&gt;
&lt;br /&gt;
1. Go to the [https://www.cloud66.com/users/sign_up sign up] page and create a Cloud 66 account.&lt;br /&gt;
&lt;br /&gt;
2. Go to Cloud 66 Dashboard and [https://www.cloud66.com/help/first_stack build your first stack].&lt;br /&gt;
&lt;br /&gt;
'''Installation'''&lt;br /&gt;
&lt;br /&gt;
Installation of toolbelt uses the following command&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Gem install c66&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This automatically searches the newest version and installs it.&lt;br /&gt;
&lt;br /&gt;
= Model Class : assignment_participant.rb =&lt;br /&gt;
Th AssignmentParticipant model class is a subclass of the participant model class. Several methods in AssignmentParticipant model class required renaming and refactoring to ensure that the change is reflected in the entire project. The names were changed to follow method naming convention. Deprecated code was removed and re-coded to ensure that the code worked in future version as well. Duplicated codes were commented. Methods that are more general to the sub classes were moved to the parent class. Some methods that calculates the collusion in reviews between students were moved to a newly created model class file called collusion_cycle.rb &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;width:3%;&amp;quot;|S. No&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;|Method Name&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;|Change Made &lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;|Reason For Change&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
|''''' 1 '''''&lt;br /&gt;
|get_course_string&lt;br /&gt;
|Renamed to course_string and refactored &lt;br /&gt;
|To follow method naming convention&lt;br /&gt;
|-&lt;br /&gt;
|''''' 2 '''''&lt;br /&gt;
|get_cycle_deviation_score&lt;br /&gt;
|Moved to collusion_cycle.rb model class&lt;br /&gt;
|Related methods that calculate collusion in reviews have been moved to the newly created collusion_cycle.rb model class&lt;br /&gt;
|-&lt;br /&gt;
|''''' 3 '''''&lt;br /&gt;
|get_cycle_similarity_score&lt;br /&gt;
|Moved to collusion_cycle.rb model class&lt;br /&gt;
|Related methods that calculate collusion in reviews have been moved to the newly created collusion_cycle.rb model class&lt;br /&gt;
|-&lt;br /&gt;
|''''' 4 '''''&lt;br /&gt;
|get_feedback&lt;br /&gt;
|Renamed to feedback and refactored&lt;br /&gt;
|To follow method naming convention&lt;br /&gt;
|-&lt;br /&gt;
|''''' 5 '''''&lt;br /&gt;
|get_files&lt;br /&gt;
|Renamed to files_in_directory  and refactored&lt;br /&gt;
|To follow method naming convention&lt;br /&gt;
|-&lt;br /&gt;
|''''' 6 '''''&lt;br /&gt;
|get_four_node_cycles&lt;br /&gt;
|Moved to collusion_cycle.rb model class&lt;br /&gt;
|Related methods that calculate collusion in reviews have been moved to the newly created collusion_cycle.rb model class&lt;br /&gt;
|-&lt;br /&gt;
|''''' 7 '''''&lt;br /&gt;
|fullname&lt;br /&gt;
|Moved to parent model class – participant.rb &lt;br /&gt;
|General methods of the subclass are moved to Parent class&lt;br /&gt;
|-&lt;br /&gt;
|''''' 8 '''''&lt;br /&gt;
|get_metareviews&lt;br /&gt;
|Renamed to metareviews and refactored&lt;br /&gt;
|To follow method naming convention&lt;br /&gt;
|-&lt;br /&gt;
|''''' 9 '''''&lt;br /&gt;
|name&lt;br /&gt;
|Commented the method  &lt;br /&gt;
|The method is already in parent model class – participant.rb and can be used in this subclass through inheritance&lt;br /&gt;
|-&lt;br /&gt;
|''''' 10 '''''&lt;br /&gt;
|name&lt;br /&gt;
|Commented the method  &lt;br /&gt;
|The method is already in parent model class – participant.rb and can be used in this subclass through inheritance. Also it is a duplicate method in patricipant.rb&lt;br /&gt;
|- &lt;br /&gt;
|''''' 11 '''''&lt;br /&gt;
|get_review_score&lt;br /&gt;
|Renamed to review_score and refactored. Deprecated code has been removed and replaced with correct code.&lt;br /&gt;
|To follow method naming convention and ensure the code works in future versions. &lt;br /&gt;
|-&lt;br /&gt;
|''''' 12 '''''&lt;br /&gt;
|get_reviewees&lt;br /&gt;
|Renamed to reviewees and refactored. Deprecated code has been removed and replaced with correct code.&lt;br /&gt;
|To follow method naming convention and ensure the code works in future versions. &lt;br /&gt;
|-&lt;br /&gt;
|''''' 13 '''''&lt;br /&gt;
|get_reviewers&lt;br /&gt;
|Renamed to reviewers and refactored . Deprecated code has been commented and replaced with correct code.&lt;br /&gt;
|To follow method naming convention and ensure the code works in future versions. &lt;br /&gt;
|-&lt;br /&gt;
|''''' 14 '''''&lt;br /&gt;
|get_reviews&lt;br /&gt;
|Renamed to reviews and refactored &lt;br /&gt;
|To follow method naming convention&lt;br /&gt;
|-&lt;br /&gt;
|''''' 15 '''''&lt;br /&gt;
|get_reviews_by_reviewer&lt;br /&gt;
|Renamed to reviews_by_reviewer and refactored &lt;br /&gt;
|To follow method naming convention&lt;br /&gt;
|-&lt;br /&gt;
|''''' 16 '''''&lt;br /&gt;
|get_reviews_by_reviewer&lt;br /&gt;
|Commented the method &lt;br /&gt;
|To remove duplicated method in this class&lt;br /&gt;
|-&lt;br /&gt;
|''''' 17 '''''&lt;br /&gt;
|get_scores&lt;br /&gt;
|Renamed to scores and refactored &lt;br /&gt;
|To follow method naming convention&lt;br /&gt;
|-&lt;br /&gt;
|''''' 18 '''''&lt;br /&gt;
|get_submitted_files&lt;br /&gt;
|Renamed to submitted_files and refactored &lt;br /&gt;
|To follow method naming convention&lt;br /&gt;
|-&lt;br /&gt;
|''''' 19 '''''&lt;br /&gt;
|get_teammate_reviews&lt;br /&gt;
|Renamed to teammate_reviews and refactored &lt;br /&gt;
|To follow method naming convention&lt;br /&gt;
|-&lt;br /&gt;
|''''' 20 '''''&lt;br /&gt;
|get_three_node_cycles&lt;br /&gt;
|Moved to collusion_cycle.rb model class&lt;br /&gt;
|Related methods that calculate collusion in reviews have been moved to the newly created collusion_cycle.rb model class&lt;br /&gt;
|-&lt;br /&gt;
|''''' 21 '''''&lt;br /&gt;
|get_topic_string&lt;br /&gt;
|Method has been Commented&lt;br /&gt;
|It is already present in model super class – participant.rb&lt;br /&gt;
|-&lt;br /&gt;
|''''' 22 '''''&lt;br /&gt;
|get_two_node_cycles&lt;br /&gt;
|Moved to collusion_cycle.rb model class&lt;br /&gt;
|Related methods that calculate collusion in reviews have been moved to the newly created collusion_cycle.rb model class&lt;br /&gt;
|-&lt;br /&gt;
|''''' 23 '''''&lt;br /&gt;
|get_wiki_submissions&lt;br /&gt;
|Renamed to wiki_submissions and refactored&lt;br /&gt;
|To follow method naming convention&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
After changes were made, the existing tests ran successfully.&lt;br /&gt;
&lt;br /&gt;
= Comparison between Capistrano/Vlad/Heroku/AppFog/OpenShift/Cloud66/AWS Beanstalk =&lt;br /&gt;
&lt;br /&gt;
With so many automated tools available for Code Deployment and Release Management, the decision on which to use for a particular Ruby on rails application depends on various parameters to be considered.&lt;br /&gt;
Some comparative features of the different tools are as follows :&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;width:9%;&amp;quot;|Criteria for Comparision&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;|Capistrano&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;| Vlad&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;| Heroku&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;| AppFog&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;| OpenShift&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;| Cloud66&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;| AWS Beanstalk&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
|'''''Getting started with the tool'''''&lt;br /&gt;
|It is a framework that allows one to execute commands on a remote server using tools like ssh.&lt;br /&gt;
|Vlad deployment is similar to Capistrano, but less complex.&lt;br /&gt;
|Heroku’s offers a plan with first dyno free i.e. 512 MB that can be paired with Postgres starter DB to start an application with 0 initial cost&lt;br /&gt;
|AppFog’s initial plan offers 2GB of RAM free which is enough for small to medium traffic applications. By managing options provided for DB, queue server, application server, etc all part of the intial package, this is an excellent option to try out an application&lt;br /&gt;
|OpenShift is an open source platform and its free plan for starters has 3 gears for free wherein each gear consists of some RAM and disk space.&lt;br /&gt;
|Free plan provides one server for deployment.&lt;br /&gt;
|Provides an initial free tier. Without free tier no additional cost for Beanstalk. One only needs to pay for the AWS resources used.&lt;br /&gt;
|-&lt;br /&gt;
|'''''Scaling Memory'''''&lt;br /&gt;
|Memory increase would require additional servers/unused space in existing ones.&lt;br /&gt;
|Memory increase depends on additional servers available/unused space in existing ones.&lt;br /&gt;
|Memory increased in terms of dyno each of size 512 MB.&lt;br /&gt;
|Can configure any size for memory allocation&lt;br /&gt;
| -&lt;br /&gt;
| -&lt;br /&gt;
|Can automatically up/down scale the application by adjusting the default auto scaling settings.&lt;br /&gt;
|-&lt;br /&gt;
|'''''Scaling – Cost and Ease'''''&lt;br /&gt;
|While this provides greater flexibility as user is in control of the servers, it also causes additional overhead in terms of user needing to work both on Rails application and web server deployment.&lt;br /&gt;
|It can be integrated with Rake without any hindrances.&lt;br /&gt;
|Can dynamically scale up and down an application and pay as per hourly usages. Each additional dyno costs $35/mo&lt;br /&gt;
|Scaling takes up some time and need to pay for a month at the minimum. Scaling up to 4GB increases cost to $100/mo&lt;br /&gt;
| -&lt;br /&gt;
|Scaling using Cloud66 is relatively easy and hassle free.&lt;br /&gt;
|Scaling is fast and easy.&lt;br /&gt;
|-&lt;br /&gt;
|'''''Special features'''''&lt;br /&gt;
|For sensitive applications where handing over the control to a third party for deployment is not feasible, Capistrano is the way to go.&lt;br /&gt;
|It also provides support for tools like rsync and ssh.&lt;br /&gt;
|Lacks support for cross region deployment i.e. can’t select location of server where application gets deployed&lt;br /&gt;
|Supports cross region deployment i.e. if users of application primarily in Asia, can choose a server in Asia to deploy application, thus making the site faster.&lt;br /&gt;
| -&lt;br /&gt;
| -&lt;br /&gt;
|Provides complete flexibility and control of the resources to the user including the chance to take over control of some or all.&lt;br /&gt;
|-&lt;br /&gt;
|'''''Database support'''''&lt;br /&gt;
|Provides support for DB related to rails applications&lt;br /&gt;
|Provides support for DB related to rails applications&lt;br /&gt;
|It features serious production DB like RDBMS, Postgres, etc. and many Addons such as MongoDB, ClearDB, etc.&lt;br /&gt;
|Features free shared databases such as MongoDB, MySQL, Postgres but for other production DB’s need to use Addons&lt;br /&gt;
|Databases featured are MySQL, MongoDB and Postgres&lt;br /&gt;
| -&lt;br /&gt;
|Supports DB like Amazon SimpleDB, Amazon RDS, Amazon DynamoDB.&lt;br /&gt;
|-&lt;br /&gt;
|'''''Deployment strategy'''''&lt;br /&gt;
|Capistrano provides commands to be executed for automated deployment. It supports git.&lt;br /&gt;
|It is much easier to deploy using Vlad as compared to Capistrano.&lt;br /&gt;
|Deployment as easy as ‘git push’&lt;br /&gt;
|Deployment does not support git. It uses the af tool for deployment.&lt;br /&gt;
| -&lt;br /&gt;
|Since Cloud66 provides the platform in terms of Application Stack Management as a Service, it uses the infrastructure of AWS, Virtual Private Server, etc. for actual deployment. But the user doesn’t have to worry about configuration or monitoring of the servers. Hence provides easy deployment.&lt;br /&gt;
|Deployment options include Git, AWS management console, etc.&lt;br /&gt;
|-&lt;br /&gt;
|'''''Community Support availability'''''&lt;br /&gt;
| As it has been in use for a long time there is a huge community support available for Capistrano.&lt;br /&gt;
| -&lt;br /&gt;
|Heroku also provides a huge community support given the fact that there are a lot of Heroku users.&lt;br /&gt;
|Community is limited.&lt;br /&gt;
|RedHat being a reputed provider for open source solutions, the OpenShift community is gradually increasing and receiving support from a considerable community of users.&lt;br /&gt;
|Limited community support currently&lt;br /&gt;
|Has community forums and documentation.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Conclusion =&lt;br /&gt;
&lt;br /&gt;
Comparison and contrast between various deployment automated tools such as Capistrano, Heroku, Vlad, AppFog, OpenShift, Cloud66, AWS Beanstalk shows that each has its own pros and cons. &lt;br /&gt;
For instance, in a client based application where handing over the control of the application to a third party such as the deployment tool provider is impossible, AWS Beanstalk would be the obvious choice for the developer.&lt;br /&gt;
On the other hand, a novice Rails application developer might find all he needs in the starter plan of Heroku with the added bonus of a huge support community available to him for troubleshooting as he stumbles his way across the development of the application.&lt;br /&gt;
One may also choose the tool that provides the specific database support for your application. In case of large scale corporations where budgets are not that limited, the increasing costs with up-scaling of some tools would not be an obstacle.&lt;br /&gt;
Thus, various considerations about the application such as scalability requirement, security concerns, cost, availability of own resources such as servers etc., will help determine which tool is the most suitable for that application.&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= See Also =&lt;br /&gt;
&lt;br /&gt;
* Rails Solutions: Ruby on Rails Made Easy by Justin Williams&lt;br /&gt;
* http://guides.beanstalkapp.com/deployments/best-practices.html&lt;br /&gt;
* http://www.urbancode.com/anthill3-help-3.7/html/SettingUpDeploymentProcess.html&lt;br /&gt;
* http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=UseFMSGateway_3.html&lt;br /&gt;
* http://pic.dhe.ibm.com/infocenter/tivihelp/v26r1/index.jsp?topic=%2Fcom.ibm.dtm.doc%2Fdeploysoftware%2Fc_deploysw_process.html&lt;/div&gt;</summary>
		<author><name>Npari</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch2_0e808_nsv&amp;diff=81367</id>
		<title>CSC/ECE 517 Fall 2013/ch2 0e808 nsv</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch2_0e808_nsv&amp;diff=81367"/>
		<updated>2013-10-30T21:26:00Z</updated>

		<summary type="html">&lt;p&gt;Npari: /* Model Class : assignment_participant.rb */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= E808: Refactor and test Participant, AssignmentParticipant, &amp;amp; CourseParticipant =&lt;br /&gt;
The requirements provided for the Open Source System project were as follows : &amp;lt;br&amp;gt;&lt;br /&gt;
'''Classes''': &amp;lt;br&amp;gt;&lt;br /&gt;
''participant.rb'' (197 lines)&amp;lt;br&amp;gt;&lt;br /&gt;
''assignment_participant.rb'' (476 lines)&amp;lt;br&amp;gt;&lt;br /&gt;
''course_participant.rb'' (90 lines)&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''What they do''': &amp;lt;br&amp;gt; &lt;br /&gt;
These classes keep track of a user who is participating in an assignment or a course.  participant.rb is the superclass, and the other two are the subclasses.&lt;br /&gt;
&lt;br /&gt;
'''What is needed''': &amp;lt;br&amp;gt; &lt;br /&gt;
The methods are complex; there are a lot of them (assignment_particpant has 44) and there is a lot of duplicated code.  assignment_participant contains code for detecting cycles of high grades (which can indicate collusion in reviews).  It would be better moved to another class.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
= Introduction =&lt;br /&gt;
&lt;br /&gt;
A cursory analysis of the code of the three model classes showed the existence of code duplication. In a lot of the cases the [http://en.wikipedia.org/wiki/Don%27t_Repeat_Yourself Don't Repeat Yourself] (DRY) principle was violated.&lt;br /&gt;
&lt;br /&gt;
In keeping with the [http://en.wikipedia.org/wiki/Agile_software_development Agile] methodology, which involves having regular discussions with all stakeholders, the design check for the project was performed with a meeting with the Instructor.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{viewxls:name=sample.xlsx|sheet=Summary|row=13|col=3}&lt;br /&gt;
&lt;br /&gt;
Next the code was analyzed in detail and the following plausible improvements were predicted.[[File:[[Media:Example.jpg]]]]&lt;br /&gt;
&lt;br /&gt;
After the final release of the code in development and testing stage, the master plan is prepared for deployment of components and sites based on the sign-offs provided by the project teams, stakeholders and customers. Then, the stabilization of the deployment is calculated based on some metrics. Once the deployment is stabilized, it is reviewed and the process of deployment is complete. The final sign-off is given by the stakeholders.&lt;br /&gt;
&lt;br /&gt;
=Participant model: participant.rb=&lt;br /&gt;
&lt;br /&gt;
Code deployment is a procedure where the application is transferred onto a production server, so that it is made available for all the other users. It is the part of release management process which involves several activities. These activities are inter-dependent and need to be completed in a specific order for successful code deployment. &lt;br /&gt;
&lt;br /&gt;
'''Code Deployment Activities'''&lt;br /&gt;
&lt;br /&gt;
The various deployment activities include &amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/Software_deployment&amp;lt;/ref&amp;gt;&lt;br /&gt;
* Release : Gathering all system components in preparation for deployment&lt;br /&gt;
* Install and activate : Installing the application components and getting them in the 'ready' state&lt;br /&gt;
* Deactivate : Shutting down components that are out-dated or that may interfere with updating others&lt;br /&gt;
* Adapt : Making changes to application to accommodate changes in environment&lt;br /&gt;
* Update : Having a newer release installed in place of the old one&lt;br /&gt;
* Built-in : There are components built-into some tools for complete/semi-automating updates&lt;br /&gt;
* Version tracking : These systems help the user to know if newer versions of a software are available and if yes, help install them&lt;br /&gt;
* Uninstall : Opposite of installation and involves complete removal of software and its dependencies from the environment&lt;br /&gt;
* Retire : This involves making a software obsolete and is the end of software life cycle&lt;br /&gt;
&lt;br /&gt;
The general guidelines for the deployment process remain the same but there are variations in the specific requirements with each software system.&lt;br /&gt;
&lt;br /&gt;
=AssignmentParticipant model: assignment_participant.rb=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ref&amp;gt;http://searchitchannel.techtarget.com/definition/release-management&amp;lt;/ref&amp;gt;&lt;br /&gt;
Release management is a software process which takes care of the development, testing, deployment and support stages of software releases. The start of release management happens in the development phase, where it requests for new features or changes in the existing application. When the request is accepted, a new release is planned and designed. This design is built and then enters the testing phase, where the release is tested until it is accepted. After the release is accepted as a candidate, it enters the deployment phase where it is implemented. Once deployed, the release is made available and sent to support phase for collection of bug reports. Once the support phase is done, the bugs and other issues lead to requests for changes and the cycle is then repeated.&lt;br /&gt;
&lt;br /&gt;
=CourseParticipant model:course_participant.rb =&lt;br /&gt;
&amp;lt;ref&amp;gt;http://www.urbancode.com/html/solutions/deployment-automation.html&amp;lt;/ref&amp;gt;&lt;br /&gt;
Automation of a process is required when the manual process is more error prone. Also, for large real world applications, the manual process is very complex and time consuming. Incomplete documentation hampers a manual process further. Deployment also has to be done in many environments and involves varied steps to be followed in a specific order. Manual process needs repetition of same procedure to each and every environment which leads to many errors and the process becomes costly.&lt;br /&gt;
In web applications each new release has to be deployed to and tested in development, testing and production environments.The number of software releases in web applications  are more and hence the need to automate release management is also greater.&lt;br /&gt;
&lt;br /&gt;
Automation of deployment delivers applications faster and with fewer errors. The defined software deployment process can be applied across all environments consistently every time. With various automated application deployment platforms now readily available, manual deployments have become a thing of the past.&lt;br /&gt;
&lt;br /&gt;
Lets take a look at the various Deployment Automation tools available to Ruby on Rails applications. For the purposes of this article the process of manual deployment of a Ruby on Rails application is out of scope.&lt;br /&gt;
&lt;br /&gt;
= Tests =&lt;br /&gt;
&lt;br /&gt;
Some of the automated tools that are widely used for the process of deployment with Ruby on Rails are &lt;br /&gt;
&lt;br /&gt;
* Capistrano&lt;br /&gt;
* Heroku&lt;br /&gt;
* Vlad&lt;br /&gt;
* AppFog&lt;br /&gt;
* AWS Elastic Beanstalk&lt;br /&gt;
* OpenShift&lt;br /&gt;
* Cloud 66&lt;br /&gt;
&lt;br /&gt;
= yml files =&lt;br /&gt;
&lt;br /&gt;
[[File:Capistrano.jpg|frame|right|&amp;lt;ref&amp;gt;http://www.capistranorb.com/&amp;lt;/ref&amp;gt;|Capistrano Logo]]&lt;br /&gt;
&lt;br /&gt;
Capistrano is a Ruby tool which helps deploy an application to the server. Capistrano allows deploying to multiple machines at a time. It has many advanced options which help to deploy different kinds of applications. It also supports the scripting and execution of tasks.&lt;br /&gt;
&lt;br /&gt;
Capistrano can be used to:&lt;br /&gt;
&lt;br /&gt;
* Deploy applications onto many machines simultaneously.&lt;br /&gt;
* Automate the audits&lt;br /&gt;
* Automate the common tasks of a team.&lt;br /&gt;
&lt;br /&gt;
Capistrano can be made a part of a larger software by integrating it with another Ruby software.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ref&amp;gt;http://www.capistranorb.com/documentation/getting-started/installation/&amp;lt;/ref&amp;gt;  &lt;br /&gt;
'''General Usage'''&lt;br /&gt;
&lt;br /&gt;
The following commands will clone Capistrano, build the gem and install it locally.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem install capistrano --pre --trust-policy HighSecurity&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Or grab the bleeding edge head from:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ git clone -b v3 https://github.com/capistrano/capistrano.git&lt;br /&gt;
$ cd capistrano&lt;br /&gt;
$ gem build *.gemspec&lt;br /&gt;
$ gem install *.gem&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
'''Signed Rubygems'''&lt;br /&gt;
&lt;br /&gt;
As Capistrano is a signed gem, you should always be careful to use the --trust-policy flag when installing Gems, or since Bundler 1.3 you should use the same flag:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem install capistrano --pre --trust-policy HighSecurity&lt;br /&gt;
$ bundle install --trust-policy HighSecurity&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If you get a message that looks like:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ERROR:  While executing gem ... (Gem::Security::Exception)&lt;br /&gt;
unsigned gems are not allowed by the High Security policy&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then please complain to your Gem author, and have them start signing their Gems.&lt;br /&gt;
&lt;br /&gt;
'''Usage in a Rails project'''&lt;br /&gt;
&lt;br /&gt;
Add the following lines to the Gemfile to the :development group ideally.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
group :development do&lt;br /&gt;
  gem 'capistrano-rails', '~&amp;gt; 0.0.7'&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= routes.rb =&lt;br /&gt;
&lt;br /&gt;
[[File:Heroku.jpg|frame|right|&amp;lt;ref&amp;gt;https://www.heroku.com/&amp;lt;/ref&amp;gt;|Heroku Logo]]&lt;br /&gt;
&lt;br /&gt;
Heroku is a cloud [http://en.wikipedia.org/wiki/Platform_as_a_service Platform as a Service] (PaaS) which supports several programming languages. PaaS is a service model of Cloud computing wherein the provider offers resources like servers, software, database, etc. to the developer. Heroku helps manage environment-specific configurations separately from the source code, which provides greater security.&lt;br /&gt;
Heroku is not just a deployment environment but it also impacts the development process. There are several principles of the development of application on Heroku.&amp;lt;br&amp;gt;&lt;br /&gt;
•	Applications and Codebases : Most of the development of the application is done on application’s codebase which is stored in a [http://en.wikipedia.org/wiki/Version_control_system Version Control System (VCS)] &amp;lt;br&amp;gt;&lt;br /&gt;
•	Dependencies : All the application dependencies such as plugins should be declared explicitly&amp;lt;br&amp;gt;&lt;br /&gt;
•	Configuration : Configuration of an application is all that varies in different deploys&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Getting Started with Heroku'''&lt;br /&gt;
&lt;br /&gt;
1. To get started with Heroku, go to https://id.heroku.com/signup/devcenter, signup for a Heroku account. &lt;br /&gt;
&lt;br /&gt;
2. Then, download and install the Heroku toolbelt at https://toolbelt.heroku.com/ for your development system. You can also use Heroku command line instead of the online Heroku application. &lt;br /&gt;
&lt;br /&gt;
3. After installing one of them, login using the email address and password used when creating the Heroku account:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ref&amp;gt;https://github.com/heroku/heroku&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ heroku login&lt;br /&gt;
Enter your Heroku credentials.&lt;br /&gt;
Email: adam@example.com&lt;br /&gt;
Password:&lt;br /&gt;
Could not find an existing public key.&lt;br /&gt;
Would you like to generate one? [Yn]&lt;br /&gt;
Generating new SSH public key.&lt;br /&gt;
Uploading SSH public key /Users/adam/.ssh/id_rsa.pub&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Deploying Applications'''&lt;br /&gt;
&lt;br /&gt;
Heroku uses [http://en.wikipedia.org/wiki/Git_(software) git] primarily to deploy the applications. When an application is created on Heroku, it associates the new git which is remote with the local git repository.&lt;br /&gt;
&lt;br /&gt;
As a result, deploying code is just the familiar git push, but to the heroku remote instead:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ref&amp;gt;https://devcenter.heroku.com/articles/how-heroku-works#deploying-applications&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ git push heroku master&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Vlad ==&lt;br /&gt;
&lt;br /&gt;
[[File:Vlad.png|frame|right|&amp;lt;ref&amp;gt;http://rubyhitsquad.com/Vlad_the_Deployer.html&amp;lt;/ref&amp;gt;|Vlad Logo]]&lt;br /&gt;
&lt;br /&gt;
Vlad is another automated deployment tool which is simple to use. It integrates with rake and uses standard tools like SSH, rsync etc.&lt;br /&gt;
&lt;br /&gt;
The main features of Vlad include&lt;br /&gt;
* It uses very few dependencies which are simple.&lt;br /&gt;
* It can execute commands on more than one server.&lt;br /&gt;
* It syncs files to one or more servers.&lt;br /&gt;
* It matches local and remote tasks.&lt;br /&gt;
* It runs tests very fast.&lt;br /&gt;
&lt;br /&gt;
'''Getting started with Vlad'''&amp;lt;ref&amp;gt;http://docs.seattlerb.org/vlad/doco/getting_started_txt.html&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create a deploy file, usually in “config/deploy.rb”:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set :application, &amp;quot;project&amp;quot;&lt;br /&gt;
set :domain, &amp;quot;example.com&amp;quot;&lt;br /&gt;
set :deploy_to, &amp;quot;/path/to/install&amp;quot;&lt;br /&gt;
set :repository, 'http://svn.example.com/project/branches/stable/'&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This defaults to using ‘svn export’ from repository, and a single server for app, db, and www.&lt;br /&gt;
&lt;br /&gt;
If you want a multi-config environment, change your config like so:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set :application, &amp;quot;project&amp;quot;&lt;br /&gt;
set :repository, 'http://svn.example.com/project/branches/stable/'&lt;br /&gt;
&lt;br /&gt;
task :beta do&lt;br /&gt;
  set :domain,    &amp;quot;beta.example.com&amp;quot;&lt;br /&gt;
  set :deploy_to, &amp;quot;/path/to/install-beta&amp;quot;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
task :dev do&lt;br /&gt;
  set :domain,    &amp;quot;dev.example.com&amp;quot;&lt;br /&gt;
  set :deploy_to, &amp;quot;/path/to/install-dev&amp;quot;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
task :prod do&lt;br /&gt;
  set :domain,    &amp;quot;example.com&amp;quot;&lt;br /&gt;
  set :deploy_to, &amp;quot;/path/to/install&amp;quot;&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Add the following to your Rakefile:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
begin&lt;br /&gt;
  require 'vlad'&lt;br /&gt;
  Vlad.load&lt;br /&gt;
rescue LoadError&lt;br /&gt;
  # do nothing&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Vlad.load has a lot of flexibility.&lt;br /&gt;
&lt;br /&gt;
You can install vlad via:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;% rake vlad:invoke COMMAND='sudo gem install vlad -y'&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Initial Launch&lt;br /&gt;
&amp;lt;pre&amp;gt;Run rake vlad:setup vlad:update vlad:migrate vlad:start&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ref&amp;gt;http://docs.seattlerb.org/vlad/index.html&amp;lt;/ref&amp;gt;&lt;br /&gt;
'''Running Vlad'''&lt;br /&gt;
&lt;br /&gt;
* Using rake&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
task :shazam! do&lt;br /&gt;
  Rake::Task[:action1].invoke&lt;br /&gt;
  Rake::Task[:action2].invoke&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Using SSH&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Host example.com&lt;br /&gt;
    User fluffy_bunny&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== AppFog == &lt;br /&gt;
&lt;br /&gt;
[[File:AppFog.jpg|frame|right|&amp;lt;ref&amp;gt;https://www.appfog.com/&amp;lt;/ref&amp;gt;|AppFog Logo]]&lt;br /&gt;
&lt;br /&gt;
AppFog is a PaaS built on Cloud Foundry which is another PaaS platform for deploying applications. &lt;br /&gt;
&lt;br /&gt;
Features of AppFog are&lt;br /&gt;
* It launches and runs fast.&lt;br /&gt;
* It does not require configuring servers or installing frameworks.&lt;br /&gt;
* It is compatible with code management systems like git, svn etc.&lt;br /&gt;
&lt;br /&gt;
'''Installing AppFog'''&amp;lt;ref&amp;gt;http://blog.appfog.com/getting-started-with-appfogs-command-line/&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
‘af‘ command line tool is written in Ruby for installation.&lt;br /&gt;
&lt;br /&gt;
Download and install [http://rubyinstaller.org/ Ruby Installer] for Windows. The installer already includes RubyGems.&lt;br /&gt;
&lt;br /&gt;
Be sure you use the Ruby-enabled command prompt window when you later install and use af. You access this command prompt from the Windows Start menu (All Programs &amp;gt; Ruby &amp;gt; Start Command Prompt with Ruby).&lt;br /&gt;
&lt;br /&gt;
Finally, update RubyGems from the Ruby Command Prompt:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem update --system&lt;br /&gt;
$ gem install af&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Login with:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ af login&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Finally from within your source code directory:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ af update hello-node&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Getting Started with AppFog'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
target [url]                                       Reports current target or sets a new target&lt;br /&gt;
login [email] [--email, --password]                Login&lt;br /&gt;
info                                               System and account information&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== AWS Elastic Beanstalk==&lt;br /&gt;
&lt;br /&gt;
[[File:AWSLogo.jpg|frame|right|&amp;lt;ref&amp;gt;https://aws.amazon.com&amp;lt;/ref&amp;gt;|AWS Logo]]&lt;br /&gt;
&lt;br /&gt;
Amazon Wen Services(AWS) offers [http://en.wikipedia.org/wiki/Infrastructure_as_a_service#Infrastructure_as_a_service_.28IaaS.29 Infrastructure as a Service] (IaaS) and provides a complete set of resources for the development of a web application in minutes. AWS Elastic Beanstalk is a deployment tool of the AWS cloud.&lt;br /&gt;
&lt;br /&gt;
With AWS Elastic Beanstalk, applications can be quickly deployed and managed in the AWS cloud without worrying about the infrastructure that runs those applications. AWS Elastic Beanstalk reduces management complexity without restricting choice or control. Once the application is uploaded AWS Elastic Beanstalk automatically handles the details of capacity provisioning, load balancing, scaling, and application health monitoring. AWS Elastic Beanstalk uses highly reliable and scalable services.&lt;br /&gt;
&lt;br /&gt;
'''AWS CLI'''&lt;br /&gt;
&lt;br /&gt;
AWS Elastic Beanstalk uses a command line tool Eb, which helps you to deploy your application easily.&lt;br /&gt;
&lt;br /&gt;
'''Getting Started with Eb'''&amp;lt;ref&amp;gt;http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/command-reference-get-started.html&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To get started with the beanstalk CLI, you will need to download the command line tools at the [http://aws.amazon.com/code/6752709412171743 AWS Sample Code &amp;amp; Libraries] website.&lt;br /&gt;
&lt;br /&gt;
Step 1: Initialize Your Git Repository&lt;br /&gt;
&lt;br /&gt;
Eb is a command line interface that enables you to deploy applications quickly and more easily using Git. Eb is available as part of the Elastic Beanstalk command line tools package. &lt;br /&gt;
&lt;br /&gt;
1. To install eb,install the following software onto your local computer:&lt;br /&gt;
&lt;br /&gt;
* Git 1.6.6 or later. To download Git, go to http://git-scm.com/.&lt;br /&gt;
* PowerShell 2.0.&lt;br /&gt;
&lt;br /&gt;
2. Initialize your Git repository.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git init &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Step 2: Configuring AWS Elastic Beanstalk&lt;br /&gt;
&lt;br /&gt;
1. From your directory where you created your local repository, type the following command.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
eb init&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2. When you are prompted for the access key ID, type your access key ID. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Enter your AWS Access Key ID (current value is &amp;quot;AKIAIOSFODNN7EXAMPLE&amp;quot;): &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3. When you are prompted for the secret access key, type your secret access key.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Enter your AWS Secret Access Key (current value is &amp;quot;wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY&amp;quot;): &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
4. When you are prompted for the AWS Elastic Beanstalk application name, type the name of the application. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Enter an AWS Elastic Beanstalk application name (auto-generated value is &amp;quot;windows&amp;quot;): &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Note:&lt;br /&gt;
If you have a space in your application name, make sure you do not use quotes.&lt;br /&gt;
&lt;br /&gt;
5. When you are prompted for the AWS Elastic Beanstalk environment name, type the name of the environment. AWS Elastic Beanstalk automatically creates an environment name based on your application name. If you want to accept the default, press Enter.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Enter an AWS Elastic Beanstalk environment name (current value is &amp;quot;HelloWorld-env&amp;quot;): &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
6. When you are prompted to create an Amazon RDS DB instance, type y or n. For this example, we'll type y.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Create an RDS DB Instance? [y/n]:&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
7. When you are prompted to enter your RDS user master password, type your password containing from 8 to 16 printable ASCII characters (excluding /, \, and @).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Enter an RDS DB master password: &lt;br /&gt;
Retype password to confirm: &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can now get started with the AWS Elastic Beanstalk.&lt;br /&gt;
&lt;br /&gt;
== OpenShift ==&lt;br /&gt;
&lt;br /&gt;
[[File:OpenShift.png|frame|right|&amp;lt;ref&amp;gt;https://en.wikipedia.org&amp;lt;/ref&amp;gt;|OpenShift Logo]]&lt;br /&gt;
&lt;br /&gt;
Another free and open source PaaS for deploying applications is OpenShift created by [[http://en.wikipedia.org/wiki/RedHat RedHat]]. &lt;br /&gt;
&lt;br /&gt;
'''Considerations'''&lt;br /&gt;
* Databases&lt;br /&gt;
&lt;br /&gt;
To use the application outside the OpenShift environment one needs to change the variables as the application is configured to use database in production mode in OpenShift.&lt;br /&gt;
&lt;br /&gt;
* Assets&lt;br /&gt;
&lt;br /&gt;
The assets are precompiled everytime application is pushed to OpenShift.&lt;br /&gt;
&lt;br /&gt;
* Security&lt;br /&gt;
&lt;br /&gt;
Security related variables are to be unique across the application.&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;ref&amp;gt;https://github.com/openshift/rails-example&amp;lt;/ref&amp;gt;&lt;br /&gt;
'''Installation'''&lt;br /&gt;
&lt;br /&gt;
1.	Create an account at http://openshift.redhat.com/&lt;br /&gt;
&lt;br /&gt;
2.	Create a rails application&lt;br /&gt;
	&amp;lt;pre&amp;gt;rhc app create -a railsapp -t ruby-1.9&amp;lt;/pre&amp;gt;&lt;br /&gt;
3.	Add mysql support to your application&lt;br /&gt;
	&amp;lt;pre&amp;gt;rhc cartridge add -a railsapp -c mysql-5.1&amp;lt;/pre&amp;gt;&lt;br /&gt;
4.	Add this upstream Rails quickstart repository&lt;br /&gt;
&amp;lt;pre&amp;gt;cd railsapp&lt;br /&gt;
git remote add upstream -m master git://github.com/openshift/rails-example.git&lt;br /&gt;
git pull -s recursive -X theirs upstream master&amp;lt;/pre&amp;gt;&lt;br /&gt;
5.	Push your new code&lt;br /&gt;
&amp;lt;pre&amp;gt;git push&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Future scope ==&lt;br /&gt;
&lt;br /&gt;
[[File:Cloud 66.jpg|frame|right|&amp;lt;ref&amp;gt;https://www.cloud66.com/&amp;lt;/ref&amp;gt;|Cloud66 Logo]]&lt;br /&gt;
&lt;br /&gt;
Cloud 66 combines the convenience of Platform-as-a-Service (PaaS) and the flexibility and control of Infrastructure-as-a-Service (IaaS). This platform allows easy deployment of application, so there is no overhead of configuring or monitoring the servers.&lt;br /&gt;
&lt;br /&gt;
'''Cloud 66 Command line Toolbelt'''&lt;br /&gt;
&lt;br /&gt;
Toolbelt is an open source released to deploy the application.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ref&amp;gt;http://blog.cloud66.com/&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Getting Started with Cloud 66'''&lt;br /&gt;
&lt;br /&gt;
1. Go to the [https://www.cloud66.com/users/sign_up sign up] page and create a Cloud 66 account.&lt;br /&gt;
&lt;br /&gt;
2. Go to Cloud 66 Dashboard and [https://www.cloud66.com/help/first_stack build your first stack].&lt;br /&gt;
&lt;br /&gt;
'''Installation'''&lt;br /&gt;
&lt;br /&gt;
Installation of toolbelt uses the following command&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Gem install c66&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This automatically searches the newest version and installs it.&lt;br /&gt;
&lt;br /&gt;
= Model Class : assignment_participant.rb =&lt;br /&gt;
Th AssignmentParticipant model class is a subclass of the participant model class. Several methods in AssignmentParticipant model class required renaming and refactoring to ensure that the change is reflected in the entire project. The names were changed to follow method naming convention. Deprecated code was removed and re-coded to ensure that the code worked in future version as well. Duplicated codes were commented. Methods that are more general to the sub classes were moved to the parent class. Some methods that calculates the collusion in reviews between students were moved to a newly created model class file called collusion_cycle.rb &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;width:3%;&amp;quot;|S. No&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;|Method Name&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;|Change Made &lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;|Reason For Change&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
|''''' 1 '''''&lt;br /&gt;
|get_course_string&lt;br /&gt;
|Renamed to course_string and refactored &lt;br /&gt;
|To follow method naming convention&lt;br /&gt;
|-&lt;br /&gt;
|''''' 2 '''''&lt;br /&gt;
|get_cycle_deviation_score&lt;br /&gt;
|Moved to collusion_cycle.rb model class&lt;br /&gt;
|Related methods that calculate collusion in reviews have been moved to the newly created collusion_cycle.rb model class&lt;br /&gt;
|-&lt;br /&gt;
|''''' 3 '''''&lt;br /&gt;
|get_cycle_similarity_score&lt;br /&gt;
|Moved to collusion_cycle.rb model class&lt;br /&gt;
|Related methods that calculate collusion in reviews have been moved to the newly created collusion_cycle.rb model class&lt;br /&gt;
|-&lt;br /&gt;
|''''' 4 '''''&lt;br /&gt;
|get_feedback&lt;br /&gt;
|Renamed to feedback and refactored&lt;br /&gt;
|To follow method naming convention&lt;br /&gt;
|-&lt;br /&gt;
|''''' 5 '''''&lt;br /&gt;
|get_files&lt;br /&gt;
|Renamed to files_in_directory  and refactored&lt;br /&gt;
|To follow method naming convention&lt;br /&gt;
|-&lt;br /&gt;
|''''' 6 '''''&lt;br /&gt;
|get_four_node_cycles&lt;br /&gt;
|Moved to collusion_cycle.rb model class&lt;br /&gt;
|Related methods that calculate collusion in reviews have been moved to the newly created collusion_cycle.rb model class&lt;br /&gt;
|-&lt;br /&gt;
|''''' 7 '''''&lt;br /&gt;
|fullname&lt;br /&gt;
|Moved to parent model class – participant.rb &lt;br /&gt;
|General methods of the subclass are moved to Parent class&lt;br /&gt;
|-&lt;br /&gt;
|''''' 8 '''''&lt;br /&gt;
|get_metareviews&lt;br /&gt;
|Renamed to metareviews and refactored&lt;br /&gt;
|To follow method naming convention&lt;br /&gt;
|-&lt;br /&gt;
|''''' 9 '''''&lt;br /&gt;
|name&lt;br /&gt;
|Commented the method  &lt;br /&gt;
|The method is already in parent model class – participant.rb and can be used in this subclass through inheritance&lt;br /&gt;
|-&lt;br /&gt;
|''''' 10 '''''&lt;br /&gt;
|name&lt;br /&gt;
|Commented the method  &lt;br /&gt;
|The method is already in parent model class – participant.rb and can be used in this subclass through inheritance. Also it is a duplicate method in patricipant.rb&lt;br /&gt;
|- &lt;br /&gt;
|''''' 11 '''''&lt;br /&gt;
|get_review_score&lt;br /&gt;
|Renamed to review_score and refactored. Deprecated code has been removed and replaced with correct code.&lt;br /&gt;
|To follow method naming convention and ensure the code works in future versions. &lt;br /&gt;
|-&lt;br /&gt;
|''''' 12 '''''&lt;br /&gt;
|get_reviewees&lt;br /&gt;
|Renamed to reviewees and refactored. Deprecated code has been removed and replaced with correct code.&lt;br /&gt;
|To follow method naming convention and ensure the code works in future versions. &lt;br /&gt;
|-&lt;br /&gt;
|''''' 13 '''''&lt;br /&gt;
|get_reviewers&lt;br /&gt;
|Renamed to reviewers and refactored . Deprecated code has been commented and replaced with correct code.&lt;br /&gt;
|To follow method naming convention and ensure the code works in future versions. &lt;br /&gt;
|-&lt;br /&gt;
|''''' 14 '''''&lt;br /&gt;
|get_reviews&lt;br /&gt;
|Renamed to reviews and refactored &lt;br /&gt;
|To follow method naming convention&lt;br /&gt;
|-&lt;br /&gt;
|''''' 15 '''''&lt;br /&gt;
|get_reviews_by_reviewer&lt;br /&gt;
|Renamed to reviews_by_reviewer and refactored &lt;br /&gt;
|To follow method naming convention&lt;br /&gt;
|-&lt;br /&gt;
|''''' 16 '''''&lt;br /&gt;
|get_reviews_by_reviewer&lt;br /&gt;
|Commented the method &lt;br /&gt;
|To remove duplicated method in this class&lt;br /&gt;
|''''' 17 '''''&lt;br /&gt;
|get_scores&lt;br /&gt;
|Renamed to scores and refactored &lt;br /&gt;
|To follow method naming convention&lt;br /&gt;
|''''' 18 '''''&lt;br /&gt;
|get_submitted_files&lt;br /&gt;
|Renamed to submitted_files and refactored &lt;br /&gt;
|To follow method naming convention&lt;br /&gt;
|''''' 19 '''''&lt;br /&gt;
|get_teammate_reviews&lt;br /&gt;
|Renamed to teammate_reviews and refactored &lt;br /&gt;
|To follow method naming convention&lt;br /&gt;
|''''' 20 '''''&lt;br /&gt;
|get_three_node_cycles&lt;br /&gt;
|Moved to collusion_cycle.rb model class&lt;br /&gt;
|Related methods that calculate collusion in reviews have been moved to the newly created collusion_cycle.rb model class&lt;br /&gt;
|''''' 21 '''''&lt;br /&gt;
|get_topic_string&lt;br /&gt;
|Method has been Commented&lt;br /&gt;
|It is already present in model super class – participant.rb&lt;br /&gt;
|''''' 22 '''''&lt;br /&gt;
|get_two_node_cycles&lt;br /&gt;
|Moved to collusion_cycle.rb model class&lt;br /&gt;
|Related methods that calculate collusion in reviews have been moved to the newly created collusion_cycle.rb model class&lt;br /&gt;
|''''' 23 '''''&lt;br /&gt;
|get_wiki_submissions&lt;br /&gt;
|Renamed to wiki_submissions and refactored&lt;br /&gt;
|To follow method naming convention&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
After changes were made, the existing tests ran successfully.&lt;br /&gt;
&lt;br /&gt;
= Comparison between Capistrano/Vlad/Heroku/AppFog/OpenShift/Cloud66/AWS Beanstalk =&lt;br /&gt;
&lt;br /&gt;
With so many automated tools available for Code Deployment and Release Management, the decision on which to use for a particular Ruby on rails application depends on various parameters to be considered.&lt;br /&gt;
Some comparative features of the different tools are as follows :&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;width:9%;&amp;quot;|Criteria for Comparision&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;|Capistrano&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;| Vlad&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;| Heroku&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;| AppFog&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;| OpenShift&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;| Cloud66&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;| AWS Beanstalk&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
|'''''Getting started with the tool'''''&lt;br /&gt;
|It is a framework that allows one to execute commands on a remote server using tools like ssh.&lt;br /&gt;
|Vlad deployment is similar to Capistrano, but less complex.&lt;br /&gt;
|Heroku’s offers a plan with first dyno free i.e. 512 MB that can be paired with Postgres starter DB to start an application with 0 initial cost&lt;br /&gt;
|AppFog’s initial plan offers 2GB of RAM free which is enough for small to medium traffic applications. By managing options provided for DB, queue server, application server, etc all part of the intial package, this is an excellent option to try out an application&lt;br /&gt;
|OpenShift is an open source platform and its free plan for starters has 3 gears for free wherein each gear consists of some RAM and disk space.&lt;br /&gt;
|Free plan provides one server for deployment.&lt;br /&gt;
|Provides an initial free tier. Without free tier no additional cost for Beanstalk. One only needs to pay for the AWS resources used.&lt;br /&gt;
|-&lt;br /&gt;
|'''''Scaling Memory'''''&lt;br /&gt;
|Memory increase would require additional servers/unused space in existing ones.&lt;br /&gt;
|Memory increase depends on additional servers available/unused space in existing ones.&lt;br /&gt;
|Memory increased in terms of dyno each of size 512 MB.&lt;br /&gt;
|Can configure any size for memory allocation&lt;br /&gt;
| -&lt;br /&gt;
| -&lt;br /&gt;
|Can automatically up/down scale the application by adjusting the default auto scaling settings.&lt;br /&gt;
|-&lt;br /&gt;
|'''''Scaling – Cost and Ease'''''&lt;br /&gt;
|While this provides greater flexibility as user is in control of the servers, it also causes additional overhead in terms of user needing to work both on Rails application and web server deployment.&lt;br /&gt;
|It can be integrated with Rake without any hindrances.&lt;br /&gt;
|Can dynamically scale up and down an application and pay as per hourly usages. Each additional dyno costs $35/mo&lt;br /&gt;
|Scaling takes up some time and need to pay for a month at the minimum. Scaling up to 4GB increases cost to $100/mo&lt;br /&gt;
| -&lt;br /&gt;
|Scaling using Cloud66 is relatively easy and hassle free.&lt;br /&gt;
|Scaling is fast and easy.&lt;br /&gt;
|-&lt;br /&gt;
|'''''Special features'''''&lt;br /&gt;
|For sensitive applications where handing over the control to a third party for deployment is not feasible, Capistrano is the way to go.&lt;br /&gt;
|It also provides support for tools like rsync and ssh.&lt;br /&gt;
|Lacks support for cross region deployment i.e. can’t select location of server where application gets deployed&lt;br /&gt;
|Supports cross region deployment i.e. if users of application primarily in Asia, can choose a server in Asia to deploy application, thus making the site faster.&lt;br /&gt;
| -&lt;br /&gt;
| -&lt;br /&gt;
|Provides complete flexibility and control of the resources to the user including the chance to take over control of some or all.&lt;br /&gt;
|-&lt;br /&gt;
|'''''Database support'''''&lt;br /&gt;
|Provides support for DB related to rails applications&lt;br /&gt;
|Provides support for DB related to rails applications&lt;br /&gt;
|It features serious production DB like RDBMS, Postgres, etc. and many Addons such as MongoDB, ClearDB, etc.&lt;br /&gt;
|Features free shared databases such as MongoDB, MySQL, Postgres but for other production DB’s need to use Addons&lt;br /&gt;
|Databases featured are MySQL, MongoDB and Postgres&lt;br /&gt;
| -&lt;br /&gt;
|Supports DB like Amazon SimpleDB, Amazon RDS, Amazon DynamoDB.&lt;br /&gt;
|-&lt;br /&gt;
|'''''Deployment strategy'''''&lt;br /&gt;
|Capistrano provides commands to be executed for automated deployment. It supports git.&lt;br /&gt;
|It is much easier to deploy using Vlad as compared to Capistrano.&lt;br /&gt;
|Deployment as easy as ‘git push’&lt;br /&gt;
|Deployment does not support git. It uses the af tool for deployment.&lt;br /&gt;
| -&lt;br /&gt;
|Since Cloud66 provides the platform in terms of Application Stack Management as a Service, it uses the infrastructure of AWS, Virtual Private Server, etc. for actual deployment. But the user doesn’t have to worry about configuration or monitoring of the servers. Hence provides easy deployment.&lt;br /&gt;
|Deployment options include Git, AWS management console, etc.&lt;br /&gt;
|-&lt;br /&gt;
|'''''Community Support availability'''''&lt;br /&gt;
| As it has been in use for a long time there is a huge community support available for Capistrano.&lt;br /&gt;
| -&lt;br /&gt;
|Heroku also provides a huge community support given the fact that there are a lot of Heroku users.&lt;br /&gt;
|Community is limited.&lt;br /&gt;
|RedHat being a reputed provider for open source solutions, the OpenShift community is gradually increasing and receiving support from a considerable community of users.&lt;br /&gt;
|Limited community support currently&lt;br /&gt;
|Has community forums and documentation.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Conclusion =&lt;br /&gt;
&lt;br /&gt;
Comparison and contrast between various deployment automated tools such as Capistrano, Heroku, Vlad, AppFog, OpenShift, Cloud66, AWS Beanstalk shows that each has its own pros and cons. &lt;br /&gt;
For instance, in a client based application where handing over the control of the application to a third party such as the deployment tool provider is impossible, AWS Beanstalk would be the obvious choice for the developer.&lt;br /&gt;
On the other hand, a novice Rails application developer might find all he needs in the starter plan of Heroku with the added bonus of a huge support community available to him for troubleshooting as he stumbles his way across the development of the application.&lt;br /&gt;
One may also choose the tool that provides the specific database support for your application. In case of large scale corporations where budgets are not that limited, the increasing costs with up-scaling of some tools would not be an obstacle.&lt;br /&gt;
Thus, various considerations about the application such as scalability requirement, security concerns, cost, availability of own resources such as servers etc., will help determine which tool is the most suitable for that application.&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= See Also =&lt;br /&gt;
&lt;br /&gt;
* Rails Solutions: Ruby on Rails Made Easy by Justin Williams&lt;br /&gt;
* http://guides.beanstalkapp.com/deployments/best-practices.html&lt;br /&gt;
* http://www.urbancode.com/anthill3-help-3.7/html/SettingUpDeploymentProcess.html&lt;br /&gt;
* http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=UseFMSGateway_3.html&lt;br /&gt;
* http://pic.dhe.ibm.com/infocenter/tivihelp/v26r1/index.jsp?topic=%2Fcom.ibm.dtm.doc%2Fdeploysoftware%2Fc_deploysw_process.html&lt;/div&gt;</summary>
		<author><name>Npari</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch2_0e808_nsv&amp;diff=81345</id>
		<title>CSC/ECE 517 Fall 2013/ch2 0e808 nsv</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch2_0e808_nsv&amp;diff=81345"/>
		<updated>2013-10-30T21:12:08Z</updated>

		<summary type="html">&lt;p&gt;Npari: /* Model Class : assignment_participant.rb */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= E808: Refactor and test Participant, AssignmentParticipant, &amp;amp; CourseParticipant =&lt;br /&gt;
The requirements provided for the Open Source System project were as follows : &amp;lt;br&amp;gt;&lt;br /&gt;
'''Classes''': &amp;lt;br&amp;gt;&lt;br /&gt;
''participant.rb'' (197 lines)&amp;lt;br&amp;gt;&lt;br /&gt;
''assignment_participant.rb'' (476 lines)&amp;lt;br&amp;gt;&lt;br /&gt;
''course_participant.rb'' (90 lines)&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''What they do''': &amp;lt;br&amp;gt; &lt;br /&gt;
These classes keep track of a user who is participating in an assignment or a course.  participant.rb is the superclass, and the other two are the subclasses.&lt;br /&gt;
&lt;br /&gt;
'''What is needed''': &amp;lt;br&amp;gt; &lt;br /&gt;
The methods are complex; there are a lot of them (assignment_particpant has 44) and there is a lot of duplicated code.  assignment_participant contains code for detecting cycles of high grades (which can indicate collusion in reviews).  It would be better moved to another class.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
= Introduction =&lt;br /&gt;
&lt;br /&gt;
The Deploying process involves different stages like development, testing, release management and sign-off by project teams.&lt;br /&gt;
&lt;br /&gt;
The following diagram illustrates the deployment process of an application.&lt;br /&gt;
&lt;br /&gt;
[[File:Deployment Process.jpg|frame|center|&amp;lt;ref&amp;gt;http://technet.microsoft.com/en-us/library/cc465178.aspx&amp;lt;/ref&amp;gt;]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The deployment flow has three stages: development and testing, release management and stakeholders and project teams. &lt;br /&gt;
&lt;br /&gt;
After the final release of the code in development and testing stage, the master plan is prepared for deployment of components and sites based on the sign-offs provided by the project teams, stakeholders and customers. Then, the stabilization of the deployment is calculated based on some metrics. Once the deployment is stabilized, it is reviewed and the process of deployment is complete. The final sign-off is given by the stakeholders.&lt;br /&gt;
&lt;br /&gt;
=Participant model: participant.rb=&lt;br /&gt;
&lt;br /&gt;
Code deployment is a procedure where the application is transferred onto a production server, so that it is made available for all the other users. It is the part of release management process which involves several activities. These activities are inter-dependent and need to be completed in a specific order for successful code deployment. &lt;br /&gt;
&lt;br /&gt;
'''Code Deployment Activities'''&lt;br /&gt;
&lt;br /&gt;
The various deployment activities include &amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/Software_deployment&amp;lt;/ref&amp;gt;&lt;br /&gt;
* Release : Gathering all system components in preparation for deployment&lt;br /&gt;
* Install and activate : Installing the application components and getting them in the 'ready' state&lt;br /&gt;
* Deactivate : Shutting down components that are out-dated or that may interfere with updating others&lt;br /&gt;
* Adapt : Making changes to application to accommodate changes in environment&lt;br /&gt;
* Update : Having a newer release installed in place of the old one&lt;br /&gt;
* Built-in : There are components built-into some tools for complete/semi-automating updates&lt;br /&gt;
* Version tracking : These systems help the user to know if newer versions of a software are available and if yes, help install them&lt;br /&gt;
* Uninstall : Opposite of installation and involves complete removal of software and its dependencies from the environment&lt;br /&gt;
* Retire : This involves making a software obsolete and is the end of software life cycle&lt;br /&gt;
&lt;br /&gt;
The general guidelines for the deployment process remain the same but there are variations in the specific requirements with each software system.&lt;br /&gt;
&lt;br /&gt;
=AssignmentParticipant model: assignment_participant.rb=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ref&amp;gt;http://searchitchannel.techtarget.com/definition/release-management&amp;lt;/ref&amp;gt;&lt;br /&gt;
Release management is a software process which takes care of the development, testing, deployment and support stages of software releases. The start of release management happens in the development phase, where it requests for new features or changes in the existing application. When the request is accepted, a new release is planned and designed. This design is built and then enters the testing phase, where the release is tested until it is accepted. After the release is accepted as a candidate, it enters the deployment phase where it is implemented. Once deployed, the release is made available and sent to support phase for collection of bug reports. Once the support phase is done, the bugs and other issues lead to requests for changes and the cycle is then repeated.&lt;br /&gt;
&lt;br /&gt;
=CourseParticipant model:course_participant.rb =&lt;br /&gt;
&amp;lt;ref&amp;gt;http://www.urbancode.com/html/solutions/deployment-automation.html&amp;lt;/ref&amp;gt;&lt;br /&gt;
Automation of a process is required when the manual process is more error prone. Also, for large real world applications, the manual process is very complex and time consuming. Incomplete documentation hampers a manual process further. Deployment also has to be done in many environments and involves varied steps to be followed in a specific order. Manual process needs repetition of same procedure to each and every environment which leads to many errors and the process becomes costly.&lt;br /&gt;
In web applications each new release has to be deployed to and tested in development, testing and production environments.The number of software releases in web applications  are more and hence the need to automate release management is also greater.&lt;br /&gt;
&lt;br /&gt;
Automation of deployment delivers applications faster and with fewer errors. The defined software deployment process can be applied across all environments consistently every time. With various automated application deployment platforms now readily available, manual deployments have become a thing of the past.&lt;br /&gt;
&lt;br /&gt;
Lets take a look at the various Deployment Automation tools available to Ruby on Rails applications. For the purposes of this article the process of manual deployment of a Ruby on Rails application is out of scope.&lt;br /&gt;
&lt;br /&gt;
= Tests =&lt;br /&gt;
&lt;br /&gt;
Some of the automated tools that are widely used for the process of deployment with Ruby on Rails are &lt;br /&gt;
&lt;br /&gt;
* Capistrano&lt;br /&gt;
* Heroku&lt;br /&gt;
* Vlad&lt;br /&gt;
* AppFog&lt;br /&gt;
* AWS Elastic Beanstalk&lt;br /&gt;
* OpenShift&lt;br /&gt;
* Cloud 66&lt;br /&gt;
&lt;br /&gt;
= yml files =&lt;br /&gt;
&lt;br /&gt;
[[File:Capistrano.jpg|frame|right|&amp;lt;ref&amp;gt;http://www.capistranorb.com/&amp;lt;/ref&amp;gt;|Capistrano Logo]]&lt;br /&gt;
&lt;br /&gt;
Capistrano is a Ruby tool which helps deploy an application to the server. Capistrano allows deploying to multiple machines at a time. It has many advanced options which help to deploy different kinds of applications. It also supports the scripting and execution of tasks.&lt;br /&gt;
&lt;br /&gt;
Capistrano can be used to:&lt;br /&gt;
&lt;br /&gt;
* Deploy applications onto many machines simultaneously.&lt;br /&gt;
* Automate the audits&lt;br /&gt;
* Automate the common tasks of a team.&lt;br /&gt;
&lt;br /&gt;
Capistrano can be made a part of a larger software by integrating it with another Ruby software.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ref&amp;gt;http://www.capistranorb.com/documentation/getting-started/installation/&amp;lt;/ref&amp;gt;  &lt;br /&gt;
'''General Usage'''&lt;br /&gt;
&lt;br /&gt;
The following commands will clone Capistrano, build the gem and install it locally.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem install capistrano --pre --trust-policy HighSecurity&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Or grab the bleeding edge head from:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ git clone -b v3 https://github.com/capistrano/capistrano.git&lt;br /&gt;
$ cd capistrano&lt;br /&gt;
$ gem build *.gemspec&lt;br /&gt;
$ gem install *.gem&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
'''Signed Rubygems'''&lt;br /&gt;
&lt;br /&gt;
As Capistrano is a signed gem, you should always be careful to use the --trust-policy flag when installing Gems, or since Bundler 1.3 you should use the same flag:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem install capistrano --pre --trust-policy HighSecurity&lt;br /&gt;
$ bundle install --trust-policy HighSecurity&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If you get a message that looks like:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ERROR:  While executing gem ... (Gem::Security::Exception)&lt;br /&gt;
unsigned gems are not allowed by the High Security policy&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then please complain to your Gem author, and have them start signing their Gems.&lt;br /&gt;
&lt;br /&gt;
'''Usage in a Rails project'''&lt;br /&gt;
&lt;br /&gt;
Add the following lines to the Gemfile to the :development group ideally.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
group :development do&lt;br /&gt;
  gem 'capistrano-rails', '~&amp;gt; 0.0.7'&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= routes.rb =&lt;br /&gt;
&lt;br /&gt;
[[File:Heroku.jpg|frame|right|&amp;lt;ref&amp;gt;https://www.heroku.com/&amp;lt;/ref&amp;gt;|Heroku Logo]]&lt;br /&gt;
&lt;br /&gt;
Heroku is a cloud [http://en.wikipedia.org/wiki/Platform_as_a_service Platform as a Service] (PaaS) which supports several programming languages. PaaS is a service model of Cloud computing wherein the provider offers resources like servers, software, database, etc. to the developer. Heroku helps manage environment-specific configurations separately from the source code, which provides greater security.&lt;br /&gt;
Heroku is not just a deployment environment but it also impacts the development process. There are several principles of the development of application on Heroku.&amp;lt;br&amp;gt;&lt;br /&gt;
•	Applications and Codebases : Most of the development of the application is done on application’s codebase which is stored in a [http://en.wikipedia.org/wiki/Version_control_system Version Control System (VCS)] &amp;lt;br&amp;gt;&lt;br /&gt;
•	Dependencies : All the application dependencies such as plugins should be declared explicitly&amp;lt;br&amp;gt;&lt;br /&gt;
•	Configuration : Configuration of an application is all that varies in different deploys&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Getting Started with Heroku'''&lt;br /&gt;
&lt;br /&gt;
1. To get started with Heroku, go to https://id.heroku.com/signup/devcenter, signup for a Heroku account. &lt;br /&gt;
&lt;br /&gt;
2. Then, download and install the Heroku toolbelt at https://toolbelt.heroku.com/ for your development system. You can also use Heroku command line instead of the online Heroku application. &lt;br /&gt;
&lt;br /&gt;
3. After installing one of them, login using the email address and password used when creating the Heroku account:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ref&amp;gt;https://github.com/heroku/heroku&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ heroku login&lt;br /&gt;
Enter your Heroku credentials.&lt;br /&gt;
Email: adam@example.com&lt;br /&gt;
Password:&lt;br /&gt;
Could not find an existing public key.&lt;br /&gt;
Would you like to generate one? [Yn]&lt;br /&gt;
Generating new SSH public key.&lt;br /&gt;
Uploading SSH public key /Users/adam/.ssh/id_rsa.pub&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Deploying Applications'''&lt;br /&gt;
&lt;br /&gt;
Heroku uses [http://en.wikipedia.org/wiki/Git_(software) git] primarily to deploy the applications. When an application is created on Heroku, it associates the new git which is remote with the local git repository.&lt;br /&gt;
&lt;br /&gt;
As a result, deploying code is just the familiar git push, but to the heroku remote instead:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ref&amp;gt;https://devcenter.heroku.com/articles/how-heroku-works#deploying-applications&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ git push heroku master&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Vlad ==&lt;br /&gt;
&lt;br /&gt;
[[File:Vlad.png|frame|right|&amp;lt;ref&amp;gt;http://rubyhitsquad.com/Vlad_the_Deployer.html&amp;lt;/ref&amp;gt;|Vlad Logo]]&lt;br /&gt;
&lt;br /&gt;
Vlad is another automated deployment tool which is simple to use. It integrates with rake and uses standard tools like SSH, rsync etc.&lt;br /&gt;
&lt;br /&gt;
The main features of Vlad include&lt;br /&gt;
* It uses very few dependencies which are simple.&lt;br /&gt;
* It can execute commands on more than one server.&lt;br /&gt;
* It syncs files to one or more servers.&lt;br /&gt;
* It matches local and remote tasks.&lt;br /&gt;
* It runs tests very fast.&lt;br /&gt;
&lt;br /&gt;
'''Getting started with Vlad'''&amp;lt;ref&amp;gt;http://docs.seattlerb.org/vlad/doco/getting_started_txt.html&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create a deploy file, usually in “config/deploy.rb”:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set :application, &amp;quot;project&amp;quot;&lt;br /&gt;
set :domain, &amp;quot;example.com&amp;quot;&lt;br /&gt;
set :deploy_to, &amp;quot;/path/to/install&amp;quot;&lt;br /&gt;
set :repository, 'http://svn.example.com/project/branches/stable/'&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This defaults to using ‘svn export’ from repository, and a single server for app, db, and www.&lt;br /&gt;
&lt;br /&gt;
If you want a multi-config environment, change your config like so:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set :application, &amp;quot;project&amp;quot;&lt;br /&gt;
set :repository, 'http://svn.example.com/project/branches/stable/'&lt;br /&gt;
&lt;br /&gt;
task :beta do&lt;br /&gt;
  set :domain,    &amp;quot;beta.example.com&amp;quot;&lt;br /&gt;
  set :deploy_to, &amp;quot;/path/to/install-beta&amp;quot;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
task :dev do&lt;br /&gt;
  set :domain,    &amp;quot;dev.example.com&amp;quot;&lt;br /&gt;
  set :deploy_to, &amp;quot;/path/to/install-dev&amp;quot;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
task :prod do&lt;br /&gt;
  set :domain,    &amp;quot;example.com&amp;quot;&lt;br /&gt;
  set :deploy_to, &amp;quot;/path/to/install&amp;quot;&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Add the following to your Rakefile:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
begin&lt;br /&gt;
  require 'vlad'&lt;br /&gt;
  Vlad.load&lt;br /&gt;
rescue LoadError&lt;br /&gt;
  # do nothing&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Vlad.load has a lot of flexibility.&lt;br /&gt;
&lt;br /&gt;
You can install vlad via:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;% rake vlad:invoke COMMAND='sudo gem install vlad -y'&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Initial Launch&lt;br /&gt;
&amp;lt;pre&amp;gt;Run rake vlad:setup vlad:update vlad:migrate vlad:start&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ref&amp;gt;http://docs.seattlerb.org/vlad/index.html&amp;lt;/ref&amp;gt;&lt;br /&gt;
'''Running Vlad'''&lt;br /&gt;
&lt;br /&gt;
* Using rake&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
task :shazam! do&lt;br /&gt;
  Rake::Task[:action1].invoke&lt;br /&gt;
  Rake::Task[:action2].invoke&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Using SSH&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Host example.com&lt;br /&gt;
    User fluffy_bunny&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== AppFog == &lt;br /&gt;
&lt;br /&gt;
[[File:AppFog.jpg|frame|right|&amp;lt;ref&amp;gt;https://www.appfog.com/&amp;lt;/ref&amp;gt;|AppFog Logo]]&lt;br /&gt;
&lt;br /&gt;
AppFog is a PaaS built on Cloud Foundry which is another PaaS platform for deploying applications. &lt;br /&gt;
&lt;br /&gt;
Features of AppFog are&lt;br /&gt;
* It launches and runs fast.&lt;br /&gt;
* It does not require configuring servers or installing frameworks.&lt;br /&gt;
* It is compatible with code management systems like git, svn etc.&lt;br /&gt;
&lt;br /&gt;
'''Installing AppFog'''&amp;lt;ref&amp;gt;http://blog.appfog.com/getting-started-with-appfogs-command-line/&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
‘af‘ command line tool is written in Ruby for installation.&lt;br /&gt;
&lt;br /&gt;
Download and install [http://rubyinstaller.org/ Ruby Installer] for Windows. The installer already includes RubyGems.&lt;br /&gt;
&lt;br /&gt;
Be sure you use the Ruby-enabled command prompt window when you later install and use af. You access this command prompt from the Windows Start menu (All Programs &amp;gt; Ruby &amp;gt; Start Command Prompt with Ruby).&lt;br /&gt;
&lt;br /&gt;
Finally, update RubyGems from the Ruby Command Prompt:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem update --system&lt;br /&gt;
$ gem install af&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Login with:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ af login&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Finally from within your source code directory:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ af update hello-node&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Getting Started with AppFog'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
target [url]                                       Reports current target or sets a new target&lt;br /&gt;
login [email] [--email, --password]                Login&lt;br /&gt;
info                                               System and account information&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== AWS Elastic Beanstalk==&lt;br /&gt;
&lt;br /&gt;
[[File:AWSLogo.jpg|frame|right|&amp;lt;ref&amp;gt;https://aws.amazon.com&amp;lt;/ref&amp;gt;|AWS Logo]]&lt;br /&gt;
&lt;br /&gt;
Amazon Wen Services(AWS) offers [http://en.wikipedia.org/wiki/Infrastructure_as_a_service#Infrastructure_as_a_service_.28IaaS.29 Infrastructure as a Service] (IaaS) and provides a complete set of resources for the development of a web application in minutes. AWS Elastic Beanstalk is a deployment tool of the AWS cloud.&lt;br /&gt;
&lt;br /&gt;
With AWS Elastic Beanstalk, applications can be quickly deployed and managed in the AWS cloud without worrying about the infrastructure that runs those applications. AWS Elastic Beanstalk reduces management complexity without restricting choice or control. Once the application is uploaded AWS Elastic Beanstalk automatically handles the details of capacity provisioning, load balancing, scaling, and application health monitoring. AWS Elastic Beanstalk uses highly reliable and scalable services.&lt;br /&gt;
&lt;br /&gt;
'''AWS CLI'''&lt;br /&gt;
&lt;br /&gt;
AWS Elastic Beanstalk uses a command line tool Eb, which helps you to deploy your application easily.&lt;br /&gt;
&lt;br /&gt;
'''Getting Started with Eb'''&amp;lt;ref&amp;gt;http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/command-reference-get-started.html&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To get started with the beanstalk CLI, you will need to download the command line tools at the [http://aws.amazon.com/code/6752709412171743 AWS Sample Code &amp;amp; Libraries] website.&lt;br /&gt;
&lt;br /&gt;
Step 1: Initialize Your Git Repository&lt;br /&gt;
&lt;br /&gt;
Eb is a command line interface that enables you to deploy applications quickly and more easily using Git. Eb is available as part of the Elastic Beanstalk command line tools package. &lt;br /&gt;
&lt;br /&gt;
1. To install eb,install the following software onto your local computer:&lt;br /&gt;
&lt;br /&gt;
* Git 1.6.6 or later. To download Git, go to http://git-scm.com/.&lt;br /&gt;
* PowerShell 2.0.&lt;br /&gt;
&lt;br /&gt;
2. Initialize your Git repository.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git init &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Step 2: Configuring AWS Elastic Beanstalk&lt;br /&gt;
&lt;br /&gt;
1. From your directory where you created your local repository, type the following command.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
eb init&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2. When you are prompted for the access key ID, type your access key ID. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Enter your AWS Access Key ID (current value is &amp;quot;AKIAIOSFODNN7EXAMPLE&amp;quot;): &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3. When you are prompted for the secret access key, type your secret access key.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Enter your AWS Secret Access Key (current value is &amp;quot;wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY&amp;quot;): &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
4. When you are prompted for the AWS Elastic Beanstalk application name, type the name of the application. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Enter an AWS Elastic Beanstalk application name (auto-generated value is &amp;quot;windows&amp;quot;): &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Note:&lt;br /&gt;
If you have a space in your application name, make sure you do not use quotes.&lt;br /&gt;
&lt;br /&gt;
5. When you are prompted for the AWS Elastic Beanstalk environment name, type the name of the environment. AWS Elastic Beanstalk automatically creates an environment name based on your application name. If you want to accept the default, press Enter.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Enter an AWS Elastic Beanstalk environment name (current value is &amp;quot;HelloWorld-env&amp;quot;): &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
6. When you are prompted to create an Amazon RDS DB instance, type y or n. For this example, we'll type y.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Create an RDS DB Instance? [y/n]:&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
7. When you are prompted to enter your RDS user master password, type your password containing from 8 to 16 printable ASCII characters (excluding /, \, and @).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Enter an RDS DB master password: &lt;br /&gt;
Retype password to confirm: &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can now get started with the AWS Elastic Beanstalk.&lt;br /&gt;
&lt;br /&gt;
== OpenShift ==&lt;br /&gt;
&lt;br /&gt;
[[File:OpenShift.png|frame|right|&amp;lt;ref&amp;gt;https://en.wikipedia.org&amp;lt;/ref&amp;gt;|OpenShift Logo]]&lt;br /&gt;
&lt;br /&gt;
Another free and open source PaaS for deploying applications is OpenShift created by [[http://en.wikipedia.org/wiki/RedHat RedHat]]. &lt;br /&gt;
&lt;br /&gt;
'''Considerations'''&lt;br /&gt;
* Databases&lt;br /&gt;
&lt;br /&gt;
To use the application outside the OpenShift environment one needs to change the variables as the application is configured to use database in production mode in OpenShift.&lt;br /&gt;
&lt;br /&gt;
* Assets&lt;br /&gt;
&lt;br /&gt;
The assets are precompiled everytime application is pushed to OpenShift.&lt;br /&gt;
&lt;br /&gt;
* Security&lt;br /&gt;
&lt;br /&gt;
Security related variables are to be unique across the application.&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;ref&amp;gt;https://github.com/openshift/rails-example&amp;lt;/ref&amp;gt;&lt;br /&gt;
'''Installation'''&lt;br /&gt;
&lt;br /&gt;
1.	Create an account at http://openshift.redhat.com/&lt;br /&gt;
&lt;br /&gt;
2.	Create a rails application&lt;br /&gt;
	&amp;lt;pre&amp;gt;rhc app create -a railsapp -t ruby-1.9&amp;lt;/pre&amp;gt;&lt;br /&gt;
3.	Add mysql support to your application&lt;br /&gt;
	&amp;lt;pre&amp;gt;rhc cartridge add -a railsapp -c mysql-5.1&amp;lt;/pre&amp;gt;&lt;br /&gt;
4.	Add this upstream Rails quickstart repository&lt;br /&gt;
&amp;lt;pre&amp;gt;cd railsapp&lt;br /&gt;
git remote add upstream -m master git://github.com/openshift/rails-example.git&lt;br /&gt;
git pull -s recursive -X theirs upstream master&amp;lt;/pre&amp;gt;&lt;br /&gt;
5.	Push your new code&lt;br /&gt;
&amp;lt;pre&amp;gt;git push&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Future scope ==&lt;br /&gt;
&lt;br /&gt;
[[File:Cloud 66.jpg|frame|right|&amp;lt;ref&amp;gt;https://www.cloud66.com/&amp;lt;/ref&amp;gt;|Cloud66 Logo]]&lt;br /&gt;
&lt;br /&gt;
Cloud 66 combines the convenience of Platform-as-a-Service (PaaS) and the flexibility and control of Infrastructure-as-a-Service (IaaS). This platform allows easy deployment of application, so there is no overhead of configuring or monitoring the servers.&lt;br /&gt;
&lt;br /&gt;
'''Cloud 66 Command line Toolbelt'''&lt;br /&gt;
&lt;br /&gt;
Toolbelt is an open source released to deploy the application.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ref&amp;gt;http://blog.cloud66.com/&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Getting Started with Cloud 66'''&lt;br /&gt;
&lt;br /&gt;
1. Go to the [https://www.cloud66.com/users/sign_up sign up] page and create a Cloud 66 account.&lt;br /&gt;
&lt;br /&gt;
2. Go to Cloud 66 Dashboard and [https://www.cloud66.com/help/first_stack build your first stack].&lt;br /&gt;
&lt;br /&gt;
'''Installation'''&lt;br /&gt;
&lt;br /&gt;
Installation of toolbelt uses the following command&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Gem install c66&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This automatically searches the newest version and installs it.&lt;br /&gt;
&lt;br /&gt;
= Model Class : assignment_participant.rb =&lt;br /&gt;
Th AssignmentParticipant model class is a subclass of the participant model class. Several methods in AssignmentParticipant model class required renaming and refactoring to ensure that the change is reflected in the entire project. The names were changed to follow method naming convention. Deprecated code was removed and re-coded to ensure that the code worked in future version as well. Duplicated codes were commented. Methods that are more general to the sub classes were moved to the parent class. Some methods that calculates the collusion in reviews between students were moved to a newly created model class file called collusion_cycle.rb &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;width:3%;&amp;quot;|S. No&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;|Method Name&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;|Change Made &lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;|Reason For Change&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
|''''' 1 '''''&lt;br /&gt;
|get_course_string&lt;br /&gt;
|Renamed to course_string and refactored &lt;br /&gt;
|To follow method naming convention&lt;br /&gt;
|-&lt;br /&gt;
|''''' 2 '''''&lt;br /&gt;
|get_cycle_deviation_score&lt;br /&gt;
|Moved to collusion_cycle.rb model class&lt;br /&gt;
|Related methods that calculate collusion in reviews have been moved to the newly created collusion_cycle.rb model class&lt;br /&gt;
|-&lt;br /&gt;
|''''' 3 '''''&lt;br /&gt;
|get_cycle_similarity_score&lt;br /&gt;
|Moved to collusion_cycle.rb model class&lt;br /&gt;
|Related methods that calculate collusion in reviews have been moved to the newly created collusion_cycle.rb model class&lt;br /&gt;
|-&lt;br /&gt;
|''''' 4 '''''&lt;br /&gt;
|get_feedback&lt;br /&gt;
|Renamed to feedback and refactored&lt;br /&gt;
|To follow method naming convention&lt;br /&gt;
|-&lt;br /&gt;
|''''' 5 '''''&lt;br /&gt;
|get_files&lt;br /&gt;
|Renamed to files_in_directory  and refactored&lt;br /&gt;
|To follow method naming convention&lt;br /&gt;
|-&lt;br /&gt;
|''''' 6 '''''&lt;br /&gt;
|get_four_node_cycles&lt;br /&gt;
|Moved to collusion_cycle.rb model class&lt;br /&gt;
|Related methods that calculate collusion in reviews have been moved to the newly created collusion_cycle.rb model class&lt;br /&gt;
|-&lt;br /&gt;
|''''' 7 '''''&lt;br /&gt;
|fullname&lt;br /&gt;
|Moved to parent model class – participant.rb &lt;br /&gt;
|General methods of the subclass are moved to Parent class&lt;br /&gt;
|-&lt;br /&gt;
|''''' 8 '''''&lt;br /&gt;
|get_metareviews&lt;br /&gt;
|Renamed to metareviews and refactored&lt;br /&gt;
|To follow method naming convention&lt;br /&gt;
|-&lt;br /&gt;
|''''' 9 '''''&lt;br /&gt;
|name&lt;br /&gt;
|Commented the method  &lt;br /&gt;
|The method is already in parent model class – participant.rb and can be used in this subclass through inheritance&lt;br /&gt;
|-&lt;br /&gt;
|''''' 10 '''''&lt;br /&gt;
|name&lt;br /&gt;
|Commented the method  &lt;br /&gt;
|The method is already in parent model class – participant.rb and can be used in this subclass through inheritance. Also it is a duplicate method in patricipant.rb&lt;br /&gt;
|- &lt;br /&gt;
|''''' 11 '''''&lt;br /&gt;
|get_review_score&lt;br /&gt;
|Renamed to review_score and refactored. Deprecated code has been removed and replaced with correct code.&lt;br /&gt;
|To follow method naming convention and ensure the code works in future versions. &lt;br /&gt;
|-&lt;br /&gt;
|''''' 12 '''''&lt;br /&gt;
|get_reviewees&lt;br /&gt;
|Renamed to reviewees and refactored. Deprecated code has been removed and replaced with correct code.&lt;br /&gt;
|To follow method naming convention and ensure the code works in future versions. &lt;br /&gt;
|-&lt;br /&gt;
|''''' 13 '''''&lt;br /&gt;
|get_reviewers&lt;br /&gt;
|Renamed to reviewers and refactored . Deprecated code has been commented and replaced with correct code.&lt;br /&gt;
|To follow method naming convention and ensure the code works in future versions. &lt;br /&gt;
|-&lt;br /&gt;
|''''' 14 '''''&lt;br /&gt;
|get_reviews&lt;br /&gt;
|Renamed to reviews and refactored &lt;br /&gt;
|To follow method naming convention&lt;br /&gt;
|-&lt;br /&gt;
|''''' 15 '''''&lt;br /&gt;
|get_reviews_by_reviewer&lt;br /&gt;
|Renamed to reviews_by_reviewer and refactored &lt;br /&gt;
|To follow method naming convention&lt;br /&gt;
|-&lt;br /&gt;
|''''' 16 '''''&lt;br /&gt;
|get_reviews_by_reviewer&lt;br /&gt;
|Commented the method &lt;br /&gt;
|To remove duplicated method in this class&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
After changes were made, the existing tests ran successfully.&lt;br /&gt;
&lt;br /&gt;
= Comparison between Capistrano/Vlad/Heroku/AppFog/OpenShift/Cloud66/AWS Beanstalk =&lt;br /&gt;
&lt;br /&gt;
With so many automated tools available for Code Deployment and Release Management, the decision on which to use for a particular Ruby on rails application depends on various parameters to be considered.&lt;br /&gt;
Some comparative features of the different tools are as follows :&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;width:9%;&amp;quot;|Criteria for Comparision&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;|Capistrano&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;| Vlad&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;| Heroku&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;| AppFog&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;| OpenShift&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;| Cloud66&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;| AWS Beanstalk&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
|'''''Getting started with the tool'''''&lt;br /&gt;
|It is a framework that allows one to execute commands on a remote server using tools like ssh.&lt;br /&gt;
|Vlad deployment is similar to Capistrano, but less complex.&lt;br /&gt;
|Heroku’s offers a plan with first dyno free i.e. 512 MB that can be paired with Postgres starter DB to start an application with 0 initial cost&lt;br /&gt;
|AppFog’s initial plan offers 2GB of RAM free which is enough for small to medium traffic applications. By managing options provided for DB, queue server, application server, etc all part of the intial package, this is an excellent option to try out an application&lt;br /&gt;
|OpenShift is an open source platform and its free plan for starters has 3 gears for free wherein each gear consists of some RAM and disk space.&lt;br /&gt;
|Free plan provides one server for deployment.&lt;br /&gt;
|Provides an initial free tier. Without free tier no additional cost for Beanstalk. One only needs to pay for the AWS resources used.&lt;br /&gt;
|-&lt;br /&gt;
|'''''Scaling Memory'''''&lt;br /&gt;
|Memory increase would require additional servers/unused space in existing ones.&lt;br /&gt;
|Memory increase depends on additional servers available/unused space in existing ones.&lt;br /&gt;
|Memory increased in terms of dyno each of size 512 MB.&lt;br /&gt;
|Can configure any size for memory allocation&lt;br /&gt;
| -&lt;br /&gt;
| -&lt;br /&gt;
|Can automatically up/down scale the application by adjusting the default auto scaling settings.&lt;br /&gt;
|-&lt;br /&gt;
|'''''Scaling – Cost and Ease'''''&lt;br /&gt;
|While this provides greater flexibility as user is in control of the servers, it also causes additional overhead in terms of user needing to work both on Rails application and web server deployment.&lt;br /&gt;
|It can be integrated with Rake without any hindrances.&lt;br /&gt;
|Can dynamically scale up and down an application and pay as per hourly usages. Each additional dyno costs $35/mo&lt;br /&gt;
|Scaling takes up some time and need to pay for a month at the minimum. Scaling up to 4GB increases cost to $100/mo&lt;br /&gt;
| -&lt;br /&gt;
|Scaling using Cloud66 is relatively easy and hassle free.&lt;br /&gt;
|Scaling is fast and easy.&lt;br /&gt;
|-&lt;br /&gt;
|'''''Special features'''''&lt;br /&gt;
|For sensitive applications where handing over the control to a third party for deployment is not feasible, Capistrano is the way to go.&lt;br /&gt;
|It also provides support for tools like rsync and ssh.&lt;br /&gt;
|Lacks support for cross region deployment i.e. can’t select location of server where application gets deployed&lt;br /&gt;
|Supports cross region deployment i.e. if users of application primarily in Asia, can choose a server in Asia to deploy application, thus making the site faster.&lt;br /&gt;
| -&lt;br /&gt;
| -&lt;br /&gt;
|Provides complete flexibility and control of the resources to the user including the chance to take over control of some or all.&lt;br /&gt;
|-&lt;br /&gt;
|'''''Database support'''''&lt;br /&gt;
|Provides support for DB related to rails applications&lt;br /&gt;
|Provides support for DB related to rails applications&lt;br /&gt;
|It features serious production DB like RDBMS, Postgres, etc. and many Addons such as MongoDB, ClearDB, etc.&lt;br /&gt;
|Features free shared databases such as MongoDB, MySQL, Postgres but for other production DB’s need to use Addons&lt;br /&gt;
|Databases featured are MySQL, MongoDB and Postgres&lt;br /&gt;
| -&lt;br /&gt;
|Supports DB like Amazon SimpleDB, Amazon RDS, Amazon DynamoDB.&lt;br /&gt;
|-&lt;br /&gt;
|'''''Deployment strategy'''''&lt;br /&gt;
|Capistrano provides commands to be executed for automated deployment. It supports git.&lt;br /&gt;
|It is much easier to deploy using Vlad as compared to Capistrano.&lt;br /&gt;
|Deployment as easy as ‘git push’&lt;br /&gt;
|Deployment does not support git. It uses the af tool for deployment.&lt;br /&gt;
| -&lt;br /&gt;
|Since Cloud66 provides the platform in terms of Application Stack Management as a Service, it uses the infrastructure of AWS, Virtual Private Server, etc. for actual deployment. But the user doesn’t have to worry about configuration or monitoring of the servers. Hence provides easy deployment.&lt;br /&gt;
|Deployment options include Git, AWS management console, etc.&lt;br /&gt;
|-&lt;br /&gt;
|'''''Community Support availability'''''&lt;br /&gt;
| As it has been in use for a long time there is a huge community support available for Capistrano.&lt;br /&gt;
| -&lt;br /&gt;
|Heroku also provides a huge community support given the fact that there are a lot of Heroku users.&lt;br /&gt;
|Community is limited.&lt;br /&gt;
|RedHat being a reputed provider for open source solutions, the OpenShift community is gradually increasing and receiving support from a considerable community of users.&lt;br /&gt;
|Limited community support currently&lt;br /&gt;
|Has community forums and documentation.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Conclusion =&lt;br /&gt;
&lt;br /&gt;
Comparison and contrast between various deployment automated tools such as Capistrano, Heroku, Vlad, AppFog, OpenShift, Cloud66, AWS Beanstalk shows that each has its own pros and cons. &lt;br /&gt;
For instance, in a client based application where handing over the control of the application to a third party such as the deployment tool provider is impossible, AWS Beanstalk would be the obvious choice for the developer.&lt;br /&gt;
On the other hand, a novice Rails application developer might find all he needs in the starter plan of Heroku with the added bonus of a huge support community available to him for troubleshooting as he stumbles his way across the development of the application.&lt;br /&gt;
One may also choose the tool that provides the specific database support for your application. In case of large scale corporations where budgets are not that limited, the increasing costs with up-scaling of some tools would not be an obstacle.&lt;br /&gt;
Thus, various considerations about the application such as scalability requirement, security concerns, cost, availability of own resources such as servers etc., will help determine which tool is the most suitable for that application.&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= See Also =&lt;br /&gt;
&lt;br /&gt;
* Rails Solutions: Ruby on Rails Made Easy by Justin Williams&lt;br /&gt;
* http://guides.beanstalkapp.com/deployments/best-practices.html&lt;br /&gt;
* http://www.urbancode.com/anthill3-help-3.7/html/SettingUpDeploymentProcess.html&lt;br /&gt;
* http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=UseFMSGateway_3.html&lt;br /&gt;
* http://pic.dhe.ibm.com/infocenter/tivihelp/v26r1/index.jsp?topic=%2Fcom.ibm.dtm.doc%2Fdeploysoftware%2Fc_deploysw_process.html&lt;/div&gt;</summary>
		<author><name>Npari</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch2_0e808_nsv&amp;diff=81343</id>
		<title>CSC/ECE 517 Fall 2013/ch2 0e808 nsv</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch2_0e808_nsv&amp;diff=81343"/>
		<updated>2013-10-30T21:11:22Z</updated>

		<summary type="html">&lt;p&gt;Npari: /* Model Class : assignment_participant.rb */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= E808: Refactor and test Participant, AssignmentParticipant, &amp;amp; CourseParticipant =&lt;br /&gt;
The requirements provided for the Open Source System project were as follows : &amp;lt;br&amp;gt;&lt;br /&gt;
'''Classes''': &amp;lt;br&amp;gt;&lt;br /&gt;
''participant.rb'' (197 lines)&amp;lt;br&amp;gt;&lt;br /&gt;
''assignment_participant.rb'' (476 lines)&amp;lt;br&amp;gt;&lt;br /&gt;
''course_participant.rb'' (90 lines)&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''What they do''': &amp;lt;br&amp;gt; &lt;br /&gt;
These classes keep track of a user who is participating in an assignment or a course.  participant.rb is the superclass, and the other two are the subclasses.&lt;br /&gt;
&lt;br /&gt;
'''What is needed''': &amp;lt;br&amp;gt; &lt;br /&gt;
The methods are complex; there are a lot of them (assignment_particpant has 44) and there is a lot of duplicated code.  assignment_participant contains code for detecting cycles of high grades (which can indicate collusion in reviews).  It would be better moved to another class.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
= Introduction =&lt;br /&gt;
&lt;br /&gt;
The Deploying process involves different stages like development, testing, release management and sign-off by project teams.&lt;br /&gt;
&lt;br /&gt;
The following diagram illustrates the deployment process of an application.&lt;br /&gt;
&lt;br /&gt;
[[File:Deployment Process.jpg|frame|center|&amp;lt;ref&amp;gt;http://technet.microsoft.com/en-us/library/cc465178.aspx&amp;lt;/ref&amp;gt;]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The deployment flow has three stages: development and testing, release management and stakeholders and project teams. &lt;br /&gt;
&lt;br /&gt;
After the final release of the code in development and testing stage, the master plan is prepared for deployment of components and sites based on the sign-offs provided by the project teams, stakeholders and customers. Then, the stabilization of the deployment is calculated based on some metrics. Once the deployment is stabilized, it is reviewed and the process of deployment is complete. The final sign-off is given by the stakeholders.&lt;br /&gt;
&lt;br /&gt;
=Participant model: participant.rb=&lt;br /&gt;
&lt;br /&gt;
Code deployment is a procedure where the application is transferred onto a production server, so that it is made available for all the other users. It is the part of release management process which involves several activities. These activities are inter-dependent and need to be completed in a specific order for successful code deployment. &lt;br /&gt;
&lt;br /&gt;
'''Code Deployment Activities'''&lt;br /&gt;
&lt;br /&gt;
The various deployment activities include &amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/Software_deployment&amp;lt;/ref&amp;gt;&lt;br /&gt;
* Release : Gathering all system components in preparation for deployment&lt;br /&gt;
* Install and activate : Installing the application components and getting them in the 'ready' state&lt;br /&gt;
* Deactivate : Shutting down components that are out-dated or that may interfere with updating others&lt;br /&gt;
* Adapt : Making changes to application to accommodate changes in environment&lt;br /&gt;
* Update : Having a newer release installed in place of the old one&lt;br /&gt;
* Built-in : There are components built-into some tools for complete/semi-automating updates&lt;br /&gt;
* Version tracking : These systems help the user to know if newer versions of a software are available and if yes, help install them&lt;br /&gt;
* Uninstall : Opposite of installation and involves complete removal of software and its dependencies from the environment&lt;br /&gt;
* Retire : This involves making a software obsolete and is the end of software life cycle&lt;br /&gt;
&lt;br /&gt;
The general guidelines for the deployment process remain the same but there are variations in the specific requirements with each software system.&lt;br /&gt;
&lt;br /&gt;
=AssignmentParticipant model: assignment_participant.rb=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ref&amp;gt;http://searchitchannel.techtarget.com/definition/release-management&amp;lt;/ref&amp;gt;&lt;br /&gt;
Release management is a software process which takes care of the development, testing, deployment and support stages of software releases. The start of release management happens in the development phase, where it requests for new features or changes in the existing application. When the request is accepted, a new release is planned and designed. This design is built and then enters the testing phase, where the release is tested until it is accepted. After the release is accepted as a candidate, it enters the deployment phase where it is implemented. Once deployed, the release is made available and sent to support phase for collection of bug reports. Once the support phase is done, the bugs and other issues lead to requests for changes and the cycle is then repeated.&lt;br /&gt;
&lt;br /&gt;
=CourseParticipant model:course_participant.rb =&lt;br /&gt;
&amp;lt;ref&amp;gt;http://www.urbancode.com/html/solutions/deployment-automation.html&amp;lt;/ref&amp;gt;&lt;br /&gt;
Automation of a process is required when the manual process is more error prone. Also, for large real world applications, the manual process is very complex and time consuming. Incomplete documentation hampers a manual process further. Deployment also has to be done in many environments and involves varied steps to be followed in a specific order. Manual process needs repetition of same procedure to each and every environment which leads to many errors and the process becomes costly.&lt;br /&gt;
In web applications each new release has to be deployed to and tested in development, testing and production environments.The number of software releases in web applications  are more and hence the need to automate release management is also greater.&lt;br /&gt;
&lt;br /&gt;
Automation of deployment delivers applications faster and with fewer errors. The defined software deployment process can be applied across all environments consistently every time. With various automated application deployment platforms now readily available, manual deployments have become a thing of the past.&lt;br /&gt;
&lt;br /&gt;
Lets take a look at the various Deployment Automation tools available to Ruby on Rails applications. For the purposes of this article the process of manual deployment of a Ruby on Rails application is out of scope.&lt;br /&gt;
&lt;br /&gt;
= Tests =&lt;br /&gt;
&lt;br /&gt;
Some of the automated tools that are widely used for the process of deployment with Ruby on Rails are &lt;br /&gt;
&lt;br /&gt;
* Capistrano&lt;br /&gt;
* Heroku&lt;br /&gt;
* Vlad&lt;br /&gt;
* AppFog&lt;br /&gt;
* AWS Elastic Beanstalk&lt;br /&gt;
* OpenShift&lt;br /&gt;
* Cloud 66&lt;br /&gt;
&lt;br /&gt;
= yml files =&lt;br /&gt;
&lt;br /&gt;
[[File:Capistrano.jpg|frame|right|&amp;lt;ref&amp;gt;http://www.capistranorb.com/&amp;lt;/ref&amp;gt;|Capistrano Logo]]&lt;br /&gt;
&lt;br /&gt;
Capistrano is a Ruby tool which helps deploy an application to the server. Capistrano allows deploying to multiple machines at a time. It has many advanced options which help to deploy different kinds of applications. It also supports the scripting and execution of tasks.&lt;br /&gt;
&lt;br /&gt;
Capistrano can be used to:&lt;br /&gt;
&lt;br /&gt;
* Deploy applications onto many machines simultaneously.&lt;br /&gt;
* Automate the audits&lt;br /&gt;
* Automate the common tasks of a team.&lt;br /&gt;
&lt;br /&gt;
Capistrano can be made a part of a larger software by integrating it with another Ruby software.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ref&amp;gt;http://www.capistranorb.com/documentation/getting-started/installation/&amp;lt;/ref&amp;gt;  &lt;br /&gt;
'''General Usage'''&lt;br /&gt;
&lt;br /&gt;
The following commands will clone Capistrano, build the gem and install it locally.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem install capistrano --pre --trust-policy HighSecurity&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Or grab the bleeding edge head from:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ git clone -b v3 https://github.com/capistrano/capistrano.git&lt;br /&gt;
$ cd capistrano&lt;br /&gt;
$ gem build *.gemspec&lt;br /&gt;
$ gem install *.gem&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
'''Signed Rubygems'''&lt;br /&gt;
&lt;br /&gt;
As Capistrano is a signed gem, you should always be careful to use the --trust-policy flag when installing Gems, or since Bundler 1.3 you should use the same flag:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem install capistrano --pre --trust-policy HighSecurity&lt;br /&gt;
$ bundle install --trust-policy HighSecurity&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If you get a message that looks like:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ERROR:  While executing gem ... (Gem::Security::Exception)&lt;br /&gt;
unsigned gems are not allowed by the High Security policy&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then please complain to your Gem author, and have them start signing their Gems.&lt;br /&gt;
&lt;br /&gt;
'''Usage in a Rails project'''&lt;br /&gt;
&lt;br /&gt;
Add the following lines to the Gemfile to the :development group ideally.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
group :development do&lt;br /&gt;
  gem 'capistrano-rails', '~&amp;gt; 0.0.7'&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= routes.rb =&lt;br /&gt;
&lt;br /&gt;
[[File:Heroku.jpg|frame|right|&amp;lt;ref&amp;gt;https://www.heroku.com/&amp;lt;/ref&amp;gt;|Heroku Logo]]&lt;br /&gt;
&lt;br /&gt;
Heroku is a cloud [http://en.wikipedia.org/wiki/Platform_as_a_service Platform as a Service] (PaaS) which supports several programming languages. PaaS is a service model of Cloud computing wherein the provider offers resources like servers, software, database, etc. to the developer. Heroku helps manage environment-specific configurations separately from the source code, which provides greater security.&lt;br /&gt;
Heroku is not just a deployment environment but it also impacts the development process. There are several principles of the development of application on Heroku.&amp;lt;br&amp;gt;&lt;br /&gt;
•	Applications and Codebases : Most of the development of the application is done on application’s codebase which is stored in a [http://en.wikipedia.org/wiki/Version_control_system Version Control System (VCS)] &amp;lt;br&amp;gt;&lt;br /&gt;
•	Dependencies : All the application dependencies such as plugins should be declared explicitly&amp;lt;br&amp;gt;&lt;br /&gt;
•	Configuration : Configuration of an application is all that varies in different deploys&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Getting Started with Heroku'''&lt;br /&gt;
&lt;br /&gt;
1. To get started with Heroku, go to https://id.heroku.com/signup/devcenter, signup for a Heroku account. &lt;br /&gt;
&lt;br /&gt;
2. Then, download and install the Heroku toolbelt at https://toolbelt.heroku.com/ for your development system. You can also use Heroku command line instead of the online Heroku application. &lt;br /&gt;
&lt;br /&gt;
3. After installing one of them, login using the email address and password used when creating the Heroku account:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ref&amp;gt;https://github.com/heroku/heroku&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ heroku login&lt;br /&gt;
Enter your Heroku credentials.&lt;br /&gt;
Email: adam@example.com&lt;br /&gt;
Password:&lt;br /&gt;
Could not find an existing public key.&lt;br /&gt;
Would you like to generate one? [Yn]&lt;br /&gt;
Generating new SSH public key.&lt;br /&gt;
Uploading SSH public key /Users/adam/.ssh/id_rsa.pub&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Deploying Applications'''&lt;br /&gt;
&lt;br /&gt;
Heroku uses [http://en.wikipedia.org/wiki/Git_(software) git] primarily to deploy the applications. When an application is created on Heroku, it associates the new git which is remote with the local git repository.&lt;br /&gt;
&lt;br /&gt;
As a result, deploying code is just the familiar git push, but to the heroku remote instead:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ref&amp;gt;https://devcenter.heroku.com/articles/how-heroku-works#deploying-applications&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ git push heroku master&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Vlad ==&lt;br /&gt;
&lt;br /&gt;
[[File:Vlad.png|frame|right|&amp;lt;ref&amp;gt;http://rubyhitsquad.com/Vlad_the_Deployer.html&amp;lt;/ref&amp;gt;|Vlad Logo]]&lt;br /&gt;
&lt;br /&gt;
Vlad is another automated deployment tool which is simple to use. It integrates with rake and uses standard tools like SSH, rsync etc.&lt;br /&gt;
&lt;br /&gt;
The main features of Vlad include&lt;br /&gt;
* It uses very few dependencies which are simple.&lt;br /&gt;
* It can execute commands on more than one server.&lt;br /&gt;
* It syncs files to one or more servers.&lt;br /&gt;
* It matches local and remote tasks.&lt;br /&gt;
* It runs tests very fast.&lt;br /&gt;
&lt;br /&gt;
'''Getting started with Vlad'''&amp;lt;ref&amp;gt;http://docs.seattlerb.org/vlad/doco/getting_started_txt.html&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create a deploy file, usually in “config/deploy.rb”:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set :application, &amp;quot;project&amp;quot;&lt;br /&gt;
set :domain, &amp;quot;example.com&amp;quot;&lt;br /&gt;
set :deploy_to, &amp;quot;/path/to/install&amp;quot;&lt;br /&gt;
set :repository, 'http://svn.example.com/project/branches/stable/'&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This defaults to using ‘svn export’ from repository, and a single server for app, db, and www.&lt;br /&gt;
&lt;br /&gt;
If you want a multi-config environment, change your config like so:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set :application, &amp;quot;project&amp;quot;&lt;br /&gt;
set :repository, 'http://svn.example.com/project/branches/stable/'&lt;br /&gt;
&lt;br /&gt;
task :beta do&lt;br /&gt;
  set :domain,    &amp;quot;beta.example.com&amp;quot;&lt;br /&gt;
  set :deploy_to, &amp;quot;/path/to/install-beta&amp;quot;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
task :dev do&lt;br /&gt;
  set :domain,    &amp;quot;dev.example.com&amp;quot;&lt;br /&gt;
  set :deploy_to, &amp;quot;/path/to/install-dev&amp;quot;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
task :prod do&lt;br /&gt;
  set :domain,    &amp;quot;example.com&amp;quot;&lt;br /&gt;
  set :deploy_to, &amp;quot;/path/to/install&amp;quot;&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Add the following to your Rakefile:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
begin&lt;br /&gt;
  require 'vlad'&lt;br /&gt;
  Vlad.load&lt;br /&gt;
rescue LoadError&lt;br /&gt;
  # do nothing&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Vlad.load has a lot of flexibility.&lt;br /&gt;
&lt;br /&gt;
You can install vlad via:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;% rake vlad:invoke COMMAND='sudo gem install vlad -y'&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Initial Launch&lt;br /&gt;
&amp;lt;pre&amp;gt;Run rake vlad:setup vlad:update vlad:migrate vlad:start&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ref&amp;gt;http://docs.seattlerb.org/vlad/index.html&amp;lt;/ref&amp;gt;&lt;br /&gt;
'''Running Vlad'''&lt;br /&gt;
&lt;br /&gt;
* Using rake&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
task :shazam! do&lt;br /&gt;
  Rake::Task[:action1].invoke&lt;br /&gt;
  Rake::Task[:action2].invoke&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Using SSH&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Host example.com&lt;br /&gt;
    User fluffy_bunny&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== AppFog == &lt;br /&gt;
&lt;br /&gt;
[[File:AppFog.jpg|frame|right|&amp;lt;ref&amp;gt;https://www.appfog.com/&amp;lt;/ref&amp;gt;|AppFog Logo]]&lt;br /&gt;
&lt;br /&gt;
AppFog is a PaaS built on Cloud Foundry which is another PaaS platform for deploying applications. &lt;br /&gt;
&lt;br /&gt;
Features of AppFog are&lt;br /&gt;
* It launches and runs fast.&lt;br /&gt;
* It does not require configuring servers or installing frameworks.&lt;br /&gt;
* It is compatible with code management systems like git, svn etc.&lt;br /&gt;
&lt;br /&gt;
'''Installing AppFog'''&amp;lt;ref&amp;gt;http://blog.appfog.com/getting-started-with-appfogs-command-line/&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
‘af‘ command line tool is written in Ruby for installation.&lt;br /&gt;
&lt;br /&gt;
Download and install [http://rubyinstaller.org/ Ruby Installer] for Windows. The installer already includes RubyGems.&lt;br /&gt;
&lt;br /&gt;
Be sure you use the Ruby-enabled command prompt window when you later install and use af. You access this command prompt from the Windows Start menu (All Programs &amp;gt; Ruby &amp;gt; Start Command Prompt with Ruby).&lt;br /&gt;
&lt;br /&gt;
Finally, update RubyGems from the Ruby Command Prompt:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem update --system&lt;br /&gt;
$ gem install af&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Login with:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ af login&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Finally from within your source code directory:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ af update hello-node&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Getting Started with AppFog'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
target [url]                                       Reports current target or sets a new target&lt;br /&gt;
login [email] [--email, --password]                Login&lt;br /&gt;
info                                               System and account information&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== AWS Elastic Beanstalk==&lt;br /&gt;
&lt;br /&gt;
[[File:AWSLogo.jpg|frame|right|&amp;lt;ref&amp;gt;https://aws.amazon.com&amp;lt;/ref&amp;gt;|AWS Logo]]&lt;br /&gt;
&lt;br /&gt;
Amazon Wen Services(AWS) offers [http://en.wikipedia.org/wiki/Infrastructure_as_a_service#Infrastructure_as_a_service_.28IaaS.29 Infrastructure as a Service] (IaaS) and provides a complete set of resources for the development of a web application in minutes. AWS Elastic Beanstalk is a deployment tool of the AWS cloud.&lt;br /&gt;
&lt;br /&gt;
With AWS Elastic Beanstalk, applications can be quickly deployed and managed in the AWS cloud without worrying about the infrastructure that runs those applications. AWS Elastic Beanstalk reduces management complexity without restricting choice or control. Once the application is uploaded AWS Elastic Beanstalk automatically handles the details of capacity provisioning, load balancing, scaling, and application health monitoring. AWS Elastic Beanstalk uses highly reliable and scalable services.&lt;br /&gt;
&lt;br /&gt;
'''AWS CLI'''&lt;br /&gt;
&lt;br /&gt;
AWS Elastic Beanstalk uses a command line tool Eb, which helps you to deploy your application easily.&lt;br /&gt;
&lt;br /&gt;
'''Getting Started with Eb'''&amp;lt;ref&amp;gt;http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/command-reference-get-started.html&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To get started with the beanstalk CLI, you will need to download the command line tools at the [http://aws.amazon.com/code/6752709412171743 AWS Sample Code &amp;amp; Libraries] website.&lt;br /&gt;
&lt;br /&gt;
Step 1: Initialize Your Git Repository&lt;br /&gt;
&lt;br /&gt;
Eb is a command line interface that enables you to deploy applications quickly and more easily using Git. Eb is available as part of the Elastic Beanstalk command line tools package. &lt;br /&gt;
&lt;br /&gt;
1. To install eb,install the following software onto your local computer:&lt;br /&gt;
&lt;br /&gt;
* Git 1.6.6 or later. To download Git, go to http://git-scm.com/.&lt;br /&gt;
* PowerShell 2.0.&lt;br /&gt;
&lt;br /&gt;
2. Initialize your Git repository.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git init &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Step 2: Configuring AWS Elastic Beanstalk&lt;br /&gt;
&lt;br /&gt;
1. From your directory where you created your local repository, type the following command.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
eb init&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2. When you are prompted for the access key ID, type your access key ID. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Enter your AWS Access Key ID (current value is &amp;quot;AKIAIOSFODNN7EXAMPLE&amp;quot;): &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3. When you are prompted for the secret access key, type your secret access key.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Enter your AWS Secret Access Key (current value is &amp;quot;wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY&amp;quot;): &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
4. When you are prompted for the AWS Elastic Beanstalk application name, type the name of the application. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Enter an AWS Elastic Beanstalk application name (auto-generated value is &amp;quot;windows&amp;quot;): &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Note:&lt;br /&gt;
If you have a space in your application name, make sure you do not use quotes.&lt;br /&gt;
&lt;br /&gt;
5. When you are prompted for the AWS Elastic Beanstalk environment name, type the name of the environment. AWS Elastic Beanstalk automatically creates an environment name based on your application name. If you want to accept the default, press Enter.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Enter an AWS Elastic Beanstalk environment name (current value is &amp;quot;HelloWorld-env&amp;quot;): &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
6. When you are prompted to create an Amazon RDS DB instance, type y or n. For this example, we'll type y.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Create an RDS DB Instance? [y/n]:&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
7. When you are prompted to enter your RDS user master password, type your password containing from 8 to 16 printable ASCII characters (excluding /, \, and @).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Enter an RDS DB master password: &lt;br /&gt;
Retype password to confirm: &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can now get started with the AWS Elastic Beanstalk.&lt;br /&gt;
&lt;br /&gt;
== OpenShift ==&lt;br /&gt;
&lt;br /&gt;
[[File:OpenShift.png|frame|right|&amp;lt;ref&amp;gt;https://en.wikipedia.org&amp;lt;/ref&amp;gt;|OpenShift Logo]]&lt;br /&gt;
&lt;br /&gt;
Another free and open source PaaS for deploying applications is OpenShift created by [[http://en.wikipedia.org/wiki/RedHat RedHat]]. &lt;br /&gt;
&lt;br /&gt;
'''Considerations'''&lt;br /&gt;
* Databases&lt;br /&gt;
&lt;br /&gt;
To use the application outside the OpenShift environment one needs to change the variables as the application is configured to use database in production mode in OpenShift.&lt;br /&gt;
&lt;br /&gt;
* Assets&lt;br /&gt;
&lt;br /&gt;
The assets are precompiled everytime application is pushed to OpenShift.&lt;br /&gt;
&lt;br /&gt;
* Security&lt;br /&gt;
&lt;br /&gt;
Security related variables are to be unique across the application.&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;ref&amp;gt;https://github.com/openshift/rails-example&amp;lt;/ref&amp;gt;&lt;br /&gt;
'''Installation'''&lt;br /&gt;
&lt;br /&gt;
1.	Create an account at http://openshift.redhat.com/&lt;br /&gt;
&lt;br /&gt;
2.	Create a rails application&lt;br /&gt;
	&amp;lt;pre&amp;gt;rhc app create -a railsapp -t ruby-1.9&amp;lt;/pre&amp;gt;&lt;br /&gt;
3.	Add mysql support to your application&lt;br /&gt;
	&amp;lt;pre&amp;gt;rhc cartridge add -a railsapp -c mysql-5.1&amp;lt;/pre&amp;gt;&lt;br /&gt;
4.	Add this upstream Rails quickstart repository&lt;br /&gt;
&amp;lt;pre&amp;gt;cd railsapp&lt;br /&gt;
git remote add upstream -m master git://github.com/openshift/rails-example.git&lt;br /&gt;
git pull -s recursive -X theirs upstream master&amp;lt;/pre&amp;gt;&lt;br /&gt;
5.	Push your new code&lt;br /&gt;
&amp;lt;pre&amp;gt;git push&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Future scope ==&lt;br /&gt;
&lt;br /&gt;
[[File:Cloud 66.jpg|frame|right|&amp;lt;ref&amp;gt;https://www.cloud66.com/&amp;lt;/ref&amp;gt;|Cloud66 Logo]]&lt;br /&gt;
&lt;br /&gt;
Cloud 66 combines the convenience of Platform-as-a-Service (PaaS) and the flexibility and control of Infrastructure-as-a-Service (IaaS). This platform allows easy deployment of application, so there is no overhead of configuring or monitoring the servers.&lt;br /&gt;
&lt;br /&gt;
'''Cloud 66 Command line Toolbelt'''&lt;br /&gt;
&lt;br /&gt;
Toolbelt is an open source released to deploy the application.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ref&amp;gt;http://blog.cloud66.com/&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Getting Started with Cloud 66'''&lt;br /&gt;
&lt;br /&gt;
1. Go to the [https://www.cloud66.com/users/sign_up sign up] page and create a Cloud 66 account.&lt;br /&gt;
&lt;br /&gt;
2. Go to Cloud 66 Dashboard and [https://www.cloud66.com/help/first_stack build your first stack].&lt;br /&gt;
&lt;br /&gt;
'''Installation'''&lt;br /&gt;
&lt;br /&gt;
Installation of toolbelt uses the following command&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Gem install c66&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This automatically searches the newest version and installs it.&lt;br /&gt;
&lt;br /&gt;
= Model Class : assignment_participant.rb =&lt;br /&gt;
Th AssignmentParticipant model class is a subclass of the participant model class. Several methods in AssignmentParticipant model class required renaming and refactoring to ensure that the change is reflected in the entire project. The names were changed to follow method naming convention. Deprecated code was removed and re-coded to ensure that the code worked in future version as well. Duplicated codes were commented. Methods that are more general to the sub classes were moved to the parent class. Some methods that calculates the collusion in reviews between students were moved to a newly created model class file called collusion_cycle.rb &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;width:3%;&amp;quot;|S. No&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;|Method Name&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;|Change Made &lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;|Reason For Change&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
|''''' 1 '''''&lt;br /&gt;
|get_course_string&lt;br /&gt;
|Renamed to course_string and refactored &lt;br /&gt;
|To follow method naming convention&lt;br /&gt;
|-&lt;br /&gt;
|''''' 2 '''''&lt;br /&gt;
|get_cycle_deviation_score&lt;br /&gt;
|Moved to collusion_cycle.rb model class&lt;br /&gt;
|Related methods that calculate collusion in reviews have been moved to the newly created collusion_cycle.rb model class&lt;br /&gt;
|-&lt;br /&gt;
|''''' 3 '''''&lt;br /&gt;
|get_cycle_similarity_score&lt;br /&gt;
|Moved to collusion_cycle.rb model class&lt;br /&gt;
|Related methods that calculate collusion in reviews have been moved to the newly created collusion_cycle.rb model class&lt;br /&gt;
|-&lt;br /&gt;
|''''' 4 '''''&lt;br /&gt;
|get_feedback&lt;br /&gt;
|Renamed to feedback and refactored&lt;br /&gt;
|To follow method naming convention&lt;br /&gt;
|-&lt;br /&gt;
|''''' 5 '''''&lt;br /&gt;
|get_files&lt;br /&gt;
|Renamed to files_in_directory  and refactored&lt;br /&gt;
|To follow method naming convention&lt;br /&gt;
|-&lt;br /&gt;
|''''' 6 '''''&lt;br /&gt;
|get_four_node_cycles&lt;br /&gt;
|Moved to collusion_cycle.rb model class&lt;br /&gt;
|Related methods that calculate collusion in reviews have been moved to the newly created collusion_cycle.rb model class&lt;br /&gt;
|-&lt;br /&gt;
|''''' 7 '''''&lt;br /&gt;
|fullname&lt;br /&gt;
|Moved to parent model class – participant.rb &lt;br /&gt;
|General methods of the subclass are moved to Parent class&lt;br /&gt;
|-&lt;br /&gt;
|''''' 8 '''''&lt;br /&gt;
|get_metareviews&lt;br /&gt;
|Renamed to metareviews and refactored&lt;br /&gt;
|To follow method naming convention&lt;br /&gt;
|-&lt;br /&gt;
|''''' 9 '''''&lt;br /&gt;
|name&lt;br /&gt;
|Commented the method  &lt;br /&gt;
|The method is already in parent model class – participant.rb and can be used in this subclass through inheritance&lt;br /&gt;
|-&lt;br /&gt;
|''''' 10 '''''&lt;br /&gt;
|name&lt;br /&gt;
|Commented the method  &lt;br /&gt;
|The method is already in parent model class – participant.rb and can be used in this subclass through inheritance. Also it is a duplicate method in patricipant.rb&lt;br /&gt;
|- &lt;br /&gt;
|''''' 11 '''''&lt;br /&gt;
|get_review_score&lt;br /&gt;
|Renamed to review_score and refactored. Deprecated code has been removed and replaced with correct code.&lt;br /&gt;
|To follow method naming convention and ensure the code works in future versions. &lt;br /&gt;
|-&lt;br /&gt;
|''''' 12 '''''&lt;br /&gt;
|get_reviewees&lt;br /&gt;
|Renamed to reviewees and refactored. Deprecated code has been removed and replaced with correct code.&lt;br /&gt;
|To follow method naming convention and ensure the code works in future versions. &lt;br /&gt;
|-&lt;br /&gt;
|''''' 13 '''''&lt;br /&gt;
|get_reviewers&lt;br /&gt;
|Renamed to reviewers and refactored . Deprecated code has been commented and replaced with correct code.&lt;br /&gt;
|To follow method naming convention and ensure the code works in future versions. &lt;br /&gt;
|-&lt;br /&gt;
|''''' 14 '''''&lt;br /&gt;
|get_reviews&lt;br /&gt;
|Renamed to reviews and refactored &lt;br /&gt;
|To follow method naming convention&lt;br /&gt;
|-&lt;br /&gt;
|''''' 15 '''''&lt;br /&gt;
|get_reviews_by_reviewer&lt;br /&gt;
|Renamed to reviews_by_reviewer and refactored &lt;br /&gt;
|To follow method naming convention&lt;br /&gt;
|-&lt;br /&gt;
|''''' 16 '''''&lt;br /&gt;
|get_reviews_by_reviewer&lt;br /&gt;
|Renamed to reviews_by_reviewer and refactored &lt;br /&gt;
|Commented the method &lt;br /&gt;
|To remove duplicated method in this class&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
After changes were made, the existing tests ran successfully.&lt;br /&gt;
&lt;br /&gt;
= Comparison between Capistrano/Vlad/Heroku/AppFog/OpenShift/Cloud66/AWS Beanstalk =&lt;br /&gt;
&lt;br /&gt;
With so many automated tools available for Code Deployment and Release Management, the decision on which to use for a particular Ruby on rails application depends on various parameters to be considered.&lt;br /&gt;
Some comparative features of the different tools are as follows :&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;width:9%;&amp;quot;|Criteria for Comparision&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;|Capistrano&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;| Vlad&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;| Heroku&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;| AppFog&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;| OpenShift&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;| Cloud66&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;| AWS Beanstalk&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
|'''''Getting started with the tool'''''&lt;br /&gt;
|It is a framework that allows one to execute commands on a remote server using tools like ssh.&lt;br /&gt;
|Vlad deployment is similar to Capistrano, but less complex.&lt;br /&gt;
|Heroku’s offers a plan with first dyno free i.e. 512 MB that can be paired with Postgres starter DB to start an application with 0 initial cost&lt;br /&gt;
|AppFog’s initial plan offers 2GB of RAM free which is enough for small to medium traffic applications. By managing options provided for DB, queue server, application server, etc all part of the intial package, this is an excellent option to try out an application&lt;br /&gt;
|OpenShift is an open source platform and its free plan for starters has 3 gears for free wherein each gear consists of some RAM and disk space.&lt;br /&gt;
|Free plan provides one server for deployment.&lt;br /&gt;
|Provides an initial free tier. Without free tier no additional cost for Beanstalk. One only needs to pay for the AWS resources used.&lt;br /&gt;
|-&lt;br /&gt;
|'''''Scaling Memory'''''&lt;br /&gt;
|Memory increase would require additional servers/unused space in existing ones.&lt;br /&gt;
|Memory increase depends on additional servers available/unused space in existing ones.&lt;br /&gt;
|Memory increased in terms of dyno each of size 512 MB.&lt;br /&gt;
|Can configure any size for memory allocation&lt;br /&gt;
| -&lt;br /&gt;
| -&lt;br /&gt;
|Can automatically up/down scale the application by adjusting the default auto scaling settings.&lt;br /&gt;
|-&lt;br /&gt;
|'''''Scaling – Cost and Ease'''''&lt;br /&gt;
|While this provides greater flexibility as user is in control of the servers, it also causes additional overhead in terms of user needing to work both on Rails application and web server deployment.&lt;br /&gt;
|It can be integrated with Rake without any hindrances.&lt;br /&gt;
|Can dynamically scale up and down an application and pay as per hourly usages. Each additional dyno costs $35/mo&lt;br /&gt;
|Scaling takes up some time and need to pay for a month at the minimum. Scaling up to 4GB increases cost to $100/mo&lt;br /&gt;
| -&lt;br /&gt;
|Scaling using Cloud66 is relatively easy and hassle free.&lt;br /&gt;
|Scaling is fast and easy.&lt;br /&gt;
|-&lt;br /&gt;
|'''''Special features'''''&lt;br /&gt;
|For sensitive applications where handing over the control to a third party for deployment is not feasible, Capistrano is the way to go.&lt;br /&gt;
|It also provides support for tools like rsync and ssh.&lt;br /&gt;
|Lacks support for cross region deployment i.e. can’t select location of server where application gets deployed&lt;br /&gt;
|Supports cross region deployment i.e. if users of application primarily in Asia, can choose a server in Asia to deploy application, thus making the site faster.&lt;br /&gt;
| -&lt;br /&gt;
| -&lt;br /&gt;
|Provides complete flexibility and control of the resources to the user including the chance to take over control of some or all.&lt;br /&gt;
|-&lt;br /&gt;
|'''''Database support'''''&lt;br /&gt;
|Provides support for DB related to rails applications&lt;br /&gt;
|Provides support for DB related to rails applications&lt;br /&gt;
|It features serious production DB like RDBMS, Postgres, etc. and many Addons such as MongoDB, ClearDB, etc.&lt;br /&gt;
|Features free shared databases such as MongoDB, MySQL, Postgres but for other production DB’s need to use Addons&lt;br /&gt;
|Databases featured are MySQL, MongoDB and Postgres&lt;br /&gt;
| -&lt;br /&gt;
|Supports DB like Amazon SimpleDB, Amazon RDS, Amazon DynamoDB.&lt;br /&gt;
|-&lt;br /&gt;
|'''''Deployment strategy'''''&lt;br /&gt;
|Capistrano provides commands to be executed for automated deployment. It supports git.&lt;br /&gt;
|It is much easier to deploy using Vlad as compared to Capistrano.&lt;br /&gt;
|Deployment as easy as ‘git push’&lt;br /&gt;
|Deployment does not support git. It uses the af tool for deployment.&lt;br /&gt;
| -&lt;br /&gt;
|Since Cloud66 provides the platform in terms of Application Stack Management as a Service, it uses the infrastructure of AWS, Virtual Private Server, etc. for actual deployment. But the user doesn’t have to worry about configuration or monitoring of the servers. Hence provides easy deployment.&lt;br /&gt;
|Deployment options include Git, AWS management console, etc.&lt;br /&gt;
|-&lt;br /&gt;
|'''''Community Support availability'''''&lt;br /&gt;
| As it has been in use for a long time there is a huge community support available for Capistrano.&lt;br /&gt;
| -&lt;br /&gt;
|Heroku also provides a huge community support given the fact that there are a lot of Heroku users.&lt;br /&gt;
|Community is limited.&lt;br /&gt;
|RedHat being a reputed provider for open source solutions, the OpenShift community is gradually increasing and receiving support from a considerable community of users.&lt;br /&gt;
|Limited community support currently&lt;br /&gt;
|Has community forums and documentation.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Conclusion =&lt;br /&gt;
&lt;br /&gt;
Comparison and contrast between various deployment automated tools such as Capistrano, Heroku, Vlad, AppFog, OpenShift, Cloud66, AWS Beanstalk shows that each has its own pros and cons. &lt;br /&gt;
For instance, in a client based application where handing over the control of the application to a third party such as the deployment tool provider is impossible, AWS Beanstalk would be the obvious choice for the developer.&lt;br /&gt;
On the other hand, a novice Rails application developer might find all he needs in the starter plan of Heroku with the added bonus of a huge support community available to him for troubleshooting as he stumbles his way across the development of the application.&lt;br /&gt;
One may also choose the tool that provides the specific database support for your application. In case of large scale corporations where budgets are not that limited, the increasing costs with up-scaling of some tools would not be an obstacle.&lt;br /&gt;
Thus, various considerations about the application such as scalability requirement, security concerns, cost, availability of own resources such as servers etc., will help determine which tool is the most suitable for that application.&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= See Also =&lt;br /&gt;
&lt;br /&gt;
* Rails Solutions: Ruby on Rails Made Easy by Justin Williams&lt;br /&gt;
* http://guides.beanstalkapp.com/deployments/best-practices.html&lt;br /&gt;
* http://www.urbancode.com/anthill3-help-3.7/html/SettingUpDeploymentProcess.html&lt;br /&gt;
* http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=UseFMSGateway_3.html&lt;br /&gt;
* http://pic.dhe.ibm.com/infocenter/tivihelp/v26r1/index.jsp?topic=%2Fcom.ibm.dtm.doc%2Fdeploysoftware%2Fc_deploysw_process.html&lt;/div&gt;</summary>
		<author><name>Npari</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch2_0e808_nsv&amp;diff=81341</id>
		<title>CSC/ECE 517 Fall 2013/ch2 0e808 nsv</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch2_0e808_nsv&amp;diff=81341"/>
		<updated>2013-10-30T21:10:29Z</updated>

		<summary type="html">&lt;p&gt;Npari: /* Model Class : assignment_participant.rb */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= E808: Refactor and test Participant, AssignmentParticipant, &amp;amp; CourseParticipant =&lt;br /&gt;
The requirements provided for the Open Source System project were as follows : &amp;lt;br&amp;gt;&lt;br /&gt;
'''Classes''': &amp;lt;br&amp;gt;&lt;br /&gt;
''participant.rb'' (197 lines)&amp;lt;br&amp;gt;&lt;br /&gt;
''assignment_participant.rb'' (476 lines)&amp;lt;br&amp;gt;&lt;br /&gt;
''course_participant.rb'' (90 lines)&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''What they do''': &amp;lt;br&amp;gt; &lt;br /&gt;
These classes keep track of a user who is participating in an assignment or a course.  participant.rb is the superclass, and the other two are the subclasses.&lt;br /&gt;
&lt;br /&gt;
'''What is needed''': &amp;lt;br&amp;gt; &lt;br /&gt;
The methods are complex; there are a lot of them (assignment_particpant has 44) and there is a lot of duplicated code.  assignment_participant contains code for detecting cycles of high grades (which can indicate collusion in reviews).  It would be better moved to another class.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
= Introduction =&lt;br /&gt;
&lt;br /&gt;
The Deploying process involves different stages like development, testing, release management and sign-off by project teams.&lt;br /&gt;
&lt;br /&gt;
The following diagram illustrates the deployment process of an application.&lt;br /&gt;
&lt;br /&gt;
[[File:Deployment Process.jpg|frame|center|&amp;lt;ref&amp;gt;http://technet.microsoft.com/en-us/library/cc465178.aspx&amp;lt;/ref&amp;gt;]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The deployment flow has three stages: development and testing, release management and stakeholders and project teams. &lt;br /&gt;
&lt;br /&gt;
After the final release of the code in development and testing stage, the master plan is prepared for deployment of components and sites based on the sign-offs provided by the project teams, stakeholders and customers. Then, the stabilization of the deployment is calculated based on some metrics. Once the deployment is stabilized, it is reviewed and the process of deployment is complete. The final sign-off is given by the stakeholders.&lt;br /&gt;
&lt;br /&gt;
=Participant model: participant.rb=&lt;br /&gt;
&lt;br /&gt;
Code deployment is a procedure where the application is transferred onto a production server, so that it is made available for all the other users. It is the part of release management process which involves several activities. These activities are inter-dependent and need to be completed in a specific order for successful code deployment. &lt;br /&gt;
&lt;br /&gt;
'''Code Deployment Activities'''&lt;br /&gt;
&lt;br /&gt;
The various deployment activities include &amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/Software_deployment&amp;lt;/ref&amp;gt;&lt;br /&gt;
* Release : Gathering all system components in preparation for deployment&lt;br /&gt;
* Install and activate : Installing the application components and getting them in the 'ready' state&lt;br /&gt;
* Deactivate : Shutting down components that are out-dated or that may interfere with updating others&lt;br /&gt;
* Adapt : Making changes to application to accommodate changes in environment&lt;br /&gt;
* Update : Having a newer release installed in place of the old one&lt;br /&gt;
* Built-in : There are components built-into some tools for complete/semi-automating updates&lt;br /&gt;
* Version tracking : These systems help the user to know if newer versions of a software are available and if yes, help install them&lt;br /&gt;
* Uninstall : Opposite of installation and involves complete removal of software and its dependencies from the environment&lt;br /&gt;
* Retire : This involves making a software obsolete and is the end of software life cycle&lt;br /&gt;
&lt;br /&gt;
The general guidelines for the deployment process remain the same but there are variations in the specific requirements with each software system.&lt;br /&gt;
&lt;br /&gt;
=AssignmentParticipant model: assignment_participant.rb=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ref&amp;gt;http://searchitchannel.techtarget.com/definition/release-management&amp;lt;/ref&amp;gt;&lt;br /&gt;
Release management is a software process which takes care of the development, testing, deployment and support stages of software releases. The start of release management happens in the development phase, where it requests for new features or changes in the existing application. When the request is accepted, a new release is planned and designed. This design is built and then enters the testing phase, where the release is tested until it is accepted. After the release is accepted as a candidate, it enters the deployment phase where it is implemented. Once deployed, the release is made available and sent to support phase for collection of bug reports. Once the support phase is done, the bugs and other issues lead to requests for changes and the cycle is then repeated.&lt;br /&gt;
&lt;br /&gt;
=CourseParticipant model:course_participant.rb =&lt;br /&gt;
&amp;lt;ref&amp;gt;http://www.urbancode.com/html/solutions/deployment-automation.html&amp;lt;/ref&amp;gt;&lt;br /&gt;
Automation of a process is required when the manual process is more error prone. Also, for large real world applications, the manual process is very complex and time consuming. Incomplete documentation hampers a manual process further. Deployment also has to be done in many environments and involves varied steps to be followed in a specific order. Manual process needs repetition of same procedure to each and every environment which leads to many errors and the process becomes costly.&lt;br /&gt;
In web applications each new release has to be deployed to and tested in development, testing and production environments.The number of software releases in web applications  are more and hence the need to automate release management is also greater.&lt;br /&gt;
&lt;br /&gt;
Automation of deployment delivers applications faster and with fewer errors. The defined software deployment process can be applied across all environments consistently every time. With various automated application deployment platforms now readily available, manual deployments have become a thing of the past.&lt;br /&gt;
&lt;br /&gt;
Lets take a look at the various Deployment Automation tools available to Ruby on Rails applications. For the purposes of this article the process of manual deployment of a Ruby on Rails application is out of scope.&lt;br /&gt;
&lt;br /&gt;
= Tests =&lt;br /&gt;
&lt;br /&gt;
Some of the automated tools that are widely used for the process of deployment with Ruby on Rails are &lt;br /&gt;
&lt;br /&gt;
* Capistrano&lt;br /&gt;
* Heroku&lt;br /&gt;
* Vlad&lt;br /&gt;
* AppFog&lt;br /&gt;
* AWS Elastic Beanstalk&lt;br /&gt;
* OpenShift&lt;br /&gt;
* Cloud 66&lt;br /&gt;
&lt;br /&gt;
= yml files =&lt;br /&gt;
&lt;br /&gt;
[[File:Capistrano.jpg|frame|right|&amp;lt;ref&amp;gt;http://www.capistranorb.com/&amp;lt;/ref&amp;gt;|Capistrano Logo]]&lt;br /&gt;
&lt;br /&gt;
Capistrano is a Ruby tool which helps deploy an application to the server. Capistrano allows deploying to multiple machines at a time. It has many advanced options which help to deploy different kinds of applications. It also supports the scripting and execution of tasks.&lt;br /&gt;
&lt;br /&gt;
Capistrano can be used to:&lt;br /&gt;
&lt;br /&gt;
* Deploy applications onto many machines simultaneously.&lt;br /&gt;
* Automate the audits&lt;br /&gt;
* Automate the common tasks of a team.&lt;br /&gt;
&lt;br /&gt;
Capistrano can be made a part of a larger software by integrating it with another Ruby software.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ref&amp;gt;http://www.capistranorb.com/documentation/getting-started/installation/&amp;lt;/ref&amp;gt;  &lt;br /&gt;
'''General Usage'''&lt;br /&gt;
&lt;br /&gt;
The following commands will clone Capistrano, build the gem and install it locally.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem install capistrano --pre --trust-policy HighSecurity&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Or grab the bleeding edge head from:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ git clone -b v3 https://github.com/capistrano/capistrano.git&lt;br /&gt;
$ cd capistrano&lt;br /&gt;
$ gem build *.gemspec&lt;br /&gt;
$ gem install *.gem&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
'''Signed Rubygems'''&lt;br /&gt;
&lt;br /&gt;
As Capistrano is a signed gem, you should always be careful to use the --trust-policy flag when installing Gems, or since Bundler 1.3 you should use the same flag:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem install capistrano --pre --trust-policy HighSecurity&lt;br /&gt;
$ bundle install --trust-policy HighSecurity&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If you get a message that looks like:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ERROR:  While executing gem ... (Gem::Security::Exception)&lt;br /&gt;
unsigned gems are not allowed by the High Security policy&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then please complain to your Gem author, and have them start signing their Gems.&lt;br /&gt;
&lt;br /&gt;
'''Usage in a Rails project'''&lt;br /&gt;
&lt;br /&gt;
Add the following lines to the Gemfile to the :development group ideally.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
group :development do&lt;br /&gt;
  gem 'capistrano-rails', '~&amp;gt; 0.0.7'&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= routes.rb =&lt;br /&gt;
&lt;br /&gt;
[[File:Heroku.jpg|frame|right|&amp;lt;ref&amp;gt;https://www.heroku.com/&amp;lt;/ref&amp;gt;|Heroku Logo]]&lt;br /&gt;
&lt;br /&gt;
Heroku is a cloud [http://en.wikipedia.org/wiki/Platform_as_a_service Platform as a Service] (PaaS) which supports several programming languages. PaaS is a service model of Cloud computing wherein the provider offers resources like servers, software, database, etc. to the developer. Heroku helps manage environment-specific configurations separately from the source code, which provides greater security.&lt;br /&gt;
Heroku is not just a deployment environment but it also impacts the development process. There are several principles of the development of application on Heroku.&amp;lt;br&amp;gt;&lt;br /&gt;
•	Applications and Codebases : Most of the development of the application is done on application’s codebase which is stored in a [http://en.wikipedia.org/wiki/Version_control_system Version Control System (VCS)] &amp;lt;br&amp;gt;&lt;br /&gt;
•	Dependencies : All the application dependencies such as plugins should be declared explicitly&amp;lt;br&amp;gt;&lt;br /&gt;
•	Configuration : Configuration of an application is all that varies in different deploys&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Getting Started with Heroku'''&lt;br /&gt;
&lt;br /&gt;
1. To get started with Heroku, go to https://id.heroku.com/signup/devcenter, signup for a Heroku account. &lt;br /&gt;
&lt;br /&gt;
2. Then, download and install the Heroku toolbelt at https://toolbelt.heroku.com/ for your development system. You can also use Heroku command line instead of the online Heroku application. &lt;br /&gt;
&lt;br /&gt;
3. After installing one of them, login using the email address and password used when creating the Heroku account:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ref&amp;gt;https://github.com/heroku/heroku&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ heroku login&lt;br /&gt;
Enter your Heroku credentials.&lt;br /&gt;
Email: adam@example.com&lt;br /&gt;
Password:&lt;br /&gt;
Could not find an existing public key.&lt;br /&gt;
Would you like to generate one? [Yn]&lt;br /&gt;
Generating new SSH public key.&lt;br /&gt;
Uploading SSH public key /Users/adam/.ssh/id_rsa.pub&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Deploying Applications'''&lt;br /&gt;
&lt;br /&gt;
Heroku uses [http://en.wikipedia.org/wiki/Git_(software) git] primarily to deploy the applications. When an application is created on Heroku, it associates the new git which is remote with the local git repository.&lt;br /&gt;
&lt;br /&gt;
As a result, deploying code is just the familiar git push, but to the heroku remote instead:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ref&amp;gt;https://devcenter.heroku.com/articles/how-heroku-works#deploying-applications&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ git push heroku master&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Vlad ==&lt;br /&gt;
&lt;br /&gt;
[[File:Vlad.png|frame|right|&amp;lt;ref&amp;gt;http://rubyhitsquad.com/Vlad_the_Deployer.html&amp;lt;/ref&amp;gt;|Vlad Logo]]&lt;br /&gt;
&lt;br /&gt;
Vlad is another automated deployment tool which is simple to use. It integrates with rake and uses standard tools like SSH, rsync etc.&lt;br /&gt;
&lt;br /&gt;
The main features of Vlad include&lt;br /&gt;
* It uses very few dependencies which are simple.&lt;br /&gt;
* It can execute commands on more than one server.&lt;br /&gt;
* It syncs files to one or more servers.&lt;br /&gt;
* It matches local and remote tasks.&lt;br /&gt;
* It runs tests very fast.&lt;br /&gt;
&lt;br /&gt;
'''Getting started with Vlad'''&amp;lt;ref&amp;gt;http://docs.seattlerb.org/vlad/doco/getting_started_txt.html&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create a deploy file, usually in “config/deploy.rb”:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set :application, &amp;quot;project&amp;quot;&lt;br /&gt;
set :domain, &amp;quot;example.com&amp;quot;&lt;br /&gt;
set :deploy_to, &amp;quot;/path/to/install&amp;quot;&lt;br /&gt;
set :repository, 'http://svn.example.com/project/branches/stable/'&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This defaults to using ‘svn export’ from repository, and a single server for app, db, and www.&lt;br /&gt;
&lt;br /&gt;
If you want a multi-config environment, change your config like so:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set :application, &amp;quot;project&amp;quot;&lt;br /&gt;
set :repository, 'http://svn.example.com/project/branches/stable/'&lt;br /&gt;
&lt;br /&gt;
task :beta do&lt;br /&gt;
  set :domain,    &amp;quot;beta.example.com&amp;quot;&lt;br /&gt;
  set :deploy_to, &amp;quot;/path/to/install-beta&amp;quot;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
task :dev do&lt;br /&gt;
  set :domain,    &amp;quot;dev.example.com&amp;quot;&lt;br /&gt;
  set :deploy_to, &amp;quot;/path/to/install-dev&amp;quot;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
task :prod do&lt;br /&gt;
  set :domain,    &amp;quot;example.com&amp;quot;&lt;br /&gt;
  set :deploy_to, &amp;quot;/path/to/install&amp;quot;&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Add the following to your Rakefile:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
begin&lt;br /&gt;
  require 'vlad'&lt;br /&gt;
  Vlad.load&lt;br /&gt;
rescue LoadError&lt;br /&gt;
  # do nothing&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Vlad.load has a lot of flexibility.&lt;br /&gt;
&lt;br /&gt;
You can install vlad via:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;% rake vlad:invoke COMMAND='sudo gem install vlad -y'&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Initial Launch&lt;br /&gt;
&amp;lt;pre&amp;gt;Run rake vlad:setup vlad:update vlad:migrate vlad:start&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ref&amp;gt;http://docs.seattlerb.org/vlad/index.html&amp;lt;/ref&amp;gt;&lt;br /&gt;
'''Running Vlad'''&lt;br /&gt;
&lt;br /&gt;
* Using rake&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
task :shazam! do&lt;br /&gt;
  Rake::Task[:action1].invoke&lt;br /&gt;
  Rake::Task[:action2].invoke&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Using SSH&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Host example.com&lt;br /&gt;
    User fluffy_bunny&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== AppFog == &lt;br /&gt;
&lt;br /&gt;
[[File:AppFog.jpg|frame|right|&amp;lt;ref&amp;gt;https://www.appfog.com/&amp;lt;/ref&amp;gt;|AppFog Logo]]&lt;br /&gt;
&lt;br /&gt;
AppFog is a PaaS built on Cloud Foundry which is another PaaS platform for deploying applications. &lt;br /&gt;
&lt;br /&gt;
Features of AppFog are&lt;br /&gt;
* It launches and runs fast.&lt;br /&gt;
* It does not require configuring servers or installing frameworks.&lt;br /&gt;
* It is compatible with code management systems like git, svn etc.&lt;br /&gt;
&lt;br /&gt;
'''Installing AppFog'''&amp;lt;ref&amp;gt;http://blog.appfog.com/getting-started-with-appfogs-command-line/&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
‘af‘ command line tool is written in Ruby for installation.&lt;br /&gt;
&lt;br /&gt;
Download and install [http://rubyinstaller.org/ Ruby Installer] for Windows. The installer already includes RubyGems.&lt;br /&gt;
&lt;br /&gt;
Be sure you use the Ruby-enabled command prompt window when you later install and use af. You access this command prompt from the Windows Start menu (All Programs &amp;gt; Ruby &amp;gt; Start Command Prompt with Ruby).&lt;br /&gt;
&lt;br /&gt;
Finally, update RubyGems from the Ruby Command Prompt:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem update --system&lt;br /&gt;
$ gem install af&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Login with:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ af login&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Finally from within your source code directory:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ af update hello-node&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Getting Started with AppFog'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
target [url]                                       Reports current target or sets a new target&lt;br /&gt;
login [email] [--email, --password]                Login&lt;br /&gt;
info                                               System and account information&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== AWS Elastic Beanstalk==&lt;br /&gt;
&lt;br /&gt;
[[File:AWSLogo.jpg|frame|right|&amp;lt;ref&amp;gt;https://aws.amazon.com&amp;lt;/ref&amp;gt;|AWS Logo]]&lt;br /&gt;
&lt;br /&gt;
Amazon Wen Services(AWS) offers [http://en.wikipedia.org/wiki/Infrastructure_as_a_service#Infrastructure_as_a_service_.28IaaS.29 Infrastructure as a Service] (IaaS) and provides a complete set of resources for the development of a web application in minutes. AWS Elastic Beanstalk is a deployment tool of the AWS cloud.&lt;br /&gt;
&lt;br /&gt;
With AWS Elastic Beanstalk, applications can be quickly deployed and managed in the AWS cloud without worrying about the infrastructure that runs those applications. AWS Elastic Beanstalk reduces management complexity without restricting choice or control. Once the application is uploaded AWS Elastic Beanstalk automatically handles the details of capacity provisioning, load balancing, scaling, and application health monitoring. AWS Elastic Beanstalk uses highly reliable and scalable services.&lt;br /&gt;
&lt;br /&gt;
'''AWS CLI'''&lt;br /&gt;
&lt;br /&gt;
AWS Elastic Beanstalk uses a command line tool Eb, which helps you to deploy your application easily.&lt;br /&gt;
&lt;br /&gt;
'''Getting Started with Eb'''&amp;lt;ref&amp;gt;http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/command-reference-get-started.html&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To get started with the beanstalk CLI, you will need to download the command line tools at the [http://aws.amazon.com/code/6752709412171743 AWS Sample Code &amp;amp; Libraries] website.&lt;br /&gt;
&lt;br /&gt;
Step 1: Initialize Your Git Repository&lt;br /&gt;
&lt;br /&gt;
Eb is a command line interface that enables you to deploy applications quickly and more easily using Git. Eb is available as part of the Elastic Beanstalk command line tools package. &lt;br /&gt;
&lt;br /&gt;
1. To install eb,install the following software onto your local computer:&lt;br /&gt;
&lt;br /&gt;
* Git 1.6.6 or later. To download Git, go to http://git-scm.com/.&lt;br /&gt;
* PowerShell 2.0.&lt;br /&gt;
&lt;br /&gt;
2. Initialize your Git repository.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git init &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Step 2: Configuring AWS Elastic Beanstalk&lt;br /&gt;
&lt;br /&gt;
1. From your directory where you created your local repository, type the following command.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
eb init&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2. When you are prompted for the access key ID, type your access key ID. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Enter your AWS Access Key ID (current value is &amp;quot;AKIAIOSFODNN7EXAMPLE&amp;quot;): &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3. When you are prompted for the secret access key, type your secret access key.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Enter your AWS Secret Access Key (current value is &amp;quot;wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY&amp;quot;): &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
4. When you are prompted for the AWS Elastic Beanstalk application name, type the name of the application. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Enter an AWS Elastic Beanstalk application name (auto-generated value is &amp;quot;windows&amp;quot;): &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Note:&lt;br /&gt;
If you have a space in your application name, make sure you do not use quotes.&lt;br /&gt;
&lt;br /&gt;
5. When you are prompted for the AWS Elastic Beanstalk environment name, type the name of the environment. AWS Elastic Beanstalk automatically creates an environment name based on your application name. If you want to accept the default, press Enter.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Enter an AWS Elastic Beanstalk environment name (current value is &amp;quot;HelloWorld-env&amp;quot;): &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
6. When you are prompted to create an Amazon RDS DB instance, type y or n. For this example, we'll type y.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Create an RDS DB Instance? [y/n]:&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
7. When you are prompted to enter your RDS user master password, type your password containing from 8 to 16 printable ASCII characters (excluding /, \, and @).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Enter an RDS DB master password: &lt;br /&gt;
Retype password to confirm: &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can now get started with the AWS Elastic Beanstalk.&lt;br /&gt;
&lt;br /&gt;
== OpenShift ==&lt;br /&gt;
&lt;br /&gt;
[[File:OpenShift.png|frame|right|&amp;lt;ref&amp;gt;https://en.wikipedia.org&amp;lt;/ref&amp;gt;|OpenShift Logo]]&lt;br /&gt;
&lt;br /&gt;
Another free and open source PaaS for deploying applications is OpenShift created by [[http://en.wikipedia.org/wiki/RedHat RedHat]]. &lt;br /&gt;
&lt;br /&gt;
'''Considerations'''&lt;br /&gt;
* Databases&lt;br /&gt;
&lt;br /&gt;
To use the application outside the OpenShift environment one needs to change the variables as the application is configured to use database in production mode in OpenShift.&lt;br /&gt;
&lt;br /&gt;
* Assets&lt;br /&gt;
&lt;br /&gt;
The assets are precompiled everytime application is pushed to OpenShift.&lt;br /&gt;
&lt;br /&gt;
* Security&lt;br /&gt;
&lt;br /&gt;
Security related variables are to be unique across the application.&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;ref&amp;gt;https://github.com/openshift/rails-example&amp;lt;/ref&amp;gt;&lt;br /&gt;
'''Installation'''&lt;br /&gt;
&lt;br /&gt;
1.	Create an account at http://openshift.redhat.com/&lt;br /&gt;
&lt;br /&gt;
2.	Create a rails application&lt;br /&gt;
	&amp;lt;pre&amp;gt;rhc app create -a railsapp -t ruby-1.9&amp;lt;/pre&amp;gt;&lt;br /&gt;
3.	Add mysql support to your application&lt;br /&gt;
	&amp;lt;pre&amp;gt;rhc cartridge add -a railsapp -c mysql-5.1&amp;lt;/pre&amp;gt;&lt;br /&gt;
4.	Add this upstream Rails quickstart repository&lt;br /&gt;
&amp;lt;pre&amp;gt;cd railsapp&lt;br /&gt;
git remote add upstream -m master git://github.com/openshift/rails-example.git&lt;br /&gt;
git pull -s recursive -X theirs upstream master&amp;lt;/pre&amp;gt;&lt;br /&gt;
5.	Push your new code&lt;br /&gt;
&amp;lt;pre&amp;gt;git push&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Future scope ==&lt;br /&gt;
&lt;br /&gt;
[[File:Cloud 66.jpg|frame|right|&amp;lt;ref&amp;gt;https://www.cloud66.com/&amp;lt;/ref&amp;gt;|Cloud66 Logo]]&lt;br /&gt;
&lt;br /&gt;
Cloud 66 combines the convenience of Platform-as-a-Service (PaaS) and the flexibility and control of Infrastructure-as-a-Service (IaaS). This platform allows easy deployment of application, so there is no overhead of configuring or monitoring the servers.&lt;br /&gt;
&lt;br /&gt;
'''Cloud 66 Command line Toolbelt'''&lt;br /&gt;
&lt;br /&gt;
Toolbelt is an open source released to deploy the application.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ref&amp;gt;http://blog.cloud66.com/&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Getting Started with Cloud 66'''&lt;br /&gt;
&lt;br /&gt;
1. Go to the [https://www.cloud66.com/users/sign_up sign up] page and create a Cloud 66 account.&lt;br /&gt;
&lt;br /&gt;
2. Go to Cloud 66 Dashboard and [https://www.cloud66.com/help/first_stack build your first stack].&lt;br /&gt;
&lt;br /&gt;
'''Installation'''&lt;br /&gt;
&lt;br /&gt;
Installation of toolbelt uses the following command&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Gem install c66&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This automatically searches the newest version and installs it.&lt;br /&gt;
&lt;br /&gt;
= Model Class : assignment_participant.rb =&lt;br /&gt;
Th AssignmentParticipant model class is a subclass of the participant model class. Several methods in AssignmentParticipant model class required renaming and refactoring to ensure that the change is reflected in the entire project. The names were changed to follow method naming convention. Deprecated code was removed and re-coded to ensure that the code worked in future version as well. Duplicated codes were commented. Methods that are more general to the sub classes were moved to the parent class. Some methods that calculates the collusion in reviews between students were moved to a newly created model class file called collusion_cycle.rb &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;width:3%;&amp;quot;|S. No&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;|Method Name&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;|Change Made &lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;|Reason For Change&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
|''''' 1 '''''&lt;br /&gt;
|get_course_string&lt;br /&gt;
|Renamed to course_string and refactored &lt;br /&gt;
|To follow method naming convention&lt;br /&gt;
|-&lt;br /&gt;
|''''' 2 '''''&lt;br /&gt;
|get_cycle_deviation_score&lt;br /&gt;
|Moved to collusion_cycle.rb model class&lt;br /&gt;
|Related methods that calculate collusion in reviews have been moved to the newly created collusion_cycle.rb model class&lt;br /&gt;
|-&lt;br /&gt;
|''''' 3 '''''&lt;br /&gt;
|get_cycle_similarity_score&lt;br /&gt;
|Moved to collusion_cycle.rb model class&lt;br /&gt;
|Related methods that calculate collusion in reviews have been moved to the newly created collusion_cycle.rb model class&lt;br /&gt;
|-&lt;br /&gt;
|''''' 4 '''''&lt;br /&gt;
|get_feedback&lt;br /&gt;
|Renamed to feedback and refactored&lt;br /&gt;
|To follow method naming convention&lt;br /&gt;
|-&lt;br /&gt;
|''''' 5 '''''&lt;br /&gt;
|get_files&lt;br /&gt;
|Renamed to files_in_directory  and refactored&lt;br /&gt;
|To follow method naming convention&lt;br /&gt;
|-&lt;br /&gt;
|''''' 6 '''''&lt;br /&gt;
|get_four_node_cycles&lt;br /&gt;
|Moved to collusion_cycle.rb model class&lt;br /&gt;
|Related methods that calculate collusion in reviews have been moved to the newly created collusion_cycle.rb model class&lt;br /&gt;
|-&lt;br /&gt;
|''''' 7 '''''&lt;br /&gt;
|fullname&lt;br /&gt;
|Moved to parent model class – participant.rb &lt;br /&gt;
|General methods of the subclass are moved to Parent class&lt;br /&gt;
|-&lt;br /&gt;
|''''' 8 '''''&lt;br /&gt;
|get_metareviews&lt;br /&gt;
|Renamed to metareviews and refactored&lt;br /&gt;
|To follow method naming convention&lt;br /&gt;
|-&lt;br /&gt;
|''''' 9 '''''&lt;br /&gt;
|name&lt;br /&gt;
|Commented the method  &lt;br /&gt;
|The method is already in parent model class – participant.rb and can be used in this subclass through inheritance&lt;br /&gt;
|-&lt;br /&gt;
|''''' 10 '''''&lt;br /&gt;
|name&lt;br /&gt;
|Commented the method  &lt;br /&gt;
|The method is already in parent model class – participant.rb and can be used in this subclass through inheritance. Also it is a duplicate method in patricipant.rb&lt;br /&gt;
|- &lt;br /&gt;
|''''' 11 '''''&lt;br /&gt;
|get_review_score&lt;br /&gt;
|Renamed to review_score and refactored. Deprecated code has been removed and replaced with correct code.&lt;br /&gt;
|To follow method naming convention and ensure the code works in future versions. &lt;br /&gt;
|-&lt;br /&gt;
|''''' 12 '''''&lt;br /&gt;
|get_reviewees&lt;br /&gt;
|Renamed to reviewees and refactored. Deprecated code has been removed and replaced with correct code.&lt;br /&gt;
|To follow method naming convention and ensure the code works in future versions. &lt;br /&gt;
|-&lt;br /&gt;
|''''' 13 '''''&lt;br /&gt;
|get_reviewers&lt;br /&gt;
|Renamed to reviewers and refactored . Deprecated code has been commented and replaced with correct code.&lt;br /&gt;
|To follow method naming convention and ensure the code works in future versions. &lt;br /&gt;
|-&lt;br /&gt;
|''''' 14 '''''&lt;br /&gt;
|get_reviews&lt;br /&gt;
|Renamed to reviews and refactored &lt;br /&gt;
|To follow method naming convention&lt;br /&gt;
|-&lt;br /&gt;
|''''' 15 '''''&lt;br /&gt;
|get_reviews_by_reviewer&lt;br /&gt;
|Renamed to reviews_by_reviewer and refactored &lt;br /&gt;
|To follow method naming convention&lt;br /&gt;
|-&lt;br /&gt;
|''''' 16 '''''&lt;br /&gt;
|get_reviews_by_reviewer&lt;br /&gt;
|Renamed to reviews_by_reviewer and refactored &lt;br /&gt;
|Commented the method &lt;br /&gt;
|To remove duplicated method in this class&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
After changes were made, the existing tests ran successfully.&lt;br /&gt;
&lt;br /&gt;
= Comparison between Capistrano/Vlad/Heroku/AppFog/OpenShift/Cloud66/AWS Beanstalk =&lt;br /&gt;
&lt;br /&gt;
With so many automated tools available for Code Deployment and Release Management, the decision on which to use for a particular Ruby on rails application depends on various parameters to be considered.&lt;br /&gt;
Some comparative features of the different tools are as follows :&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;width:9%;&amp;quot;|Criteria for Comparision&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;|Capistrano&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;| Vlad&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;| Heroku&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;| AppFog&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;| OpenShift&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;| Cloud66&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;| AWS Beanstalk&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
|'''''Getting started with the tool'''''&lt;br /&gt;
|It is a framework that allows one to execute commands on a remote server using tools like ssh.&lt;br /&gt;
|Vlad deployment is similar to Capistrano, but less complex.&lt;br /&gt;
|Heroku’s offers a plan with first dyno free i.e. 512 MB that can be paired with Postgres starter DB to start an application with 0 initial cost&lt;br /&gt;
|AppFog’s initial plan offers 2GB of RAM free which is enough for small to medium traffic applications. By managing options provided for DB, queue server, application server, etc all part of the intial package, this is an excellent option to try out an application&lt;br /&gt;
|OpenShift is an open source platform and its free plan for starters has 3 gears for free wherein each gear consists of some RAM and disk space.&lt;br /&gt;
|Free plan provides one server for deployment.&lt;br /&gt;
|Provides an initial free tier. Without free tier no additional cost for Beanstalk. One only needs to pay for the AWS resources used.&lt;br /&gt;
|-&lt;br /&gt;
|'''''Scaling Memory'''''&lt;br /&gt;
|Memory increase would require additional servers/unused space in existing ones.&lt;br /&gt;
|Memory increase depends on additional servers available/unused space in existing ones.&lt;br /&gt;
|Memory increased in terms of dyno each of size 512 MB.&lt;br /&gt;
|Can configure any size for memory allocation&lt;br /&gt;
| -&lt;br /&gt;
| -&lt;br /&gt;
|Can automatically up/down scale the application by adjusting the default auto scaling settings.&lt;br /&gt;
|-&lt;br /&gt;
|'''''Scaling – Cost and Ease'''''&lt;br /&gt;
|While this provides greater flexibility as user is in control of the servers, it also causes additional overhead in terms of user needing to work both on Rails application and web server deployment.&lt;br /&gt;
|It can be integrated with Rake without any hindrances.&lt;br /&gt;
|Can dynamically scale up and down an application and pay as per hourly usages. Each additional dyno costs $35/mo&lt;br /&gt;
|Scaling takes up some time and need to pay for a month at the minimum. Scaling up to 4GB increases cost to $100/mo&lt;br /&gt;
| -&lt;br /&gt;
|Scaling using Cloud66 is relatively easy and hassle free.&lt;br /&gt;
|Scaling is fast and easy.&lt;br /&gt;
|-&lt;br /&gt;
|'''''Special features'''''&lt;br /&gt;
|For sensitive applications where handing over the control to a third party for deployment is not feasible, Capistrano is the way to go.&lt;br /&gt;
|It also provides support for tools like rsync and ssh.&lt;br /&gt;
|Lacks support for cross region deployment i.e. can’t select location of server where application gets deployed&lt;br /&gt;
|Supports cross region deployment i.e. if users of application primarily in Asia, can choose a server in Asia to deploy application, thus making the site faster.&lt;br /&gt;
| -&lt;br /&gt;
| -&lt;br /&gt;
|Provides complete flexibility and control of the resources to the user including the chance to take over control of some or all.&lt;br /&gt;
|-&lt;br /&gt;
|'''''Database support'''''&lt;br /&gt;
|Provides support for DB related to rails applications&lt;br /&gt;
|Provides support for DB related to rails applications&lt;br /&gt;
|It features serious production DB like RDBMS, Postgres, etc. and many Addons such as MongoDB, ClearDB, etc.&lt;br /&gt;
|Features free shared databases such as MongoDB, MySQL, Postgres but for other production DB’s need to use Addons&lt;br /&gt;
|Databases featured are MySQL, MongoDB and Postgres&lt;br /&gt;
| -&lt;br /&gt;
|Supports DB like Amazon SimpleDB, Amazon RDS, Amazon DynamoDB.&lt;br /&gt;
|-&lt;br /&gt;
|'''''Deployment strategy'''''&lt;br /&gt;
|Capistrano provides commands to be executed for automated deployment. It supports git.&lt;br /&gt;
|It is much easier to deploy using Vlad as compared to Capistrano.&lt;br /&gt;
|Deployment as easy as ‘git push’&lt;br /&gt;
|Deployment does not support git. It uses the af tool for deployment.&lt;br /&gt;
| -&lt;br /&gt;
|Since Cloud66 provides the platform in terms of Application Stack Management as a Service, it uses the infrastructure of AWS, Virtual Private Server, etc. for actual deployment. But the user doesn’t have to worry about configuration or monitoring of the servers. Hence provides easy deployment.&lt;br /&gt;
|Deployment options include Git, AWS management console, etc.&lt;br /&gt;
|-&lt;br /&gt;
|'''''Community Support availability'''''&lt;br /&gt;
| As it has been in use for a long time there is a huge community support available for Capistrano.&lt;br /&gt;
| -&lt;br /&gt;
|Heroku also provides a huge community support given the fact that there are a lot of Heroku users.&lt;br /&gt;
|Community is limited.&lt;br /&gt;
|RedHat being a reputed provider for open source solutions, the OpenShift community is gradually increasing and receiving support from a considerable community of users.&lt;br /&gt;
|Limited community support currently&lt;br /&gt;
|Has community forums and documentation.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Conclusion =&lt;br /&gt;
&lt;br /&gt;
Comparison and contrast between various deployment automated tools such as Capistrano, Heroku, Vlad, AppFog, OpenShift, Cloud66, AWS Beanstalk shows that each has its own pros and cons. &lt;br /&gt;
For instance, in a client based application where handing over the control of the application to a third party such as the deployment tool provider is impossible, AWS Beanstalk would be the obvious choice for the developer.&lt;br /&gt;
On the other hand, a novice Rails application developer might find all he needs in the starter plan of Heroku with the added bonus of a huge support community available to him for troubleshooting as he stumbles his way across the development of the application.&lt;br /&gt;
One may also choose the tool that provides the specific database support for your application. In case of large scale corporations where budgets are not that limited, the increasing costs with up-scaling of some tools would not be an obstacle.&lt;br /&gt;
Thus, various considerations about the application such as scalability requirement, security concerns, cost, availability of own resources such as servers etc., will help determine which tool is the most suitable for that application.&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= See Also =&lt;br /&gt;
&lt;br /&gt;
* Rails Solutions: Ruby on Rails Made Easy by Justin Williams&lt;br /&gt;
* http://guides.beanstalkapp.com/deployments/best-practices.html&lt;br /&gt;
* http://www.urbancode.com/anthill3-help-3.7/html/SettingUpDeploymentProcess.html&lt;br /&gt;
* http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=UseFMSGateway_3.html&lt;br /&gt;
* http://pic.dhe.ibm.com/infocenter/tivihelp/v26r1/index.jsp?topic=%2Fcom.ibm.dtm.doc%2Fdeploysoftware%2Fc_deploysw_process.html&lt;/div&gt;</summary>
		<author><name>Npari</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch2_0e808_nsv&amp;diff=81335</id>
		<title>CSC/ECE 517 Fall 2013/ch2 0e808 nsv</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch2_0e808_nsv&amp;diff=81335"/>
		<updated>2013-10-30T21:06:41Z</updated>

		<summary type="html">&lt;p&gt;Npari: /* Model Class : assignment_participant.rb */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= E808: Refactor and test Participant, AssignmentParticipant, &amp;amp; CourseParticipant =&lt;br /&gt;
The requirements provided for the Open Source System project were as follows : &amp;lt;br&amp;gt;&lt;br /&gt;
'''Classes''': &amp;lt;br&amp;gt;&lt;br /&gt;
''participant.rb'' (197 lines)&amp;lt;br&amp;gt;&lt;br /&gt;
''assignment_participant.rb'' (476 lines)&amp;lt;br&amp;gt;&lt;br /&gt;
''course_participant.rb'' (90 lines)&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''What they do''': &amp;lt;br&amp;gt; &lt;br /&gt;
These classes keep track of a user who is participating in an assignment or a course.  participant.rb is the superclass, and the other two are the subclasses.&lt;br /&gt;
&lt;br /&gt;
'''What is needed''': &amp;lt;br&amp;gt; &lt;br /&gt;
The methods are complex; there are a lot of them (assignment_particpant has 44) and there is a lot of duplicated code.  assignment_participant contains code for detecting cycles of high grades (which can indicate collusion in reviews).  It would be better moved to another class.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
= Introduction =&lt;br /&gt;
&lt;br /&gt;
The Deploying process involves different stages like development, testing, release management and sign-off by project teams.&lt;br /&gt;
&lt;br /&gt;
The following diagram illustrates the deployment process of an application.&lt;br /&gt;
&lt;br /&gt;
[[File:Deployment Process.jpg|frame|center|&amp;lt;ref&amp;gt;http://technet.microsoft.com/en-us/library/cc465178.aspx&amp;lt;/ref&amp;gt;]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The deployment flow has three stages: development and testing, release management and stakeholders and project teams. &lt;br /&gt;
&lt;br /&gt;
After the final release of the code in development and testing stage, the master plan is prepared for deployment of components and sites based on the sign-offs provided by the project teams, stakeholders and customers. Then, the stabilization of the deployment is calculated based on some metrics. Once the deployment is stabilized, it is reviewed and the process of deployment is complete. The final sign-off is given by the stakeholders.&lt;br /&gt;
&lt;br /&gt;
=Participant model: participant.rb=&lt;br /&gt;
&lt;br /&gt;
Code deployment is a procedure where the application is transferred onto a production server, so that it is made available for all the other users. It is the part of release management process which involves several activities. These activities are inter-dependent and need to be completed in a specific order for successful code deployment. &lt;br /&gt;
&lt;br /&gt;
'''Code Deployment Activities'''&lt;br /&gt;
&lt;br /&gt;
The various deployment activities include &amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/Software_deployment&amp;lt;/ref&amp;gt;&lt;br /&gt;
* Release : Gathering all system components in preparation for deployment&lt;br /&gt;
* Install and activate : Installing the application components and getting them in the 'ready' state&lt;br /&gt;
* Deactivate : Shutting down components that are out-dated or that may interfere with updating others&lt;br /&gt;
* Adapt : Making changes to application to accommodate changes in environment&lt;br /&gt;
* Update : Having a newer release installed in place of the old one&lt;br /&gt;
* Built-in : There are components built-into some tools for complete/semi-automating updates&lt;br /&gt;
* Version tracking : These systems help the user to know if newer versions of a software are available and if yes, help install them&lt;br /&gt;
* Uninstall : Opposite of installation and involves complete removal of software and its dependencies from the environment&lt;br /&gt;
* Retire : This involves making a software obsolete and is the end of software life cycle&lt;br /&gt;
&lt;br /&gt;
The general guidelines for the deployment process remain the same but there are variations in the specific requirements with each software system.&lt;br /&gt;
&lt;br /&gt;
=AssignmentParticipant model: assignment_participant.rb=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ref&amp;gt;http://searchitchannel.techtarget.com/definition/release-management&amp;lt;/ref&amp;gt;&lt;br /&gt;
Release management is a software process which takes care of the development, testing, deployment and support stages of software releases. The start of release management happens in the development phase, where it requests for new features or changes in the existing application. When the request is accepted, a new release is planned and designed. This design is built and then enters the testing phase, where the release is tested until it is accepted. After the release is accepted as a candidate, it enters the deployment phase where it is implemented. Once deployed, the release is made available and sent to support phase for collection of bug reports. Once the support phase is done, the bugs and other issues lead to requests for changes and the cycle is then repeated.&lt;br /&gt;
&lt;br /&gt;
=CourseParticipant model:course_participant.rb =&lt;br /&gt;
&amp;lt;ref&amp;gt;http://www.urbancode.com/html/solutions/deployment-automation.html&amp;lt;/ref&amp;gt;&lt;br /&gt;
Automation of a process is required when the manual process is more error prone. Also, for large real world applications, the manual process is very complex and time consuming. Incomplete documentation hampers a manual process further. Deployment also has to be done in many environments and involves varied steps to be followed in a specific order. Manual process needs repetition of same procedure to each and every environment which leads to many errors and the process becomes costly.&lt;br /&gt;
In web applications each new release has to be deployed to and tested in development, testing and production environments.The number of software releases in web applications  are more and hence the need to automate release management is also greater.&lt;br /&gt;
&lt;br /&gt;
Automation of deployment delivers applications faster and with fewer errors. The defined software deployment process can be applied across all environments consistently every time. With various automated application deployment platforms now readily available, manual deployments have become a thing of the past.&lt;br /&gt;
&lt;br /&gt;
Lets take a look at the various Deployment Automation tools available to Ruby on Rails applications. For the purposes of this article the process of manual deployment of a Ruby on Rails application is out of scope.&lt;br /&gt;
&lt;br /&gt;
= Tests =&lt;br /&gt;
&lt;br /&gt;
Some of the automated tools that are widely used for the process of deployment with Ruby on Rails are &lt;br /&gt;
&lt;br /&gt;
* Capistrano&lt;br /&gt;
* Heroku&lt;br /&gt;
* Vlad&lt;br /&gt;
* AppFog&lt;br /&gt;
* AWS Elastic Beanstalk&lt;br /&gt;
* OpenShift&lt;br /&gt;
* Cloud 66&lt;br /&gt;
&lt;br /&gt;
= yml files =&lt;br /&gt;
&lt;br /&gt;
[[File:Capistrano.jpg|frame|right|&amp;lt;ref&amp;gt;http://www.capistranorb.com/&amp;lt;/ref&amp;gt;|Capistrano Logo]]&lt;br /&gt;
&lt;br /&gt;
Capistrano is a Ruby tool which helps deploy an application to the server. Capistrano allows deploying to multiple machines at a time. It has many advanced options which help to deploy different kinds of applications. It also supports the scripting and execution of tasks.&lt;br /&gt;
&lt;br /&gt;
Capistrano can be used to:&lt;br /&gt;
&lt;br /&gt;
* Deploy applications onto many machines simultaneously.&lt;br /&gt;
* Automate the audits&lt;br /&gt;
* Automate the common tasks of a team.&lt;br /&gt;
&lt;br /&gt;
Capistrano can be made a part of a larger software by integrating it with another Ruby software.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ref&amp;gt;http://www.capistranorb.com/documentation/getting-started/installation/&amp;lt;/ref&amp;gt;  &lt;br /&gt;
'''General Usage'''&lt;br /&gt;
&lt;br /&gt;
The following commands will clone Capistrano, build the gem and install it locally.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem install capistrano --pre --trust-policy HighSecurity&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Or grab the bleeding edge head from:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ git clone -b v3 https://github.com/capistrano/capistrano.git&lt;br /&gt;
$ cd capistrano&lt;br /&gt;
$ gem build *.gemspec&lt;br /&gt;
$ gem install *.gem&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
'''Signed Rubygems'''&lt;br /&gt;
&lt;br /&gt;
As Capistrano is a signed gem, you should always be careful to use the --trust-policy flag when installing Gems, or since Bundler 1.3 you should use the same flag:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem install capistrano --pre --trust-policy HighSecurity&lt;br /&gt;
$ bundle install --trust-policy HighSecurity&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If you get a message that looks like:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ERROR:  While executing gem ... (Gem::Security::Exception)&lt;br /&gt;
unsigned gems are not allowed by the High Security policy&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then please complain to your Gem author, and have them start signing their Gems.&lt;br /&gt;
&lt;br /&gt;
'''Usage in a Rails project'''&lt;br /&gt;
&lt;br /&gt;
Add the following lines to the Gemfile to the :development group ideally.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
group :development do&lt;br /&gt;
  gem 'capistrano-rails', '~&amp;gt; 0.0.7'&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= routes.rb =&lt;br /&gt;
&lt;br /&gt;
[[File:Heroku.jpg|frame|right|&amp;lt;ref&amp;gt;https://www.heroku.com/&amp;lt;/ref&amp;gt;|Heroku Logo]]&lt;br /&gt;
&lt;br /&gt;
Heroku is a cloud [http://en.wikipedia.org/wiki/Platform_as_a_service Platform as a Service] (PaaS) which supports several programming languages. PaaS is a service model of Cloud computing wherein the provider offers resources like servers, software, database, etc. to the developer. Heroku helps manage environment-specific configurations separately from the source code, which provides greater security.&lt;br /&gt;
Heroku is not just a deployment environment but it also impacts the development process. There are several principles of the development of application on Heroku.&amp;lt;br&amp;gt;&lt;br /&gt;
•	Applications and Codebases : Most of the development of the application is done on application’s codebase which is stored in a [http://en.wikipedia.org/wiki/Version_control_system Version Control System (VCS)] &amp;lt;br&amp;gt;&lt;br /&gt;
•	Dependencies : All the application dependencies such as plugins should be declared explicitly&amp;lt;br&amp;gt;&lt;br /&gt;
•	Configuration : Configuration of an application is all that varies in different deploys&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Getting Started with Heroku'''&lt;br /&gt;
&lt;br /&gt;
1. To get started with Heroku, go to https://id.heroku.com/signup/devcenter, signup for a Heroku account. &lt;br /&gt;
&lt;br /&gt;
2. Then, download and install the Heroku toolbelt at https://toolbelt.heroku.com/ for your development system. You can also use Heroku command line instead of the online Heroku application. &lt;br /&gt;
&lt;br /&gt;
3. After installing one of them, login using the email address and password used when creating the Heroku account:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ref&amp;gt;https://github.com/heroku/heroku&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ heroku login&lt;br /&gt;
Enter your Heroku credentials.&lt;br /&gt;
Email: adam@example.com&lt;br /&gt;
Password:&lt;br /&gt;
Could not find an existing public key.&lt;br /&gt;
Would you like to generate one? [Yn]&lt;br /&gt;
Generating new SSH public key.&lt;br /&gt;
Uploading SSH public key /Users/adam/.ssh/id_rsa.pub&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Deploying Applications'''&lt;br /&gt;
&lt;br /&gt;
Heroku uses [http://en.wikipedia.org/wiki/Git_(software) git] primarily to deploy the applications. When an application is created on Heroku, it associates the new git which is remote with the local git repository.&lt;br /&gt;
&lt;br /&gt;
As a result, deploying code is just the familiar git push, but to the heroku remote instead:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ref&amp;gt;https://devcenter.heroku.com/articles/how-heroku-works#deploying-applications&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ git push heroku master&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Vlad ==&lt;br /&gt;
&lt;br /&gt;
[[File:Vlad.png|frame|right|&amp;lt;ref&amp;gt;http://rubyhitsquad.com/Vlad_the_Deployer.html&amp;lt;/ref&amp;gt;|Vlad Logo]]&lt;br /&gt;
&lt;br /&gt;
Vlad is another automated deployment tool which is simple to use. It integrates with rake and uses standard tools like SSH, rsync etc.&lt;br /&gt;
&lt;br /&gt;
The main features of Vlad include&lt;br /&gt;
* It uses very few dependencies which are simple.&lt;br /&gt;
* It can execute commands on more than one server.&lt;br /&gt;
* It syncs files to one or more servers.&lt;br /&gt;
* It matches local and remote tasks.&lt;br /&gt;
* It runs tests very fast.&lt;br /&gt;
&lt;br /&gt;
'''Getting started with Vlad'''&amp;lt;ref&amp;gt;http://docs.seattlerb.org/vlad/doco/getting_started_txt.html&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create a deploy file, usually in “config/deploy.rb”:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set :application, &amp;quot;project&amp;quot;&lt;br /&gt;
set :domain, &amp;quot;example.com&amp;quot;&lt;br /&gt;
set :deploy_to, &amp;quot;/path/to/install&amp;quot;&lt;br /&gt;
set :repository, 'http://svn.example.com/project/branches/stable/'&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This defaults to using ‘svn export’ from repository, and a single server for app, db, and www.&lt;br /&gt;
&lt;br /&gt;
If you want a multi-config environment, change your config like so:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set :application, &amp;quot;project&amp;quot;&lt;br /&gt;
set :repository, 'http://svn.example.com/project/branches/stable/'&lt;br /&gt;
&lt;br /&gt;
task :beta do&lt;br /&gt;
  set :domain,    &amp;quot;beta.example.com&amp;quot;&lt;br /&gt;
  set :deploy_to, &amp;quot;/path/to/install-beta&amp;quot;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
task :dev do&lt;br /&gt;
  set :domain,    &amp;quot;dev.example.com&amp;quot;&lt;br /&gt;
  set :deploy_to, &amp;quot;/path/to/install-dev&amp;quot;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
task :prod do&lt;br /&gt;
  set :domain,    &amp;quot;example.com&amp;quot;&lt;br /&gt;
  set :deploy_to, &amp;quot;/path/to/install&amp;quot;&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Add the following to your Rakefile:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
begin&lt;br /&gt;
  require 'vlad'&lt;br /&gt;
  Vlad.load&lt;br /&gt;
rescue LoadError&lt;br /&gt;
  # do nothing&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Vlad.load has a lot of flexibility.&lt;br /&gt;
&lt;br /&gt;
You can install vlad via:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;% rake vlad:invoke COMMAND='sudo gem install vlad -y'&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Initial Launch&lt;br /&gt;
&amp;lt;pre&amp;gt;Run rake vlad:setup vlad:update vlad:migrate vlad:start&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ref&amp;gt;http://docs.seattlerb.org/vlad/index.html&amp;lt;/ref&amp;gt;&lt;br /&gt;
'''Running Vlad'''&lt;br /&gt;
&lt;br /&gt;
* Using rake&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
task :shazam! do&lt;br /&gt;
  Rake::Task[:action1].invoke&lt;br /&gt;
  Rake::Task[:action2].invoke&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Using SSH&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Host example.com&lt;br /&gt;
    User fluffy_bunny&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== AppFog == &lt;br /&gt;
&lt;br /&gt;
[[File:AppFog.jpg|frame|right|&amp;lt;ref&amp;gt;https://www.appfog.com/&amp;lt;/ref&amp;gt;|AppFog Logo]]&lt;br /&gt;
&lt;br /&gt;
AppFog is a PaaS built on Cloud Foundry which is another PaaS platform for deploying applications. &lt;br /&gt;
&lt;br /&gt;
Features of AppFog are&lt;br /&gt;
* It launches and runs fast.&lt;br /&gt;
* It does not require configuring servers or installing frameworks.&lt;br /&gt;
* It is compatible with code management systems like git, svn etc.&lt;br /&gt;
&lt;br /&gt;
'''Installing AppFog'''&amp;lt;ref&amp;gt;http://blog.appfog.com/getting-started-with-appfogs-command-line/&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
‘af‘ command line tool is written in Ruby for installation.&lt;br /&gt;
&lt;br /&gt;
Download and install [http://rubyinstaller.org/ Ruby Installer] for Windows. The installer already includes RubyGems.&lt;br /&gt;
&lt;br /&gt;
Be sure you use the Ruby-enabled command prompt window when you later install and use af. You access this command prompt from the Windows Start menu (All Programs &amp;gt; Ruby &amp;gt; Start Command Prompt with Ruby).&lt;br /&gt;
&lt;br /&gt;
Finally, update RubyGems from the Ruby Command Prompt:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem update --system&lt;br /&gt;
$ gem install af&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Login with:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ af login&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Finally from within your source code directory:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ af update hello-node&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Getting Started with AppFog'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
target [url]                                       Reports current target or sets a new target&lt;br /&gt;
login [email] [--email, --password]                Login&lt;br /&gt;
info                                               System and account information&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== AWS Elastic Beanstalk==&lt;br /&gt;
&lt;br /&gt;
[[File:AWSLogo.jpg|frame|right|&amp;lt;ref&amp;gt;https://aws.amazon.com&amp;lt;/ref&amp;gt;|AWS Logo]]&lt;br /&gt;
&lt;br /&gt;
Amazon Wen Services(AWS) offers [http://en.wikipedia.org/wiki/Infrastructure_as_a_service#Infrastructure_as_a_service_.28IaaS.29 Infrastructure as a Service] (IaaS) and provides a complete set of resources for the development of a web application in minutes. AWS Elastic Beanstalk is a deployment tool of the AWS cloud.&lt;br /&gt;
&lt;br /&gt;
With AWS Elastic Beanstalk, applications can be quickly deployed and managed in the AWS cloud without worrying about the infrastructure that runs those applications. AWS Elastic Beanstalk reduces management complexity without restricting choice or control. Once the application is uploaded AWS Elastic Beanstalk automatically handles the details of capacity provisioning, load balancing, scaling, and application health monitoring. AWS Elastic Beanstalk uses highly reliable and scalable services.&lt;br /&gt;
&lt;br /&gt;
'''AWS CLI'''&lt;br /&gt;
&lt;br /&gt;
AWS Elastic Beanstalk uses a command line tool Eb, which helps you to deploy your application easily.&lt;br /&gt;
&lt;br /&gt;
'''Getting Started with Eb'''&amp;lt;ref&amp;gt;http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/command-reference-get-started.html&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To get started with the beanstalk CLI, you will need to download the command line tools at the [http://aws.amazon.com/code/6752709412171743 AWS Sample Code &amp;amp; Libraries] website.&lt;br /&gt;
&lt;br /&gt;
Step 1: Initialize Your Git Repository&lt;br /&gt;
&lt;br /&gt;
Eb is a command line interface that enables you to deploy applications quickly and more easily using Git. Eb is available as part of the Elastic Beanstalk command line tools package. &lt;br /&gt;
&lt;br /&gt;
1. To install eb,install the following software onto your local computer:&lt;br /&gt;
&lt;br /&gt;
* Git 1.6.6 or later. To download Git, go to http://git-scm.com/.&lt;br /&gt;
* PowerShell 2.0.&lt;br /&gt;
&lt;br /&gt;
2. Initialize your Git repository.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git init &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Step 2: Configuring AWS Elastic Beanstalk&lt;br /&gt;
&lt;br /&gt;
1. From your directory where you created your local repository, type the following command.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
eb init&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2. When you are prompted for the access key ID, type your access key ID. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Enter your AWS Access Key ID (current value is &amp;quot;AKIAIOSFODNN7EXAMPLE&amp;quot;): &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3. When you are prompted for the secret access key, type your secret access key.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Enter your AWS Secret Access Key (current value is &amp;quot;wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY&amp;quot;): &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
4. When you are prompted for the AWS Elastic Beanstalk application name, type the name of the application. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Enter an AWS Elastic Beanstalk application name (auto-generated value is &amp;quot;windows&amp;quot;): &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Note:&lt;br /&gt;
If you have a space in your application name, make sure you do not use quotes.&lt;br /&gt;
&lt;br /&gt;
5. When you are prompted for the AWS Elastic Beanstalk environment name, type the name of the environment. AWS Elastic Beanstalk automatically creates an environment name based on your application name. If you want to accept the default, press Enter.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Enter an AWS Elastic Beanstalk environment name (current value is &amp;quot;HelloWorld-env&amp;quot;): &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
6. When you are prompted to create an Amazon RDS DB instance, type y or n. For this example, we'll type y.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Create an RDS DB Instance? [y/n]:&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
7. When you are prompted to enter your RDS user master password, type your password containing from 8 to 16 printable ASCII characters (excluding /, \, and @).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Enter an RDS DB master password: &lt;br /&gt;
Retype password to confirm: &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can now get started with the AWS Elastic Beanstalk.&lt;br /&gt;
&lt;br /&gt;
== OpenShift ==&lt;br /&gt;
&lt;br /&gt;
[[File:OpenShift.png|frame|right|&amp;lt;ref&amp;gt;https://en.wikipedia.org&amp;lt;/ref&amp;gt;|OpenShift Logo]]&lt;br /&gt;
&lt;br /&gt;
Another free and open source PaaS for deploying applications is OpenShift created by [[http://en.wikipedia.org/wiki/RedHat RedHat]]. &lt;br /&gt;
&lt;br /&gt;
'''Considerations'''&lt;br /&gt;
* Databases&lt;br /&gt;
&lt;br /&gt;
To use the application outside the OpenShift environment one needs to change the variables as the application is configured to use database in production mode in OpenShift.&lt;br /&gt;
&lt;br /&gt;
* Assets&lt;br /&gt;
&lt;br /&gt;
The assets are precompiled everytime application is pushed to OpenShift.&lt;br /&gt;
&lt;br /&gt;
* Security&lt;br /&gt;
&lt;br /&gt;
Security related variables are to be unique across the application.&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;ref&amp;gt;https://github.com/openshift/rails-example&amp;lt;/ref&amp;gt;&lt;br /&gt;
'''Installation'''&lt;br /&gt;
&lt;br /&gt;
1.	Create an account at http://openshift.redhat.com/&lt;br /&gt;
&lt;br /&gt;
2.	Create a rails application&lt;br /&gt;
	&amp;lt;pre&amp;gt;rhc app create -a railsapp -t ruby-1.9&amp;lt;/pre&amp;gt;&lt;br /&gt;
3.	Add mysql support to your application&lt;br /&gt;
	&amp;lt;pre&amp;gt;rhc cartridge add -a railsapp -c mysql-5.1&amp;lt;/pre&amp;gt;&lt;br /&gt;
4.	Add this upstream Rails quickstart repository&lt;br /&gt;
&amp;lt;pre&amp;gt;cd railsapp&lt;br /&gt;
git remote add upstream -m master git://github.com/openshift/rails-example.git&lt;br /&gt;
git pull -s recursive -X theirs upstream master&amp;lt;/pre&amp;gt;&lt;br /&gt;
5.	Push your new code&lt;br /&gt;
&amp;lt;pre&amp;gt;git push&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Future scope ==&lt;br /&gt;
&lt;br /&gt;
[[File:Cloud 66.jpg|frame|right|&amp;lt;ref&amp;gt;https://www.cloud66.com/&amp;lt;/ref&amp;gt;|Cloud66 Logo]]&lt;br /&gt;
&lt;br /&gt;
Cloud 66 combines the convenience of Platform-as-a-Service (PaaS) and the flexibility and control of Infrastructure-as-a-Service (IaaS). This platform allows easy deployment of application, so there is no overhead of configuring or monitoring the servers.&lt;br /&gt;
&lt;br /&gt;
'''Cloud 66 Command line Toolbelt'''&lt;br /&gt;
&lt;br /&gt;
Toolbelt is an open source released to deploy the application.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ref&amp;gt;http://blog.cloud66.com/&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Getting Started with Cloud 66'''&lt;br /&gt;
&lt;br /&gt;
1. Go to the [https://www.cloud66.com/users/sign_up sign up] page and create a Cloud 66 account.&lt;br /&gt;
&lt;br /&gt;
2. Go to Cloud 66 Dashboard and [https://www.cloud66.com/help/first_stack build your first stack].&lt;br /&gt;
&lt;br /&gt;
'''Installation'''&lt;br /&gt;
&lt;br /&gt;
Installation of toolbelt uses the following command&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Gem install c66&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This automatically searches the newest version and installs it.&lt;br /&gt;
&lt;br /&gt;
= Model Class : assignment_participant.rb =&lt;br /&gt;
This class is a subclass of the model class named 'participant'.Several methods in this model class required refactoring. The names were changed to follow method naming convention. Deprecated code was removed and re-coded as needed. Duplicated methods were commented. Some of the methods were moved to the parent class while some other were moved to a new class.  &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;width:3%;&amp;quot;|S. No&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;|Method Name&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;|Change Made &lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;|Reason For Change&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
|''''' 1 '''''&lt;br /&gt;
|get_course_string&lt;br /&gt;
|Renamed to course_string and refactored &lt;br /&gt;
|To follow method naming convention&lt;br /&gt;
|-&lt;br /&gt;
|''''' 2 '''''&lt;br /&gt;
|get_cycle_deviation_score&lt;br /&gt;
|Moved to collusion_cycle.rb model class&lt;br /&gt;
|Related methods that calculate collusion in reviews have been moved to the newly created collusion_cycle.rb model class&lt;br /&gt;
|-&lt;br /&gt;
|''''' 3 '''''&lt;br /&gt;
|get_cycle_similarity_score&lt;br /&gt;
|Moved to collusion_cycle.rb model class&lt;br /&gt;
|Related methods that calculate collusion in reviews have been moved to the newly created collusion_cycle.rb model class&lt;br /&gt;
|-&lt;br /&gt;
|''''' 4 '''''&lt;br /&gt;
|get_feedback&lt;br /&gt;
|Renamed to feedback and refactored&lt;br /&gt;
|To follow method naming convention&lt;br /&gt;
|-&lt;br /&gt;
|''''' 5 '''''&lt;br /&gt;
|get_files&lt;br /&gt;
|Renamed to files_in_directory  and refactored&lt;br /&gt;
|To follow method naming convention&lt;br /&gt;
|-&lt;br /&gt;
|''''' 6 '''''&lt;br /&gt;
|get_four_node_cycles&lt;br /&gt;
|Moved to collusion_cycle.rb model class&lt;br /&gt;
|Related methods that calculate collusion in reviews have been moved to the newly created collusion_cycle.rb model class&lt;br /&gt;
|-&lt;br /&gt;
|''''' 7 '''''&lt;br /&gt;
|fullname&lt;br /&gt;
|Moved to parent model class – participant.rb &lt;br /&gt;
|General methods of the subclass are moved to Parent class&lt;br /&gt;
|-&lt;br /&gt;
|''''' 8 '''''&lt;br /&gt;
|get_metareviews&lt;br /&gt;
|Renamed to metareviews and refactored&lt;br /&gt;
|To follow method naming convention&lt;br /&gt;
|-&lt;br /&gt;
|''''' 9 '''''&lt;br /&gt;
|name&lt;br /&gt;
|Commented the method  &lt;br /&gt;
|The method is already in parent model class – participant.rb and can be used in this subclass through inheritance&lt;br /&gt;
|-&lt;br /&gt;
|''''' 10 '''''&lt;br /&gt;
|name&lt;br /&gt;
|Commented the method  &lt;br /&gt;
|The method is already in parent model class – participant.rb and can be used in this subclass through inheritance. Also it is a duplicate method in patricipant.rb&lt;br /&gt;
|- &lt;br /&gt;
|''''' 11 '''''&lt;br /&gt;
|get_review_score&lt;br /&gt;
|Renamed to review_score and refactored. Deprecated code has been removed and replaced with correct code.&lt;br /&gt;
|To follow method naming convention and ensure the code works in future versions. &lt;br /&gt;
|-&lt;br /&gt;
|''''' 12 '''''&lt;br /&gt;
|get_reviewees&lt;br /&gt;
|Renamed to reviewees and refactored. Deprecated code has been removed and replaced with correct code.&lt;br /&gt;
|To follow method naming convention and ensure the code works in future versions. &lt;br /&gt;
|-&lt;br /&gt;
|''''' 13 '''''&lt;br /&gt;
|get_reviewers&lt;br /&gt;
|Renamed to reviewers and refactored . Deprecated code has been commented and replaced with correct code.&lt;br /&gt;
|To follow method naming convention and ensure the code works in future versions. &lt;br /&gt;
|-&lt;br /&gt;
|''''' 14 '''''&lt;br /&gt;
|get_reviews&lt;br /&gt;
|Renamed to reviews and refactored &lt;br /&gt;
|To follow method naming convention&lt;br /&gt;
|-&lt;br /&gt;
|''''' 15 '''''&lt;br /&gt;
|get_reviews_by_reviewer&lt;br /&gt;
|Renamed to reviews_by_reviewer and refactored &lt;br /&gt;
|To follow method naming convention&lt;br /&gt;
|''''' 16 '''''&lt;br /&gt;
|get_reviews_by_reviewer&lt;br /&gt;
|Renamed to reviews_by_reviewer and refactored &lt;br /&gt;
|Commented the method &lt;br /&gt;
|To remove duplicated method in this class&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Comparison between Capistrano/Vlad/Heroku/AppFog/OpenShift/Cloud66/AWS Beanstalk =&lt;br /&gt;
&lt;br /&gt;
With so many automated tools available for Code Deployment and Release Management, the decision on which to use for a particular Ruby on rails application depends on various parameters to be considered.&lt;br /&gt;
Some comparative features of the different tools are as follows :&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;width:9%;&amp;quot;|Criteria for Comparision&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;|Capistrano&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;| Vlad&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;| Heroku&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;| AppFog&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;| OpenShift&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;| Cloud66&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;| AWS Beanstalk&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
|'''''Getting started with the tool'''''&lt;br /&gt;
|It is a framework that allows one to execute commands on a remote server using tools like ssh.&lt;br /&gt;
|Vlad deployment is similar to Capistrano, but less complex.&lt;br /&gt;
|Heroku’s offers a plan with first dyno free i.e. 512 MB that can be paired with Postgres starter DB to start an application with 0 initial cost&lt;br /&gt;
|AppFog’s initial plan offers 2GB of RAM free which is enough for small to medium traffic applications. By managing options provided for DB, queue server, application server, etc all part of the intial package, this is an excellent option to try out an application&lt;br /&gt;
|OpenShift is an open source platform and its free plan for starters has 3 gears for free wherein each gear consists of some RAM and disk space.&lt;br /&gt;
|Free plan provides one server for deployment.&lt;br /&gt;
|Provides an initial free tier. Without free tier no additional cost for Beanstalk. One only needs to pay for the AWS resources used.&lt;br /&gt;
|-&lt;br /&gt;
|'''''Scaling Memory'''''&lt;br /&gt;
|Memory increase would require additional servers/unused space in existing ones.&lt;br /&gt;
|Memory increase depends on additional servers available/unused space in existing ones.&lt;br /&gt;
|Memory increased in terms of dyno each of size 512 MB.&lt;br /&gt;
|Can configure any size for memory allocation&lt;br /&gt;
| -&lt;br /&gt;
| -&lt;br /&gt;
|Can automatically up/down scale the application by adjusting the default auto scaling settings.&lt;br /&gt;
|-&lt;br /&gt;
|'''''Scaling – Cost and Ease'''''&lt;br /&gt;
|While this provides greater flexibility as user is in control of the servers, it also causes additional overhead in terms of user needing to work both on Rails application and web server deployment.&lt;br /&gt;
|It can be integrated with Rake without any hindrances.&lt;br /&gt;
|Can dynamically scale up and down an application and pay as per hourly usages. Each additional dyno costs $35/mo&lt;br /&gt;
|Scaling takes up some time and need to pay for a month at the minimum. Scaling up to 4GB increases cost to $100/mo&lt;br /&gt;
| -&lt;br /&gt;
|Scaling using Cloud66 is relatively easy and hassle free.&lt;br /&gt;
|Scaling is fast and easy.&lt;br /&gt;
|-&lt;br /&gt;
|'''''Special features'''''&lt;br /&gt;
|For sensitive applications where handing over the control to a third party for deployment is not feasible, Capistrano is the way to go.&lt;br /&gt;
|It also provides support for tools like rsync and ssh.&lt;br /&gt;
|Lacks support for cross region deployment i.e. can’t select location of server where application gets deployed&lt;br /&gt;
|Supports cross region deployment i.e. if users of application primarily in Asia, can choose a server in Asia to deploy application, thus making the site faster.&lt;br /&gt;
| -&lt;br /&gt;
| -&lt;br /&gt;
|Provides complete flexibility and control of the resources to the user including the chance to take over control of some or all.&lt;br /&gt;
|-&lt;br /&gt;
|'''''Database support'''''&lt;br /&gt;
|Provides support for DB related to rails applications&lt;br /&gt;
|Provides support for DB related to rails applications&lt;br /&gt;
|It features serious production DB like RDBMS, Postgres, etc. and many Addons such as MongoDB, ClearDB, etc.&lt;br /&gt;
|Features free shared databases such as MongoDB, MySQL, Postgres but for other production DB’s need to use Addons&lt;br /&gt;
|Databases featured are MySQL, MongoDB and Postgres&lt;br /&gt;
| -&lt;br /&gt;
|Supports DB like Amazon SimpleDB, Amazon RDS, Amazon DynamoDB.&lt;br /&gt;
|-&lt;br /&gt;
|'''''Deployment strategy'''''&lt;br /&gt;
|Capistrano provides commands to be executed for automated deployment. It supports git.&lt;br /&gt;
|It is much easier to deploy using Vlad as compared to Capistrano.&lt;br /&gt;
|Deployment as easy as ‘git push’&lt;br /&gt;
|Deployment does not support git. It uses the af tool for deployment.&lt;br /&gt;
| -&lt;br /&gt;
|Since Cloud66 provides the platform in terms of Application Stack Management as a Service, it uses the infrastructure of AWS, Virtual Private Server, etc. for actual deployment. But the user doesn’t have to worry about configuration or monitoring of the servers. Hence provides easy deployment.&lt;br /&gt;
|Deployment options include Git, AWS management console, etc.&lt;br /&gt;
|-&lt;br /&gt;
|'''''Community Support availability'''''&lt;br /&gt;
| As it has been in use for a long time there is a huge community support available for Capistrano.&lt;br /&gt;
| -&lt;br /&gt;
|Heroku also provides a huge community support given the fact that there are a lot of Heroku users.&lt;br /&gt;
|Community is limited.&lt;br /&gt;
|RedHat being a reputed provider for open source solutions, the OpenShift community is gradually increasing and receiving support from a considerable community of users.&lt;br /&gt;
|Limited community support currently&lt;br /&gt;
|Has community forums and documentation.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Conclusion =&lt;br /&gt;
&lt;br /&gt;
Comparison and contrast between various deployment automated tools such as Capistrano, Heroku, Vlad, AppFog, OpenShift, Cloud66, AWS Beanstalk shows that each has its own pros and cons. &lt;br /&gt;
For instance, in a client based application where handing over the control of the application to a third party such as the deployment tool provider is impossible, AWS Beanstalk would be the obvious choice for the developer.&lt;br /&gt;
On the other hand, a novice Rails application developer might find all he needs in the starter plan of Heroku with the added bonus of a huge support community available to him for troubleshooting as he stumbles his way across the development of the application.&lt;br /&gt;
One may also choose the tool that provides the specific database support for your application. In case of large scale corporations where budgets are not that limited, the increasing costs with up-scaling of some tools would not be an obstacle.&lt;br /&gt;
Thus, various considerations about the application such as scalability requirement, security concerns, cost, availability of own resources such as servers etc., will help determine which tool is the most suitable for that application.&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= See Also =&lt;br /&gt;
&lt;br /&gt;
* Rails Solutions: Ruby on Rails Made Easy by Justin Williams&lt;br /&gt;
* http://guides.beanstalkapp.com/deployments/best-practices.html&lt;br /&gt;
* http://www.urbancode.com/anthill3-help-3.7/html/SettingUpDeploymentProcess.html&lt;br /&gt;
* http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=UseFMSGateway_3.html&lt;br /&gt;
* http://pic.dhe.ibm.com/infocenter/tivihelp/v26r1/index.jsp?topic=%2Fcom.ibm.dtm.doc%2Fdeploysoftware%2Fc_deploysw_process.html&lt;/div&gt;</summary>
		<author><name>Npari</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch2_0e808_nsv&amp;diff=81279</id>
		<title>CSC/ECE 517 Fall 2013/ch2 0e808 nsv</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch2_0e808_nsv&amp;diff=81279"/>
		<updated>2013-10-30T20:19:00Z</updated>

		<summary type="html">&lt;p&gt;Npari: /* Model Class : assignment_participant.rb */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= E808: Refactor and test Participant, AssignmentParticipant, &amp;amp; CourseParticipant =&lt;br /&gt;
&lt;br /&gt;
Code Deployment or [http://en.wikipedia.org/wiki/Software_deployment Software Deployment] and [http://en.wikipedia.org/wiki/Release_management Release management] with [http://en.wikipedia.org/wiki/Ruby_on_Rails Ruby on Rails] can be done using various tools such as [http://en.wikipedia.org/wiki/Capistrano Capistrano], [http://en.wikipedia.org/wiki/Heroku Heroku], AppFog, OpenShift, AWS, Cloud 66, Vlad, etc. These automated tools are frameworks used to write and execute commands in parallel remote machines and thus ease the process of deployment and management of various applications.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
= Introduction =&lt;br /&gt;
&lt;br /&gt;
The Deploying process involves different stages like development, testing, release management and sign-off by project teams.&lt;br /&gt;
&lt;br /&gt;
The following diagram illustrates the deployment process of an application.&lt;br /&gt;
&lt;br /&gt;
[[File:Deployment Process.jpg|frame|center|&amp;lt;ref&amp;gt;http://technet.microsoft.com/en-us/library/cc465178.aspx&amp;lt;/ref&amp;gt;]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The deployment flow has three stages: development and testing, release management and stakeholders and project teams. &lt;br /&gt;
&lt;br /&gt;
After the final release of the code in development and testing stage, the master plan is prepared for deployment of components and sites based on the sign-offs provided by the project teams, stakeholders and customers. Then, the stabilization of the deployment is calculated based on some metrics. Once the deployment is stabilized, it is reviewed and the process of deployment is complete. The final sign-off is given by the stakeholders.&lt;br /&gt;
&lt;br /&gt;
=Participant model: participant.rb=&lt;br /&gt;
&lt;br /&gt;
Code deployment is a procedure where the application is transferred onto a production server, so that it is made available for all the other users. It is the part of release management process which involves several activities. These activities are inter-dependent and need to be completed in a specific order for successful code deployment. &lt;br /&gt;
&lt;br /&gt;
'''Code Deployment Activities'''&lt;br /&gt;
&lt;br /&gt;
The various deployment activities include &amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/Software_deployment&amp;lt;/ref&amp;gt;&lt;br /&gt;
* Release : Gathering all system components in preparation for deployment&lt;br /&gt;
* Install and activate : Installing the application components and getting them in the 'ready' state&lt;br /&gt;
* Deactivate : Shutting down components that are out-dated or that may interfere with updating others&lt;br /&gt;
* Adapt : Making changes to application to accommodate changes in environment&lt;br /&gt;
* Update : Having a newer release installed in place of the old one&lt;br /&gt;
* Built-in : There are components built-into some tools for complete/semi-automating updates&lt;br /&gt;
* Version tracking : These systems help the user to know if newer versions of a software are available and if yes, help install them&lt;br /&gt;
* Uninstall : Opposite of installation and involves complete removal of software and its dependencies from the environment&lt;br /&gt;
* Retire : This involves making a software obsolete and is the end of software life cycle&lt;br /&gt;
&lt;br /&gt;
The general guidelines for the deployment process remain the same but there are variations in the specific requirements with each software system.&lt;br /&gt;
&lt;br /&gt;
=AssignmentParticipant model: assignment_participant.rb=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ref&amp;gt;http://searchitchannel.techtarget.com/definition/release-management&amp;lt;/ref&amp;gt;&lt;br /&gt;
Release management is a software process which takes care of the development, testing, deployment and support stages of software releases. The start of release management happens in the development phase, where it requests for new features or changes in the existing application. When the request is accepted, a new release is planned and designed. This design is built and then enters the testing phase, where the release is tested until it is accepted. After the release is accepted as a candidate, it enters the deployment phase where it is implemented. Once deployed, the release is made available and sent to support phase for collection of bug reports. Once the support phase is done, the bugs and other issues lead to requests for changes and the cycle is then repeated.&lt;br /&gt;
&lt;br /&gt;
=CourseParticipant model:course_participant.rb =&lt;br /&gt;
&amp;lt;ref&amp;gt;http://www.urbancode.com/html/solutions/deployment-automation.html&amp;lt;/ref&amp;gt;&lt;br /&gt;
Automation of a process is required when the manual process is more error prone. Also, for large real world applications, the manual process is very complex and time consuming. Incomplete documentation hampers a manual process further. Deployment also has to be done in many environments and involves varied steps to be followed in a specific order. Manual process needs repetition of same procedure to each and every environment which leads to many errors and the process becomes costly.&lt;br /&gt;
In web applications each new release has to be deployed to and tested in development, testing and production environments.The number of software releases in web applications  are more and hence the need to automate release management is also greater.&lt;br /&gt;
&lt;br /&gt;
Automation of deployment delivers applications faster and with fewer errors. The defined software deployment process can be applied across all environments consistently every time. With various automated application deployment platforms now readily available, manual deployments have become a thing of the past.&lt;br /&gt;
&lt;br /&gt;
Lets take a look at the various Deployment Automation tools available to Ruby on Rails applications. For the purposes of this article the process of manual deployment of a Ruby on Rails application is out of scope.&lt;br /&gt;
&lt;br /&gt;
= Tests =&lt;br /&gt;
&lt;br /&gt;
Some of the automated tools that are widely used for the process of deployment with Ruby on Rails are &lt;br /&gt;
&lt;br /&gt;
* Capistrano&lt;br /&gt;
* Heroku&lt;br /&gt;
* Vlad&lt;br /&gt;
* AppFog&lt;br /&gt;
* AWS Elastic Beanstalk&lt;br /&gt;
* OpenShift&lt;br /&gt;
* Cloud 66&lt;br /&gt;
&lt;br /&gt;
= yml files =&lt;br /&gt;
&lt;br /&gt;
[[File:Capistrano.jpg|frame|right|&amp;lt;ref&amp;gt;http://www.capistranorb.com/&amp;lt;/ref&amp;gt;|Capistrano Logo]]&lt;br /&gt;
&lt;br /&gt;
Capistrano is a Ruby tool which helps deploy an application to the server. Capistrano allows deploying to multiple machines at a time. It has many advanced options which help to deploy different kinds of applications. It also supports the scripting and execution of tasks.&lt;br /&gt;
&lt;br /&gt;
Capistrano can be used to:&lt;br /&gt;
&lt;br /&gt;
* Deploy applications onto many machines simultaneously.&lt;br /&gt;
* Automate the audits&lt;br /&gt;
* Automate the common tasks of a team.&lt;br /&gt;
&lt;br /&gt;
Capistrano can be made a part of a larger software by integrating it with another Ruby software.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ref&amp;gt;http://www.capistranorb.com/documentation/getting-started/installation/&amp;lt;/ref&amp;gt;  &lt;br /&gt;
'''General Usage'''&lt;br /&gt;
&lt;br /&gt;
The following commands will clone Capistrano, build the gem and install it locally.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem install capistrano --pre --trust-policy HighSecurity&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Or grab the bleeding edge head from:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ git clone -b v3 https://github.com/capistrano/capistrano.git&lt;br /&gt;
$ cd capistrano&lt;br /&gt;
$ gem build *.gemspec&lt;br /&gt;
$ gem install *.gem&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
'''Signed Rubygems'''&lt;br /&gt;
&lt;br /&gt;
As Capistrano is a signed gem, you should always be careful to use the --trust-policy flag when installing Gems, or since Bundler 1.3 you should use the same flag:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem install capistrano --pre --trust-policy HighSecurity&lt;br /&gt;
$ bundle install --trust-policy HighSecurity&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If you get a message that looks like:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ERROR:  While executing gem ... (Gem::Security::Exception)&lt;br /&gt;
unsigned gems are not allowed by the High Security policy&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then please complain to your Gem author, and have them start signing their Gems.&lt;br /&gt;
&lt;br /&gt;
'''Usage in a Rails project'''&lt;br /&gt;
&lt;br /&gt;
Add the following lines to the Gemfile to the :development group ideally.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
group :development do&lt;br /&gt;
  gem 'capistrano-rails', '~&amp;gt; 0.0.7'&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= routes.rb =&lt;br /&gt;
&lt;br /&gt;
[[File:Heroku.jpg|frame|right|&amp;lt;ref&amp;gt;https://www.heroku.com/&amp;lt;/ref&amp;gt;|Heroku Logo]]&lt;br /&gt;
&lt;br /&gt;
Heroku is a cloud [http://en.wikipedia.org/wiki/Platform_as_a_service Platform as a Service] (PaaS) which supports several programming languages. PaaS is a service model of Cloud computing wherein the provider offers resources like servers, software, database, etc. to the developer. Heroku helps manage environment-specific configurations separately from the source code, which provides greater security.&lt;br /&gt;
Heroku is not just a deployment environment but it also impacts the development process. There are several principles of the development of application on Heroku.&amp;lt;br&amp;gt;&lt;br /&gt;
•	Applications and Codebases : Most of the development of the application is done on application’s codebase which is stored in a [http://en.wikipedia.org/wiki/Version_control_system Version Control System (VCS)] &amp;lt;br&amp;gt;&lt;br /&gt;
•	Dependencies : All the application dependencies such as plugins should be declared explicitly&amp;lt;br&amp;gt;&lt;br /&gt;
•	Configuration : Configuration of an application is all that varies in different deploys&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Getting Started with Heroku'''&lt;br /&gt;
&lt;br /&gt;
1. To get started with Heroku, go to https://id.heroku.com/signup/devcenter, signup for a Heroku account. &lt;br /&gt;
&lt;br /&gt;
2. Then, download and install the Heroku toolbelt at https://toolbelt.heroku.com/ for your development system. You can also use Heroku command line instead of the online Heroku application. &lt;br /&gt;
&lt;br /&gt;
3. After installing one of them, login using the email address and password used when creating the Heroku account:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ref&amp;gt;https://github.com/heroku/heroku&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ heroku login&lt;br /&gt;
Enter your Heroku credentials.&lt;br /&gt;
Email: adam@example.com&lt;br /&gt;
Password:&lt;br /&gt;
Could not find an existing public key.&lt;br /&gt;
Would you like to generate one? [Yn]&lt;br /&gt;
Generating new SSH public key.&lt;br /&gt;
Uploading SSH public key /Users/adam/.ssh/id_rsa.pub&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Deploying Applications'''&lt;br /&gt;
&lt;br /&gt;
Heroku uses [http://en.wikipedia.org/wiki/Git_(software) git] primarily to deploy the applications. When an application is created on Heroku, it associates the new git which is remote with the local git repository.&lt;br /&gt;
&lt;br /&gt;
As a result, deploying code is just the familiar git push, but to the heroku remote instead:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ref&amp;gt;https://devcenter.heroku.com/articles/how-heroku-works#deploying-applications&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ git push heroku master&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Vlad ==&lt;br /&gt;
&lt;br /&gt;
[[File:Vlad.png|frame|right|&amp;lt;ref&amp;gt;http://rubyhitsquad.com/Vlad_the_Deployer.html&amp;lt;/ref&amp;gt;|Vlad Logo]]&lt;br /&gt;
&lt;br /&gt;
Vlad is another automated deployment tool which is simple to use. It integrates with rake and uses standard tools like SSH, rsync etc.&lt;br /&gt;
&lt;br /&gt;
The main features of Vlad include&lt;br /&gt;
* It uses very few dependencies which are simple.&lt;br /&gt;
* It can execute commands on more than one server.&lt;br /&gt;
* It syncs files to one or more servers.&lt;br /&gt;
* It matches local and remote tasks.&lt;br /&gt;
* It runs tests very fast.&lt;br /&gt;
&lt;br /&gt;
'''Getting started with Vlad'''&amp;lt;ref&amp;gt;http://docs.seattlerb.org/vlad/doco/getting_started_txt.html&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create a deploy file, usually in “config/deploy.rb”:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set :application, &amp;quot;project&amp;quot;&lt;br /&gt;
set :domain, &amp;quot;example.com&amp;quot;&lt;br /&gt;
set :deploy_to, &amp;quot;/path/to/install&amp;quot;&lt;br /&gt;
set :repository, 'http://svn.example.com/project/branches/stable/'&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This defaults to using ‘svn export’ from repository, and a single server for app, db, and www.&lt;br /&gt;
&lt;br /&gt;
If you want a multi-config environment, change your config like so:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set :application, &amp;quot;project&amp;quot;&lt;br /&gt;
set :repository, 'http://svn.example.com/project/branches/stable/'&lt;br /&gt;
&lt;br /&gt;
task :beta do&lt;br /&gt;
  set :domain,    &amp;quot;beta.example.com&amp;quot;&lt;br /&gt;
  set :deploy_to, &amp;quot;/path/to/install-beta&amp;quot;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
task :dev do&lt;br /&gt;
  set :domain,    &amp;quot;dev.example.com&amp;quot;&lt;br /&gt;
  set :deploy_to, &amp;quot;/path/to/install-dev&amp;quot;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
task :prod do&lt;br /&gt;
  set :domain,    &amp;quot;example.com&amp;quot;&lt;br /&gt;
  set :deploy_to, &amp;quot;/path/to/install&amp;quot;&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Add the following to your Rakefile:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
begin&lt;br /&gt;
  require 'vlad'&lt;br /&gt;
  Vlad.load&lt;br /&gt;
rescue LoadError&lt;br /&gt;
  # do nothing&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Vlad.load has a lot of flexibility.&lt;br /&gt;
&lt;br /&gt;
You can install vlad via:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;% rake vlad:invoke COMMAND='sudo gem install vlad -y'&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Initial Launch&lt;br /&gt;
&amp;lt;pre&amp;gt;Run rake vlad:setup vlad:update vlad:migrate vlad:start&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ref&amp;gt;http://docs.seattlerb.org/vlad/index.html&amp;lt;/ref&amp;gt;&lt;br /&gt;
'''Running Vlad'''&lt;br /&gt;
&lt;br /&gt;
* Using rake&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
task :shazam! do&lt;br /&gt;
  Rake::Task[:action1].invoke&lt;br /&gt;
  Rake::Task[:action2].invoke&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Using SSH&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Host example.com&lt;br /&gt;
    User fluffy_bunny&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== AppFog == &lt;br /&gt;
&lt;br /&gt;
[[File:AppFog.jpg|frame|right|&amp;lt;ref&amp;gt;https://www.appfog.com/&amp;lt;/ref&amp;gt;|AppFog Logo]]&lt;br /&gt;
&lt;br /&gt;
AppFog is a PaaS built on Cloud Foundry which is another PaaS platform for deploying applications. &lt;br /&gt;
&lt;br /&gt;
Features of AppFog are&lt;br /&gt;
* It launches and runs fast.&lt;br /&gt;
* It does not require configuring servers or installing frameworks.&lt;br /&gt;
* It is compatible with code management systems like git, svn etc.&lt;br /&gt;
&lt;br /&gt;
'''Installing AppFog'''&amp;lt;ref&amp;gt;http://blog.appfog.com/getting-started-with-appfogs-command-line/&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
‘af‘ command line tool is written in Ruby for installation.&lt;br /&gt;
&lt;br /&gt;
Download and install [http://rubyinstaller.org/ Ruby Installer] for Windows. The installer already includes RubyGems.&lt;br /&gt;
&lt;br /&gt;
Be sure you use the Ruby-enabled command prompt window when you later install and use af. You access this command prompt from the Windows Start menu (All Programs &amp;gt; Ruby &amp;gt; Start Command Prompt with Ruby).&lt;br /&gt;
&lt;br /&gt;
Finally, update RubyGems from the Ruby Command Prompt:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem update --system&lt;br /&gt;
$ gem install af&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Login with:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ af login&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Finally from within your source code directory:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ af update hello-node&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Getting Started with AppFog'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
target [url]                                       Reports current target or sets a new target&lt;br /&gt;
login [email] [--email, --password]                Login&lt;br /&gt;
info                                               System and account information&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== AWS Elastic Beanstalk==&lt;br /&gt;
&lt;br /&gt;
[[File:AWSLogo.jpg|frame|right|&amp;lt;ref&amp;gt;https://aws.amazon.com&amp;lt;/ref&amp;gt;|AWS Logo]]&lt;br /&gt;
&lt;br /&gt;
Amazon Wen Services(AWS) offers [http://en.wikipedia.org/wiki/Infrastructure_as_a_service#Infrastructure_as_a_service_.28IaaS.29 Infrastructure as a Service] (IaaS) and provides a complete set of resources for the development of a web application in minutes. AWS Elastic Beanstalk is a deployment tool of the AWS cloud.&lt;br /&gt;
&lt;br /&gt;
With AWS Elastic Beanstalk, applications can be quickly deployed and managed in the AWS cloud without worrying about the infrastructure that runs those applications. AWS Elastic Beanstalk reduces management complexity without restricting choice or control. Once the application is uploaded AWS Elastic Beanstalk automatically handles the details of capacity provisioning, load balancing, scaling, and application health monitoring. AWS Elastic Beanstalk uses highly reliable and scalable services.&lt;br /&gt;
&lt;br /&gt;
'''AWS CLI'''&lt;br /&gt;
&lt;br /&gt;
AWS Elastic Beanstalk uses a command line tool Eb, which helps you to deploy your application easily.&lt;br /&gt;
&lt;br /&gt;
'''Getting Started with Eb'''&amp;lt;ref&amp;gt;http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/command-reference-get-started.html&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To get started with the beanstalk CLI, you will need to download the command line tools at the [http://aws.amazon.com/code/6752709412171743 AWS Sample Code &amp;amp; Libraries] website.&lt;br /&gt;
&lt;br /&gt;
Step 1: Initialize Your Git Repository&lt;br /&gt;
&lt;br /&gt;
Eb is a command line interface that enables you to deploy applications quickly and more easily using Git. Eb is available as part of the Elastic Beanstalk command line tools package. &lt;br /&gt;
&lt;br /&gt;
1. To install eb,install the following software onto your local computer:&lt;br /&gt;
&lt;br /&gt;
* Git 1.6.6 or later. To download Git, go to http://git-scm.com/.&lt;br /&gt;
* PowerShell 2.0.&lt;br /&gt;
&lt;br /&gt;
2. Initialize your Git repository.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git init &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Step 2: Configuring AWS Elastic Beanstalk&lt;br /&gt;
&lt;br /&gt;
1. From your directory where you created your local repository, type the following command.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
eb init&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2. When you are prompted for the access key ID, type your access key ID. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Enter your AWS Access Key ID (current value is &amp;quot;AKIAIOSFODNN7EXAMPLE&amp;quot;): &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3. When you are prompted for the secret access key, type your secret access key.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Enter your AWS Secret Access Key (current value is &amp;quot;wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY&amp;quot;): &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
4. When you are prompted for the AWS Elastic Beanstalk application name, type the name of the application. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Enter an AWS Elastic Beanstalk application name (auto-generated value is &amp;quot;windows&amp;quot;): &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Note:&lt;br /&gt;
If you have a space in your application name, make sure you do not use quotes.&lt;br /&gt;
&lt;br /&gt;
5. When you are prompted for the AWS Elastic Beanstalk environment name, type the name of the environment. AWS Elastic Beanstalk automatically creates an environment name based on your application name. If you want to accept the default, press Enter.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Enter an AWS Elastic Beanstalk environment name (current value is &amp;quot;HelloWorld-env&amp;quot;): &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
6. When you are prompted to create an Amazon RDS DB instance, type y or n. For this example, we'll type y.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Create an RDS DB Instance? [y/n]:&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
7. When you are prompted to enter your RDS user master password, type your password containing from 8 to 16 printable ASCII characters (excluding /, \, and @).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Enter an RDS DB master password: &lt;br /&gt;
Retype password to confirm: &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can now get started with the AWS Elastic Beanstalk.&lt;br /&gt;
&lt;br /&gt;
== OpenShift ==&lt;br /&gt;
&lt;br /&gt;
[[File:OpenShift.png|frame|right|&amp;lt;ref&amp;gt;https://en.wikipedia.org&amp;lt;/ref&amp;gt;|OpenShift Logo]]&lt;br /&gt;
&lt;br /&gt;
Another free and open source PaaS for deploying applications is OpenShift created by [[http://en.wikipedia.org/wiki/RedHat RedHat]]. &lt;br /&gt;
&lt;br /&gt;
'''Considerations'''&lt;br /&gt;
* Databases&lt;br /&gt;
&lt;br /&gt;
To use the application outside the OpenShift environment one needs to change the variables as the application is configured to use database in production mode in OpenShift.&lt;br /&gt;
&lt;br /&gt;
* Assets&lt;br /&gt;
&lt;br /&gt;
The assets are precompiled everytime application is pushed to OpenShift.&lt;br /&gt;
&lt;br /&gt;
* Security&lt;br /&gt;
&lt;br /&gt;
Security related variables are to be unique across the application.&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;ref&amp;gt;https://github.com/openshift/rails-example&amp;lt;/ref&amp;gt;&lt;br /&gt;
'''Installation'''&lt;br /&gt;
&lt;br /&gt;
1.	Create an account at http://openshift.redhat.com/&lt;br /&gt;
&lt;br /&gt;
2.	Create a rails application&lt;br /&gt;
	&amp;lt;pre&amp;gt;rhc app create -a railsapp -t ruby-1.9&amp;lt;/pre&amp;gt;&lt;br /&gt;
3.	Add mysql support to your application&lt;br /&gt;
	&amp;lt;pre&amp;gt;rhc cartridge add -a railsapp -c mysql-5.1&amp;lt;/pre&amp;gt;&lt;br /&gt;
4.	Add this upstream Rails quickstart repository&lt;br /&gt;
&amp;lt;pre&amp;gt;cd railsapp&lt;br /&gt;
git remote add upstream -m master git://github.com/openshift/rails-example.git&lt;br /&gt;
git pull -s recursive -X theirs upstream master&amp;lt;/pre&amp;gt;&lt;br /&gt;
5.	Push your new code&lt;br /&gt;
&amp;lt;pre&amp;gt;git push&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Future scope ==&lt;br /&gt;
&lt;br /&gt;
[[File:Cloud 66.jpg|frame|right|&amp;lt;ref&amp;gt;https://www.cloud66.com/&amp;lt;/ref&amp;gt;|Cloud66 Logo]]&lt;br /&gt;
&lt;br /&gt;
Cloud 66 combines the convenience of Platform-as-a-Service (PaaS) and the flexibility and control of Infrastructure-as-a-Service (IaaS). This platform allows easy deployment of application, so there is no overhead of configuring or monitoring the servers.&lt;br /&gt;
&lt;br /&gt;
'''Cloud 66 Command line Toolbelt'''&lt;br /&gt;
&lt;br /&gt;
Toolbelt is an open source released to deploy the application.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ref&amp;gt;http://blog.cloud66.com/&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Getting Started with Cloud 66'''&lt;br /&gt;
&lt;br /&gt;
1. Go to the [https://www.cloud66.com/users/sign_up sign up] page and create a Cloud 66 account.&lt;br /&gt;
&lt;br /&gt;
2. Go to Cloud 66 Dashboard and [https://www.cloud66.com/help/first_stack build your first stack].&lt;br /&gt;
&lt;br /&gt;
'''Installation'''&lt;br /&gt;
&lt;br /&gt;
Installation of toolbelt uses the following command&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Gem install c66&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This automatically searches the newest version and installs it.&lt;br /&gt;
&lt;br /&gt;
= Model Class : assignment_participant.rb =&lt;br /&gt;
This class is a subclass of the model class named 'participant'.Several methods in this model class required refactoring. The names were changed to follow method naming convention. Deprecated code was removed and re-coded as needed. Duplicated methods were commented. Some of the methods were moved to the parent class while some other were moved to a new class.  &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;width:3%;&amp;quot;|S. No&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;|Method Name&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;|Change Made &lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;|Reason For Change&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
|''''' 1 '''''&lt;br /&gt;
|get_course_string&lt;br /&gt;
|Renamed to course_string and refactored &lt;br /&gt;
|To follow method naming convention&lt;br /&gt;
|-&lt;br /&gt;
|''''' 2 '''''&lt;br /&gt;
|get_cycle_deviation_score&lt;br /&gt;
|Moved to collusion_cycle.rb model class&lt;br /&gt;
|Related methods that calculate collusion in reviews have been moved to the newly created collusion_cycle.rb model class&lt;br /&gt;
|-&lt;br /&gt;
|''''' 3 '''''&lt;br /&gt;
|get_cycle_similarity_score&lt;br /&gt;
|Moved to collusion_cycle.rb model class&lt;br /&gt;
|Related methods that calculate collusion in reviews have been moved to the newly created collusion_cycle.rb model class&lt;br /&gt;
|-&lt;br /&gt;
|''''' 4 '''''&lt;br /&gt;
|get_feedback&lt;br /&gt;
|Renamed to feedback and refactored&lt;br /&gt;
|To follow method naming convention&lt;br /&gt;
|-&lt;br /&gt;
|''''' 5 '''''&lt;br /&gt;
|get_files&lt;br /&gt;
|Renamed to files_in_directory  and refactored&lt;br /&gt;
|To follow method naming convention&lt;br /&gt;
|-&lt;br /&gt;
|''''' 6 '''''&lt;br /&gt;
|get_four_node_cycles&lt;br /&gt;
|Moved to collusion_cycle.rb model class&lt;br /&gt;
|Related methods that calculate collusion in reviews have been moved to the newly created collusion_cycle.rb model class&lt;br /&gt;
|-&lt;br /&gt;
|''''' 7 '''''&lt;br /&gt;
|fullname&lt;br /&gt;
|Moved to parent model class – participant.rb &lt;br /&gt;
|General methods of the subclass are moved to Parent class&lt;br /&gt;
|-&lt;br /&gt;
|''''' 8 '''''&lt;br /&gt;
|get_metareviews&lt;br /&gt;
|Renamed to metareviews and refactored&lt;br /&gt;
|To follow method naming convention&lt;br /&gt;
|-&lt;br /&gt;
|''''' 9 '''''&lt;br /&gt;
|name&lt;br /&gt;
|Commented the method  &lt;br /&gt;
|The method is already in parent model class – participant.rb and can be used in this subclass through inheritance&lt;br /&gt;
|-&lt;br /&gt;
|''''' 10 '''''&lt;br /&gt;
|name&lt;br /&gt;
|Commented the method  &lt;br /&gt;
|The method is already in parent model class – participant.rb and can be used in this subclass through inheritance. Also it is a duplicate method in patricipant.rb&lt;br /&gt;
|- &lt;br /&gt;
|get_review_score&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|get_reviewees&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|get_reviewers&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|get_reviews&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|get_reviews_by_reviewer&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Comparison between Capistrano/Vlad/Heroku/AppFog/OpenShift/Cloud66/AWS Beanstalk =&lt;br /&gt;
&lt;br /&gt;
With so many automated tools available for Code Deployment and Release Management, the decision on which to use for a particular Ruby on rails application depends on various parameters to be considered.&lt;br /&gt;
Some comparative features of the different tools are as follows :&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;width:9%;&amp;quot;|Criteria for Comparision&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;|Capistrano&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;| Vlad&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;| Heroku&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;| AppFog&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;| OpenShift&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;| Cloud66&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;| AWS Beanstalk&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
|'''''Getting started with the tool'''''&lt;br /&gt;
|It is a framework that allows one to execute commands on a remote server using tools like ssh.&lt;br /&gt;
|Vlad deployment is similar to Capistrano, but less complex.&lt;br /&gt;
|Heroku’s offers a plan with first dyno free i.e. 512 MB that can be paired with Postgres starter DB to start an application with 0 initial cost&lt;br /&gt;
|AppFog’s initial plan offers 2GB of RAM free which is enough for small to medium traffic applications. By managing options provided for DB, queue server, application server, etc all part of the intial package, this is an excellent option to try out an application&lt;br /&gt;
|OpenShift is an open source platform and its free plan for starters has 3 gears for free wherein each gear consists of some RAM and disk space.&lt;br /&gt;
|Free plan provides one server for deployment.&lt;br /&gt;
|Provides an initial free tier. Without free tier no additional cost for Beanstalk. One only needs to pay for the AWS resources used.&lt;br /&gt;
|-&lt;br /&gt;
|'''''Scaling Memory'''''&lt;br /&gt;
|Memory increase would require additional servers/unused space in existing ones.&lt;br /&gt;
|Memory increase depends on additional servers available/unused space in existing ones.&lt;br /&gt;
|Memory increased in terms of dyno each of size 512 MB.&lt;br /&gt;
|Can configure any size for memory allocation&lt;br /&gt;
| -&lt;br /&gt;
| -&lt;br /&gt;
|Can automatically up/down scale the application by adjusting the default auto scaling settings.&lt;br /&gt;
|-&lt;br /&gt;
|'''''Scaling – Cost and Ease'''''&lt;br /&gt;
|While this provides greater flexibility as user is in control of the servers, it also causes additional overhead in terms of user needing to work both on Rails application and web server deployment.&lt;br /&gt;
|It can be integrated with Rake without any hindrances.&lt;br /&gt;
|Can dynamically scale up and down an application and pay as per hourly usages. Each additional dyno costs $35/mo&lt;br /&gt;
|Scaling takes up some time and need to pay for a month at the minimum. Scaling up to 4GB increases cost to $100/mo&lt;br /&gt;
| -&lt;br /&gt;
|Scaling using Cloud66 is relatively easy and hassle free.&lt;br /&gt;
|Scaling is fast and easy.&lt;br /&gt;
|-&lt;br /&gt;
|'''''Special features'''''&lt;br /&gt;
|For sensitive applications where handing over the control to a third party for deployment is not feasible, Capistrano is the way to go.&lt;br /&gt;
|It also provides support for tools like rsync and ssh.&lt;br /&gt;
|Lacks support for cross region deployment i.e. can’t select location of server where application gets deployed&lt;br /&gt;
|Supports cross region deployment i.e. if users of application primarily in Asia, can choose a server in Asia to deploy application, thus making the site faster.&lt;br /&gt;
| -&lt;br /&gt;
| -&lt;br /&gt;
|Provides complete flexibility and control of the resources to the user including the chance to take over control of some or all.&lt;br /&gt;
|-&lt;br /&gt;
|'''''Database support'''''&lt;br /&gt;
|Provides support for DB related to rails applications&lt;br /&gt;
|Provides support for DB related to rails applications&lt;br /&gt;
|It features serious production DB like RDBMS, Postgres, etc. and many Addons such as MongoDB, ClearDB, etc.&lt;br /&gt;
|Features free shared databases such as MongoDB, MySQL, Postgres but for other production DB’s need to use Addons&lt;br /&gt;
|Databases featured are MySQL, MongoDB and Postgres&lt;br /&gt;
| -&lt;br /&gt;
|Supports DB like Amazon SimpleDB, Amazon RDS, Amazon DynamoDB.&lt;br /&gt;
|-&lt;br /&gt;
|'''''Deployment strategy'''''&lt;br /&gt;
|Capistrano provides commands to be executed for automated deployment. It supports git.&lt;br /&gt;
|It is much easier to deploy using Vlad as compared to Capistrano.&lt;br /&gt;
|Deployment as easy as ‘git push’&lt;br /&gt;
|Deployment does not support git. It uses the af tool for deployment.&lt;br /&gt;
| -&lt;br /&gt;
|Since Cloud66 provides the platform in terms of Application Stack Management as a Service, it uses the infrastructure of AWS, Virtual Private Server, etc. for actual deployment. But the user doesn’t have to worry about configuration or monitoring of the servers. Hence provides easy deployment.&lt;br /&gt;
|Deployment options include Git, AWS management console, etc.&lt;br /&gt;
|-&lt;br /&gt;
|'''''Community Support availability'''''&lt;br /&gt;
| As it has been in use for a long time there is a huge community support available for Capistrano.&lt;br /&gt;
| -&lt;br /&gt;
|Heroku also provides a huge community support given the fact that there are a lot of Heroku users.&lt;br /&gt;
|Community is limited.&lt;br /&gt;
|RedHat being a reputed provider for open source solutions, the OpenShift community is gradually increasing and receiving support from a considerable community of users.&lt;br /&gt;
|Limited community support currently&lt;br /&gt;
|Has community forums and documentation.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Conclusion =&lt;br /&gt;
&lt;br /&gt;
Comparison and contrast between various deployment automated tools such as Capistrano, Heroku, Vlad, AppFog, OpenShift, Cloud66, AWS Beanstalk shows that each has its own pros and cons. &lt;br /&gt;
For instance, in a client based application where handing over the control of the application to a third party such as the deployment tool provider is impossible, AWS Beanstalk would be the obvious choice for the developer.&lt;br /&gt;
On the other hand, a novice Rails application developer might find all he needs in the starter plan of Heroku with the added bonus of a huge support community available to him for troubleshooting as he stumbles his way across the development of the application.&lt;br /&gt;
One may also choose the tool that provides the specific database support for your application. In case of large scale corporations where budgets are not that limited, the increasing costs with up-scaling of some tools would not be an obstacle.&lt;br /&gt;
Thus, various considerations about the application such as scalability requirement, security concerns, cost, availability of own resources such as servers etc., will help determine which tool is the most suitable for that application.&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= See Also =&lt;br /&gt;
&lt;br /&gt;
* Rails Solutions: Ruby on Rails Made Easy by Justin Williams&lt;br /&gt;
* http://guides.beanstalkapp.com/deployments/best-practices.html&lt;br /&gt;
* http://www.urbancode.com/anthill3-help-3.7/html/SettingUpDeploymentProcess.html&lt;br /&gt;
* http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=UseFMSGateway_3.html&lt;br /&gt;
* http://pic.dhe.ibm.com/infocenter/tivihelp/v26r1/index.jsp?topic=%2Fcom.ibm.dtm.doc%2Fdeploysoftware%2Fc_deploysw_process.html&lt;/div&gt;</summary>
		<author><name>Npari</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch2_0e808_nsv&amp;diff=81266</id>
		<title>CSC/ECE 517 Fall 2013/ch2 0e808 nsv</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch2_0e808_nsv&amp;diff=81266"/>
		<updated>2013-10-30T20:14:01Z</updated>

		<summary type="html">&lt;p&gt;Npari: /* Model Class : assignment_participant.rb */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= E808: Refactor and test Participant, AssignmentParticipant, &amp;amp; CourseParticipant =&lt;br /&gt;
&lt;br /&gt;
Code Deployment or [http://en.wikipedia.org/wiki/Software_deployment Software Deployment] and [http://en.wikipedia.org/wiki/Release_management Release management] with [http://en.wikipedia.org/wiki/Ruby_on_Rails Ruby on Rails] can be done using various tools such as [http://en.wikipedia.org/wiki/Capistrano Capistrano], [http://en.wikipedia.org/wiki/Heroku Heroku], AppFog, OpenShift, AWS, Cloud 66, Vlad, etc. These automated tools are frameworks used to write and execute commands in parallel remote machines and thus ease the process of deployment and management of various applications.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
= Introduction =&lt;br /&gt;
&lt;br /&gt;
The Deploying process involves different stages like development, testing, release management and sign-off by project teams.&lt;br /&gt;
&lt;br /&gt;
The following diagram illustrates the deployment process of an application.&lt;br /&gt;
&lt;br /&gt;
[[File:Deployment Process.jpg|frame|center|&amp;lt;ref&amp;gt;http://technet.microsoft.com/en-us/library/cc465178.aspx&amp;lt;/ref&amp;gt;]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The deployment flow has three stages: development and testing, release management and stakeholders and project teams. &lt;br /&gt;
&lt;br /&gt;
After the final release of the code in development and testing stage, the master plan is prepared for deployment of components and sites based on the sign-offs provided by the project teams, stakeholders and customers. Then, the stabilization of the deployment is calculated based on some metrics. Once the deployment is stabilized, it is reviewed and the process of deployment is complete. The final sign-off is given by the stakeholders.&lt;br /&gt;
&lt;br /&gt;
=Participant model: participant.rb=&lt;br /&gt;
&lt;br /&gt;
Code deployment is a procedure where the application is transferred onto a production server, so that it is made available for all the other users. It is the part of release management process which involves several activities. These activities are inter-dependent and need to be completed in a specific order for successful code deployment. &lt;br /&gt;
&lt;br /&gt;
'''Code Deployment Activities'''&lt;br /&gt;
&lt;br /&gt;
The various deployment activities include &amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/Software_deployment&amp;lt;/ref&amp;gt;&lt;br /&gt;
* Release : Gathering all system components in preparation for deployment&lt;br /&gt;
* Install and activate : Installing the application components and getting them in the 'ready' state&lt;br /&gt;
* Deactivate : Shutting down components that are out-dated or that may interfere with updating others&lt;br /&gt;
* Adapt : Making changes to application to accommodate changes in environment&lt;br /&gt;
* Update : Having a newer release installed in place of the old one&lt;br /&gt;
* Built-in : There are components built-into some tools for complete/semi-automating updates&lt;br /&gt;
* Version tracking : These systems help the user to know if newer versions of a software are available and if yes, help install them&lt;br /&gt;
* Uninstall : Opposite of installation and involves complete removal of software and its dependencies from the environment&lt;br /&gt;
* Retire : This involves making a software obsolete and is the end of software life cycle&lt;br /&gt;
&lt;br /&gt;
The general guidelines for the deployment process remain the same but there are variations in the specific requirements with each software system.&lt;br /&gt;
&lt;br /&gt;
=AssignmentParticipant model: assignment_participant.rb=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ref&amp;gt;http://searchitchannel.techtarget.com/definition/release-management&amp;lt;/ref&amp;gt;&lt;br /&gt;
Release management is a software process which takes care of the development, testing, deployment and support stages of software releases. The start of release management happens in the development phase, where it requests for new features or changes in the existing application. When the request is accepted, a new release is planned and designed. This design is built and then enters the testing phase, where the release is tested until it is accepted. After the release is accepted as a candidate, it enters the deployment phase where it is implemented. Once deployed, the release is made available and sent to support phase for collection of bug reports. Once the support phase is done, the bugs and other issues lead to requests for changes and the cycle is then repeated.&lt;br /&gt;
&lt;br /&gt;
=CourseParticipant model:course_participant.rb =&lt;br /&gt;
&amp;lt;ref&amp;gt;http://www.urbancode.com/html/solutions/deployment-automation.html&amp;lt;/ref&amp;gt;&lt;br /&gt;
Automation of a process is required when the manual process is more error prone. Also, for large real world applications, the manual process is very complex and time consuming. Incomplete documentation hampers a manual process further. Deployment also has to be done in many environments and involves varied steps to be followed in a specific order. Manual process needs repetition of same procedure to each and every environment which leads to many errors and the process becomes costly.&lt;br /&gt;
In web applications each new release has to be deployed to and tested in development, testing and production environments.The number of software releases in web applications  are more and hence the need to automate release management is also greater.&lt;br /&gt;
&lt;br /&gt;
Automation of deployment delivers applications faster and with fewer errors. The defined software deployment process can be applied across all environments consistently every time. With various automated application deployment platforms now readily available, manual deployments have become a thing of the past.&lt;br /&gt;
&lt;br /&gt;
Lets take a look at the various Deployment Automation tools available to Ruby on Rails applications. For the purposes of this article the process of manual deployment of a Ruby on Rails application is out of scope.&lt;br /&gt;
&lt;br /&gt;
= Tests =&lt;br /&gt;
&lt;br /&gt;
Some of the automated tools that are widely used for the process of deployment with Ruby on Rails are &lt;br /&gt;
&lt;br /&gt;
* Capistrano&lt;br /&gt;
* Heroku&lt;br /&gt;
* Vlad&lt;br /&gt;
* AppFog&lt;br /&gt;
* AWS Elastic Beanstalk&lt;br /&gt;
* OpenShift&lt;br /&gt;
* Cloud 66&lt;br /&gt;
&lt;br /&gt;
= yml files =&lt;br /&gt;
&lt;br /&gt;
[[File:Capistrano.jpg|frame|right|&amp;lt;ref&amp;gt;http://www.capistranorb.com/&amp;lt;/ref&amp;gt;|Capistrano Logo]]&lt;br /&gt;
&lt;br /&gt;
Capistrano is a Ruby tool which helps deploy an application to the server. Capistrano allows deploying to multiple machines at a time. It has many advanced options which help to deploy different kinds of applications. It also supports the scripting and execution of tasks.&lt;br /&gt;
&lt;br /&gt;
Capistrano can be used to:&lt;br /&gt;
&lt;br /&gt;
* Deploy applications onto many machines simultaneously.&lt;br /&gt;
* Automate the audits&lt;br /&gt;
* Automate the common tasks of a team.&lt;br /&gt;
&lt;br /&gt;
Capistrano can be made a part of a larger software by integrating it with another Ruby software.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ref&amp;gt;http://www.capistranorb.com/documentation/getting-started/installation/&amp;lt;/ref&amp;gt;  &lt;br /&gt;
'''General Usage'''&lt;br /&gt;
&lt;br /&gt;
The following commands will clone Capistrano, build the gem and install it locally.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem install capistrano --pre --trust-policy HighSecurity&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Or grab the bleeding edge head from:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ git clone -b v3 https://github.com/capistrano/capistrano.git&lt;br /&gt;
$ cd capistrano&lt;br /&gt;
$ gem build *.gemspec&lt;br /&gt;
$ gem install *.gem&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
'''Signed Rubygems'''&lt;br /&gt;
&lt;br /&gt;
As Capistrano is a signed gem, you should always be careful to use the --trust-policy flag when installing Gems, or since Bundler 1.3 you should use the same flag:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem install capistrano --pre --trust-policy HighSecurity&lt;br /&gt;
$ bundle install --trust-policy HighSecurity&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If you get a message that looks like:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ERROR:  While executing gem ... (Gem::Security::Exception)&lt;br /&gt;
unsigned gems are not allowed by the High Security policy&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then please complain to your Gem author, and have them start signing their Gems.&lt;br /&gt;
&lt;br /&gt;
'''Usage in a Rails project'''&lt;br /&gt;
&lt;br /&gt;
Add the following lines to the Gemfile to the :development group ideally.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
group :development do&lt;br /&gt;
  gem 'capistrano-rails', '~&amp;gt; 0.0.7'&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= routes.rb =&lt;br /&gt;
&lt;br /&gt;
[[File:Heroku.jpg|frame|right|&amp;lt;ref&amp;gt;https://www.heroku.com/&amp;lt;/ref&amp;gt;|Heroku Logo]]&lt;br /&gt;
&lt;br /&gt;
Heroku is a cloud [http://en.wikipedia.org/wiki/Platform_as_a_service Platform as a Service] (PaaS) which supports several programming languages. PaaS is a service model of Cloud computing wherein the provider offers resources like servers, software, database, etc. to the developer. Heroku helps manage environment-specific configurations separately from the source code, which provides greater security.&lt;br /&gt;
Heroku is not just a deployment environment but it also impacts the development process. There are several principles of the development of application on Heroku.&amp;lt;br&amp;gt;&lt;br /&gt;
•	Applications and Codebases : Most of the development of the application is done on application’s codebase which is stored in a [http://en.wikipedia.org/wiki/Version_control_system Version Control System (VCS)] &amp;lt;br&amp;gt;&lt;br /&gt;
•	Dependencies : All the application dependencies such as plugins should be declared explicitly&amp;lt;br&amp;gt;&lt;br /&gt;
•	Configuration : Configuration of an application is all that varies in different deploys&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Getting Started with Heroku'''&lt;br /&gt;
&lt;br /&gt;
1. To get started with Heroku, go to https://id.heroku.com/signup/devcenter, signup for a Heroku account. &lt;br /&gt;
&lt;br /&gt;
2. Then, download and install the Heroku toolbelt at https://toolbelt.heroku.com/ for your development system. You can also use Heroku command line instead of the online Heroku application. &lt;br /&gt;
&lt;br /&gt;
3. After installing one of them, login using the email address and password used when creating the Heroku account:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ref&amp;gt;https://github.com/heroku/heroku&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ heroku login&lt;br /&gt;
Enter your Heroku credentials.&lt;br /&gt;
Email: adam@example.com&lt;br /&gt;
Password:&lt;br /&gt;
Could not find an existing public key.&lt;br /&gt;
Would you like to generate one? [Yn]&lt;br /&gt;
Generating new SSH public key.&lt;br /&gt;
Uploading SSH public key /Users/adam/.ssh/id_rsa.pub&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Deploying Applications'''&lt;br /&gt;
&lt;br /&gt;
Heroku uses [http://en.wikipedia.org/wiki/Git_(software) git] primarily to deploy the applications. When an application is created on Heroku, it associates the new git which is remote with the local git repository.&lt;br /&gt;
&lt;br /&gt;
As a result, deploying code is just the familiar git push, but to the heroku remote instead:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ref&amp;gt;https://devcenter.heroku.com/articles/how-heroku-works#deploying-applications&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ git push heroku master&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Vlad ==&lt;br /&gt;
&lt;br /&gt;
[[File:Vlad.png|frame|right|&amp;lt;ref&amp;gt;http://rubyhitsquad.com/Vlad_the_Deployer.html&amp;lt;/ref&amp;gt;|Vlad Logo]]&lt;br /&gt;
&lt;br /&gt;
Vlad is another automated deployment tool which is simple to use. It integrates with rake and uses standard tools like SSH, rsync etc.&lt;br /&gt;
&lt;br /&gt;
The main features of Vlad include&lt;br /&gt;
* It uses very few dependencies which are simple.&lt;br /&gt;
* It can execute commands on more than one server.&lt;br /&gt;
* It syncs files to one or more servers.&lt;br /&gt;
* It matches local and remote tasks.&lt;br /&gt;
* It runs tests very fast.&lt;br /&gt;
&lt;br /&gt;
'''Getting started with Vlad'''&amp;lt;ref&amp;gt;http://docs.seattlerb.org/vlad/doco/getting_started_txt.html&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create a deploy file, usually in “config/deploy.rb”:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set :application, &amp;quot;project&amp;quot;&lt;br /&gt;
set :domain, &amp;quot;example.com&amp;quot;&lt;br /&gt;
set :deploy_to, &amp;quot;/path/to/install&amp;quot;&lt;br /&gt;
set :repository, 'http://svn.example.com/project/branches/stable/'&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This defaults to using ‘svn export’ from repository, and a single server for app, db, and www.&lt;br /&gt;
&lt;br /&gt;
If you want a multi-config environment, change your config like so:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set :application, &amp;quot;project&amp;quot;&lt;br /&gt;
set :repository, 'http://svn.example.com/project/branches/stable/'&lt;br /&gt;
&lt;br /&gt;
task :beta do&lt;br /&gt;
  set :domain,    &amp;quot;beta.example.com&amp;quot;&lt;br /&gt;
  set :deploy_to, &amp;quot;/path/to/install-beta&amp;quot;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
task :dev do&lt;br /&gt;
  set :domain,    &amp;quot;dev.example.com&amp;quot;&lt;br /&gt;
  set :deploy_to, &amp;quot;/path/to/install-dev&amp;quot;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
task :prod do&lt;br /&gt;
  set :domain,    &amp;quot;example.com&amp;quot;&lt;br /&gt;
  set :deploy_to, &amp;quot;/path/to/install&amp;quot;&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Add the following to your Rakefile:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
begin&lt;br /&gt;
  require 'vlad'&lt;br /&gt;
  Vlad.load&lt;br /&gt;
rescue LoadError&lt;br /&gt;
  # do nothing&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Vlad.load has a lot of flexibility.&lt;br /&gt;
&lt;br /&gt;
You can install vlad via:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;% rake vlad:invoke COMMAND='sudo gem install vlad -y'&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Initial Launch&lt;br /&gt;
&amp;lt;pre&amp;gt;Run rake vlad:setup vlad:update vlad:migrate vlad:start&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ref&amp;gt;http://docs.seattlerb.org/vlad/index.html&amp;lt;/ref&amp;gt;&lt;br /&gt;
'''Running Vlad'''&lt;br /&gt;
&lt;br /&gt;
* Using rake&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
task :shazam! do&lt;br /&gt;
  Rake::Task[:action1].invoke&lt;br /&gt;
  Rake::Task[:action2].invoke&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Using SSH&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Host example.com&lt;br /&gt;
    User fluffy_bunny&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== AppFog == &lt;br /&gt;
&lt;br /&gt;
[[File:AppFog.jpg|frame|right|&amp;lt;ref&amp;gt;https://www.appfog.com/&amp;lt;/ref&amp;gt;|AppFog Logo]]&lt;br /&gt;
&lt;br /&gt;
AppFog is a PaaS built on Cloud Foundry which is another PaaS platform for deploying applications. &lt;br /&gt;
&lt;br /&gt;
Features of AppFog are&lt;br /&gt;
* It launches and runs fast.&lt;br /&gt;
* It does not require configuring servers or installing frameworks.&lt;br /&gt;
* It is compatible with code management systems like git, svn etc.&lt;br /&gt;
&lt;br /&gt;
'''Installing AppFog'''&amp;lt;ref&amp;gt;http://blog.appfog.com/getting-started-with-appfogs-command-line/&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
‘af‘ command line tool is written in Ruby for installation.&lt;br /&gt;
&lt;br /&gt;
Download and install [http://rubyinstaller.org/ Ruby Installer] for Windows. The installer already includes RubyGems.&lt;br /&gt;
&lt;br /&gt;
Be sure you use the Ruby-enabled command prompt window when you later install and use af. You access this command prompt from the Windows Start menu (All Programs &amp;gt; Ruby &amp;gt; Start Command Prompt with Ruby).&lt;br /&gt;
&lt;br /&gt;
Finally, update RubyGems from the Ruby Command Prompt:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem update --system&lt;br /&gt;
$ gem install af&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Login with:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ af login&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Finally from within your source code directory:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ af update hello-node&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Getting Started with AppFog'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
target [url]                                       Reports current target or sets a new target&lt;br /&gt;
login [email] [--email, --password]                Login&lt;br /&gt;
info                                               System and account information&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== AWS Elastic Beanstalk==&lt;br /&gt;
&lt;br /&gt;
[[File:AWSLogo.jpg|frame|right|&amp;lt;ref&amp;gt;https://aws.amazon.com&amp;lt;/ref&amp;gt;|AWS Logo]]&lt;br /&gt;
&lt;br /&gt;
Amazon Wen Services(AWS) offers [http://en.wikipedia.org/wiki/Infrastructure_as_a_service#Infrastructure_as_a_service_.28IaaS.29 Infrastructure as a Service] (IaaS) and provides a complete set of resources for the development of a web application in minutes. AWS Elastic Beanstalk is a deployment tool of the AWS cloud.&lt;br /&gt;
&lt;br /&gt;
With AWS Elastic Beanstalk, applications can be quickly deployed and managed in the AWS cloud without worrying about the infrastructure that runs those applications. AWS Elastic Beanstalk reduces management complexity without restricting choice or control. Once the application is uploaded AWS Elastic Beanstalk automatically handles the details of capacity provisioning, load balancing, scaling, and application health monitoring. AWS Elastic Beanstalk uses highly reliable and scalable services.&lt;br /&gt;
&lt;br /&gt;
'''AWS CLI'''&lt;br /&gt;
&lt;br /&gt;
AWS Elastic Beanstalk uses a command line tool Eb, which helps you to deploy your application easily.&lt;br /&gt;
&lt;br /&gt;
'''Getting Started with Eb'''&amp;lt;ref&amp;gt;http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/command-reference-get-started.html&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To get started with the beanstalk CLI, you will need to download the command line tools at the [http://aws.amazon.com/code/6752709412171743 AWS Sample Code &amp;amp; Libraries] website.&lt;br /&gt;
&lt;br /&gt;
Step 1: Initialize Your Git Repository&lt;br /&gt;
&lt;br /&gt;
Eb is a command line interface that enables you to deploy applications quickly and more easily using Git. Eb is available as part of the Elastic Beanstalk command line tools package. &lt;br /&gt;
&lt;br /&gt;
1. To install eb,install the following software onto your local computer:&lt;br /&gt;
&lt;br /&gt;
* Git 1.6.6 or later. To download Git, go to http://git-scm.com/.&lt;br /&gt;
* PowerShell 2.0.&lt;br /&gt;
&lt;br /&gt;
2. Initialize your Git repository.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git init &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Step 2: Configuring AWS Elastic Beanstalk&lt;br /&gt;
&lt;br /&gt;
1. From your directory where you created your local repository, type the following command.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
eb init&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2. When you are prompted for the access key ID, type your access key ID. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Enter your AWS Access Key ID (current value is &amp;quot;AKIAIOSFODNN7EXAMPLE&amp;quot;): &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3. When you are prompted for the secret access key, type your secret access key.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Enter your AWS Secret Access Key (current value is &amp;quot;wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY&amp;quot;): &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
4. When you are prompted for the AWS Elastic Beanstalk application name, type the name of the application. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Enter an AWS Elastic Beanstalk application name (auto-generated value is &amp;quot;windows&amp;quot;): &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Note:&lt;br /&gt;
If you have a space in your application name, make sure you do not use quotes.&lt;br /&gt;
&lt;br /&gt;
5. When you are prompted for the AWS Elastic Beanstalk environment name, type the name of the environment. AWS Elastic Beanstalk automatically creates an environment name based on your application name. If you want to accept the default, press Enter.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Enter an AWS Elastic Beanstalk environment name (current value is &amp;quot;HelloWorld-env&amp;quot;): &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
6. When you are prompted to create an Amazon RDS DB instance, type y or n. For this example, we'll type y.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Create an RDS DB Instance? [y/n]:&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
7. When you are prompted to enter your RDS user master password, type your password containing from 8 to 16 printable ASCII characters (excluding /, \, and @).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Enter an RDS DB master password: &lt;br /&gt;
Retype password to confirm: &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can now get started with the AWS Elastic Beanstalk.&lt;br /&gt;
&lt;br /&gt;
== OpenShift ==&lt;br /&gt;
&lt;br /&gt;
[[File:OpenShift.png|frame|right|&amp;lt;ref&amp;gt;https://en.wikipedia.org&amp;lt;/ref&amp;gt;|OpenShift Logo]]&lt;br /&gt;
&lt;br /&gt;
Another free and open source PaaS for deploying applications is OpenShift created by [[http://en.wikipedia.org/wiki/RedHat RedHat]]. &lt;br /&gt;
&lt;br /&gt;
'''Considerations'''&lt;br /&gt;
* Databases&lt;br /&gt;
&lt;br /&gt;
To use the application outside the OpenShift environment one needs to change the variables as the application is configured to use database in production mode in OpenShift.&lt;br /&gt;
&lt;br /&gt;
* Assets&lt;br /&gt;
&lt;br /&gt;
The assets are precompiled everytime application is pushed to OpenShift.&lt;br /&gt;
&lt;br /&gt;
* Security&lt;br /&gt;
&lt;br /&gt;
Security related variables are to be unique across the application.&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;ref&amp;gt;https://github.com/openshift/rails-example&amp;lt;/ref&amp;gt;&lt;br /&gt;
'''Installation'''&lt;br /&gt;
&lt;br /&gt;
1.	Create an account at http://openshift.redhat.com/&lt;br /&gt;
&lt;br /&gt;
2.	Create a rails application&lt;br /&gt;
	&amp;lt;pre&amp;gt;rhc app create -a railsapp -t ruby-1.9&amp;lt;/pre&amp;gt;&lt;br /&gt;
3.	Add mysql support to your application&lt;br /&gt;
	&amp;lt;pre&amp;gt;rhc cartridge add -a railsapp -c mysql-5.1&amp;lt;/pre&amp;gt;&lt;br /&gt;
4.	Add this upstream Rails quickstart repository&lt;br /&gt;
&amp;lt;pre&amp;gt;cd railsapp&lt;br /&gt;
git remote add upstream -m master git://github.com/openshift/rails-example.git&lt;br /&gt;
git pull -s recursive -X theirs upstream master&amp;lt;/pre&amp;gt;&lt;br /&gt;
5.	Push your new code&lt;br /&gt;
&amp;lt;pre&amp;gt;git push&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Future scope ==&lt;br /&gt;
&lt;br /&gt;
[[File:Cloud 66.jpg|frame|right|&amp;lt;ref&amp;gt;https://www.cloud66.com/&amp;lt;/ref&amp;gt;|Cloud66 Logo]]&lt;br /&gt;
&lt;br /&gt;
Cloud 66 combines the convenience of Platform-as-a-Service (PaaS) and the flexibility and control of Infrastructure-as-a-Service (IaaS). This platform allows easy deployment of application, so there is no overhead of configuring or monitoring the servers.&lt;br /&gt;
&lt;br /&gt;
'''Cloud 66 Command line Toolbelt'''&lt;br /&gt;
&lt;br /&gt;
Toolbelt is an open source released to deploy the application.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ref&amp;gt;http://blog.cloud66.com/&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Getting Started with Cloud 66'''&lt;br /&gt;
&lt;br /&gt;
1. Go to the [https://www.cloud66.com/users/sign_up sign up] page and create a Cloud 66 account.&lt;br /&gt;
&lt;br /&gt;
2. Go to Cloud 66 Dashboard and [https://www.cloud66.com/help/first_stack build your first stack].&lt;br /&gt;
&lt;br /&gt;
'''Installation'''&lt;br /&gt;
&lt;br /&gt;
Installation of toolbelt uses the following command&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Gem install c66&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This automatically searches the newest version and installs it.&lt;br /&gt;
&lt;br /&gt;
= Model Class : assignment_participant.rb =&lt;br /&gt;
This class is a subclass of the model class named 'participant'.Several methods in this model class required refactoring. The names were changed to follow method naming convention. Deprecated code was removed and re-coded as needed. Duplicated methods were commented. Some of the methods were moved to the parent class while some other were moved to a new class.  &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;width:3%;&amp;quot;|S. No&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;|Method Name&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;|Change Made &lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;|Reason For Change&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
|''''' 1 '''''&lt;br /&gt;
|get_course_string&lt;br /&gt;
|Renamed to course_string and refactored &lt;br /&gt;
|To follow method naming convention&lt;br /&gt;
|-&lt;br /&gt;
|''''' 2 '''''&lt;br /&gt;
|get_cycle_deviation_score&lt;br /&gt;
|Moved to collusion_cycle.rb model class&lt;br /&gt;
|Related methods that calculate collusion in reviews have been moved to the newly created collusion_cycle.rb model class&lt;br /&gt;
|-&lt;br /&gt;
|''''' 3 '''''&lt;br /&gt;
|get_cycle_similarity_score&lt;br /&gt;
|Moved to collusion_cycle.rb model class&lt;br /&gt;
|Related methods that calculate collusion in reviews have been moved to the newly created collusion_cycle.rb model class&lt;br /&gt;
|-&lt;br /&gt;
|''''' 4 '''''&lt;br /&gt;
|get_feedback&lt;br /&gt;
|Renamed to feedback and refactored&lt;br /&gt;
|To follow method naming convention&lt;br /&gt;
|-&lt;br /&gt;
|''''' 5 '''''&lt;br /&gt;
|get_files&lt;br /&gt;
|Renamed to files_in_directory  and refactored&lt;br /&gt;
|To follow method naming convention&lt;br /&gt;
|-&lt;br /&gt;
|''''' 6 '''''&lt;br /&gt;
|get_four_node_cycles&lt;br /&gt;
|Moved to collusion_cycle.rb model class&lt;br /&gt;
|Related methods that calculate collusion in reviews have been moved to the newly created collusion_cycle.rb model class&lt;br /&gt;
|-&lt;br /&gt;
|fullname&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|get_metareviews&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|name&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|name&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|- &lt;br /&gt;
|get_review_score&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|get_reviewees&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|get_reviewers&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|get_reviews&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|get_reviews_by_reviewer&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Comparison between Capistrano/Vlad/Heroku/AppFog/OpenShift/Cloud66/AWS Beanstalk =&lt;br /&gt;
&lt;br /&gt;
With so many automated tools available for Code Deployment and Release Management, the decision on which to use for a particular Ruby on rails application depends on various parameters to be considered.&lt;br /&gt;
Some comparative features of the different tools are as follows :&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;width:9%;&amp;quot;|Criteria for Comparision&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;|Capistrano&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;| Vlad&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;| Heroku&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;| AppFog&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;| OpenShift&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;| Cloud66&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;| AWS Beanstalk&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
|'''''Getting started with the tool'''''&lt;br /&gt;
|It is a framework that allows one to execute commands on a remote server using tools like ssh.&lt;br /&gt;
|Vlad deployment is similar to Capistrano, but less complex.&lt;br /&gt;
|Heroku’s offers a plan with first dyno free i.e. 512 MB that can be paired with Postgres starter DB to start an application with 0 initial cost&lt;br /&gt;
|AppFog’s initial plan offers 2GB of RAM free which is enough for small to medium traffic applications. By managing options provided for DB, queue server, application server, etc all part of the intial package, this is an excellent option to try out an application&lt;br /&gt;
|OpenShift is an open source platform and its free plan for starters has 3 gears for free wherein each gear consists of some RAM and disk space.&lt;br /&gt;
|Free plan provides one server for deployment.&lt;br /&gt;
|Provides an initial free tier. Without free tier no additional cost for Beanstalk. One only needs to pay for the AWS resources used.&lt;br /&gt;
|-&lt;br /&gt;
|'''''Scaling Memory'''''&lt;br /&gt;
|Memory increase would require additional servers/unused space in existing ones.&lt;br /&gt;
|Memory increase depends on additional servers available/unused space in existing ones.&lt;br /&gt;
|Memory increased in terms of dyno each of size 512 MB.&lt;br /&gt;
|Can configure any size for memory allocation&lt;br /&gt;
| -&lt;br /&gt;
| -&lt;br /&gt;
|Can automatically up/down scale the application by adjusting the default auto scaling settings.&lt;br /&gt;
|-&lt;br /&gt;
|'''''Scaling – Cost and Ease'''''&lt;br /&gt;
|While this provides greater flexibility as user is in control of the servers, it also causes additional overhead in terms of user needing to work both on Rails application and web server deployment.&lt;br /&gt;
|It can be integrated with Rake without any hindrances.&lt;br /&gt;
|Can dynamically scale up and down an application and pay as per hourly usages. Each additional dyno costs $35/mo&lt;br /&gt;
|Scaling takes up some time and need to pay for a month at the minimum. Scaling up to 4GB increases cost to $100/mo&lt;br /&gt;
| -&lt;br /&gt;
|Scaling using Cloud66 is relatively easy and hassle free.&lt;br /&gt;
|Scaling is fast and easy.&lt;br /&gt;
|-&lt;br /&gt;
|'''''Special features'''''&lt;br /&gt;
|For sensitive applications where handing over the control to a third party for deployment is not feasible, Capistrano is the way to go.&lt;br /&gt;
|It also provides support for tools like rsync and ssh.&lt;br /&gt;
|Lacks support for cross region deployment i.e. can’t select location of server where application gets deployed&lt;br /&gt;
|Supports cross region deployment i.e. if users of application primarily in Asia, can choose a server in Asia to deploy application, thus making the site faster.&lt;br /&gt;
| -&lt;br /&gt;
| -&lt;br /&gt;
|Provides complete flexibility and control of the resources to the user including the chance to take over control of some or all.&lt;br /&gt;
|-&lt;br /&gt;
|'''''Database support'''''&lt;br /&gt;
|Provides support for DB related to rails applications&lt;br /&gt;
|Provides support for DB related to rails applications&lt;br /&gt;
|It features serious production DB like RDBMS, Postgres, etc. and many Addons such as MongoDB, ClearDB, etc.&lt;br /&gt;
|Features free shared databases such as MongoDB, MySQL, Postgres but for other production DB’s need to use Addons&lt;br /&gt;
|Databases featured are MySQL, MongoDB and Postgres&lt;br /&gt;
| -&lt;br /&gt;
|Supports DB like Amazon SimpleDB, Amazon RDS, Amazon DynamoDB.&lt;br /&gt;
|-&lt;br /&gt;
|'''''Deployment strategy'''''&lt;br /&gt;
|Capistrano provides commands to be executed for automated deployment. It supports git.&lt;br /&gt;
|It is much easier to deploy using Vlad as compared to Capistrano.&lt;br /&gt;
|Deployment as easy as ‘git push’&lt;br /&gt;
|Deployment does not support git. It uses the af tool for deployment.&lt;br /&gt;
| -&lt;br /&gt;
|Since Cloud66 provides the platform in terms of Application Stack Management as a Service, it uses the infrastructure of AWS, Virtual Private Server, etc. for actual deployment. But the user doesn’t have to worry about configuration or monitoring of the servers. Hence provides easy deployment.&lt;br /&gt;
|Deployment options include Git, AWS management console, etc.&lt;br /&gt;
|-&lt;br /&gt;
|'''''Community Support availability'''''&lt;br /&gt;
| As it has been in use for a long time there is a huge community support available for Capistrano.&lt;br /&gt;
| -&lt;br /&gt;
|Heroku also provides a huge community support given the fact that there are a lot of Heroku users.&lt;br /&gt;
|Community is limited.&lt;br /&gt;
|RedHat being a reputed provider for open source solutions, the OpenShift community is gradually increasing and receiving support from a considerable community of users.&lt;br /&gt;
|Limited community support currently&lt;br /&gt;
|Has community forums and documentation.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Conclusion =&lt;br /&gt;
&lt;br /&gt;
Comparison and contrast between various deployment automated tools such as Capistrano, Heroku, Vlad, AppFog, OpenShift, Cloud66, AWS Beanstalk shows that each has its own pros and cons. &lt;br /&gt;
For instance, in a client based application where handing over the control of the application to a third party such as the deployment tool provider is impossible, AWS Beanstalk would be the obvious choice for the developer.&lt;br /&gt;
On the other hand, a novice Rails application developer might find all he needs in the starter plan of Heroku with the added bonus of a huge support community available to him for troubleshooting as he stumbles his way across the development of the application.&lt;br /&gt;
One may also choose the tool that provides the specific database support for your application. In case of large scale corporations where budgets are not that limited, the increasing costs with up-scaling of some tools would not be an obstacle.&lt;br /&gt;
Thus, various considerations about the application such as scalability requirement, security concerns, cost, availability of own resources such as servers etc., will help determine which tool is the most suitable for that application.&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= See Also =&lt;br /&gt;
&lt;br /&gt;
* Rails Solutions: Ruby on Rails Made Easy by Justin Williams&lt;br /&gt;
* http://guides.beanstalkapp.com/deployments/best-practices.html&lt;br /&gt;
* http://www.urbancode.com/anthill3-help-3.7/html/SettingUpDeploymentProcess.html&lt;br /&gt;
* http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=UseFMSGateway_3.html&lt;br /&gt;
* http://pic.dhe.ibm.com/infocenter/tivihelp/v26r1/index.jsp?topic=%2Fcom.ibm.dtm.doc%2Fdeploysoftware%2Fc_deploysw_process.html&lt;/div&gt;</summary>
		<author><name>Npari</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch2_0e808_nsv&amp;diff=80997</id>
		<title>CSC/ECE 517 Fall 2013/ch2 0e808 nsv</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch2_0e808_nsv&amp;diff=80997"/>
		<updated>2013-10-30T18:27:58Z</updated>

		<summary type="html">&lt;p&gt;Npari: /* Model Class : assignment_participant.rb */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= E808: Refactor and test Participant, AssignmentParticipant, &amp;amp; CourseParticipant =&lt;br /&gt;
&lt;br /&gt;
Code Deployment or [http://en.wikipedia.org/wiki/Software_deployment Software Deployment] and [http://en.wikipedia.org/wiki/Release_management Release management] with [http://en.wikipedia.org/wiki/Ruby_on_Rails Ruby on Rails] can be done using various tools such as [http://en.wikipedia.org/wiki/Capistrano Capistrano], [http://en.wikipedia.org/wiki/Heroku Heroku], AppFog, OpenShift, AWS, Cloud 66, Vlad, etc. These automated tools are frameworks used to write and execute commands in parallel remote machines and thus ease the process of deployment and management of various applications.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
= Introduction =&lt;br /&gt;
&lt;br /&gt;
The Deploying process involves different stages like development, testing, release management and sign-off by project teams.&lt;br /&gt;
&lt;br /&gt;
The following diagram illustrates the deployment process of an application.&lt;br /&gt;
&lt;br /&gt;
[[File:Deployment Process.jpg|frame|center|&amp;lt;ref&amp;gt;http://technet.microsoft.com/en-us/library/cc465178.aspx&amp;lt;/ref&amp;gt;]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The deployment flow has three stages: development and testing, release management and stakeholders and project teams. &lt;br /&gt;
&lt;br /&gt;
After the final release of the code in development and testing stage, the master plan is prepared for deployment of components and sites based on the sign-offs provided by the project teams, stakeholders and customers. Then, the stabilization of the deployment is calculated based on some metrics. Once the deployment is stabilized, it is reviewed and the process of deployment is complete. The final sign-off is given by the stakeholders.&lt;br /&gt;
&lt;br /&gt;
==Participant model: participant.rb==&lt;br /&gt;
&lt;br /&gt;
Code deployment is a procedure where the application is transferred onto a production server, so that it is made available for all the other users. It is the part of release management process which involves several activities. These activities are inter-dependent and need to be completed in a specific order for successful code deployment. &lt;br /&gt;
&lt;br /&gt;
'''Code Deployment Activities'''&lt;br /&gt;
&lt;br /&gt;
The various deployment activities include &amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/Software_deployment&amp;lt;/ref&amp;gt;&lt;br /&gt;
* Release : Gathering all system components in preparation for deployment&lt;br /&gt;
* Install and activate : Installing the application components and getting them in the 'ready' state&lt;br /&gt;
* Deactivate : Shutting down components that are out-dated or that may interfere with updating others&lt;br /&gt;
* Adapt : Making changes to application to accommodate changes in environment&lt;br /&gt;
* Update : Having a newer release installed in place of the old one&lt;br /&gt;
* Built-in : There are components built-into some tools for complete/semi-automating updates&lt;br /&gt;
* Version tracking : These systems help the user to know if newer versions of a software are available and if yes, help install them&lt;br /&gt;
* Uninstall : Opposite of installation and involves complete removal of software and its dependencies from the environment&lt;br /&gt;
* Retire : This involves making a software obsolete and is the end of software life cycle&lt;br /&gt;
&lt;br /&gt;
The general guidelines for the deployment process remain the same but there are variations in the specific requirements with each software system.&lt;br /&gt;
&lt;br /&gt;
==AssignmentParticipant model: assignment_participant.rb==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ref&amp;gt;http://searchitchannel.techtarget.com/definition/release-management&amp;lt;/ref&amp;gt;&lt;br /&gt;
Release management is a software process which takes care of the development, testing, deployment and support stages of software releases. The start of release management happens in the development phase, where it requests for new features or changes in the existing application. When the request is accepted, a new release is planned and designed. This design is built and then enters the testing phase, where the release is tested until it is accepted. After the release is accepted as a candidate, it enters the deployment phase where it is implemented. Once deployed, the release is made available and sent to support phase for collection of bug reports. Once the support phase is done, the bugs and other issues lead to requests for changes and the cycle is then repeated.&lt;br /&gt;
&lt;br /&gt;
= Automating Code Deployment and Release Management =&lt;br /&gt;
&amp;lt;ref&amp;gt;http://www.urbancode.com/html/solutions/deployment-automation.html&amp;lt;/ref&amp;gt;&lt;br /&gt;
Automation of a process is required when the manual process is more error prone. Also, for large real world applications, the manual process is very complex and time consuming. Incomplete documentation hampers a manual process further. Deployment also has to be done in many environments and involves varied steps to be followed in a specific order. Manual process needs repetition of same procedure to each and every environment which leads to many errors and the process becomes costly.&lt;br /&gt;
In web applications each new release has to be deployed to and tested in development, testing and production environments.The number of software releases in web applications  are more and hence the need to automate release management is also greater.&lt;br /&gt;
&lt;br /&gt;
Automation of deployment delivers applications faster and with fewer errors. The defined software deployment process can be applied across all environments consistently every time. With various automated application deployment platforms now readily available, manual deployments have become a thing of the past.&lt;br /&gt;
&lt;br /&gt;
Lets take a look at the various Deployment Automation tools available to Ruby on Rails applications. For the purposes of this article the process of manual deployment of a Ruby on Rails application is out of scope.&lt;br /&gt;
&lt;br /&gt;
= Deployment Automation tools =&lt;br /&gt;
&lt;br /&gt;
Some of the automated tools that are widely used for the process of deployment with Ruby on Rails are &lt;br /&gt;
&lt;br /&gt;
* Capistrano&lt;br /&gt;
* Heroku&lt;br /&gt;
* Vlad&lt;br /&gt;
* AppFog&lt;br /&gt;
* AWS Elastic Beanstalk&lt;br /&gt;
* OpenShift&lt;br /&gt;
* Cloud 66&lt;br /&gt;
&lt;br /&gt;
== Capistrano ==&lt;br /&gt;
&lt;br /&gt;
[[File:Capistrano.jpg|frame|right|&amp;lt;ref&amp;gt;http://www.capistranorb.com/&amp;lt;/ref&amp;gt;|Capistrano Logo]]&lt;br /&gt;
&lt;br /&gt;
Capistrano is a Ruby tool which helps deploy an application to the server. Capistrano allows deploying to multiple machines at a time. It has many advanced options which help to deploy different kinds of applications. It also supports the scripting and execution of tasks.&lt;br /&gt;
&lt;br /&gt;
Capistrano can be used to:&lt;br /&gt;
&lt;br /&gt;
* Deploy applications onto many machines simultaneously.&lt;br /&gt;
* Automate the audits&lt;br /&gt;
* Automate the common tasks of a team.&lt;br /&gt;
&lt;br /&gt;
Capistrano can be made a part of a larger software by integrating it with another Ruby software.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ref&amp;gt;http://www.capistranorb.com/documentation/getting-started/installation/&amp;lt;/ref&amp;gt;  &lt;br /&gt;
'''General Usage'''&lt;br /&gt;
&lt;br /&gt;
The following commands will clone Capistrano, build the gem and install it locally.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem install capistrano --pre --trust-policy HighSecurity&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Or grab the bleeding edge head from:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ git clone -b v3 https://github.com/capistrano/capistrano.git&lt;br /&gt;
$ cd capistrano&lt;br /&gt;
$ gem build *.gemspec&lt;br /&gt;
$ gem install *.gem&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
'''Signed Rubygems'''&lt;br /&gt;
&lt;br /&gt;
As Capistrano is a signed gem, you should always be careful to use the --trust-policy flag when installing Gems, or since Bundler 1.3 you should use the same flag:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem install capistrano --pre --trust-policy HighSecurity&lt;br /&gt;
$ bundle install --trust-policy HighSecurity&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If you get a message that looks like:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ERROR:  While executing gem ... (Gem::Security::Exception)&lt;br /&gt;
unsigned gems are not allowed by the High Security policy&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then please complain to your Gem author, and have them start signing their Gems.&lt;br /&gt;
&lt;br /&gt;
'''Usage in a Rails project'''&lt;br /&gt;
&lt;br /&gt;
Add the following lines to the Gemfile to the :development group ideally.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
group :development do&lt;br /&gt;
  gem 'capistrano-rails', '~&amp;gt; 0.0.7'&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Heroku ==&lt;br /&gt;
&lt;br /&gt;
[[File:Heroku.jpg|frame|right|&amp;lt;ref&amp;gt;https://www.heroku.com/&amp;lt;/ref&amp;gt;|Heroku Logo]]&lt;br /&gt;
&lt;br /&gt;
Heroku is a cloud [http://en.wikipedia.org/wiki/Platform_as_a_service Platform as a Service] (PaaS) which supports several programming languages. PaaS is a service model of Cloud computing wherein the provider offers resources like servers, software, database, etc. to the developer. Heroku helps manage environment-specific configurations separately from the source code, which provides greater security.&lt;br /&gt;
Heroku is not just a deployment environment but it also impacts the development process. There are several principles of the development of application on Heroku.&amp;lt;br&amp;gt;&lt;br /&gt;
•	Applications and Codebases : Most of the development of the application is done on application’s codebase which is stored in a [http://en.wikipedia.org/wiki/Version_control_system Version Control System (VCS)] &amp;lt;br&amp;gt;&lt;br /&gt;
•	Dependencies : All the application dependencies such as plugins should be declared explicitly&amp;lt;br&amp;gt;&lt;br /&gt;
•	Configuration : Configuration of an application is all that varies in different deploys&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Getting Started with Heroku'''&lt;br /&gt;
&lt;br /&gt;
1. To get started with Heroku, go to https://id.heroku.com/signup/devcenter, signup for a Heroku account. &lt;br /&gt;
&lt;br /&gt;
2. Then, download and install the Heroku toolbelt at https://toolbelt.heroku.com/ for your development system. You can also use Heroku command line instead of the online Heroku application. &lt;br /&gt;
&lt;br /&gt;
3. After installing one of them, login using the email address and password used when creating the Heroku account:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ref&amp;gt;https://github.com/heroku/heroku&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ heroku login&lt;br /&gt;
Enter your Heroku credentials.&lt;br /&gt;
Email: adam@example.com&lt;br /&gt;
Password:&lt;br /&gt;
Could not find an existing public key.&lt;br /&gt;
Would you like to generate one? [Yn]&lt;br /&gt;
Generating new SSH public key.&lt;br /&gt;
Uploading SSH public key /Users/adam/.ssh/id_rsa.pub&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Deploying Applications'''&lt;br /&gt;
&lt;br /&gt;
Heroku uses [http://en.wikipedia.org/wiki/Git_(software) git] primarily to deploy the applications. When an application is created on Heroku, it associates the new git which is remote with the local git repository.&lt;br /&gt;
&lt;br /&gt;
As a result, deploying code is just the familiar git push, but to the heroku remote instead:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ref&amp;gt;https://devcenter.heroku.com/articles/how-heroku-works#deploying-applications&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ git push heroku master&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Vlad ==&lt;br /&gt;
&lt;br /&gt;
[[File:Vlad.png|frame|right|&amp;lt;ref&amp;gt;http://rubyhitsquad.com/Vlad_the_Deployer.html&amp;lt;/ref&amp;gt;|Vlad Logo]]&lt;br /&gt;
&lt;br /&gt;
Vlad is another automated deployment tool which is simple to use. It integrates with rake and uses standard tools like SSH, rsync etc.&lt;br /&gt;
&lt;br /&gt;
The main features of Vlad include&lt;br /&gt;
* It uses very few dependencies which are simple.&lt;br /&gt;
* It can execute commands on more than one server.&lt;br /&gt;
* It syncs files to one or more servers.&lt;br /&gt;
* It matches local and remote tasks.&lt;br /&gt;
* It runs tests very fast.&lt;br /&gt;
&lt;br /&gt;
'''Getting started with Vlad'''&amp;lt;ref&amp;gt;http://docs.seattlerb.org/vlad/doco/getting_started_txt.html&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create a deploy file, usually in “config/deploy.rb”:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set :application, &amp;quot;project&amp;quot;&lt;br /&gt;
set :domain, &amp;quot;example.com&amp;quot;&lt;br /&gt;
set :deploy_to, &amp;quot;/path/to/install&amp;quot;&lt;br /&gt;
set :repository, 'http://svn.example.com/project/branches/stable/'&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This defaults to using ‘svn export’ from repository, and a single server for app, db, and www.&lt;br /&gt;
&lt;br /&gt;
If you want a multi-config environment, change your config like so:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set :application, &amp;quot;project&amp;quot;&lt;br /&gt;
set :repository, 'http://svn.example.com/project/branches/stable/'&lt;br /&gt;
&lt;br /&gt;
task :beta do&lt;br /&gt;
  set :domain,    &amp;quot;beta.example.com&amp;quot;&lt;br /&gt;
  set :deploy_to, &amp;quot;/path/to/install-beta&amp;quot;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
task :dev do&lt;br /&gt;
  set :domain,    &amp;quot;dev.example.com&amp;quot;&lt;br /&gt;
  set :deploy_to, &amp;quot;/path/to/install-dev&amp;quot;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
task :prod do&lt;br /&gt;
  set :domain,    &amp;quot;example.com&amp;quot;&lt;br /&gt;
  set :deploy_to, &amp;quot;/path/to/install&amp;quot;&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Add the following to your Rakefile:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
begin&lt;br /&gt;
  require 'vlad'&lt;br /&gt;
  Vlad.load&lt;br /&gt;
rescue LoadError&lt;br /&gt;
  # do nothing&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Vlad.load has a lot of flexibility.&lt;br /&gt;
&lt;br /&gt;
You can install vlad via:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;% rake vlad:invoke COMMAND='sudo gem install vlad -y'&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Initial Launch&lt;br /&gt;
&amp;lt;pre&amp;gt;Run rake vlad:setup vlad:update vlad:migrate vlad:start&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ref&amp;gt;http://docs.seattlerb.org/vlad/index.html&amp;lt;/ref&amp;gt;&lt;br /&gt;
'''Running Vlad'''&lt;br /&gt;
&lt;br /&gt;
* Using rake&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
task :shazam! do&lt;br /&gt;
  Rake::Task[:action1].invoke&lt;br /&gt;
  Rake::Task[:action2].invoke&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Using SSH&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Host example.com&lt;br /&gt;
    User fluffy_bunny&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== AppFog == &lt;br /&gt;
&lt;br /&gt;
[[File:AppFog.jpg|frame|right|&amp;lt;ref&amp;gt;https://www.appfog.com/&amp;lt;/ref&amp;gt;|AppFog Logo]]&lt;br /&gt;
&lt;br /&gt;
AppFog is a PaaS built on Cloud Foundry which is another PaaS platform for deploying applications. &lt;br /&gt;
&lt;br /&gt;
Features of AppFog are&lt;br /&gt;
* It launches and runs fast.&lt;br /&gt;
* It does not require configuring servers or installing frameworks.&lt;br /&gt;
* It is compatible with code management systems like git, svn etc.&lt;br /&gt;
&lt;br /&gt;
'''Installing AppFog'''&amp;lt;ref&amp;gt;http://blog.appfog.com/getting-started-with-appfogs-command-line/&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
‘af‘ command line tool is written in Ruby for installation.&lt;br /&gt;
&lt;br /&gt;
Download and install [http://rubyinstaller.org/ Ruby Installer] for Windows. The installer already includes RubyGems.&lt;br /&gt;
&lt;br /&gt;
Be sure you use the Ruby-enabled command prompt window when you later install and use af. You access this command prompt from the Windows Start menu (All Programs &amp;gt; Ruby &amp;gt; Start Command Prompt with Ruby).&lt;br /&gt;
&lt;br /&gt;
Finally, update RubyGems from the Ruby Command Prompt:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem update --system&lt;br /&gt;
$ gem install af&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Login with:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ af login&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Finally from within your source code directory:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ af update hello-node&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Getting Started with AppFog'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
target [url]                                       Reports current target or sets a new target&lt;br /&gt;
login [email] [--email, --password]                Login&lt;br /&gt;
info                                               System and account information&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== AWS Elastic Beanstalk==&lt;br /&gt;
&lt;br /&gt;
[[File:AWSLogo.jpg|frame|right|&amp;lt;ref&amp;gt;https://aws.amazon.com&amp;lt;/ref&amp;gt;|AWS Logo]]&lt;br /&gt;
&lt;br /&gt;
Amazon Wen Services(AWS) offers [http://en.wikipedia.org/wiki/Infrastructure_as_a_service#Infrastructure_as_a_service_.28IaaS.29 Infrastructure as a Service] (IaaS) and provides a complete set of resources for the development of a web application in minutes. AWS Elastic Beanstalk is a deployment tool of the AWS cloud.&lt;br /&gt;
&lt;br /&gt;
With AWS Elastic Beanstalk, applications can be quickly deployed and managed in the AWS cloud without worrying about the infrastructure that runs those applications. AWS Elastic Beanstalk reduces management complexity without restricting choice or control. Once the application is uploaded AWS Elastic Beanstalk automatically handles the details of capacity provisioning, load balancing, scaling, and application health monitoring. AWS Elastic Beanstalk uses highly reliable and scalable services.&lt;br /&gt;
&lt;br /&gt;
'''AWS CLI'''&lt;br /&gt;
&lt;br /&gt;
AWS Elastic Beanstalk uses a command line tool Eb, which helps you to deploy your application easily.&lt;br /&gt;
&lt;br /&gt;
'''Getting Started with Eb'''&amp;lt;ref&amp;gt;http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/command-reference-get-started.html&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To get started with the beanstalk CLI, you will need to download the command line tools at the [http://aws.amazon.com/code/6752709412171743 AWS Sample Code &amp;amp; Libraries] website.&lt;br /&gt;
&lt;br /&gt;
Step 1: Initialize Your Git Repository&lt;br /&gt;
&lt;br /&gt;
Eb is a command line interface that enables you to deploy applications quickly and more easily using Git. Eb is available as part of the Elastic Beanstalk command line tools package. &lt;br /&gt;
&lt;br /&gt;
1. To install eb,install the following software onto your local computer:&lt;br /&gt;
&lt;br /&gt;
* Git 1.6.6 or later. To download Git, go to http://git-scm.com/.&lt;br /&gt;
* PowerShell 2.0.&lt;br /&gt;
&lt;br /&gt;
2. Initialize your Git repository.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git init &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Step 2: Configuring AWS Elastic Beanstalk&lt;br /&gt;
&lt;br /&gt;
1. From your directory where you created your local repository, type the following command.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
eb init&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2. When you are prompted for the access key ID, type your access key ID. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Enter your AWS Access Key ID (current value is &amp;quot;AKIAIOSFODNN7EXAMPLE&amp;quot;): &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3. When you are prompted for the secret access key, type your secret access key.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Enter your AWS Secret Access Key (current value is &amp;quot;wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY&amp;quot;): &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
4. When you are prompted for the AWS Elastic Beanstalk application name, type the name of the application. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Enter an AWS Elastic Beanstalk application name (auto-generated value is &amp;quot;windows&amp;quot;): &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Note:&lt;br /&gt;
If you have a space in your application name, make sure you do not use quotes.&lt;br /&gt;
&lt;br /&gt;
5. When you are prompted for the AWS Elastic Beanstalk environment name, type the name of the environment. AWS Elastic Beanstalk automatically creates an environment name based on your application name. If you want to accept the default, press Enter.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Enter an AWS Elastic Beanstalk environment name (current value is &amp;quot;HelloWorld-env&amp;quot;): &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
6. When you are prompted to create an Amazon RDS DB instance, type y or n. For this example, we'll type y.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Create an RDS DB Instance? [y/n]:&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
7. When you are prompted to enter your RDS user master password, type your password containing from 8 to 16 printable ASCII characters (excluding /, \, and @).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Enter an RDS DB master password: &lt;br /&gt;
Retype password to confirm: &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can now get started with the AWS Elastic Beanstalk.&lt;br /&gt;
&lt;br /&gt;
== OpenShift ==&lt;br /&gt;
&lt;br /&gt;
[[File:OpenShift.png|frame|right|&amp;lt;ref&amp;gt;https://en.wikipedia.org&amp;lt;/ref&amp;gt;|OpenShift Logo]]&lt;br /&gt;
&lt;br /&gt;
Another free and open source PaaS for deploying applications is OpenShift created by [[http://en.wikipedia.org/wiki/RedHat RedHat]]. &lt;br /&gt;
&lt;br /&gt;
'''Considerations'''&lt;br /&gt;
* Databases&lt;br /&gt;
&lt;br /&gt;
To use the application outside the OpenShift environment one needs to change the variables as the application is configured to use database in production mode in OpenShift.&lt;br /&gt;
&lt;br /&gt;
* Assets&lt;br /&gt;
&lt;br /&gt;
The assets are precompiled everytime application is pushed to OpenShift.&lt;br /&gt;
&lt;br /&gt;
* Security&lt;br /&gt;
&lt;br /&gt;
Security related variables are to be unique across the application.&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;ref&amp;gt;https://github.com/openshift/rails-example&amp;lt;/ref&amp;gt;&lt;br /&gt;
'''Installation'''&lt;br /&gt;
&lt;br /&gt;
1.	Create an account at http://openshift.redhat.com/&lt;br /&gt;
&lt;br /&gt;
2.	Create a rails application&lt;br /&gt;
	&amp;lt;pre&amp;gt;rhc app create -a railsapp -t ruby-1.9&amp;lt;/pre&amp;gt;&lt;br /&gt;
3.	Add mysql support to your application&lt;br /&gt;
	&amp;lt;pre&amp;gt;rhc cartridge add -a railsapp -c mysql-5.1&amp;lt;/pre&amp;gt;&lt;br /&gt;
4.	Add this upstream Rails quickstart repository&lt;br /&gt;
&amp;lt;pre&amp;gt;cd railsapp&lt;br /&gt;
git remote add upstream -m master git://github.com/openshift/rails-example.git&lt;br /&gt;
git pull -s recursive -X theirs upstream master&amp;lt;/pre&amp;gt;&lt;br /&gt;
5.	Push your new code&lt;br /&gt;
&amp;lt;pre&amp;gt;git push&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Cloud 66 ==&lt;br /&gt;
&lt;br /&gt;
[[File:Cloud 66.jpg|frame|right|&amp;lt;ref&amp;gt;https://www.cloud66.com/&amp;lt;/ref&amp;gt;|Cloud66 Logo]]&lt;br /&gt;
&lt;br /&gt;
Cloud 66 combines the convenience of Platform-as-a-Service (PaaS) and the flexibility and control of Infrastructure-as-a-Service (IaaS). This platform allows easy deployment of application, so there is no overhead of configuring or monitoring the servers.&lt;br /&gt;
&lt;br /&gt;
'''Cloud 66 Command line Toolbelt'''&lt;br /&gt;
&lt;br /&gt;
Toolbelt is an open source released to deploy the application.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ref&amp;gt;http://blog.cloud66.com/&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Getting Started with Cloud 66'''&lt;br /&gt;
&lt;br /&gt;
1. Go to the [https://www.cloud66.com/users/sign_up sign up] page and create a Cloud 66 account.&lt;br /&gt;
&lt;br /&gt;
2. Go to Cloud 66 Dashboard and [https://www.cloud66.com/help/first_stack build your first stack].&lt;br /&gt;
&lt;br /&gt;
'''Installation'''&lt;br /&gt;
&lt;br /&gt;
Installation of toolbelt uses the following command&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Gem install c66&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This automatically searches the newest version and installs it.&lt;br /&gt;
&lt;br /&gt;
= Model Class : assignment_participant.rb =&lt;br /&gt;
This class is a subclass of the model class named 'participant'.Several methods in this model class required refactoring. The names were changed to follow method naming convention. Deprecated code was removed and re-coded as needed. Duplicated methods were commented. Some of the methods were moved to the parent class while some other were moved to a new class.  &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;width:3%;&amp;quot;|S. No&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;|Method Name&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;|Change Made &lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;|Reason For Change&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
|''''' 1 '''''&lt;br /&gt;
|get_course_string&lt;br /&gt;
|Renamed to course_string and refactored &lt;br /&gt;
|To follow method naming convention&lt;br /&gt;
|-&lt;br /&gt;
|''''' 2 '''''&lt;br /&gt;
|get_cycle_deviation_score&lt;br /&gt;
|Moved to collusion_cycle.rb model class&lt;br /&gt;
|Related methods that calculate collusion in reviews have been moved to the newly created collusion_cycle.rb model class&lt;br /&gt;
|-&lt;br /&gt;
|get_cycle_similarity_score&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|get_feedback&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|get_files&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|get_four_node_cycles&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|fullname&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|get_metareviews&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|name&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|name&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|- &lt;br /&gt;
|get_review_score&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|get_reviewees&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|get_reviewers&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|get_reviews&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|get_reviews_by_reviewer&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Comparison between Capistrano/Vlad/Heroku/AppFog/OpenShift/Cloud66/AWS Beanstalk =&lt;br /&gt;
&lt;br /&gt;
With so many automated tools available for Code Deployment and Release Management, the decision on which to use for a particular Ruby on rails application depends on various parameters to be considered.&lt;br /&gt;
Some comparative features of the different tools are as follows :&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;width:9%;&amp;quot;|Criteria for Comparision&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;|Capistrano&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;| Vlad&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;| Heroku&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;| AppFog&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;| OpenShift&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;| Cloud66&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;| AWS Beanstalk&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
|'''''Getting started with the tool'''''&lt;br /&gt;
|It is a framework that allows one to execute commands on a remote server using tools like ssh.&lt;br /&gt;
|Vlad deployment is similar to Capistrano, but less complex.&lt;br /&gt;
|Heroku’s offers a plan with first dyno free i.e. 512 MB that can be paired with Postgres starter DB to start an application with 0 initial cost&lt;br /&gt;
|AppFog’s initial plan offers 2GB of RAM free which is enough for small to medium traffic applications. By managing options provided for DB, queue server, application server, etc all part of the intial package, this is an excellent option to try out an application&lt;br /&gt;
|OpenShift is an open source platform and its free plan for starters has 3 gears for free wherein each gear consists of some RAM and disk space.&lt;br /&gt;
|Free plan provides one server for deployment.&lt;br /&gt;
|Provides an initial free tier. Without free tier no additional cost for Beanstalk. One only needs to pay for the AWS resources used.&lt;br /&gt;
|-&lt;br /&gt;
|'''''Scaling Memory'''''&lt;br /&gt;
|Memory increase would require additional servers/unused space in existing ones.&lt;br /&gt;
|Memory increase depends on additional servers available/unused space in existing ones.&lt;br /&gt;
|Memory increased in terms of dyno each of size 512 MB.&lt;br /&gt;
|Can configure any size for memory allocation&lt;br /&gt;
| -&lt;br /&gt;
| -&lt;br /&gt;
|Can automatically up/down scale the application by adjusting the default auto scaling settings.&lt;br /&gt;
|-&lt;br /&gt;
|'''''Scaling – Cost and Ease'''''&lt;br /&gt;
|While this provides greater flexibility as user is in control of the servers, it also causes additional overhead in terms of user needing to work both on Rails application and web server deployment.&lt;br /&gt;
|It can be integrated with Rake without any hindrances.&lt;br /&gt;
|Can dynamically scale up and down an application and pay as per hourly usages. Each additional dyno costs $35/mo&lt;br /&gt;
|Scaling takes up some time and need to pay for a month at the minimum. Scaling up to 4GB increases cost to $100/mo&lt;br /&gt;
| -&lt;br /&gt;
|Scaling using Cloud66 is relatively easy and hassle free.&lt;br /&gt;
|Scaling is fast and easy.&lt;br /&gt;
|-&lt;br /&gt;
|'''''Special features'''''&lt;br /&gt;
|For sensitive applications where handing over the control to a third party for deployment is not feasible, Capistrano is the way to go.&lt;br /&gt;
|It also provides support for tools like rsync and ssh.&lt;br /&gt;
|Lacks support for cross region deployment i.e. can’t select location of server where application gets deployed&lt;br /&gt;
|Supports cross region deployment i.e. if users of application primarily in Asia, can choose a server in Asia to deploy application, thus making the site faster.&lt;br /&gt;
| -&lt;br /&gt;
| -&lt;br /&gt;
|Provides complete flexibility and control of the resources to the user including the chance to take over control of some or all.&lt;br /&gt;
|-&lt;br /&gt;
|'''''Database support'''''&lt;br /&gt;
|Provides support for DB related to rails applications&lt;br /&gt;
|Provides support for DB related to rails applications&lt;br /&gt;
|It features serious production DB like RDBMS, Postgres, etc. and many Addons such as MongoDB, ClearDB, etc.&lt;br /&gt;
|Features free shared databases such as MongoDB, MySQL, Postgres but for other production DB’s need to use Addons&lt;br /&gt;
|Databases featured are MySQL, MongoDB and Postgres&lt;br /&gt;
| -&lt;br /&gt;
|Supports DB like Amazon SimpleDB, Amazon RDS, Amazon DynamoDB.&lt;br /&gt;
|-&lt;br /&gt;
|'''''Deployment strategy'''''&lt;br /&gt;
|Capistrano provides commands to be executed for automated deployment. It supports git.&lt;br /&gt;
|It is much easier to deploy using Vlad as compared to Capistrano.&lt;br /&gt;
|Deployment as easy as ‘git push’&lt;br /&gt;
|Deployment does not support git. It uses the af tool for deployment.&lt;br /&gt;
| -&lt;br /&gt;
|Since Cloud66 provides the platform in terms of Application Stack Management as a Service, it uses the infrastructure of AWS, Virtual Private Server, etc. for actual deployment. But the user doesn’t have to worry about configuration or monitoring of the servers. Hence provides easy deployment.&lt;br /&gt;
|Deployment options include Git, AWS management console, etc.&lt;br /&gt;
|-&lt;br /&gt;
|'''''Community Support availability'''''&lt;br /&gt;
| As it has been in use for a long time there is a huge community support available for Capistrano.&lt;br /&gt;
| -&lt;br /&gt;
|Heroku also provides a huge community support given the fact that there are a lot of Heroku users.&lt;br /&gt;
|Community is limited.&lt;br /&gt;
|RedHat being a reputed provider for open source solutions, the OpenShift community is gradually increasing and receiving support from a considerable community of users.&lt;br /&gt;
|Limited community support currently&lt;br /&gt;
|Has community forums and documentation.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Conclusion =&lt;br /&gt;
&lt;br /&gt;
Comparison and contrast between various deployment automated tools such as Capistrano, Heroku, Vlad, AppFog, OpenShift, Cloud66, AWS Beanstalk shows that each has its own pros and cons. &lt;br /&gt;
For instance, in a client based application where handing over the control of the application to a third party such as the deployment tool provider is impossible, AWS Beanstalk would be the obvious choice for the developer.&lt;br /&gt;
On the other hand, a novice Rails application developer might find all he needs in the starter plan of Heroku with the added bonus of a huge support community available to him for troubleshooting as he stumbles his way across the development of the application.&lt;br /&gt;
One may also choose the tool that provides the specific database support for your application. In case of large scale corporations where budgets are not that limited, the increasing costs with up-scaling of some tools would not be an obstacle.&lt;br /&gt;
Thus, various considerations about the application such as scalability requirement, security concerns, cost, availability of own resources such as servers etc., will help determine which tool is the most suitable for that application.&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= See Also =&lt;br /&gt;
&lt;br /&gt;
* Rails Solutions: Ruby on Rails Made Easy by Justin Williams&lt;br /&gt;
* http://guides.beanstalkapp.com/deployments/best-practices.html&lt;br /&gt;
* http://www.urbancode.com/anthill3-help-3.7/html/SettingUpDeploymentProcess.html&lt;br /&gt;
* http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=UseFMSGateway_3.html&lt;br /&gt;
* http://pic.dhe.ibm.com/infocenter/tivihelp/v26r1/index.jsp?topic=%2Fcom.ibm.dtm.doc%2Fdeploysoftware%2Fc_deploysw_process.html&lt;/div&gt;</summary>
		<author><name>Npari</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch2_0e808_nsv&amp;diff=80991</id>
		<title>CSC/ECE 517 Fall 2013/ch2 0e808 nsv</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch2_0e808_nsv&amp;diff=80991"/>
		<updated>2013-10-30T18:25:49Z</updated>

		<summary type="html">&lt;p&gt;Npari: /* Model Class : assignment_participant.rb */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= E808: Refactor and test Participant, AssignmentParticipant, &amp;amp; CourseParticipant =&lt;br /&gt;
&lt;br /&gt;
Code Deployment or [http://en.wikipedia.org/wiki/Software_deployment Software Deployment] and [http://en.wikipedia.org/wiki/Release_management Release management] with [http://en.wikipedia.org/wiki/Ruby_on_Rails Ruby on Rails] can be done using various tools such as [http://en.wikipedia.org/wiki/Capistrano Capistrano], [http://en.wikipedia.org/wiki/Heroku Heroku], AppFog, OpenShift, AWS, Cloud 66, Vlad, etc. These automated tools are frameworks used to write and execute commands in parallel remote machines and thus ease the process of deployment and management of various applications.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
= Introduction =&lt;br /&gt;
&lt;br /&gt;
The Deploying process involves different stages like development, testing, release management and sign-off by project teams.&lt;br /&gt;
&lt;br /&gt;
The following diagram illustrates the deployment process of an application.&lt;br /&gt;
&lt;br /&gt;
[[File:Deployment Process.jpg|frame|center|&amp;lt;ref&amp;gt;http://technet.microsoft.com/en-us/library/cc465178.aspx&amp;lt;/ref&amp;gt;]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The deployment flow has three stages: development and testing, release management and stakeholders and project teams. &lt;br /&gt;
&lt;br /&gt;
After the final release of the code in development and testing stage, the master plan is prepared for deployment of components and sites based on the sign-offs provided by the project teams, stakeholders and customers. Then, the stabilization of the deployment is calculated based on some metrics. Once the deployment is stabilized, it is reviewed and the process of deployment is complete. The final sign-off is given by the stakeholders.&lt;br /&gt;
&lt;br /&gt;
==Participant model: participant.rb==&lt;br /&gt;
&lt;br /&gt;
Code deployment is a procedure where the application is transferred onto a production server, so that it is made available for all the other users. It is the part of release management process which involves several activities. These activities are inter-dependent and need to be completed in a specific order for successful code deployment. &lt;br /&gt;
&lt;br /&gt;
'''Code Deployment Activities'''&lt;br /&gt;
&lt;br /&gt;
The various deployment activities include &amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/Software_deployment&amp;lt;/ref&amp;gt;&lt;br /&gt;
* Release : Gathering all system components in preparation for deployment&lt;br /&gt;
* Install and activate : Installing the application components and getting them in the 'ready' state&lt;br /&gt;
* Deactivate : Shutting down components that are out-dated or that may interfere with updating others&lt;br /&gt;
* Adapt : Making changes to application to accommodate changes in environment&lt;br /&gt;
* Update : Having a newer release installed in place of the old one&lt;br /&gt;
* Built-in : There are components built-into some tools for complete/semi-automating updates&lt;br /&gt;
* Version tracking : These systems help the user to know if newer versions of a software are available and if yes, help install them&lt;br /&gt;
* Uninstall : Opposite of installation and involves complete removal of software and its dependencies from the environment&lt;br /&gt;
* Retire : This involves making a software obsolete and is the end of software life cycle&lt;br /&gt;
&lt;br /&gt;
The general guidelines for the deployment process remain the same but there are variations in the specific requirements with each software system.&lt;br /&gt;
&lt;br /&gt;
==AssignmentParticipant model: assignment_participant.rb==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ref&amp;gt;http://searchitchannel.techtarget.com/definition/release-management&amp;lt;/ref&amp;gt;&lt;br /&gt;
Release management is a software process which takes care of the development, testing, deployment and support stages of software releases. The start of release management happens in the development phase, where it requests for new features or changes in the existing application. When the request is accepted, a new release is planned and designed. This design is built and then enters the testing phase, where the release is tested until it is accepted. After the release is accepted as a candidate, it enters the deployment phase where it is implemented. Once deployed, the release is made available and sent to support phase for collection of bug reports. Once the support phase is done, the bugs and other issues lead to requests for changes and the cycle is then repeated.&lt;br /&gt;
&lt;br /&gt;
= Automating Code Deployment and Release Management =&lt;br /&gt;
&amp;lt;ref&amp;gt;http://www.urbancode.com/html/solutions/deployment-automation.html&amp;lt;/ref&amp;gt;&lt;br /&gt;
Automation of a process is required when the manual process is more error prone. Also, for large real world applications, the manual process is very complex and time consuming. Incomplete documentation hampers a manual process further. Deployment also has to be done in many environments and involves varied steps to be followed in a specific order. Manual process needs repetition of same procedure to each and every environment which leads to many errors and the process becomes costly.&lt;br /&gt;
In web applications each new release has to be deployed to and tested in development, testing and production environments.The number of software releases in web applications  are more and hence the need to automate release management is also greater.&lt;br /&gt;
&lt;br /&gt;
Automation of deployment delivers applications faster and with fewer errors. The defined software deployment process can be applied across all environments consistently every time. With various automated application deployment platforms now readily available, manual deployments have become a thing of the past.&lt;br /&gt;
&lt;br /&gt;
Lets take a look at the various Deployment Automation tools available to Ruby on Rails applications. For the purposes of this article the process of manual deployment of a Ruby on Rails application is out of scope.&lt;br /&gt;
&lt;br /&gt;
= Deployment Automation tools =&lt;br /&gt;
&lt;br /&gt;
Some of the automated tools that are widely used for the process of deployment with Ruby on Rails are &lt;br /&gt;
&lt;br /&gt;
* Capistrano&lt;br /&gt;
* Heroku&lt;br /&gt;
* Vlad&lt;br /&gt;
* AppFog&lt;br /&gt;
* AWS Elastic Beanstalk&lt;br /&gt;
* OpenShift&lt;br /&gt;
* Cloud 66&lt;br /&gt;
&lt;br /&gt;
== Capistrano ==&lt;br /&gt;
&lt;br /&gt;
[[File:Capistrano.jpg|frame|right|&amp;lt;ref&amp;gt;http://www.capistranorb.com/&amp;lt;/ref&amp;gt;|Capistrano Logo]]&lt;br /&gt;
&lt;br /&gt;
Capistrano is a Ruby tool which helps deploy an application to the server. Capistrano allows deploying to multiple machines at a time. It has many advanced options which help to deploy different kinds of applications. It also supports the scripting and execution of tasks.&lt;br /&gt;
&lt;br /&gt;
Capistrano can be used to:&lt;br /&gt;
&lt;br /&gt;
* Deploy applications onto many machines simultaneously.&lt;br /&gt;
* Automate the audits&lt;br /&gt;
* Automate the common tasks of a team.&lt;br /&gt;
&lt;br /&gt;
Capistrano can be made a part of a larger software by integrating it with another Ruby software.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ref&amp;gt;http://www.capistranorb.com/documentation/getting-started/installation/&amp;lt;/ref&amp;gt;  &lt;br /&gt;
'''General Usage'''&lt;br /&gt;
&lt;br /&gt;
The following commands will clone Capistrano, build the gem and install it locally.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem install capistrano --pre --trust-policy HighSecurity&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Or grab the bleeding edge head from:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ git clone -b v3 https://github.com/capistrano/capistrano.git&lt;br /&gt;
$ cd capistrano&lt;br /&gt;
$ gem build *.gemspec&lt;br /&gt;
$ gem install *.gem&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
'''Signed Rubygems'''&lt;br /&gt;
&lt;br /&gt;
As Capistrano is a signed gem, you should always be careful to use the --trust-policy flag when installing Gems, or since Bundler 1.3 you should use the same flag:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem install capistrano --pre --trust-policy HighSecurity&lt;br /&gt;
$ bundle install --trust-policy HighSecurity&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If you get a message that looks like:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ERROR:  While executing gem ... (Gem::Security::Exception)&lt;br /&gt;
unsigned gems are not allowed by the High Security policy&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then please complain to your Gem author, and have them start signing their Gems.&lt;br /&gt;
&lt;br /&gt;
'''Usage in a Rails project'''&lt;br /&gt;
&lt;br /&gt;
Add the following lines to the Gemfile to the :development group ideally.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
group :development do&lt;br /&gt;
  gem 'capistrano-rails', '~&amp;gt; 0.0.7'&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Heroku ==&lt;br /&gt;
&lt;br /&gt;
[[File:Heroku.jpg|frame|right|&amp;lt;ref&amp;gt;https://www.heroku.com/&amp;lt;/ref&amp;gt;|Heroku Logo]]&lt;br /&gt;
&lt;br /&gt;
Heroku is a cloud [http://en.wikipedia.org/wiki/Platform_as_a_service Platform as a Service] (PaaS) which supports several programming languages. PaaS is a service model of Cloud computing wherein the provider offers resources like servers, software, database, etc. to the developer. Heroku helps manage environment-specific configurations separately from the source code, which provides greater security.&lt;br /&gt;
Heroku is not just a deployment environment but it also impacts the development process. There are several principles of the development of application on Heroku.&amp;lt;br&amp;gt;&lt;br /&gt;
•	Applications and Codebases : Most of the development of the application is done on application’s codebase which is stored in a [http://en.wikipedia.org/wiki/Version_control_system Version Control System (VCS)] &amp;lt;br&amp;gt;&lt;br /&gt;
•	Dependencies : All the application dependencies such as plugins should be declared explicitly&amp;lt;br&amp;gt;&lt;br /&gt;
•	Configuration : Configuration of an application is all that varies in different deploys&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Getting Started with Heroku'''&lt;br /&gt;
&lt;br /&gt;
1. To get started with Heroku, go to https://id.heroku.com/signup/devcenter, signup for a Heroku account. &lt;br /&gt;
&lt;br /&gt;
2. Then, download and install the Heroku toolbelt at https://toolbelt.heroku.com/ for your development system. You can also use Heroku command line instead of the online Heroku application. &lt;br /&gt;
&lt;br /&gt;
3. After installing one of them, login using the email address and password used when creating the Heroku account:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ref&amp;gt;https://github.com/heroku/heroku&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ heroku login&lt;br /&gt;
Enter your Heroku credentials.&lt;br /&gt;
Email: adam@example.com&lt;br /&gt;
Password:&lt;br /&gt;
Could not find an existing public key.&lt;br /&gt;
Would you like to generate one? [Yn]&lt;br /&gt;
Generating new SSH public key.&lt;br /&gt;
Uploading SSH public key /Users/adam/.ssh/id_rsa.pub&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Deploying Applications'''&lt;br /&gt;
&lt;br /&gt;
Heroku uses [http://en.wikipedia.org/wiki/Git_(software) git] primarily to deploy the applications. When an application is created on Heroku, it associates the new git which is remote with the local git repository.&lt;br /&gt;
&lt;br /&gt;
As a result, deploying code is just the familiar git push, but to the heroku remote instead:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ref&amp;gt;https://devcenter.heroku.com/articles/how-heroku-works#deploying-applications&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ git push heroku master&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Vlad ==&lt;br /&gt;
&lt;br /&gt;
[[File:Vlad.png|frame|right|&amp;lt;ref&amp;gt;http://rubyhitsquad.com/Vlad_the_Deployer.html&amp;lt;/ref&amp;gt;|Vlad Logo]]&lt;br /&gt;
&lt;br /&gt;
Vlad is another automated deployment tool which is simple to use. It integrates with rake and uses standard tools like SSH, rsync etc.&lt;br /&gt;
&lt;br /&gt;
The main features of Vlad include&lt;br /&gt;
* It uses very few dependencies which are simple.&lt;br /&gt;
* It can execute commands on more than one server.&lt;br /&gt;
* It syncs files to one or more servers.&lt;br /&gt;
* It matches local and remote tasks.&lt;br /&gt;
* It runs tests very fast.&lt;br /&gt;
&lt;br /&gt;
'''Getting started with Vlad'''&amp;lt;ref&amp;gt;http://docs.seattlerb.org/vlad/doco/getting_started_txt.html&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create a deploy file, usually in “config/deploy.rb”:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set :application, &amp;quot;project&amp;quot;&lt;br /&gt;
set :domain, &amp;quot;example.com&amp;quot;&lt;br /&gt;
set :deploy_to, &amp;quot;/path/to/install&amp;quot;&lt;br /&gt;
set :repository, 'http://svn.example.com/project/branches/stable/'&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This defaults to using ‘svn export’ from repository, and a single server for app, db, and www.&lt;br /&gt;
&lt;br /&gt;
If you want a multi-config environment, change your config like so:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set :application, &amp;quot;project&amp;quot;&lt;br /&gt;
set :repository, 'http://svn.example.com/project/branches/stable/'&lt;br /&gt;
&lt;br /&gt;
task :beta do&lt;br /&gt;
  set :domain,    &amp;quot;beta.example.com&amp;quot;&lt;br /&gt;
  set :deploy_to, &amp;quot;/path/to/install-beta&amp;quot;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
task :dev do&lt;br /&gt;
  set :domain,    &amp;quot;dev.example.com&amp;quot;&lt;br /&gt;
  set :deploy_to, &amp;quot;/path/to/install-dev&amp;quot;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
task :prod do&lt;br /&gt;
  set :domain,    &amp;quot;example.com&amp;quot;&lt;br /&gt;
  set :deploy_to, &amp;quot;/path/to/install&amp;quot;&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Add the following to your Rakefile:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
begin&lt;br /&gt;
  require 'vlad'&lt;br /&gt;
  Vlad.load&lt;br /&gt;
rescue LoadError&lt;br /&gt;
  # do nothing&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Vlad.load has a lot of flexibility.&lt;br /&gt;
&lt;br /&gt;
You can install vlad via:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;% rake vlad:invoke COMMAND='sudo gem install vlad -y'&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Initial Launch&lt;br /&gt;
&amp;lt;pre&amp;gt;Run rake vlad:setup vlad:update vlad:migrate vlad:start&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ref&amp;gt;http://docs.seattlerb.org/vlad/index.html&amp;lt;/ref&amp;gt;&lt;br /&gt;
'''Running Vlad'''&lt;br /&gt;
&lt;br /&gt;
* Using rake&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
task :shazam! do&lt;br /&gt;
  Rake::Task[:action1].invoke&lt;br /&gt;
  Rake::Task[:action2].invoke&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Using SSH&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Host example.com&lt;br /&gt;
    User fluffy_bunny&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== AppFog == &lt;br /&gt;
&lt;br /&gt;
[[File:AppFog.jpg|frame|right|&amp;lt;ref&amp;gt;https://www.appfog.com/&amp;lt;/ref&amp;gt;|AppFog Logo]]&lt;br /&gt;
&lt;br /&gt;
AppFog is a PaaS built on Cloud Foundry which is another PaaS platform for deploying applications. &lt;br /&gt;
&lt;br /&gt;
Features of AppFog are&lt;br /&gt;
* It launches and runs fast.&lt;br /&gt;
* It does not require configuring servers or installing frameworks.&lt;br /&gt;
* It is compatible with code management systems like git, svn etc.&lt;br /&gt;
&lt;br /&gt;
'''Installing AppFog'''&amp;lt;ref&amp;gt;http://blog.appfog.com/getting-started-with-appfogs-command-line/&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
‘af‘ command line tool is written in Ruby for installation.&lt;br /&gt;
&lt;br /&gt;
Download and install [http://rubyinstaller.org/ Ruby Installer] for Windows. The installer already includes RubyGems.&lt;br /&gt;
&lt;br /&gt;
Be sure you use the Ruby-enabled command prompt window when you later install and use af. You access this command prompt from the Windows Start menu (All Programs &amp;gt; Ruby &amp;gt; Start Command Prompt with Ruby).&lt;br /&gt;
&lt;br /&gt;
Finally, update RubyGems from the Ruby Command Prompt:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem update --system&lt;br /&gt;
$ gem install af&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Login with:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ af login&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Finally from within your source code directory:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ af update hello-node&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Getting Started with AppFog'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
target [url]                                       Reports current target or sets a new target&lt;br /&gt;
login [email] [--email, --password]                Login&lt;br /&gt;
info                                               System and account information&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== AWS Elastic Beanstalk==&lt;br /&gt;
&lt;br /&gt;
[[File:AWSLogo.jpg|frame|right|&amp;lt;ref&amp;gt;https://aws.amazon.com&amp;lt;/ref&amp;gt;|AWS Logo]]&lt;br /&gt;
&lt;br /&gt;
Amazon Wen Services(AWS) offers [http://en.wikipedia.org/wiki/Infrastructure_as_a_service#Infrastructure_as_a_service_.28IaaS.29 Infrastructure as a Service] (IaaS) and provides a complete set of resources for the development of a web application in minutes. AWS Elastic Beanstalk is a deployment tool of the AWS cloud.&lt;br /&gt;
&lt;br /&gt;
With AWS Elastic Beanstalk, applications can be quickly deployed and managed in the AWS cloud without worrying about the infrastructure that runs those applications. AWS Elastic Beanstalk reduces management complexity without restricting choice or control. Once the application is uploaded AWS Elastic Beanstalk automatically handles the details of capacity provisioning, load balancing, scaling, and application health monitoring. AWS Elastic Beanstalk uses highly reliable and scalable services.&lt;br /&gt;
&lt;br /&gt;
'''AWS CLI'''&lt;br /&gt;
&lt;br /&gt;
AWS Elastic Beanstalk uses a command line tool Eb, which helps you to deploy your application easily.&lt;br /&gt;
&lt;br /&gt;
'''Getting Started with Eb'''&amp;lt;ref&amp;gt;http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/command-reference-get-started.html&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To get started with the beanstalk CLI, you will need to download the command line tools at the [http://aws.amazon.com/code/6752709412171743 AWS Sample Code &amp;amp; Libraries] website.&lt;br /&gt;
&lt;br /&gt;
Step 1: Initialize Your Git Repository&lt;br /&gt;
&lt;br /&gt;
Eb is a command line interface that enables you to deploy applications quickly and more easily using Git. Eb is available as part of the Elastic Beanstalk command line tools package. &lt;br /&gt;
&lt;br /&gt;
1. To install eb,install the following software onto your local computer:&lt;br /&gt;
&lt;br /&gt;
* Git 1.6.6 or later. To download Git, go to http://git-scm.com/.&lt;br /&gt;
* PowerShell 2.0.&lt;br /&gt;
&lt;br /&gt;
2. Initialize your Git repository.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git init &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Step 2: Configuring AWS Elastic Beanstalk&lt;br /&gt;
&lt;br /&gt;
1. From your directory where you created your local repository, type the following command.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
eb init&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2. When you are prompted for the access key ID, type your access key ID. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Enter your AWS Access Key ID (current value is &amp;quot;AKIAIOSFODNN7EXAMPLE&amp;quot;): &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3. When you are prompted for the secret access key, type your secret access key.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Enter your AWS Secret Access Key (current value is &amp;quot;wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY&amp;quot;): &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
4. When you are prompted for the AWS Elastic Beanstalk application name, type the name of the application. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Enter an AWS Elastic Beanstalk application name (auto-generated value is &amp;quot;windows&amp;quot;): &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Note:&lt;br /&gt;
If you have a space in your application name, make sure you do not use quotes.&lt;br /&gt;
&lt;br /&gt;
5. When you are prompted for the AWS Elastic Beanstalk environment name, type the name of the environment. AWS Elastic Beanstalk automatically creates an environment name based on your application name. If you want to accept the default, press Enter.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Enter an AWS Elastic Beanstalk environment name (current value is &amp;quot;HelloWorld-env&amp;quot;): &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
6. When you are prompted to create an Amazon RDS DB instance, type y or n. For this example, we'll type y.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Create an RDS DB Instance? [y/n]:&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
7. When you are prompted to enter your RDS user master password, type your password containing from 8 to 16 printable ASCII characters (excluding /, \, and @).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Enter an RDS DB master password: &lt;br /&gt;
Retype password to confirm: &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can now get started with the AWS Elastic Beanstalk.&lt;br /&gt;
&lt;br /&gt;
== OpenShift ==&lt;br /&gt;
&lt;br /&gt;
[[File:OpenShift.png|frame|right|&amp;lt;ref&amp;gt;https://en.wikipedia.org&amp;lt;/ref&amp;gt;|OpenShift Logo]]&lt;br /&gt;
&lt;br /&gt;
Another free and open source PaaS for deploying applications is OpenShift created by [[http://en.wikipedia.org/wiki/RedHat RedHat]]. &lt;br /&gt;
&lt;br /&gt;
'''Considerations'''&lt;br /&gt;
* Databases&lt;br /&gt;
&lt;br /&gt;
To use the application outside the OpenShift environment one needs to change the variables as the application is configured to use database in production mode in OpenShift.&lt;br /&gt;
&lt;br /&gt;
* Assets&lt;br /&gt;
&lt;br /&gt;
The assets are precompiled everytime application is pushed to OpenShift.&lt;br /&gt;
&lt;br /&gt;
* Security&lt;br /&gt;
&lt;br /&gt;
Security related variables are to be unique across the application.&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;ref&amp;gt;https://github.com/openshift/rails-example&amp;lt;/ref&amp;gt;&lt;br /&gt;
'''Installation'''&lt;br /&gt;
&lt;br /&gt;
1.	Create an account at http://openshift.redhat.com/&lt;br /&gt;
&lt;br /&gt;
2.	Create a rails application&lt;br /&gt;
	&amp;lt;pre&amp;gt;rhc app create -a railsapp -t ruby-1.9&amp;lt;/pre&amp;gt;&lt;br /&gt;
3.	Add mysql support to your application&lt;br /&gt;
	&amp;lt;pre&amp;gt;rhc cartridge add -a railsapp -c mysql-5.1&amp;lt;/pre&amp;gt;&lt;br /&gt;
4.	Add this upstream Rails quickstart repository&lt;br /&gt;
&amp;lt;pre&amp;gt;cd railsapp&lt;br /&gt;
git remote add upstream -m master git://github.com/openshift/rails-example.git&lt;br /&gt;
git pull -s recursive -X theirs upstream master&amp;lt;/pre&amp;gt;&lt;br /&gt;
5.	Push your new code&lt;br /&gt;
&amp;lt;pre&amp;gt;git push&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Cloud 66 ==&lt;br /&gt;
&lt;br /&gt;
[[File:Cloud 66.jpg|frame|right|&amp;lt;ref&amp;gt;https://www.cloud66.com/&amp;lt;/ref&amp;gt;|Cloud66 Logo]]&lt;br /&gt;
&lt;br /&gt;
Cloud 66 combines the convenience of Platform-as-a-Service (PaaS) and the flexibility and control of Infrastructure-as-a-Service (IaaS). This platform allows easy deployment of application, so there is no overhead of configuring or monitoring the servers.&lt;br /&gt;
&lt;br /&gt;
'''Cloud 66 Command line Toolbelt'''&lt;br /&gt;
&lt;br /&gt;
Toolbelt is an open source released to deploy the application.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ref&amp;gt;http://blog.cloud66.com/&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Getting Started with Cloud 66'''&lt;br /&gt;
&lt;br /&gt;
1. Go to the [https://www.cloud66.com/users/sign_up sign up] page and create a Cloud 66 account.&lt;br /&gt;
&lt;br /&gt;
2. Go to Cloud 66 Dashboard and [https://www.cloud66.com/help/first_stack build your first stack].&lt;br /&gt;
&lt;br /&gt;
'''Installation'''&lt;br /&gt;
&lt;br /&gt;
Installation of toolbelt uses the following command&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Gem install c66&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This automatically searches the newest version and installs it.&lt;br /&gt;
&lt;br /&gt;
= Model Class : assignment_participant.rb =&lt;br /&gt;
This class is a subclass of the model class named 'participant'.Several methods in this model class required refactoring. The names were changed to follow method naming convention. Deprecated code was removed and re-coded as needed. Duplicated methods were commented. Some of the methods were moved to the parent class while some other were moved to a new class.  &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;width:3%;&amp;quot;|S. No&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;|Method Name&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;|Change Made &lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;|Reason For Change&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
|''''' 1 '''''&lt;br /&gt;
|get_course_string&lt;br /&gt;
|Renamed to course_string and refactored &lt;br /&gt;
|To follow method naming convention&lt;br /&gt;
|-&lt;br /&gt;
|get_cycle_deviation_score&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|get_cycle_similarity_score&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|get_feedback&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|get_files&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|get_four_node_cycles&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|fullname&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|get_metareviews&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|name&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|name&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|- &lt;br /&gt;
|get_review_score&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|get_reviewees&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|get_reviewers&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|get_reviews&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|get_reviews_by_reviewer&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Comparison between Capistrano/Vlad/Heroku/AppFog/OpenShift/Cloud66/AWS Beanstalk =&lt;br /&gt;
&lt;br /&gt;
With so many automated tools available for Code Deployment and Release Management, the decision on which to use for a particular Ruby on rails application depends on various parameters to be considered.&lt;br /&gt;
Some comparative features of the different tools are as follows :&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;width:9%;&amp;quot;|Criteria for Comparision&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;|Capistrano&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;| Vlad&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;| Heroku&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;| AppFog&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;| OpenShift&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;| Cloud66&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;| AWS Beanstalk&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
|'''''Getting started with the tool'''''&lt;br /&gt;
|It is a framework that allows one to execute commands on a remote server using tools like ssh.&lt;br /&gt;
|Vlad deployment is similar to Capistrano, but less complex.&lt;br /&gt;
|Heroku’s offers a plan with first dyno free i.e. 512 MB that can be paired with Postgres starter DB to start an application with 0 initial cost&lt;br /&gt;
|AppFog’s initial plan offers 2GB of RAM free which is enough for small to medium traffic applications. By managing options provided for DB, queue server, application server, etc all part of the intial package, this is an excellent option to try out an application&lt;br /&gt;
|OpenShift is an open source platform and its free plan for starters has 3 gears for free wherein each gear consists of some RAM and disk space.&lt;br /&gt;
|Free plan provides one server for deployment.&lt;br /&gt;
|Provides an initial free tier. Without free tier no additional cost for Beanstalk. One only needs to pay for the AWS resources used.&lt;br /&gt;
|-&lt;br /&gt;
|'''''Scaling Memory'''''&lt;br /&gt;
|Memory increase would require additional servers/unused space in existing ones.&lt;br /&gt;
|Memory increase depends on additional servers available/unused space in existing ones.&lt;br /&gt;
|Memory increased in terms of dyno each of size 512 MB.&lt;br /&gt;
|Can configure any size for memory allocation&lt;br /&gt;
| -&lt;br /&gt;
| -&lt;br /&gt;
|Can automatically up/down scale the application by adjusting the default auto scaling settings.&lt;br /&gt;
|-&lt;br /&gt;
|'''''Scaling – Cost and Ease'''''&lt;br /&gt;
|While this provides greater flexibility as user is in control of the servers, it also causes additional overhead in terms of user needing to work both on Rails application and web server deployment.&lt;br /&gt;
|It can be integrated with Rake without any hindrances.&lt;br /&gt;
|Can dynamically scale up and down an application and pay as per hourly usages. Each additional dyno costs $35/mo&lt;br /&gt;
|Scaling takes up some time and need to pay for a month at the minimum. Scaling up to 4GB increases cost to $100/mo&lt;br /&gt;
| -&lt;br /&gt;
|Scaling using Cloud66 is relatively easy and hassle free.&lt;br /&gt;
|Scaling is fast and easy.&lt;br /&gt;
|-&lt;br /&gt;
|'''''Special features'''''&lt;br /&gt;
|For sensitive applications where handing over the control to a third party for deployment is not feasible, Capistrano is the way to go.&lt;br /&gt;
|It also provides support for tools like rsync and ssh.&lt;br /&gt;
|Lacks support for cross region deployment i.e. can’t select location of server where application gets deployed&lt;br /&gt;
|Supports cross region deployment i.e. if users of application primarily in Asia, can choose a server in Asia to deploy application, thus making the site faster.&lt;br /&gt;
| -&lt;br /&gt;
| -&lt;br /&gt;
|Provides complete flexibility and control of the resources to the user including the chance to take over control of some or all.&lt;br /&gt;
|-&lt;br /&gt;
|'''''Database support'''''&lt;br /&gt;
|Provides support for DB related to rails applications&lt;br /&gt;
|Provides support for DB related to rails applications&lt;br /&gt;
|It features serious production DB like RDBMS, Postgres, etc. and many Addons such as MongoDB, ClearDB, etc.&lt;br /&gt;
|Features free shared databases such as MongoDB, MySQL, Postgres but for other production DB’s need to use Addons&lt;br /&gt;
|Databases featured are MySQL, MongoDB and Postgres&lt;br /&gt;
| -&lt;br /&gt;
|Supports DB like Amazon SimpleDB, Amazon RDS, Amazon DynamoDB.&lt;br /&gt;
|-&lt;br /&gt;
|'''''Deployment strategy'''''&lt;br /&gt;
|Capistrano provides commands to be executed for automated deployment. It supports git.&lt;br /&gt;
|It is much easier to deploy using Vlad as compared to Capistrano.&lt;br /&gt;
|Deployment as easy as ‘git push’&lt;br /&gt;
|Deployment does not support git. It uses the af tool for deployment.&lt;br /&gt;
| -&lt;br /&gt;
|Since Cloud66 provides the platform in terms of Application Stack Management as a Service, it uses the infrastructure of AWS, Virtual Private Server, etc. for actual deployment. But the user doesn’t have to worry about configuration or monitoring of the servers. Hence provides easy deployment.&lt;br /&gt;
|Deployment options include Git, AWS management console, etc.&lt;br /&gt;
|-&lt;br /&gt;
|'''''Community Support availability'''''&lt;br /&gt;
| As it has been in use for a long time there is a huge community support available for Capistrano.&lt;br /&gt;
| -&lt;br /&gt;
|Heroku also provides a huge community support given the fact that there are a lot of Heroku users.&lt;br /&gt;
|Community is limited.&lt;br /&gt;
|RedHat being a reputed provider for open source solutions, the OpenShift community is gradually increasing and receiving support from a considerable community of users.&lt;br /&gt;
|Limited community support currently&lt;br /&gt;
|Has community forums and documentation.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Conclusion =&lt;br /&gt;
&lt;br /&gt;
Comparison and contrast between various deployment automated tools such as Capistrano, Heroku, Vlad, AppFog, OpenShift, Cloud66, AWS Beanstalk shows that each has its own pros and cons. &lt;br /&gt;
For instance, in a client based application where handing over the control of the application to a third party such as the deployment tool provider is impossible, AWS Beanstalk would be the obvious choice for the developer.&lt;br /&gt;
On the other hand, a novice Rails application developer might find all he needs in the starter plan of Heroku with the added bonus of a huge support community available to him for troubleshooting as he stumbles his way across the development of the application.&lt;br /&gt;
One may also choose the tool that provides the specific database support for your application. In case of large scale corporations where budgets are not that limited, the increasing costs with up-scaling of some tools would not be an obstacle.&lt;br /&gt;
Thus, various considerations about the application such as scalability requirement, security concerns, cost, availability of own resources such as servers etc., will help determine which tool is the most suitable for that application.&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= See Also =&lt;br /&gt;
&lt;br /&gt;
* Rails Solutions: Ruby on Rails Made Easy by Justin Williams&lt;br /&gt;
* http://guides.beanstalkapp.com/deployments/best-practices.html&lt;br /&gt;
* http://www.urbancode.com/anthill3-help-3.7/html/SettingUpDeploymentProcess.html&lt;br /&gt;
* http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=UseFMSGateway_3.html&lt;br /&gt;
* http://pic.dhe.ibm.com/infocenter/tivihelp/v26r1/index.jsp?topic=%2Fcom.ibm.dtm.doc%2Fdeploysoftware%2Fc_deploysw_process.html&lt;/div&gt;</summary>
		<author><name>Npari</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch2_0e808_nsv&amp;diff=80985</id>
		<title>CSC/ECE 517 Fall 2013/ch2 0e808 nsv</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch2_0e808_nsv&amp;diff=80985"/>
		<updated>2013-10-30T18:24:15Z</updated>

		<summary type="html">&lt;p&gt;Npari: /* Model Class : assignment_participant.rb */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= E808: Refactor and test Participant, AssignmentParticipant, &amp;amp; CourseParticipant =&lt;br /&gt;
&lt;br /&gt;
Code Deployment or [http://en.wikipedia.org/wiki/Software_deployment Software Deployment] and [http://en.wikipedia.org/wiki/Release_management Release management] with [http://en.wikipedia.org/wiki/Ruby_on_Rails Ruby on Rails] can be done using various tools such as [http://en.wikipedia.org/wiki/Capistrano Capistrano], [http://en.wikipedia.org/wiki/Heroku Heroku], AppFog, OpenShift, AWS, Cloud 66, Vlad, etc. These automated tools are frameworks used to write and execute commands in parallel remote machines and thus ease the process of deployment and management of various applications.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
= Introduction =&lt;br /&gt;
&lt;br /&gt;
The Deploying process involves different stages like development, testing, release management and sign-off by project teams.&lt;br /&gt;
&lt;br /&gt;
The following diagram illustrates the deployment process of an application.&lt;br /&gt;
&lt;br /&gt;
[[File:Deployment Process.jpg|frame|center|&amp;lt;ref&amp;gt;http://technet.microsoft.com/en-us/library/cc465178.aspx&amp;lt;/ref&amp;gt;]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The deployment flow has three stages: development and testing, release management and stakeholders and project teams. &lt;br /&gt;
&lt;br /&gt;
After the final release of the code in development and testing stage, the master plan is prepared for deployment of components and sites based on the sign-offs provided by the project teams, stakeholders and customers. Then, the stabilization of the deployment is calculated based on some metrics. Once the deployment is stabilized, it is reviewed and the process of deployment is complete. The final sign-off is given by the stakeholders.&lt;br /&gt;
&lt;br /&gt;
==Participant model: participant.rb==&lt;br /&gt;
&lt;br /&gt;
Code deployment is a procedure where the application is transferred onto a production server, so that it is made available for all the other users. It is the part of release management process which involves several activities. These activities are inter-dependent and need to be completed in a specific order for successful code deployment. &lt;br /&gt;
&lt;br /&gt;
'''Code Deployment Activities'''&lt;br /&gt;
&lt;br /&gt;
The various deployment activities include &amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/Software_deployment&amp;lt;/ref&amp;gt;&lt;br /&gt;
* Release : Gathering all system components in preparation for deployment&lt;br /&gt;
* Install and activate : Installing the application components and getting them in the 'ready' state&lt;br /&gt;
* Deactivate : Shutting down components that are out-dated or that may interfere with updating others&lt;br /&gt;
* Adapt : Making changes to application to accommodate changes in environment&lt;br /&gt;
* Update : Having a newer release installed in place of the old one&lt;br /&gt;
* Built-in : There are components built-into some tools for complete/semi-automating updates&lt;br /&gt;
* Version tracking : These systems help the user to know if newer versions of a software are available and if yes, help install them&lt;br /&gt;
* Uninstall : Opposite of installation and involves complete removal of software and its dependencies from the environment&lt;br /&gt;
* Retire : This involves making a software obsolete and is the end of software life cycle&lt;br /&gt;
&lt;br /&gt;
The general guidelines for the deployment process remain the same but there are variations in the specific requirements with each software system.&lt;br /&gt;
&lt;br /&gt;
==Release Management==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ref&amp;gt;http://searchitchannel.techtarget.com/definition/release-management&amp;lt;/ref&amp;gt;&lt;br /&gt;
Release management is a software process which takes care of the development, testing, deployment and support stages of software releases. The start of release management happens in the development phase, where it requests for new features or changes in the existing application. When the request is accepted, a new release is planned and designed. This design is built and then enters the testing phase, where the release is tested until it is accepted. After the release is accepted as a candidate, it enters the deployment phase where it is implemented. Once deployed, the release is made available and sent to support phase for collection of bug reports. Once the support phase is done, the bugs and other issues lead to requests for changes and the cycle is then repeated.&lt;br /&gt;
&lt;br /&gt;
= Automating Code Deployment and Release Management =&lt;br /&gt;
&amp;lt;ref&amp;gt;http://www.urbancode.com/html/solutions/deployment-automation.html&amp;lt;/ref&amp;gt;&lt;br /&gt;
Automation of a process is required when the manual process is more error prone. Also, for large real world applications, the manual process is very complex and time consuming. Incomplete documentation hampers a manual process further. Deployment also has to be done in many environments and involves varied steps to be followed in a specific order. Manual process needs repetition of same procedure to each and every environment which leads to many errors and the process becomes costly.&lt;br /&gt;
In web applications each new release has to be deployed to and tested in development, testing and production environments.The number of software releases in web applications  are more and hence the need to automate release management is also greater.&lt;br /&gt;
&lt;br /&gt;
Automation of deployment delivers applications faster and with fewer errors. The defined software deployment process can be applied across all environments consistently every time. With various automated application deployment platforms now readily available, manual deployments have become a thing of the past.&lt;br /&gt;
&lt;br /&gt;
Lets take a look at the various Deployment Automation tools available to Ruby on Rails applications. For the purposes of this article the process of manual deployment of a Ruby on Rails application is out of scope.&lt;br /&gt;
&lt;br /&gt;
= Deployment Automation tools =&lt;br /&gt;
&lt;br /&gt;
Some of the automated tools that are widely used for the process of deployment with Ruby on Rails are &lt;br /&gt;
&lt;br /&gt;
* Capistrano&lt;br /&gt;
* Heroku&lt;br /&gt;
* Vlad&lt;br /&gt;
* AppFog&lt;br /&gt;
* AWS Elastic Beanstalk&lt;br /&gt;
* OpenShift&lt;br /&gt;
* Cloud 66&lt;br /&gt;
&lt;br /&gt;
== Capistrano ==&lt;br /&gt;
&lt;br /&gt;
[[File:Capistrano.jpg|frame|right|&amp;lt;ref&amp;gt;http://www.capistranorb.com/&amp;lt;/ref&amp;gt;|Capistrano Logo]]&lt;br /&gt;
&lt;br /&gt;
Capistrano is a Ruby tool which helps deploy an application to the server. Capistrano allows deploying to multiple machines at a time. It has many advanced options which help to deploy different kinds of applications. It also supports the scripting and execution of tasks.&lt;br /&gt;
&lt;br /&gt;
Capistrano can be used to:&lt;br /&gt;
&lt;br /&gt;
* Deploy applications onto many machines simultaneously.&lt;br /&gt;
* Automate the audits&lt;br /&gt;
* Automate the common tasks of a team.&lt;br /&gt;
&lt;br /&gt;
Capistrano can be made a part of a larger software by integrating it with another Ruby software.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ref&amp;gt;http://www.capistranorb.com/documentation/getting-started/installation/&amp;lt;/ref&amp;gt;  &lt;br /&gt;
'''General Usage'''&lt;br /&gt;
&lt;br /&gt;
The following commands will clone Capistrano, build the gem and install it locally.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem install capistrano --pre --trust-policy HighSecurity&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Or grab the bleeding edge head from:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ git clone -b v3 https://github.com/capistrano/capistrano.git&lt;br /&gt;
$ cd capistrano&lt;br /&gt;
$ gem build *.gemspec&lt;br /&gt;
$ gem install *.gem&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
'''Signed Rubygems'''&lt;br /&gt;
&lt;br /&gt;
As Capistrano is a signed gem, you should always be careful to use the --trust-policy flag when installing Gems, or since Bundler 1.3 you should use the same flag:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem install capistrano --pre --trust-policy HighSecurity&lt;br /&gt;
$ bundle install --trust-policy HighSecurity&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If you get a message that looks like:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ERROR:  While executing gem ... (Gem::Security::Exception)&lt;br /&gt;
unsigned gems are not allowed by the High Security policy&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then please complain to your Gem author, and have them start signing their Gems.&lt;br /&gt;
&lt;br /&gt;
'''Usage in a Rails project'''&lt;br /&gt;
&lt;br /&gt;
Add the following lines to the Gemfile to the :development group ideally.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
group :development do&lt;br /&gt;
  gem 'capistrano-rails', '~&amp;gt; 0.0.7'&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Heroku ==&lt;br /&gt;
&lt;br /&gt;
[[File:Heroku.jpg|frame|right|&amp;lt;ref&amp;gt;https://www.heroku.com/&amp;lt;/ref&amp;gt;|Heroku Logo]]&lt;br /&gt;
&lt;br /&gt;
Heroku is a cloud [http://en.wikipedia.org/wiki/Platform_as_a_service Platform as a Service] (PaaS) which supports several programming languages. PaaS is a service model of Cloud computing wherein the provider offers resources like servers, software, database, etc. to the developer. Heroku helps manage environment-specific configurations separately from the source code, which provides greater security.&lt;br /&gt;
Heroku is not just a deployment environment but it also impacts the development process. There are several principles of the development of application on Heroku.&amp;lt;br&amp;gt;&lt;br /&gt;
•	Applications and Codebases : Most of the development of the application is done on application’s codebase which is stored in a [http://en.wikipedia.org/wiki/Version_control_system Version Control System (VCS)] &amp;lt;br&amp;gt;&lt;br /&gt;
•	Dependencies : All the application dependencies such as plugins should be declared explicitly&amp;lt;br&amp;gt;&lt;br /&gt;
•	Configuration : Configuration of an application is all that varies in different deploys&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Getting Started with Heroku'''&lt;br /&gt;
&lt;br /&gt;
1. To get started with Heroku, go to https://id.heroku.com/signup/devcenter, signup for a Heroku account. &lt;br /&gt;
&lt;br /&gt;
2. Then, download and install the Heroku toolbelt at https://toolbelt.heroku.com/ for your development system. You can also use Heroku command line instead of the online Heroku application. &lt;br /&gt;
&lt;br /&gt;
3. After installing one of them, login using the email address and password used when creating the Heroku account:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ref&amp;gt;https://github.com/heroku/heroku&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ heroku login&lt;br /&gt;
Enter your Heroku credentials.&lt;br /&gt;
Email: adam@example.com&lt;br /&gt;
Password:&lt;br /&gt;
Could not find an existing public key.&lt;br /&gt;
Would you like to generate one? [Yn]&lt;br /&gt;
Generating new SSH public key.&lt;br /&gt;
Uploading SSH public key /Users/adam/.ssh/id_rsa.pub&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Deploying Applications'''&lt;br /&gt;
&lt;br /&gt;
Heroku uses [http://en.wikipedia.org/wiki/Git_(software) git] primarily to deploy the applications. When an application is created on Heroku, it associates the new git which is remote with the local git repository.&lt;br /&gt;
&lt;br /&gt;
As a result, deploying code is just the familiar git push, but to the heroku remote instead:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ref&amp;gt;https://devcenter.heroku.com/articles/how-heroku-works#deploying-applications&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ git push heroku master&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Vlad ==&lt;br /&gt;
&lt;br /&gt;
[[File:Vlad.png|frame|right|&amp;lt;ref&amp;gt;http://rubyhitsquad.com/Vlad_the_Deployer.html&amp;lt;/ref&amp;gt;|Vlad Logo]]&lt;br /&gt;
&lt;br /&gt;
Vlad is another automated deployment tool which is simple to use. It integrates with rake and uses standard tools like SSH, rsync etc.&lt;br /&gt;
&lt;br /&gt;
The main features of Vlad include&lt;br /&gt;
* It uses very few dependencies which are simple.&lt;br /&gt;
* It can execute commands on more than one server.&lt;br /&gt;
* It syncs files to one or more servers.&lt;br /&gt;
* It matches local and remote tasks.&lt;br /&gt;
* It runs tests very fast.&lt;br /&gt;
&lt;br /&gt;
'''Getting started with Vlad'''&amp;lt;ref&amp;gt;http://docs.seattlerb.org/vlad/doco/getting_started_txt.html&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create a deploy file, usually in “config/deploy.rb”:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set :application, &amp;quot;project&amp;quot;&lt;br /&gt;
set :domain, &amp;quot;example.com&amp;quot;&lt;br /&gt;
set :deploy_to, &amp;quot;/path/to/install&amp;quot;&lt;br /&gt;
set :repository, 'http://svn.example.com/project/branches/stable/'&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This defaults to using ‘svn export’ from repository, and a single server for app, db, and www.&lt;br /&gt;
&lt;br /&gt;
If you want a multi-config environment, change your config like so:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set :application, &amp;quot;project&amp;quot;&lt;br /&gt;
set :repository, 'http://svn.example.com/project/branches/stable/'&lt;br /&gt;
&lt;br /&gt;
task :beta do&lt;br /&gt;
  set :domain,    &amp;quot;beta.example.com&amp;quot;&lt;br /&gt;
  set :deploy_to, &amp;quot;/path/to/install-beta&amp;quot;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
task :dev do&lt;br /&gt;
  set :domain,    &amp;quot;dev.example.com&amp;quot;&lt;br /&gt;
  set :deploy_to, &amp;quot;/path/to/install-dev&amp;quot;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
task :prod do&lt;br /&gt;
  set :domain,    &amp;quot;example.com&amp;quot;&lt;br /&gt;
  set :deploy_to, &amp;quot;/path/to/install&amp;quot;&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Add the following to your Rakefile:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
begin&lt;br /&gt;
  require 'vlad'&lt;br /&gt;
  Vlad.load&lt;br /&gt;
rescue LoadError&lt;br /&gt;
  # do nothing&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Vlad.load has a lot of flexibility.&lt;br /&gt;
&lt;br /&gt;
You can install vlad via:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;% rake vlad:invoke COMMAND='sudo gem install vlad -y'&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Initial Launch&lt;br /&gt;
&amp;lt;pre&amp;gt;Run rake vlad:setup vlad:update vlad:migrate vlad:start&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ref&amp;gt;http://docs.seattlerb.org/vlad/index.html&amp;lt;/ref&amp;gt;&lt;br /&gt;
'''Running Vlad'''&lt;br /&gt;
&lt;br /&gt;
* Using rake&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
task :shazam! do&lt;br /&gt;
  Rake::Task[:action1].invoke&lt;br /&gt;
  Rake::Task[:action2].invoke&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Using SSH&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Host example.com&lt;br /&gt;
    User fluffy_bunny&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== AppFog == &lt;br /&gt;
&lt;br /&gt;
[[File:AppFog.jpg|frame|right|&amp;lt;ref&amp;gt;https://www.appfog.com/&amp;lt;/ref&amp;gt;|AppFog Logo]]&lt;br /&gt;
&lt;br /&gt;
AppFog is a PaaS built on Cloud Foundry which is another PaaS platform for deploying applications. &lt;br /&gt;
&lt;br /&gt;
Features of AppFog are&lt;br /&gt;
* It launches and runs fast.&lt;br /&gt;
* It does not require configuring servers or installing frameworks.&lt;br /&gt;
* It is compatible with code management systems like git, svn etc.&lt;br /&gt;
&lt;br /&gt;
'''Installing AppFog'''&amp;lt;ref&amp;gt;http://blog.appfog.com/getting-started-with-appfogs-command-line/&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
‘af‘ command line tool is written in Ruby for installation.&lt;br /&gt;
&lt;br /&gt;
Download and install [http://rubyinstaller.org/ Ruby Installer] for Windows. The installer already includes RubyGems.&lt;br /&gt;
&lt;br /&gt;
Be sure you use the Ruby-enabled command prompt window when you later install and use af. You access this command prompt from the Windows Start menu (All Programs &amp;gt; Ruby &amp;gt; Start Command Prompt with Ruby).&lt;br /&gt;
&lt;br /&gt;
Finally, update RubyGems from the Ruby Command Prompt:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem update --system&lt;br /&gt;
$ gem install af&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Login with:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ af login&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Finally from within your source code directory:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ af update hello-node&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Getting Started with AppFog'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
target [url]                                       Reports current target or sets a new target&lt;br /&gt;
login [email] [--email, --password]                Login&lt;br /&gt;
info                                               System and account information&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== AWS Elastic Beanstalk==&lt;br /&gt;
&lt;br /&gt;
[[File:AWSLogo.jpg|frame|right|&amp;lt;ref&amp;gt;https://aws.amazon.com&amp;lt;/ref&amp;gt;|AWS Logo]]&lt;br /&gt;
&lt;br /&gt;
Amazon Wen Services(AWS) offers [http://en.wikipedia.org/wiki/Infrastructure_as_a_service#Infrastructure_as_a_service_.28IaaS.29 Infrastructure as a Service] (IaaS) and provides a complete set of resources for the development of a web application in minutes. AWS Elastic Beanstalk is a deployment tool of the AWS cloud.&lt;br /&gt;
&lt;br /&gt;
With AWS Elastic Beanstalk, applications can be quickly deployed and managed in the AWS cloud without worrying about the infrastructure that runs those applications. AWS Elastic Beanstalk reduces management complexity without restricting choice or control. Once the application is uploaded AWS Elastic Beanstalk automatically handles the details of capacity provisioning, load balancing, scaling, and application health monitoring. AWS Elastic Beanstalk uses highly reliable and scalable services.&lt;br /&gt;
&lt;br /&gt;
'''AWS CLI'''&lt;br /&gt;
&lt;br /&gt;
AWS Elastic Beanstalk uses a command line tool Eb, which helps you to deploy your application easily.&lt;br /&gt;
&lt;br /&gt;
'''Getting Started with Eb'''&amp;lt;ref&amp;gt;http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/command-reference-get-started.html&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To get started with the beanstalk CLI, you will need to download the command line tools at the [http://aws.amazon.com/code/6752709412171743 AWS Sample Code &amp;amp; Libraries] website.&lt;br /&gt;
&lt;br /&gt;
Step 1: Initialize Your Git Repository&lt;br /&gt;
&lt;br /&gt;
Eb is a command line interface that enables you to deploy applications quickly and more easily using Git. Eb is available as part of the Elastic Beanstalk command line tools package. &lt;br /&gt;
&lt;br /&gt;
1. To install eb,install the following software onto your local computer:&lt;br /&gt;
&lt;br /&gt;
* Git 1.6.6 or later. To download Git, go to http://git-scm.com/.&lt;br /&gt;
* PowerShell 2.0.&lt;br /&gt;
&lt;br /&gt;
2. Initialize your Git repository.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git init &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Step 2: Configuring AWS Elastic Beanstalk&lt;br /&gt;
&lt;br /&gt;
1. From your directory where you created your local repository, type the following command.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
eb init&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2. When you are prompted for the access key ID, type your access key ID. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Enter your AWS Access Key ID (current value is &amp;quot;AKIAIOSFODNN7EXAMPLE&amp;quot;): &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3. When you are prompted for the secret access key, type your secret access key.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Enter your AWS Secret Access Key (current value is &amp;quot;wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY&amp;quot;): &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
4. When you are prompted for the AWS Elastic Beanstalk application name, type the name of the application. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Enter an AWS Elastic Beanstalk application name (auto-generated value is &amp;quot;windows&amp;quot;): &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Note:&lt;br /&gt;
If you have a space in your application name, make sure you do not use quotes.&lt;br /&gt;
&lt;br /&gt;
5. When you are prompted for the AWS Elastic Beanstalk environment name, type the name of the environment. AWS Elastic Beanstalk automatically creates an environment name based on your application name. If you want to accept the default, press Enter.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Enter an AWS Elastic Beanstalk environment name (current value is &amp;quot;HelloWorld-env&amp;quot;): &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
6. When you are prompted to create an Amazon RDS DB instance, type y or n. For this example, we'll type y.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Create an RDS DB Instance? [y/n]:&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
7. When you are prompted to enter your RDS user master password, type your password containing from 8 to 16 printable ASCII characters (excluding /, \, and @).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Enter an RDS DB master password: &lt;br /&gt;
Retype password to confirm: &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can now get started with the AWS Elastic Beanstalk.&lt;br /&gt;
&lt;br /&gt;
== OpenShift ==&lt;br /&gt;
&lt;br /&gt;
[[File:OpenShift.png|frame|right|&amp;lt;ref&amp;gt;https://en.wikipedia.org&amp;lt;/ref&amp;gt;|OpenShift Logo]]&lt;br /&gt;
&lt;br /&gt;
Another free and open source PaaS for deploying applications is OpenShift created by [[http://en.wikipedia.org/wiki/RedHat RedHat]]. &lt;br /&gt;
&lt;br /&gt;
'''Considerations'''&lt;br /&gt;
* Databases&lt;br /&gt;
&lt;br /&gt;
To use the application outside the OpenShift environment one needs to change the variables as the application is configured to use database in production mode in OpenShift.&lt;br /&gt;
&lt;br /&gt;
* Assets&lt;br /&gt;
&lt;br /&gt;
The assets are precompiled everytime application is pushed to OpenShift.&lt;br /&gt;
&lt;br /&gt;
* Security&lt;br /&gt;
&lt;br /&gt;
Security related variables are to be unique across the application.&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;ref&amp;gt;https://github.com/openshift/rails-example&amp;lt;/ref&amp;gt;&lt;br /&gt;
'''Installation'''&lt;br /&gt;
&lt;br /&gt;
1.	Create an account at http://openshift.redhat.com/&lt;br /&gt;
&lt;br /&gt;
2.	Create a rails application&lt;br /&gt;
	&amp;lt;pre&amp;gt;rhc app create -a railsapp -t ruby-1.9&amp;lt;/pre&amp;gt;&lt;br /&gt;
3.	Add mysql support to your application&lt;br /&gt;
	&amp;lt;pre&amp;gt;rhc cartridge add -a railsapp -c mysql-5.1&amp;lt;/pre&amp;gt;&lt;br /&gt;
4.	Add this upstream Rails quickstart repository&lt;br /&gt;
&amp;lt;pre&amp;gt;cd railsapp&lt;br /&gt;
git remote add upstream -m master git://github.com/openshift/rails-example.git&lt;br /&gt;
git pull -s recursive -X theirs upstream master&amp;lt;/pre&amp;gt;&lt;br /&gt;
5.	Push your new code&lt;br /&gt;
&amp;lt;pre&amp;gt;git push&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Cloud 66 ==&lt;br /&gt;
&lt;br /&gt;
[[File:Cloud 66.jpg|frame|right|&amp;lt;ref&amp;gt;https://www.cloud66.com/&amp;lt;/ref&amp;gt;|Cloud66 Logo]]&lt;br /&gt;
&lt;br /&gt;
Cloud 66 combines the convenience of Platform-as-a-Service (PaaS) and the flexibility and control of Infrastructure-as-a-Service (IaaS). This platform allows easy deployment of application, so there is no overhead of configuring or monitoring the servers.&lt;br /&gt;
&lt;br /&gt;
'''Cloud 66 Command line Toolbelt'''&lt;br /&gt;
&lt;br /&gt;
Toolbelt is an open source released to deploy the application.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ref&amp;gt;http://blog.cloud66.com/&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Getting Started with Cloud 66'''&lt;br /&gt;
&lt;br /&gt;
1. Go to the [https://www.cloud66.com/users/sign_up sign up] page and create a Cloud 66 account.&lt;br /&gt;
&lt;br /&gt;
2. Go to Cloud 66 Dashboard and [https://www.cloud66.com/help/first_stack build your first stack].&lt;br /&gt;
&lt;br /&gt;
'''Installation'''&lt;br /&gt;
&lt;br /&gt;
Installation of toolbelt uses the following command&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Gem install c66&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This automatically searches the newest version and installs it.&lt;br /&gt;
&lt;br /&gt;
= Model Class : assignment_participant.rb =&lt;br /&gt;
This class is a subclass of the model class named 'participant'.Several methods in this model class required refactoring. The names were changed to follow method naming convention. Deprecated code was removed and re-coded as needed. Duplicated methods were commented. Some of the methods were moved to the parent class while some other were moved to a new class.  &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;width:3%;&amp;quot;|S. No&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;|Method Name&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;|Change Made &lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;|Reason For Change&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
|''''' 1 '''''&lt;br /&gt;
|get_course_string&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|get_cycle_deviation_score&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|get_cycle_similarity_score&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|get_feedback&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|get_files&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|get_four_node_cycles&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|fullname&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|get_metareviews&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|name&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|name&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|- &lt;br /&gt;
|get_review_score&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|get_reviewees&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|get_reviewers&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|get_reviews&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|get_reviews_by_reviewer&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Comparison between Capistrano/Vlad/Heroku/AppFog/OpenShift/Cloud66/AWS Beanstalk =&lt;br /&gt;
&lt;br /&gt;
With so many automated tools available for Code Deployment and Release Management, the decision on which to use for a particular Ruby on rails application depends on various parameters to be considered.&lt;br /&gt;
Some comparative features of the different tools are as follows :&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;width:9%;&amp;quot;|Criteria for Comparision&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;|Capistrano&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;| Vlad&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;| Heroku&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;| AppFog&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;| OpenShift&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;| Cloud66&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;| AWS Beanstalk&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
|'''''Getting started with the tool'''''&lt;br /&gt;
|It is a framework that allows one to execute commands on a remote server using tools like ssh.&lt;br /&gt;
|Vlad deployment is similar to Capistrano, but less complex.&lt;br /&gt;
|Heroku’s offers a plan with first dyno free i.e. 512 MB that can be paired with Postgres starter DB to start an application with 0 initial cost&lt;br /&gt;
|AppFog’s initial plan offers 2GB of RAM free which is enough for small to medium traffic applications. By managing options provided for DB, queue server, application server, etc all part of the intial package, this is an excellent option to try out an application&lt;br /&gt;
|OpenShift is an open source platform and its free plan for starters has 3 gears for free wherein each gear consists of some RAM and disk space.&lt;br /&gt;
|Free plan provides one server for deployment.&lt;br /&gt;
|Provides an initial free tier. Without free tier no additional cost for Beanstalk. One only needs to pay for the AWS resources used.&lt;br /&gt;
|-&lt;br /&gt;
|'''''Scaling Memory'''''&lt;br /&gt;
|Memory increase would require additional servers/unused space in existing ones.&lt;br /&gt;
|Memory increase depends on additional servers available/unused space in existing ones.&lt;br /&gt;
|Memory increased in terms of dyno each of size 512 MB.&lt;br /&gt;
|Can configure any size for memory allocation&lt;br /&gt;
| -&lt;br /&gt;
| -&lt;br /&gt;
|Can automatically up/down scale the application by adjusting the default auto scaling settings.&lt;br /&gt;
|-&lt;br /&gt;
|'''''Scaling – Cost and Ease'''''&lt;br /&gt;
|While this provides greater flexibility as user is in control of the servers, it also causes additional overhead in terms of user needing to work both on Rails application and web server deployment.&lt;br /&gt;
|It can be integrated with Rake without any hindrances.&lt;br /&gt;
|Can dynamically scale up and down an application and pay as per hourly usages. Each additional dyno costs $35/mo&lt;br /&gt;
|Scaling takes up some time and need to pay for a month at the minimum. Scaling up to 4GB increases cost to $100/mo&lt;br /&gt;
| -&lt;br /&gt;
|Scaling using Cloud66 is relatively easy and hassle free.&lt;br /&gt;
|Scaling is fast and easy.&lt;br /&gt;
|-&lt;br /&gt;
|'''''Special features'''''&lt;br /&gt;
|For sensitive applications where handing over the control to a third party for deployment is not feasible, Capistrano is the way to go.&lt;br /&gt;
|It also provides support for tools like rsync and ssh.&lt;br /&gt;
|Lacks support for cross region deployment i.e. can’t select location of server where application gets deployed&lt;br /&gt;
|Supports cross region deployment i.e. if users of application primarily in Asia, can choose a server in Asia to deploy application, thus making the site faster.&lt;br /&gt;
| -&lt;br /&gt;
| -&lt;br /&gt;
|Provides complete flexibility and control of the resources to the user including the chance to take over control of some or all.&lt;br /&gt;
|-&lt;br /&gt;
|'''''Database support'''''&lt;br /&gt;
|Provides support for DB related to rails applications&lt;br /&gt;
|Provides support for DB related to rails applications&lt;br /&gt;
|It features serious production DB like RDBMS, Postgres, etc. and many Addons such as MongoDB, ClearDB, etc.&lt;br /&gt;
|Features free shared databases such as MongoDB, MySQL, Postgres but for other production DB’s need to use Addons&lt;br /&gt;
|Databases featured are MySQL, MongoDB and Postgres&lt;br /&gt;
| -&lt;br /&gt;
|Supports DB like Amazon SimpleDB, Amazon RDS, Amazon DynamoDB.&lt;br /&gt;
|-&lt;br /&gt;
|'''''Deployment strategy'''''&lt;br /&gt;
|Capistrano provides commands to be executed for automated deployment. It supports git.&lt;br /&gt;
|It is much easier to deploy using Vlad as compared to Capistrano.&lt;br /&gt;
|Deployment as easy as ‘git push’&lt;br /&gt;
|Deployment does not support git. It uses the af tool for deployment.&lt;br /&gt;
| -&lt;br /&gt;
|Since Cloud66 provides the platform in terms of Application Stack Management as a Service, it uses the infrastructure of AWS, Virtual Private Server, etc. for actual deployment. But the user doesn’t have to worry about configuration or monitoring of the servers. Hence provides easy deployment.&lt;br /&gt;
|Deployment options include Git, AWS management console, etc.&lt;br /&gt;
|-&lt;br /&gt;
|'''''Community Support availability'''''&lt;br /&gt;
| As it has been in use for a long time there is a huge community support available for Capistrano.&lt;br /&gt;
| -&lt;br /&gt;
|Heroku also provides a huge community support given the fact that there are a lot of Heroku users.&lt;br /&gt;
|Community is limited.&lt;br /&gt;
|RedHat being a reputed provider for open source solutions, the OpenShift community is gradually increasing and receiving support from a considerable community of users.&lt;br /&gt;
|Limited community support currently&lt;br /&gt;
|Has community forums and documentation.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Conclusion =&lt;br /&gt;
&lt;br /&gt;
Comparison and contrast between various deployment automated tools such as Capistrano, Heroku, Vlad, AppFog, OpenShift, Cloud66, AWS Beanstalk shows that each has its own pros and cons. &lt;br /&gt;
For instance, in a client based application where handing over the control of the application to a third party such as the deployment tool provider is impossible, AWS Beanstalk would be the obvious choice for the developer.&lt;br /&gt;
On the other hand, a novice Rails application developer might find all he needs in the starter plan of Heroku with the added bonus of a huge support community available to him for troubleshooting as he stumbles his way across the development of the application.&lt;br /&gt;
One may also choose the tool that provides the specific database support for your application. In case of large scale corporations where budgets are not that limited, the increasing costs with up-scaling of some tools would not be an obstacle.&lt;br /&gt;
Thus, various considerations about the application such as scalability requirement, security concerns, cost, availability of own resources such as servers etc., will help determine which tool is the most suitable for that application.&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= See Also =&lt;br /&gt;
&lt;br /&gt;
* Rails Solutions: Ruby on Rails Made Easy by Justin Williams&lt;br /&gt;
* http://guides.beanstalkapp.com/deployments/best-practices.html&lt;br /&gt;
* http://www.urbancode.com/anthill3-help-3.7/html/SettingUpDeploymentProcess.html&lt;br /&gt;
* http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=UseFMSGateway_3.html&lt;br /&gt;
* http://pic.dhe.ibm.com/infocenter/tivihelp/v26r1/index.jsp?topic=%2Fcom.ibm.dtm.doc%2Fdeploysoftware%2Fc_deploysw_process.html&lt;/div&gt;</summary>
		<author><name>Npari</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch2_0e808_nsv&amp;diff=80945</id>
		<title>CSC/ECE 517 Fall 2013/ch2 0e808 nsv</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch2_0e808_nsv&amp;diff=80945"/>
		<updated>2013-10-30T18:15:02Z</updated>

		<summary type="html">&lt;p&gt;Npari: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= E808: Refactor and test Participant, AssignmentParticipant, &amp;amp; CourseParticipant =&lt;br /&gt;
&lt;br /&gt;
Code Deployment or [http://en.wikipedia.org/wiki/Software_deployment Software Deployment] and [http://en.wikipedia.org/wiki/Release_management Release management] with [http://en.wikipedia.org/wiki/Ruby_on_Rails Ruby on Rails] can be done using various tools such as [http://en.wikipedia.org/wiki/Capistrano Capistrano], [http://en.wikipedia.org/wiki/Heroku Heroku], AppFog, OpenShift, AWS, Cloud 66, Vlad, etc. These automated tools are frameworks used to write and execute commands in parallel remote machines and thus ease the process of deployment and management of various applications.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
= Introduction =&lt;br /&gt;
&lt;br /&gt;
The Deploying process involves different stages like development, testing, release management and sign-off by project teams.&lt;br /&gt;
&lt;br /&gt;
The following diagram illustrates the deployment process of an application.&lt;br /&gt;
&lt;br /&gt;
[[File:Deployment Process.jpg|frame|center|&amp;lt;ref&amp;gt;http://technet.microsoft.com/en-us/library/cc465178.aspx&amp;lt;/ref&amp;gt;]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The deployment flow has three stages: development and testing, release management and stakeholders and project teams. &lt;br /&gt;
&lt;br /&gt;
After the final release of the code in development and testing stage, the master plan is prepared for deployment of components and sites based on the sign-offs provided by the project teams, stakeholders and customers. Then, the stabilization of the deployment is calculated based on some metrics. Once the deployment is stabilized, it is reviewed and the process of deployment is complete. The final sign-off is given by the stakeholders.&lt;br /&gt;
&lt;br /&gt;
==Code Deployment==&lt;br /&gt;
&lt;br /&gt;
Code deployment is a procedure where the application is transferred onto a production server, so that it is made available for all the other users. It is the part of release management process which involves several activities. These activities are inter-dependent and need to be completed in a specific order for successful code deployment. &lt;br /&gt;
&lt;br /&gt;
'''Code Deployment Activities'''&lt;br /&gt;
&lt;br /&gt;
The various deployment activities include &amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/Software_deployment&amp;lt;/ref&amp;gt;&lt;br /&gt;
* Release : Gathering all system components in preparation for deployment&lt;br /&gt;
* Install and activate : Installing the application components and getting them in the 'ready' state&lt;br /&gt;
* Deactivate : Shutting down components that are out-dated or that may interfere with updating others&lt;br /&gt;
* Adapt : Making changes to application to accommodate changes in environment&lt;br /&gt;
* Update : Having a newer release installed in place of the old one&lt;br /&gt;
* Built-in : There are components built-into some tools for complete/semi-automating updates&lt;br /&gt;
* Version tracking : These systems help the user to know if newer versions of a software are available and if yes, help install them&lt;br /&gt;
* Uninstall : Opposite of installation and involves complete removal of software and its dependencies from the environment&lt;br /&gt;
* Retire : This involves making a software obsolete and is the end of software life cycle&lt;br /&gt;
&lt;br /&gt;
The general guidelines for the deployment process remain the same but there are variations in the specific requirements with each software system.&lt;br /&gt;
&lt;br /&gt;
==Release Management==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ref&amp;gt;http://searchitchannel.techtarget.com/definition/release-management&amp;lt;/ref&amp;gt;&lt;br /&gt;
Release management is a software process which takes care of the development, testing, deployment and support stages of software releases. The start of release management happens in the development phase, where it requests for new features or changes in the existing application. When the request is accepted, a new release is planned and designed. This design is built and then enters the testing phase, where the release is tested until it is accepted. After the release is accepted as a candidate, it enters the deployment phase where it is implemented. Once deployed, the release is made available and sent to support phase for collection of bug reports. Once the support phase is done, the bugs and other issues lead to requests for changes and the cycle is then repeated.&lt;br /&gt;
&lt;br /&gt;
= Automating Code Deployment and Release Management =&lt;br /&gt;
&amp;lt;ref&amp;gt;http://www.urbancode.com/html/solutions/deployment-automation.html&amp;lt;/ref&amp;gt;&lt;br /&gt;
Automation of a process is required when the manual process is more error prone. Also, for large real world applications, the manual process is very complex and time consuming. Incomplete documentation hampers a manual process further. Deployment also has to be done in many environments and involves varied steps to be followed in a specific order. Manual process needs repetition of same procedure to each and every environment which leads to many errors and the process becomes costly.&lt;br /&gt;
In web applications each new release has to be deployed to and tested in development, testing and production environments.The number of software releases in web applications  are more and hence the need to automate release management is also greater.&lt;br /&gt;
&lt;br /&gt;
Automation of deployment delivers applications faster and with fewer errors. The defined software deployment process can be applied across all environments consistently every time. With various automated application deployment platforms now readily available, manual deployments have become a thing of the past.&lt;br /&gt;
&lt;br /&gt;
Lets take a look at the various Deployment Automation tools available to Ruby on Rails applications. For the purposes of this article the process of manual deployment of a Ruby on Rails application is out of scope.&lt;br /&gt;
&lt;br /&gt;
= Deployment Automation tools =&lt;br /&gt;
&lt;br /&gt;
Some of the automated tools that are widely used for the process of deployment with Ruby on Rails are &lt;br /&gt;
&lt;br /&gt;
* Capistrano&lt;br /&gt;
* Heroku&lt;br /&gt;
* Vlad&lt;br /&gt;
* AppFog&lt;br /&gt;
* AWS Elastic Beanstalk&lt;br /&gt;
* OpenShift&lt;br /&gt;
* Cloud 66&lt;br /&gt;
&lt;br /&gt;
== Capistrano ==&lt;br /&gt;
&lt;br /&gt;
[[File:Capistrano.jpg|frame|right|&amp;lt;ref&amp;gt;http://www.capistranorb.com/&amp;lt;/ref&amp;gt;|Capistrano Logo]]&lt;br /&gt;
&lt;br /&gt;
Capistrano is a Ruby tool which helps deploy an application to the server. Capistrano allows deploying to multiple machines at a time. It has many advanced options which help to deploy different kinds of applications. It also supports the scripting and execution of tasks.&lt;br /&gt;
&lt;br /&gt;
Capistrano can be used to:&lt;br /&gt;
&lt;br /&gt;
* Deploy applications onto many machines simultaneously.&lt;br /&gt;
* Automate the audits&lt;br /&gt;
* Automate the common tasks of a team.&lt;br /&gt;
&lt;br /&gt;
Capistrano can be made a part of a larger software by integrating it with another Ruby software.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ref&amp;gt;http://www.capistranorb.com/documentation/getting-started/installation/&amp;lt;/ref&amp;gt;  &lt;br /&gt;
'''General Usage'''&lt;br /&gt;
&lt;br /&gt;
The following commands will clone Capistrano, build the gem and install it locally.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem install capistrano --pre --trust-policy HighSecurity&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Or grab the bleeding edge head from:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ git clone -b v3 https://github.com/capistrano/capistrano.git&lt;br /&gt;
$ cd capistrano&lt;br /&gt;
$ gem build *.gemspec&lt;br /&gt;
$ gem install *.gem&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
'''Signed Rubygems'''&lt;br /&gt;
&lt;br /&gt;
As Capistrano is a signed gem, you should always be careful to use the --trust-policy flag when installing Gems, or since Bundler 1.3 you should use the same flag:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem install capistrano --pre --trust-policy HighSecurity&lt;br /&gt;
$ bundle install --trust-policy HighSecurity&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If you get a message that looks like:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ERROR:  While executing gem ... (Gem::Security::Exception)&lt;br /&gt;
unsigned gems are not allowed by the High Security policy&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then please complain to your Gem author, and have them start signing their Gems.&lt;br /&gt;
&lt;br /&gt;
'''Usage in a Rails project'''&lt;br /&gt;
&lt;br /&gt;
Add the following lines to the Gemfile to the :development group ideally.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
group :development do&lt;br /&gt;
  gem 'capistrano-rails', '~&amp;gt; 0.0.7'&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Heroku ==&lt;br /&gt;
&lt;br /&gt;
[[File:Heroku.jpg|frame|right|&amp;lt;ref&amp;gt;https://www.heroku.com/&amp;lt;/ref&amp;gt;|Heroku Logo]]&lt;br /&gt;
&lt;br /&gt;
Heroku is a cloud [http://en.wikipedia.org/wiki/Platform_as_a_service Platform as a Service] (PaaS) which supports several programming languages. PaaS is a service model of Cloud computing wherein the provider offers resources like servers, software, database, etc. to the developer. Heroku helps manage environment-specific configurations separately from the source code, which provides greater security.&lt;br /&gt;
Heroku is not just a deployment environment but it also impacts the development process. There are several principles of the development of application on Heroku.&amp;lt;br&amp;gt;&lt;br /&gt;
•	Applications and Codebases : Most of the development of the application is done on application’s codebase which is stored in a [http://en.wikipedia.org/wiki/Version_control_system Version Control System (VCS)] &amp;lt;br&amp;gt;&lt;br /&gt;
•	Dependencies : All the application dependencies such as plugins should be declared explicitly&amp;lt;br&amp;gt;&lt;br /&gt;
•	Configuration : Configuration of an application is all that varies in different deploys&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Getting Started with Heroku'''&lt;br /&gt;
&lt;br /&gt;
1. To get started with Heroku, go to https://id.heroku.com/signup/devcenter, signup for a Heroku account. &lt;br /&gt;
&lt;br /&gt;
2. Then, download and install the Heroku toolbelt at https://toolbelt.heroku.com/ for your development system. You can also use Heroku command line instead of the online Heroku application. &lt;br /&gt;
&lt;br /&gt;
3. After installing one of them, login using the email address and password used when creating the Heroku account:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ref&amp;gt;https://github.com/heroku/heroku&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ heroku login&lt;br /&gt;
Enter your Heroku credentials.&lt;br /&gt;
Email: adam@example.com&lt;br /&gt;
Password:&lt;br /&gt;
Could not find an existing public key.&lt;br /&gt;
Would you like to generate one? [Yn]&lt;br /&gt;
Generating new SSH public key.&lt;br /&gt;
Uploading SSH public key /Users/adam/.ssh/id_rsa.pub&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Deploying Applications'''&lt;br /&gt;
&lt;br /&gt;
Heroku uses [http://en.wikipedia.org/wiki/Git_(software) git] primarily to deploy the applications. When an application is created on Heroku, it associates the new git which is remote with the local git repository.&lt;br /&gt;
&lt;br /&gt;
As a result, deploying code is just the familiar git push, but to the heroku remote instead:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ref&amp;gt;https://devcenter.heroku.com/articles/how-heroku-works#deploying-applications&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ git push heroku master&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Vlad ==&lt;br /&gt;
&lt;br /&gt;
[[File:Vlad.png|frame|right|&amp;lt;ref&amp;gt;http://rubyhitsquad.com/Vlad_the_Deployer.html&amp;lt;/ref&amp;gt;|Vlad Logo]]&lt;br /&gt;
&lt;br /&gt;
Vlad is another automated deployment tool which is simple to use. It integrates with rake and uses standard tools like SSH, rsync etc.&lt;br /&gt;
&lt;br /&gt;
The main features of Vlad include&lt;br /&gt;
* It uses very few dependencies which are simple.&lt;br /&gt;
* It can execute commands on more than one server.&lt;br /&gt;
* It syncs files to one or more servers.&lt;br /&gt;
* It matches local and remote tasks.&lt;br /&gt;
* It runs tests very fast.&lt;br /&gt;
&lt;br /&gt;
'''Getting started with Vlad'''&amp;lt;ref&amp;gt;http://docs.seattlerb.org/vlad/doco/getting_started_txt.html&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create a deploy file, usually in “config/deploy.rb”:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set :application, &amp;quot;project&amp;quot;&lt;br /&gt;
set :domain, &amp;quot;example.com&amp;quot;&lt;br /&gt;
set :deploy_to, &amp;quot;/path/to/install&amp;quot;&lt;br /&gt;
set :repository, 'http://svn.example.com/project/branches/stable/'&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This defaults to using ‘svn export’ from repository, and a single server for app, db, and www.&lt;br /&gt;
&lt;br /&gt;
If you want a multi-config environment, change your config like so:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set :application, &amp;quot;project&amp;quot;&lt;br /&gt;
set :repository, 'http://svn.example.com/project/branches/stable/'&lt;br /&gt;
&lt;br /&gt;
task :beta do&lt;br /&gt;
  set :domain,    &amp;quot;beta.example.com&amp;quot;&lt;br /&gt;
  set :deploy_to, &amp;quot;/path/to/install-beta&amp;quot;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
task :dev do&lt;br /&gt;
  set :domain,    &amp;quot;dev.example.com&amp;quot;&lt;br /&gt;
  set :deploy_to, &amp;quot;/path/to/install-dev&amp;quot;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
task :prod do&lt;br /&gt;
  set :domain,    &amp;quot;example.com&amp;quot;&lt;br /&gt;
  set :deploy_to, &amp;quot;/path/to/install&amp;quot;&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Add the following to your Rakefile:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
begin&lt;br /&gt;
  require 'vlad'&lt;br /&gt;
  Vlad.load&lt;br /&gt;
rescue LoadError&lt;br /&gt;
  # do nothing&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Vlad.load has a lot of flexibility.&lt;br /&gt;
&lt;br /&gt;
You can install vlad via:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;% rake vlad:invoke COMMAND='sudo gem install vlad -y'&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Initial Launch&lt;br /&gt;
&amp;lt;pre&amp;gt;Run rake vlad:setup vlad:update vlad:migrate vlad:start&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ref&amp;gt;http://docs.seattlerb.org/vlad/index.html&amp;lt;/ref&amp;gt;&lt;br /&gt;
'''Running Vlad'''&lt;br /&gt;
&lt;br /&gt;
* Using rake&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
task :shazam! do&lt;br /&gt;
  Rake::Task[:action1].invoke&lt;br /&gt;
  Rake::Task[:action2].invoke&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Using SSH&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Host example.com&lt;br /&gt;
    User fluffy_bunny&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== AppFog == &lt;br /&gt;
&lt;br /&gt;
[[File:AppFog.jpg|frame|right|&amp;lt;ref&amp;gt;https://www.appfog.com/&amp;lt;/ref&amp;gt;|AppFog Logo]]&lt;br /&gt;
&lt;br /&gt;
AppFog is a PaaS built on Cloud Foundry which is another PaaS platform for deploying applications. &lt;br /&gt;
&lt;br /&gt;
Features of AppFog are&lt;br /&gt;
* It launches and runs fast.&lt;br /&gt;
* It does not require configuring servers or installing frameworks.&lt;br /&gt;
* It is compatible with code management systems like git, svn etc.&lt;br /&gt;
&lt;br /&gt;
'''Installing AppFog'''&amp;lt;ref&amp;gt;http://blog.appfog.com/getting-started-with-appfogs-command-line/&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
‘af‘ command line tool is written in Ruby for installation.&lt;br /&gt;
&lt;br /&gt;
Download and install [http://rubyinstaller.org/ Ruby Installer] for Windows. The installer already includes RubyGems.&lt;br /&gt;
&lt;br /&gt;
Be sure you use the Ruby-enabled command prompt window when you later install and use af. You access this command prompt from the Windows Start menu (All Programs &amp;gt; Ruby &amp;gt; Start Command Prompt with Ruby).&lt;br /&gt;
&lt;br /&gt;
Finally, update RubyGems from the Ruby Command Prompt:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem update --system&lt;br /&gt;
$ gem install af&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Login with:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ af login&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Finally from within your source code directory:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ af update hello-node&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Getting Started with AppFog'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
target [url]                                       Reports current target or sets a new target&lt;br /&gt;
login [email] [--email, --password]                Login&lt;br /&gt;
info                                               System and account information&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== AWS Elastic Beanstalk==&lt;br /&gt;
&lt;br /&gt;
[[File:AWSLogo.jpg|frame|right|&amp;lt;ref&amp;gt;https://aws.amazon.com&amp;lt;/ref&amp;gt;|AWS Logo]]&lt;br /&gt;
&lt;br /&gt;
Amazon Wen Services(AWS) offers [http://en.wikipedia.org/wiki/Infrastructure_as_a_service#Infrastructure_as_a_service_.28IaaS.29 Infrastructure as a Service] (IaaS) and provides a complete set of resources for the development of a web application in minutes. AWS Elastic Beanstalk is a deployment tool of the AWS cloud.&lt;br /&gt;
&lt;br /&gt;
With AWS Elastic Beanstalk, applications can be quickly deployed and managed in the AWS cloud without worrying about the infrastructure that runs those applications. AWS Elastic Beanstalk reduces management complexity without restricting choice or control. Once the application is uploaded AWS Elastic Beanstalk automatically handles the details of capacity provisioning, load balancing, scaling, and application health monitoring. AWS Elastic Beanstalk uses highly reliable and scalable services.&lt;br /&gt;
&lt;br /&gt;
'''AWS CLI'''&lt;br /&gt;
&lt;br /&gt;
AWS Elastic Beanstalk uses a command line tool Eb, which helps you to deploy your application easily.&lt;br /&gt;
&lt;br /&gt;
'''Getting Started with Eb'''&amp;lt;ref&amp;gt;http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/command-reference-get-started.html&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To get started with the beanstalk CLI, you will need to download the command line tools at the [http://aws.amazon.com/code/6752709412171743 AWS Sample Code &amp;amp; Libraries] website.&lt;br /&gt;
&lt;br /&gt;
Step 1: Initialize Your Git Repository&lt;br /&gt;
&lt;br /&gt;
Eb is a command line interface that enables you to deploy applications quickly and more easily using Git. Eb is available as part of the Elastic Beanstalk command line tools package. &lt;br /&gt;
&lt;br /&gt;
1. To install eb,install the following software onto your local computer:&lt;br /&gt;
&lt;br /&gt;
* Git 1.6.6 or later. To download Git, go to http://git-scm.com/.&lt;br /&gt;
* PowerShell 2.0.&lt;br /&gt;
&lt;br /&gt;
2. Initialize your Git repository.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git init &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Step 2: Configuring AWS Elastic Beanstalk&lt;br /&gt;
&lt;br /&gt;
1. From your directory where you created your local repository, type the following command.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
eb init&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2. When you are prompted for the access key ID, type your access key ID. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Enter your AWS Access Key ID (current value is &amp;quot;AKIAIOSFODNN7EXAMPLE&amp;quot;): &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3. When you are prompted for the secret access key, type your secret access key.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Enter your AWS Secret Access Key (current value is &amp;quot;wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY&amp;quot;): &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
4. When you are prompted for the AWS Elastic Beanstalk application name, type the name of the application. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Enter an AWS Elastic Beanstalk application name (auto-generated value is &amp;quot;windows&amp;quot;): &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Note:&lt;br /&gt;
If you have a space in your application name, make sure you do not use quotes.&lt;br /&gt;
&lt;br /&gt;
5. When you are prompted for the AWS Elastic Beanstalk environment name, type the name of the environment. AWS Elastic Beanstalk automatically creates an environment name based on your application name. If you want to accept the default, press Enter.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Enter an AWS Elastic Beanstalk environment name (current value is &amp;quot;HelloWorld-env&amp;quot;): &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
6. When you are prompted to create an Amazon RDS DB instance, type y or n. For this example, we'll type y.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Create an RDS DB Instance? [y/n]:&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
7. When you are prompted to enter your RDS user master password, type your password containing from 8 to 16 printable ASCII characters (excluding /, \, and @).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Enter an RDS DB master password: &lt;br /&gt;
Retype password to confirm: &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can now get started with the AWS Elastic Beanstalk.&lt;br /&gt;
&lt;br /&gt;
== OpenShift ==&lt;br /&gt;
&lt;br /&gt;
[[File:OpenShift.png|frame|right|&amp;lt;ref&amp;gt;https://en.wikipedia.org&amp;lt;/ref&amp;gt;|OpenShift Logo]]&lt;br /&gt;
&lt;br /&gt;
Another free and open source PaaS for deploying applications is OpenShift created by [[http://en.wikipedia.org/wiki/RedHat RedHat]]. &lt;br /&gt;
&lt;br /&gt;
'''Considerations'''&lt;br /&gt;
* Databases&lt;br /&gt;
&lt;br /&gt;
To use the application outside the OpenShift environment one needs to change the variables as the application is configured to use database in production mode in OpenShift.&lt;br /&gt;
&lt;br /&gt;
* Assets&lt;br /&gt;
&lt;br /&gt;
The assets are precompiled everytime application is pushed to OpenShift.&lt;br /&gt;
&lt;br /&gt;
* Security&lt;br /&gt;
&lt;br /&gt;
Security related variables are to be unique across the application.&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;ref&amp;gt;https://github.com/openshift/rails-example&amp;lt;/ref&amp;gt;&lt;br /&gt;
'''Installation'''&lt;br /&gt;
&lt;br /&gt;
1.	Create an account at http://openshift.redhat.com/&lt;br /&gt;
&lt;br /&gt;
2.	Create a rails application&lt;br /&gt;
	&amp;lt;pre&amp;gt;rhc app create -a railsapp -t ruby-1.9&amp;lt;/pre&amp;gt;&lt;br /&gt;
3.	Add mysql support to your application&lt;br /&gt;
	&amp;lt;pre&amp;gt;rhc cartridge add -a railsapp -c mysql-5.1&amp;lt;/pre&amp;gt;&lt;br /&gt;
4.	Add this upstream Rails quickstart repository&lt;br /&gt;
&amp;lt;pre&amp;gt;cd railsapp&lt;br /&gt;
git remote add upstream -m master git://github.com/openshift/rails-example.git&lt;br /&gt;
git pull -s recursive -X theirs upstream master&amp;lt;/pre&amp;gt;&lt;br /&gt;
5.	Push your new code&lt;br /&gt;
&amp;lt;pre&amp;gt;git push&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Cloud 66 ==&lt;br /&gt;
&lt;br /&gt;
[[File:Cloud 66.jpg|frame|right|&amp;lt;ref&amp;gt;https://www.cloud66.com/&amp;lt;/ref&amp;gt;|Cloud66 Logo]]&lt;br /&gt;
&lt;br /&gt;
Cloud 66 combines the convenience of Platform-as-a-Service (PaaS) and the flexibility and control of Infrastructure-as-a-Service (IaaS). This platform allows easy deployment of application, so there is no overhead of configuring or monitoring the servers.&lt;br /&gt;
&lt;br /&gt;
'''Cloud 66 Command line Toolbelt'''&lt;br /&gt;
&lt;br /&gt;
Toolbelt is an open source released to deploy the application.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ref&amp;gt;http://blog.cloud66.com/&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Getting Started with Cloud 66'''&lt;br /&gt;
&lt;br /&gt;
1. Go to the [https://www.cloud66.com/users/sign_up sign up] page and create a Cloud 66 account.&lt;br /&gt;
&lt;br /&gt;
2. Go to Cloud 66 Dashboard and [https://www.cloud66.com/help/first_stack build your first stack].&lt;br /&gt;
&lt;br /&gt;
'''Installation'''&lt;br /&gt;
&lt;br /&gt;
Installation of toolbelt uses the following command&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Gem install c66&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This automatically searches the newest version and installs it.&lt;br /&gt;
&lt;br /&gt;
= Model Class : assignment_participant.rb =&lt;br /&gt;
This class is a subclass of the model class named 'participant'.Several methods in this model class required refactoring. The names were changed to follow method naming convention. Deprecated code was removed and re-coded as needed. Duplicated methods were commented. Some of the methods were moved to the parent class while some other were moved to a new class.  &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;width:3%;&amp;quot;|S. No&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;|Method Name&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;|Change Made &lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;|Reason For Change&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
|''''' 1 '''''&lt;br /&gt;
|get_course_string&lt;br /&gt;
|-&lt;br /&gt;
|get_cycle_deviation_score&lt;br /&gt;
|-&lt;br /&gt;
|get_cycle_similarity_score&lt;br /&gt;
|-&lt;br /&gt;
|get_feedback&lt;br /&gt;
|-&lt;br /&gt;
|get_files&lt;br /&gt;
|-&lt;br /&gt;
|get_four_node_cycles&lt;br /&gt;
|-&lt;br /&gt;
|fullname&lt;br /&gt;
|-&lt;br /&gt;
|get_metareviews&lt;br /&gt;
|-&lt;br /&gt;
|name&lt;br /&gt;
|-&lt;br /&gt;
|name&lt;br /&gt;
|- &lt;br /&gt;
|get_review_score&lt;br /&gt;
|-&lt;br /&gt;
|get_reviewees&lt;br /&gt;
|-&lt;br /&gt;
|get_reviewers&lt;br /&gt;
|-&lt;br /&gt;
|get_reviews&lt;br /&gt;
|-&lt;br /&gt;
|get_reviews_by_reviewer&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Comparison between Capistrano/Vlad/Heroku/AppFog/OpenShift/Cloud66/AWS Beanstalk =&lt;br /&gt;
&lt;br /&gt;
With so many automated tools available for Code Deployment and Release Management, the decision on which to use for a particular Ruby on rails application depends on various parameters to be considered.&lt;br /&gt;
Some comparative features of the different tools are as follows :&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;width:9%;&amp;quot;|Criteria for Comparision&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;|Capistrano&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;| Vlad&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;| Heroku&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;| AppFog&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;| OpenShift&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;| Cloud66&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;| AWS Beanstalk&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
|'''''Getting started with the tool'''''&lt;br /&gt;
|It is a framework that allows one to execute commands on a remote server using tools like ssh.&lt;br /&gt;
|Vlad deployment is similar to Capistrano, but less complex.&lt;br /&gt;
|Heroku’s offers a plan with first dyno free i.e. 512 MB that can be paired with Postgres starter DB to start an application with 0 initial cost&lt;br /&gt;
|AppFog’s initial plan offers 2GB of RAM free which is enough for small to medium traffic applications. By managing options provided for DB, queue server, application server, etc all part of the intial package, this is an excellent option to try out an application&lt;br /&gt;
|OpenShift is an open source platform and its free plan for starters has 3 gears for free wherein each gear consists of some RAM and disk space.&lt;br /&gt;
|Free plan provides one server for deployment.&lt;br /&gt;
|Provides an initial free tier. Without free tier no additional cost for Beanstalk. One only needs to pay for the AWS resources used.&lt;br /&gt;
|-&lt;br /&gt;
|'''''Scaling Memory'''''&lt;br /&gt;
|Memory increase would require additional servers/unused space in existing ones.&lt;br /&gt;
|Memory increase depends on additional servers available/unused space in existing ones.&lt;br /&gt;
|Memory increased in terms of dyno each of size 512 MB.&lt;br /&gt;
|Can configure any size for memory allocation&lt;br /&gt;
| -&lt;br /&gt;
| -&lt;br /&gt;
|Can automatically up/down scale the application by adjusting the default auto scaling settings.&lt;br /&gt;
|-&lt;br /&gt;
|'''''Scaling – Cost and Ease'''''&lt;br /&gt;
|While this provides greater flexibility as user is in control of the servers, it also causes additional overhead in terms of user needing to work both on Rails application and web server deployment.&lt;br /&gt;
|It can be integrated with Rake without any hindrances.&lt;br /&gt;
|Can dynamically scale up and down an application and pay as per hourly usages. Each additional dyno costs $35/mo&lt;br /&gt;
|Scaling takes up some time and need to pay for a month at the minimum. Scaling up to 4GB increases cost to $100/mo&lt;br /&gt;
| -&lt;br /&gt;
|Scaling using Cloud66 is relatively easy and hassle free.&lt;br /&gt;
|Scaling is fast and easy.&lt;br /&gt;
|-&lt;br /&gt;
|'''''Special features'''''&lt;br /&gt;
|For sensitive applications where handing over the control to a third party for deployment is not feasible, Capistrano is the way to go.&lt;br /&gt;
|It also provides support for tools like rsync and ssh.&lt;br /&gt;
|Lacks support for cross region deployment i.e. can’t select location of server where application gets deployed&lt;br /&gt;
|Supports cross region deployment i.e. if users of application primarily in Asia, can choose a server in Asia to deploy application, thus making the site faster.&lt;br /&gt;
| -&lt;br /&gt;
| -&lt;br /&gt;
|Provides complete flexibility and control of the resources to the user including the chance to take over control of some or all.&lt;br /&gt;
|-&lt;br /&gt;
|'''''Database support'''''&lt;br /&gt;
|Provides support for DB related to rails applications&lt;br /&gt;
|Provides support for DB related to rails applications&lt;br /&gt;
|It features serious production DB like RDBMS, Postgres, etc. and many Addons such as MongoDB, ClearDB, etc.&lt;br /&gt;
|Features free shared databases such as MongoDB, MySQL, Postgres but for other production DB’s need to use Addons&lt;br /&gt;
|Databases featured are MySQL, MongoDB and Postgres&lt;br /&gt;
| -&lt;br /&gt;
|Supports DB like Amazon SimpleDB, Amazon RDS, Amazon DynamoDB.&lt;br /&gt;
|-&lt;br /&gt;
|'''''Deployment strategy'''''&lt;br /&gt;
|Capistrano provides commands to be executed for automated deployment. It supports git.&lt;br /&gt;
|It is much easier to deploy using Vlad as compared to Capistrano.&lt;br /&gt;
|Deployment as easy as ‘git push’&lt;br /&gt;
|Deployment does not support git. It uses the af tool for deployment.&lt;br /&gt;
| -&lt;br /&gt;
|Since Cloud66 provides the platform in terms of Application Stack Management as a Service, it uses the infrastructure of AWS, Virtual Private Server, etc. for actual deployment. But the user doesn’t have to worry about configuration or monitoring of the servers. Hence provides easy deployment.&lt;br /&gt;
|Deployment options include Git, AWS management console, etc.&lt;br /&gt;
|-&lt;br /&gt;
|'''''Community Support availability'''''&lt;br /&gt;
| As it has been in use for a long time there is a huge community support available for Capistrano.&lt;br /&gt;
| -&lt;br /&gt;
|Heroku also provides a huge community support given the fact that there are a lot of Heroku users.&lt;br /&gt;
|Community is limited.&lt;br /&gt;
|RedHat being a reputed provider for open source solutions, the OpenShift community is gradually increasing and receiving support from a considerable community of users.&lt;br /&gt;
|Limited community support currently&lt;br /&gt;
|Has community forums and documentation.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Conclusion =&lt;br /&gt;
&lt;br /&gt;
Comparison and contrast between various deployment automated tools such as Capistrano, Heroku, Vlad, AppFog, OpenShift, Cloud66, AWS Beanstalk shows that each has its own pros and cons. &lt;br /&gt;
For instance, in a client based application where handing over the control of the application to a third party such as the deployment tool provider is impossible, AWS Beanstalk would be the obvious choice for the developer.&lt;br /&gt;
On the other hand, a novice Rails application developer might find all he needs in the starter plan of Heroku with the added bonus of a huge support community available to him for troubleshooting as he stumbles his way across the development of the application.&lt;br /&gt;
One may also choose the tool that provides the specific database support for your application. In case of large scale corporations where budgets are not that limited, the increasing costs with up-scaling of some tools would not be an obstacle.&lt;br /&gt;
Thus, various considerations about the application such as scalability requirement, security concerns, cost, availability of own resources such as servers etc., will help determine which tool is the most suitable for that application.&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= See Also =&lt;br /&gt;
&lt;br /&gt;
* Rails Solutions: Ruby on Rails Made Easy by Justin Williams&lt;br /&gt;
* http://guides.beanstalkapp.com/deployments/best-practices.html&lt;br /&gt;
* http://www.urbancode.com/anthill3-help-3.7/html/SettingUpDeploymentProcess.html&lt;br /&gt;
* http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=UseFMSGateway_3.html&lt;br /&gt;
* http://pic.dhe.ibm.com/infocenter/tivihelp/v26r1/index.jsp?topic=%2Fcom.ibm.dtm.doc%2Fdeploysoftware%2Fc_deploysw_process.html&lt;/div&gt;</summary>
		<author><name>Npari</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch2_0e808_nsv&amp;diff=80933</id>
		<title>CSC/ECE 517 Fall 2013/ch2 0e808 nsv</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch2_0e808_nsv&amp;diff=80933"/>
		<updated>2013-10-30T18:10:59Z</updated>

		<summary type="html">&lt;p&gt;Npari: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= E808: Refactor and test Participant, AssignmentParticipant, &amp;amp; CourseParticipant =&lt;br /&gt;
&lt;br /&gt;
Code Deployment or [http://en.wikipedia.org/wiki/Software_deployment Software Deployment] and [http://en.wikipedia.org/wiki/Release_management Release management] with [http://en.wikipedia.org/wiki/Ruby_on_Rails Ruby on Rails] can be done using various tools such as [http://en.wikipedia.org/wiki/Capistrano Capistrano], [http://en.wikipedia.org/wiki/Heroku Heroku], AppFog, OpenShift, AWS, Cloud 66, Vlad, etc. These automated tools are frameworks used to write and execute commands in parallel remote machines and thus ease the process of deployment and management of various applications.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
= Introduction =&lt;br /&gt;
&lt;br /&gt;
The Deploying process involves different stages like development, testing, release management and sign-off by project teams.&lt;br /&gt;
&lt;br /&gt;
The following diagram illustrates the deployment process of an application.&lt;br /&gt;
&lt;br /&gt;
[[File:Deployment Process.jpg|frame|center|&amp;lt;ref&amp;gt;http://technet.microsoft.com/en-us/library/cc465178.aspx&amp;lt;/ref&amp;gt;]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The deployment flow has three stages: development and testing, release management and stakeholders and project teams. &lt;br /&gt;
&lt;br /&gt;
After the final release of the code in development and testing stage, the master plan is prepared for deployment of components and sites based on the sign-offs provided by the project teams, stakeholders and customers. Then, the stabilization of the deployment is calculated based on some metrics. Once the deployment is stabilized, it is reviewed and the process of deployment is complete. The final sign-off is given by the stakeholders.&lt;br /&gt;
&lt;br /&gt;
==Code Deployment==&lt;br /&gt;
&lt;br /&gt;
Code deployment is a procedure where the application is transferred onto a production server, so that it is made available for all the other users. It is the part of release management process which involves several activities. These activities are inter-dependent and need to be completed in a specific order for successful code deployment. &lt;br /&gt;
&lt;br /&gt;
'''Code Deployment Activities'''&lt;br /&gt;
&lt;br /&gt;
The various deployment activities include &amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/Software_deployment&amp;lt;/ref&amp;gt;&lt;br /&gt;
* Release : Gathering all system components in preparation for deployment&lt;br /&gt;
* Install and activate : Installing the application components and getting them in the 'ready' state&lt;br /&gt;
* Deactivate : Shutting down components that are out-dated or that may interfere with updating others&lt;br /&gt;
* Adapt : Making changes to application to accommodate changes in environment&lt;br /&gt;
* Update : Having a newer release installed in place of the old one&lt;br /&gt;
* Built-in : There are components built-into some tools for complete/semi-automating updates&lt;br /&gt;
* Version tracking : These systems help the user to know if newer versions of a software are available and if yes, help install them&lt;br /&gt;
* Uninstall : Opposite of installation and involves complete removal of software and its dependencies from the environment&lt;br /&gt;
* Retire : This involves making a software obsolete and is the end of software life cycle&lt;br /&gt;
&lt;br /&gt;
The general guidelines for the deployment process remain the same but there are variations in the specific requirements with each software system.&lt;br /&gt;
&lt;br /&gt;
==Release Management==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ref&amp;gt;http://searchitchannel.techtarget.com/definition/release-management&amp;lt;/ref&amp;gt;&lt;br /&gt;
Release management is a software process which takes care of the development, testing, deployment and support stages of software releases. The start of release management happens in the development phase, where it requests for new features or changes in the existing application. When the request is accepted, a new release is planned and designed. This design is built and then enters the testing phase, where the release is tested until it is accepted. After the release is accepted as a candidate, it enters the deployment phase where it is implemented. Once deployed, the release is made available and sent to support phase for collection of bug reports. Once the support phase is done, the bugs and other issues lead to requests for changes and the cycle is then repeated.&lt;br /&gt;
&lt;br /&gt;
= Automating Code Deployment and Release Management =&lt;br /&gt;
&amp;lt;ref&amp;gt;http://www.urbancode.com/html/solutions/deployment-automation.html&amp;lt;/ref&amp;gt;&lt;br /&gt;
Automation of a process is required when the manual process is more error prone. Also, for large real world applications, the manual process is very complex and time consuming. Incomplete documentation hampers a manual process further. Deployment also has to be done in many environments and involves varied steps to be followed in a specific order. Manual process needs repetition of same procedure to each and every environment which leads to many errors and the process becomes costly.&lt;br /&gt;
In web applications each new release has to be deployed to and tested in development, testing and production environments.The number of software releases in web applications  are more and hence the need to automate release management is also greater.&lt;br /&gt;
&lt;br /&gt;
Automation of deployment delivers applications faster and with fewer errors. The defined software deployment process can be applied across all environments consistently every time. With various automated application deployment platforms now readily available, manual deployments have become a thing of the past.&lt;br /&gt;
&lt;br /&gt;
Lets take a look at the various Deployment Automation tools available to Ruby on Rails applications. For the purposes of this article the process of manual deployment of a Ruby on Rails application is out of scope.&lt;br /&gt;
&lt;br /&gt;
= Deployment Automation tools =&lt;br /&gt;
&lt;br /&gt;
Some of the automated tools that are widely used for the process of deployment with Ruby on Rails are &lt;br /&gt;
&lt;br /&gt;
* Capistrano&lt;br /&gt;
* Heroku&lt;br /&gt;
* Vlad&lt;br /&gt;
* AppFog&lt;br /&gt;
* AWS Elastic Beanstalk&lt;br /&gt;
* OpenShift&lt;br /&gt;
* Cloud 66&lt;br /&gt;
&lt;br /&gt;
== Capistrano ==&lt;br /&gt;
&lt;br /&gt;
[[File:Capistrano.jpg|frame|right|&amp;lt;ref&amp;gt;http://www.capistranorb.com/&amp;lt;/ref&amp;gt;|Capistrano Logo]]&lt;br /&gt;
&lt;br /&gt;
Capistrano is a Ruby tool which helps deploy an application to the server. Capistrano allows deploying to multiple machines at a time. It has many advanced options which help to deploy different kinds of applications. It also supports the scripting and execution of tasks.&lt;br /&gt;
&lt;br /&gt;
Capistrano can be used to:&lt;br /&gt;
&lt;br /&gt;
* Deploy applications onto many machines simultaneously.&lt;br /&gt;
* Automate the audits&lt;br /&gt;
* Automate the common tasks of a team.&lt;br /&gt;
&lt;br /&gt;
Capistrano can be made a part of a larger software by integrating it with another Ruby software.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ref&amp;gt;http://www.capistranorb.com/documentation/getting-started/installation/&amp;lt;/ref&amp;gt;  &lt;br /&gt;
'''General Usage'''&lt;br /&gt;
&lt;br /&gt;
The following commands will clone Capistrano, build the gem and install it locally.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem install capistrano --pre --trust-policy HighSecurity&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Or grab the bleeding edge head from:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ git clone -b v3 https://github.com/capistrano/capistrano.git&lt;br /&gt;
$ cd capistrano&lt;br /&gt;
$ gem build *.gemspec&lt;br /&gt;
$ gem install *.gem&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
'''Signed Rubygems'''&lt;br /&gt;
&lt;br /&gt;
As Capistrano is a signed gem, you should always be careful to use the --trust-policy flag when installing Gems, or since Bundler 1.3 you should use the same flag:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem install capistrano --pre --trust-policy HighSecurity&lt;br /&gt;
$ bundle install --trust-policy HighSecurity&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If you get a message that looks like:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ERROR:  While executing gem ... (Gem::Security::Exception)&lt;br /&gt;
unsigned gems are not allowed by the High Security policy&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then please complain to your Gem author, and have them start signing their Gems.&lt;br /&gt;
&lt;br /&gt;
'''Usage in a Rails project'''&lt;br /&gt;
&lt;br /&gt;
Add the following lines to the Gemfile to the :development group ideally.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
group :development do&lt;br /&gt;
  gem 'capistrano-rails', '~&amp;gt; 0.0.7'&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Heroku ==&lt;br /&gt;
&lt;br /&gt;
[[File:Heroku.jpg|frame|right|&amp;lt;ref&amp;gt;https://www.heroku.com/&amp;lt;/ref&amp;gt;|Heroku Logo]]&lt;br /&gt;
&lt;br /&gt;
Heroku is a cloud [http://en.wikipedia.org/wiki/Platform_as_a_service Platform as a Service] (PaaS) which supports several programming languages. PaaS is a service model of Cloud computing wherein the provider offers resources like servers, software, database, etc. to the developer. Heroku helps manage environment-specific configurations separately from the source code, which provides greater security.&lt;br /&gt;
Heroku is not just a deployment environment but it also impacts the development process. There are several principles of the development of application on Heroku.&amp;lt;br&amp;gt;&lt;br /&gt;
•	Applications and Codebases : Most of the development of the application is done on application’s codebase which is stored in a [http://en.wikipedia.org/wiki/Version_control_system Version Control System (VCS)] &amp;lt;br&amp;gt;&lt;br /&gt;
•	Dependencies : All the application dependencies such as plugins should be declared explicitly&amp;lt;br&amp;gt;&lt;br /&gt;
•	Configuration : Configuration of an application is all that varies in different deploys&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Getting Started with Heroku'''&lt;br /&gt;
&lt;br /&gt;
1. To get started with Heroku, go to https://id.heroku.com/signup/devcenter, signup for a Heroku account. &lt;br /&gt;
&lt;br /&gt;
2. Then, download and install the Heroku toolbelt at https://toolbelt.heroku.com/ for your development system. You can also use Heroku command line instead of the online Heroku application. &lt;br /&gt;
&lt;br /&gt;
3. After installing one of them, login using the email address and password used when creating the Heroku account:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ref&amp;gt;https://github.com/heroku/heroku&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ heroku login&lt;br /&gt;
Enter your Heroku credentials.&lt;br /&gt;
Email: adam@example.com&lt;br /&gt;
Password:&lt;br /&gt;
Could not find an existing public key.&lt;br /&gt;
Would you like to generate one? [Yn]&lt;br /&gt;
Generating new SSH public key.&lt;br /&gt;
Uploading SSH public key /Users/adam/.ssh/id_rsa.pub&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Deploying Applications'''&lt;br /&gt;
&lt;br /&gt;
Heroku uses [http://en.wikipedia.org/wiki/Git_(software) git] primarily to deploy the applications. When an application is created on Heroku, it associates the new git which is remote with the local git repository.&lt;br /&gt;
&lt;br /&gt;
As a result, deploying code is just the familiar git push, but to the heroku remote instead:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ref&amp;gt;https://devcenter.heroku.com/articles/how-heroku-works#deploying-applications&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ git push heroku master&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Vlad ==&lt;br /&gt;
&lt;br /&gt;
[[File:Vlad.png|frame|right|&amp;lt;ref&amp;gt;http://rubyhitsquad.com/Vlad_the_Deployer.html&amp;lt;/ref&amp;gt;|Vlad Logo]]&lt;br /&gt;
&lt;br /&gt;
Vlad is another automated deployment tool which is simple to use. It integrates with rake and uses standard tools like SSH, rsync etc.&lt;br /&gt;
&lt;br /&gt;
The main features of Vlad include&lt;br /&gt;
* It uses very few dependencies which are simple.&lt;br /&gt;
* It can execute commands on more than one server.&lt;br /&gt;
* It syncs files to one or more servers.&lt;br /&gt;
* It matches local and remote tasks.&lt;br /&gt;
* It runs tests very fast.&lt;br /&gt;
&lt;br /&gt;
'''Getting started with Vlad'''&amp;lt;ref&amp;gt;http://docs.seattlerb.org/vlad/doco/getting_started_txt.html&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create a deploy file, usually in “config/deploy.rb”:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set :application, &amp;quot;project&amp;quot;&lt;br /&gt;
set :domain, &amp;quot;example.com&amp;quot;&lt;br /&gt;
set :deploy_to, &amp;quot;/path/to/install&amp;quot;&lt;br /&gt;
set :repository, 'http://svn.example.com/project/branches/stable/'&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This defaults to using ‘svn export’ from repository, and a single server for app, db, and www.&lt;br /&gt;
&lt;br /&gt;
If you want a multi-config environment, change your config like so:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set :application, &amp;quot;project&amp;quot;&lt;br /&gt;
set :repository, 'http://svn.example.com/project/branches/stable/'&lt;br /&gt;
&lt;br /&gt;
task :beta do&lt;br /&gt;
  set :domain,    &amp;quot;beta.example.com&amp;quot;&lt;br /&gt;
  set :deploy_to, &amp;quot;/path/to/install-beta&amp;quot;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
task :dev do&lt;br /&gt;
  set :domain,    &amp;quot;dev.example.com&amp;quot;&lt;br /&gt;
  set :deploy_to, &amp;quot;/path/to/install-dev&amp;quot;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
task :prod do&lt;br /&gt;
  set :domain,    &amp;quot;example.com&amp;quot;&lt;br /&gt;
  set :deploy_to, &amp;quot;/path/to/install&amp;quot;&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Add the following to your Rakefile:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
begin&lt;br /&gt;
  require 'vlad'&lt;br /&gt;
  Vlad.load&lt;br /&gt;
rescue LoadError&lt;br /&gt;
  # do nothing&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Vlad.load has a lot of flexibility.&lt;br /&gt;
&lt;br /&gt;
You can install vlad via:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;% rake vlad:invoke COMMAND='sudo gem install vlad -y'&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Initial Launch&lt;br /&gt;
&amp;lt;pre&amp;gt;Run rake vlad:setup vlad:update vlad:migrate vlad:start&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ref&amp;gt;http://docs.seattlerb.org/vlad/index.html&amp;lt;/ref&amp;gt;&lt;br /&gt;
'''Running Vlad'''&lt;br /&gt;
&lt;br /&gt;
* Using rake&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
task :shazam! do&lt;br /&gt;
  Rake::Task[:action1].invoke&lt;br /&gt;
  Rake::Task[:action2].invoke&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Using SSH&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Host example.com&lt;br /&gt;
    User fluffy_bunny&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== AppFog == &lt;br /&gt;
&lt;br /&gt;
[[File:AppFog.jpg|frame|right|&amp;lt;ref&amp;gt;https://www.appfog.com/&amp;lt;/ref&amp;gt;|AppFog Logo]]&lt;br /&gt;
&lt;br /&gt;
AppFog is a PaaS built on Cloud Foundry which is another PaaS platform for deploying applications. &lt;br /&gt;
&lt;br /&gt;
Features of AppFog are&lt;br /&gt;
* It launches and runs fast.&lt;br /&gt;
* It does not require configuring servers or installing frameworks.&lt;br /&gt;
* It is compatible with code management systems like git, svn etc.&lt;br /&gt;
&lt;br /&gt;
'''Installing AppFog'''&amp;lt;ref&amp;gt;http://blog.appfog.com/getting-started-with-appfogs-command-line/&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
‘af‘ command line tool is written in Ruby for installation.&lt;br /&gt;
&lt;br /&gt;
Download and install [http://rubyinstaller.org/ Ruby Installer] for Windows. The installer already includes RubyGems.&lt;br /&gt;
&lt;br /&gt;
Be sure you use the Ruby-enabled command prompt window when you later install and use af. You access this command prompt from the Windows Start menu (All Programs &amp;gt; Ruby &amp;gt; Start Command Prompt with Ruby).&lt;br /&gt;
&lt;br /&gt;
Finally, update RubyGems from the Ruby Command Prompt:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem update --system&lt;br /&gt;
$ gem install af&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Login with:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ af login&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Finally from within your source code directory:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ af update hello-node&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Getting Started with AppFog'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
target [url]                                       Reports current target or sets a new target&lt;br /&gt;
login [email] [--email, --password]                Login&lt;br /&gt;
info                                               System and account information&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== AWS Elastic Beanstalk==&lt;br /&gt;
&lt;br /&gt;
[[File:AWSLogo.jpg|frame|right|&amp;lt;ref&amp;gt;https://aws.amazon.com&amp;lt;/ref&amp;gt;|AWS Logo]]&lt;br /&gt;
&lt;br /&gt;
Amazon Wen Services(AWS) offers [http://en.wikipedia.org/wiki/Infrastructure_as_a_service#Infrastructure_as_a_service_.28IaaS.29 Infrastructure as a Service] (IaaS) and provides a complete set of resources for the development of a web application in minutes. AWS Elastic Beanstalk is a deployment tool of the AWS cloud.&lt;br /&gt;
&lt;br /&gt;
With AWS Elastic Beanstalk, applications can be quickly deployed and managed in the AWS cloud without worrying about the infrastructure that runs those applications. AWS Elastic Beanstalk reduces management complexity without restricting choice or control. Once the application is uploaded AWS Elastic Beanstalk automatically handles the details of capacity provisioning, load balancing, scaling, and application health monitoring. AWS Elastic Beanstalk uses highly reliable and scalable services.&lt;br /&gt;
&lt;br /&gt;
'''AWS CLI'''&lt;br /&gt;
&lt;br /&gt;
AWS Elastic Beanstalk uses a command line tool Eb, which helps you to deploy your application easily.&lt;br /&gt;
&lt;br /&gt;
'''Getting Started with Eb'''&amp;lt;ref&amp;gt;http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/command-reference-get-started.html&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To get started with the beanstalk CLI, you will need to download the command line tools at the [http://aws.amazon.com/code/6752709412171743 AWS Sample Code &amp;amp; Libraries] website.&lt;br /&gt;
&lt;br /&gt;
Step 1: Initialize Your Git Repository&lt;br /&gt;
&lt;br /&gt;
Eb is a command line interface that enables you to deploy applications quickly and more easily using Git. Eb is available as part of the Elastic Beanstalk command line tools package. &lt;br /&gt;
&lt;br /&gt;
1. To install eb,install the following software onto your local computer:&lt;br /&gt;
&lt;br /&gt;
* Git 1.6.6 or later. To download Git, go to http://git-scm.com/.&lt;br /&gt;
* PowerShell 2.0.&lt;br /&gt;
&lt;br /&gt;
2. Initialize your Git repository.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git init &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Step 2: Configuring AWS Elastic Beanstalk&lt;br /&gt;
&lt;br /&gt;
1. From your directory where you created your local repository, type the following command.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
eb init&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2. When you are prompted for the access key ID, type your access key ID. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Enter your AWS Access Key ID (current value is &amp;quot;AKIAIOSFODNN7EXAMPLE&amp;quot;): &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3. When you are prompted for the secret access key, type your secret access key.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Enter your AWS Secret Access Key (current value is &amp;quot;wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY&amp;quot;): &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
4. When you are prompted for the AWS Elastic Beanstalk application name, type the name of the application. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Enter an AWS Elastic Beanstalk application name (auto-generated value is &amp;quot;windows&amp;quot;): &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Note:&lt;br /&gt;
If you have a space in your application name, make sure you do not use quotes.&lt;br /&gt;
&lt;br /&gt;
5. When you are prompted for the AWS Elastic Beanstalk environment name, type the name of the environment. AWS Elastic Beanstalk automatically creates an environment name based on your application name. If you want to accept the default, press Enter.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Enter an AWS Elastic Beanstalk environment name (current value is &amp;quot;HelloWorld-env&amp;quot;): &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
6. When you are prompted to create an Amazon RDS DB instance, type y or n. For this example, we'll type y.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Create an RDS DB Instance? [y/n]:&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
7. When you are prompted to enter your RDS user master password, type your password containing from 8 to 16 printable ASCII characters (excluding /, \, and @).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Enter an RDS DB master password: &lt;br /&gt;
Retype password to confirm: &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can now get started with the AWS Elastic Beanstalk.&lt;br /&gt;
&lt;br /&gt;
== OpenShift ==&lt;br /&gt;
&lt;br /&gt;
[[File:OpenShift.png|frame|right|&amp;lt;ref&amp;gt;https://en.wikipedia.org&amp;lt;/ref&amp;gt;|OpenShift Logo]]&lt;br /&gt;
&lt;br /&gt;
Another free and open source PaaS for deploying applications is OpenShift created by [[http://en.wikipedia.org/wiki/RedHat RedHat]]. &lt;br /&gt;
&lt;br /&gt;
'''Considerations'''&lt;br /&gt;
* Databases&lt;br /&gt;
&lt;br /&gt;
To use the application outside the OpenShift environment one needs to change the variables as the application is configured to use database in production mode in OpenShift.&lt;br /&gt;
&lt;br /&gt;
* Assets&lt;br /&gt;
&lt;br /&gt;
The assets are precompiled everytime application is pushed to OpenShift.&lt;br /&gt;
&lt;br /&gt;
* Security&lt;br /&gt;
&lt;br /&gt;
Security related variables are to be unique across the application.&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;ref&amp;gt;https://github.com/openshift/rails-example&amp;lt;/ref&amp;gt;&lt;br /&gt;
'''Installation'''&lt;br /&gt;
&lt;br /&gt;
1.	Create an account at http://openshift.redhat.com/&lt;br /&gt;
&lt;br /&gt;
2.	Create a rails application&lt;br /&gt;
	&amp;lt;pre&amp;gt;rhc app create -a railsapp -t ruby-1.9&amp;lt;/pre&amp;gt;&lt;br /&gt;
3.	Add mysql support to your application&lt;br /&gt;
	&amp;lt;pre&amp;gt;rhc cartridge add -a railsapp -c mysql-5.1&amp;lt;/pre&amp;gt;&lt;br /&gt;
4.	Add this upstream Rails quickstart repository&lt;br /&gt;
&amp;lt;pre&amp;gt;cd railsapp&lt;br /&gt;
git remote add upstream -m master git://github.com/openshift/rails-example.git&lt;br /&gt;
git pull -s recursive -X theirs upstream master&amp;lt;/pre&amp;gt;&lt;br /&gt;
5.	Push your new code&lt;br /&gt;
&amp;lt;pre&amp;gt;git push&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Cloud 66 ==&lt;br /&gt;
&lt;br /&gt;
[[File:Cloud 66.jpg|frame|right|&amp;lt;ref&amp;gt;https://www.cloud66.com/&amp;lt;/ref&amp;gt;|Cloud66 Logo]]&lt;br /&gt;
&lt;br /&gt;
Cloud 66 combines the convenience of Platform-as-a-Service (PaaS) and the flexibility and control of Infrastructure-as-a-Service (IaaS). This platform allows easy deployment of application, so there is no overhead of configuring or monitoring the servers.&lt;br /&gt;
&lt;br /&gt;
'''Cloud 66 Command line Toolbelt'''&lt;br /&gt;
&lt;br /&gt;
Toolbelt is an open source released to deploy the application.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ref&amp;gt;http://blog.cloud66.com/&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Getting Started with Cloud 66'''&lt;br /&gt;
&lt;br /&gt;
1. Go to the [https://www.cloud66.com/users/sign_up sign up] page and create a Cloud 66 account.&lt;br /&gt;
&lt;br /&gt;
2. Go to Cloud 66 Dashboard and [https://www.cloud66.com/help/first_stack build your first stack].&lt;br /&gt;
&lt;br /&gt;
'''Installation'''&lt;br /&gt;
&lt;br /&gt;
Installation of toolbelt uses the following command&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Gem install c66&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This automatically searches the newest version and installs it.&lt;br /&gt;
&lt;br /&gt;
= Model Class : assignment_participant.rb =&lt;br /&gt;
This class is a subclass of the model class named 'participant'.Several methods in this model class required refactoring. The names were changed to follow method naming convention. Deprecated code was removed and re-coded as needed. Duplicated methods were commented. Some of the methods were moved to the parent class while some other were moved to a new class.  &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;width:9%;&amp;quot;|S. No&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;|Method Name&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;|Change Made &lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;|Reason For Change&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
|''''' 1 '''''&lt;br /&gt;
|get_course_string&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Comparison between Capistrano/Vlad/Heroku/AppFog/OpenShift/Cloud66/AWS Beanstalk =&lt;br /&gt;
&lt;br /&gt;
With so many automated tools available for Code Deployment and Release Management, the decision on which to use for a particular Ruby on rails application depends on various parameters to be considered.&lt;br /&gt;
Some comparative features of the different tools are as follows :&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;width:9%;&amp;quot;|Criteria for Comparision&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;|Capistrano&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;| Vlad&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;| Heroku&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;| AppFog&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;| OpenShift&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;| Cloud66&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;| AWS Beanstalk&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
|'''''Getting started with the tool'''''&lt;br /&gt;
|It is a framework that allows one to execute commands on a remote server using tools like ssh.&lt;br /&gt;
|Vlad deployment is similar to Capistrano, but less complex.&lt;br /&gt;
|Heroku’s offers a plan with first dyno free i.e. 512 MB that can be paired with Postgres starter DB to start an application with 0 initial cost&lt;br /&gt;
|AppFog’s initial plan offers 2GB of RAM free which is enough for small to medium traffic applications. By managing options provided for DB, queue server, application server, etc all part of the intial package, this is an excellent option to try out an application&lt;br /&gt;
|OpenShift is an open source platform and its free plan for starters has 3 gears for free wherein each gear consists of some RAM and disk space.&lt;br /&gt;
|Free plan provides one server for deployment.&lt;br /&gt;
|Provides an initial free tier. Without free tier no additional cost for Beanstalk. One only needs to pay for the AWS resources used.&lt;br /&gt;
|-&lt;br /&gt;
|'''''Scaling Memory'''''&lt;br /&gt;
|Memory increase would require additional servers/unused space in existing ones.&lt;br /&gt;
|Memory increase depends on additional servers available/unused space in existing ones.&lt;br /&gt;
|Memory increased in terms of dyno each of size 512 MB.&lt;br /&gt;
|Can configure any size for memory allocation&lt;br /&gt;
| -&lt;br /&gt;
| -&lt;br /&gt;
|Can automatically up/down scale the application by adjusting the default auto scaling settings.&lt;br /&gt;
|-&lt;br /&gt;
|'''''Scaling – Cost and Ease'''''&lt;br /&gt;
|While this provides greater flexibility as user is in control of the servers, it also causes additional overhead in terms of user needing to work both on Rails application and web server deployment.&lt;br /&gt;
|It can be integrated with Rake without any hindrances.&lt;br /&gt;
|Can dynamically scale up and down an application and pay as per hourly usages. Each additional dyno costs $35/mo&lt;br /&gt;
|Scaling takes up some time and need to pay for a month at the minimum. Scaling up to 4GB increases cost to $100/mo&lt;br /&gt;
| -&lt;br /&gt;
|Scaling using Cloud66 is relatively easy and hassle free.&lt;br /&gt;
|Scaling is fast and easy.&lt;br /&gt;
|-&lt;br /&gt;
|'''''Special features'''''&lt;br /&gt;
|For sensitive applications where handing over the control to a third party for deployment is not feasible, Capistrano is the way to go.&lt;br /&gt;
|It also provides support for tools like rsync and ssh.&lt;br /&gt;
|Lacks support for cross region deployment i.e. can’t select location of server where application gets deployed&lt;br /&gt;
|Supports cross region deployment i.e. if users of application primarily in Asia, can choose a server in Asia to deploy application, thus making the site faster.&lt;br /&gt;
| -&lt;br /&gt;
| -&lt;br /&gt;
|Provides complete flexibility and control of the resources to the user including the chance to take over control of some or all.&lt;br /&gt;
|-&lt;br /&gt;
|'''''Database support'''''&lt;br /&gt;
|Provides support for DB related to rails applications&lt;br /&gt;
|Provides support for DB related to rails applications&lt;br /&gt;
|It features serious production DB like RDBMS, Postgres, etc. and many Addons such as MongoDB, ClearDB, etc.&lt;br /&gt;
|Features free shared databases such as MongoDB, MySQL, Postgres but for other production DB’s need to use Addons&lt;br /&gt;
|Databases featured are MySQL, MongoDB and Postgres&lt;br /&gt;
| -&lt;br /&gt;
|Supports DB like Amazon SimpleDB, Amazon RDS, Amazon DynamoDB.&lt;br /&gt;
|-&lt;br /&gt;
|'''''Deployment strategy'''''&lt;br /&gt;
|Capistrano provides commands to be executed for automated deployment. It supports git.&lt;br /&gt;
|It is much easier to deploy using Vlad as compared to Capistrano.&lt;br /&gt;
|Deployment as easy as ‘git push’&lt;br /&gt;
|Deployment does not support git. It uses the af tool for deployment.&lt;br /&gt;
| -&lt;br /&gt;
|Since Cloud66 provides the platform in terms of Application Stack Management as a Service, it uses the infrastructure of AWS, Virtual Private Server, etc. for actual deployment. But the user doesn’t have to worry about configuration or monitoring of the servers. Hence provides easy deployment.&lt;br /&gt;
|Deployment options include Git, AWS management console, etc.&lt;br /&gt;
|-&lt;br /&gt;
|'''''Community Support availability'''''&lt;br /&gt;
| As it has been in use for a long time there is a huge community support available for Capistrano.&lt;br /&gt;
| -&lt;br /&gt;
|Heroku also provides a huge community support given the fact that there are a lot of Heroku users.&lt;br /&gt;
|Community is limited.&lt;br /&gt;
|RedHat being a reputed provider for open source solutions, the OpenShift community is gradually increasing and receiving support from a considerable community of users.&lt;br /&gt;
|Limited community support currently&lt;br /&gt;
|Has community forums and documentation.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Conclusion =&lt;br /&gt;
&lt;br /&gt;
Comparison and contrast between various deployment automated tools such as Capistrano, Heroku, Vlad, AppFog, OpenShift, Cloud66, AWS Beanstalk shows that each has its own pros and cons. &lt;br /&gt;
For instance, in a client based application where handing over the control of the application to a third party such as the deployment tool provider is impossible, AWS Beanstalk would be the obvious choice for the developer.&lt;br /&gt;
On the other hand, a novice Rails application developer might find all he needs in the starter plan of Heroku with the added bonus of a huge support community available to him for troubleshooting as he stumbles his way across the development of the application.&lt;br /&gt;
One may also choose the tool that provides the specific database support for your application. In case of large scale corporations where budgets are not that limited, the increasing costs with up-scaling of some tools would not be an obstacle.&lt;br /&gt;
Thus, various considerations about the application such as scalability requirement, security concerns, cost, availability of own resources such as servers etc., will help determine which tool is the most suitable for that application.&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= See Also =&lt;br /&gt;
&lt;br /&gt;
* Rails Solutions: Ruby on Rails Made Easy by Justin Williams&lt;br /&gt;
* http://guides.beanstalkapp.com/deployments/best-practices.html&lt;br /&gt;
* http://www.urbancode.com/anthill3-help-3.7/html/SettingUpDeploymentProcess.html&lt;br /&gt;
* http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=UseFMSGateway_3.html&lt;br /&gt;
* http://pic.dhe.ibm.com/infocenter/tivihelp/v26r1/index.jsp?topic=%2Fcom.ibm.dtm.doc%2Fdeploysoftware%2Fc_deploysw_process.html&lt;/div&gt;</summary>
		<author><name>Npari</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch2_0e808_nsv&amp;diff=80919</id>
		<title>CSC/ECE 517 Fall 2013/ch2 0e808 nsv</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch2_0e808_nsv&amp;diff=80919"/>
		<updated>2013-10-30T17:57:38Z</updated>

		<summary type="html">&lt;p&gt;Npari: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= E808: Refactor and test Participant, AssignmentParticipant, &amp;amp; CourseParticipant =&lt;br /&gt;
&lt;br /&gt;
Code Deployment or [http://en.wikipedia.org/wiki/Software_deployment Software Deployment] and [http://en.wikipedia.org/wiki/Release_management Release management] with [http://en.wikipedia.org/wiki/Ruby_on_Rails Ruby on Rails] can be done using various tools such as [http://en.wikipedia.org/wiki/Capistrano Capistrano], [http://en.wikipedia.org/wiki/Heroku Heroku], AppFog, OpenShift, AWS, Cloud 66, Vlad, etc. These automated tools are frameworks used to write and execute commands in parallel remote machines and thus ease the process of deployment and management of various applications.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
= Introduction =&lt;br /&gt;
&lt;br /&gt;
The Deploying process involves different stages like development, testing, release management and sign-off by project teams.&lt;br /&gt;
&lt;br /&gt;
The following diagram illustrates the deployment process of an application.&lt;br /&gt;
&lt;br /&gt;
[[File:Deployment Process.jpg|frame|center|&amp;lt;ref&amp;gt;http://technet.microsoft.com/en-us/library/cc465178.aspx&amp;lt;/ref&amp;gt;]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The deployment flow has three stages: development and testing, release management and stakeholders and project teams. &lt;br /&gt;
&lt;br /&gt;
After the final release of the code in development and testing stage, the master plan is prepared for deployment of components and sites based on the sign-offs provided by the project teams, stakeholders and customers. Then, the stabilization of the deployment is calculated based on some metrics. Once the deployment is stabilized, it is reviewed and the process of deployment is complete. The final sign-off is given by the stakeholders.&lt;br /&gt;
&lt;br /&gt;
==Code Deployment==&lt;br /&gt;
&lt;br /&gt;
Code deployment is a procedure where the application is transferred onto a production server, so that it is made available for all the other users. It is the part of release management process which involves several activities. These activities are inter-dependent and need to be completed in a specific order for successful code deployment. &lt;br /&gt;
&lt;br /&gt;
'''Code Deployment Activities'''&lt;br /&gt;
&lt;br /&gt;
The various deployment activities include &amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/Software_deployment&amp;lt;/ref&amp;gt;&lt;br /&gt;
* Release : Gathering all system components in preparation for deployment&lt;br /&gt;
* Install and activate : Installing the application components and getting them in the 'ready' state&lt;br /&gt;
* Deactivate : Shutting down components that are out-dated or that may interfere with updating others&lt;br /&gt;
* Adapt : Making changes to application to accommodate changes in environment&lt;br /&gt;
* Update : Having a newer release installed in place of the old one&lt;br /&gt;
* Built-in : There are components built-into some tools for complete/semi-automating updates&lt;br /&gt;
* Version tracking : These systems help the user to know if newer versions of a software are available and if yes, help install them&lt;br /&gt;
* Uninstall : Opposite of installation and involves complete removal of software and its dependencies from the environment&lt;br /&gt;
* Retire : This involves making a software obsolete and is the end of software life cycle&lt;br /&gt;
&lt;br /&gt;
The general guidelines for the deployment process remain the same but there are variations in the specific requirements with each software system.&lt;br /&gt;
&lt;br /&gt;
==Release Management==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ref&amp;gt;http://searchitchannel.techtarget.com/definition/release-management&amp;lt;/ref&amp;gt;&lt;br /&gt;
Release management is a software process which takes care of the development, testing, deployment and support stages of software releases. The start of release management happens in the development phase, where it requests for new features or changes in the existing application. When the request is accepted, a new release is planned and designed. This design is built and then enters the testing phase, where the release is tested until it is accepted. After the release is accepted as a candidate, it enters the deployment phase where it is implemented. Once deployed, the release is made available and sent to support phase for collection of bug reports. Once the support phase is done, the bugs and other issues lead to requests for changes and the cycle is then repeated.&lt;br /&gt;
&lt;br /&gt;
= Automating Code Deployment and Release Management =&lt;br /&gt;
&amp;lt;ref&amp;gt;http://www.urbancode.com/html/solutions/deployment-automation.html&amp;lt;/ref&amp;gt;&lt;br /&gt;
Automation of a process is required when the manual process is more error prone. Also, for large real world applications, the manual process is very complex and time consuming. Incomplete documentation hampers a manual process further. Deployment also has to be done in many environments and involves varied steps to be followed in a specific order. Manual process needs repetition of same procedure to each and every environment which leads to many errors and the process becomes costly.&lt;br /&gt;
In web applications each new release has to be deployed to and tested in development, testing and production environments.The number of software releases in web applications  are more and hence the need to automate release management is also greater.&lt;br /&gt;
&lt;br /&gt;
Automation of deployment delivers applications faster and with fewer errors. The defined software deployment process can be applied across all environments consistently every time. With various automated application deployment platforms now readily available, manual deployments have become a thing of the past.&lt;br /&gt;
&lt;br /&gt;
Lets take a look at the various Deployment Automation tools available to Ruby on Rails applications. For the purposes of this article the process of manual deployment of a Ruby on Rails application is out of scope.&lt;br /&gt;
&lt;br /&gt;
= Deployment Automation tools =&lt;br /&gt;
&lt;br /&gt;
Some of the automated tools that are widely used for the process of deployment with Ruby on Rails are &lt;br /&gt;
&lt;br /&gt;
* Capistrano&lt;br /&gt;
* Heroku&lt;br /&gt;
* Vlad&lt;br /&gt;
* AppFog&lt;br /&gt;
* AWS Elastic Beanstalk&lt;br /&gt;
* OpenShift&lt;br /&gt;
* Cloud 66&lt;br /&gt;
&lt;br /&gt;
== Capistrano ==&lt;br /&gt;
&lt;br /&gt;
[[File:Capistrano.jpg|frame|right|&amp;lt;ref&amp;gt;http://www.capistranorb.com/&amp;lt;/ref&amp;gt;|Capistrano Logo]]&lt;br /&gt;
&lt;br /&gt;
Capistrano is a Ruby tool which helps deploy an application to the server. Capistrano allows deploying to multiple machines at a time. It has many advanced options which help to deploy different kinds of applications. It also supports the scripting and execution of tasks.&lt;br /&gt;
&lt;br /&gt;
Capistrano can be used to:&lt;br /&gt;
&lt;br /&gt;
* Deploy applications onto many machines simultaneously.&lt;br /&gt;
* Automate the audits&lt;br /&gt;
* Automate the common tasks of a team.&lt;br /&gt;
&lt;br /&gt;
Capistrano can be made a part of a larger software by integrating it with another Ruby software.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ref&amp;gt;http://www.capistranorb.com/documentation/getting-started/installation/&amp;lt;/ref&amp;gt;  &lt;br /&gt;
'''General Usage'''&lt;br /&gt;
&lt;br /&gt;
The following commands will clone Capistrano, build the gem and install it locally.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem install capistrano --pre --trust-policy HighSecurity&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Or grab the bleeding edge head from:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ git clone -b v3 https://github.com/capistrano/capistrano.git&lt;br /&gt;
$ cd capistrano&lt;br /&gt;
$ gem build *.gemspec&lt;br /&gt;
$ gem install *.gem&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
'''Signed Rubygems'''&lt;br /&gt;
&lt;br /&gt;
As Capistrano is a signed gem, you should always be careful to use the --trust-policy flag when installing Gems, or since Bundler 1.3 you should use the same flag:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem install capistrano --pre --trust-policy HighSecurity&lt;br /&gt;
$ bundle install --trust-policy HighSecurity&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If you get a message that looks like:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ERROR:  While executing gem ... (Gem::Security::Exception)&lt;br /&gt;
unsigned gems are not allowed by the High Security policy&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then please complain to your Gem author, and have them start signing their Gems.&lt;br /&gt;
&lt;br /&gt;
'''Usage in a Rails project'''&lt;br /&gt;
&lt;br /&gt;
Add the following lines to the Gemfile to the :development group ideally.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
group :development do&lt;br /&gt;
  gem 'capistrano-rails', '~&amp;gt; 0.0.7'&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Heroku ==&lt;br /&gt;
&lt;br /&gt;
[[File:Heroku.jpg|frame|right|&amp;lt;ref&amp;gt;https://www.heroku.com/&amp;lt;/ref&amp;gt;|Heroku Logo]]&lt;br /&gt;
&lt;br /&gt;
Heroku is a cloud [http://en.wikipedia.org/wiki/Platform_as_a_service Platform as a Service] (PaaS) which supports several programming languages. PaaS is a service model of Cloud computing wherein the provider offers resources like servers, software, database, etc. to the developer. Heroku helps manage environment-specific configurations separately from the source code, which provides greater security.&lt;br /&gt;
Heroku is not just a deployment environment but it also impacts the development process. There are several principles of the development of application on Heroku.&amp;lt;br&amp;gt;&lt;br /&gt;
•	Applications and Codebases : Most of the development of the application is done on application’s codebase which is stored in a [http://en.wikipedia.org/wiki/Version_control_system Version Control System (VCS)] &amp;lt;br&amp;gt;&lt;br /&gt;
•	Dependencies : All the application dependencies such as plugins should be declared explicitly&amp;lt;br&amp;gt;&lt;br /&gt;
•	Configuration : Configuration of an application is all that varies in different deploys&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Getting Started with Heroku'''&lt;br /&gt;
&lt;br /&gt;
1. To get started with Heroku, go to https://id.heroku.com/signup/devcenter, signup for a Heroku account. &lt;br /&gt;
&lt;br /&gt;
2. Then, download and install the Heroku toolbelt at https://toolbelt.heroku.com/ for your development system. You can also use Heroku command line instead of the online Heroku application. &lt;br /&gt;
&lt;br /&gt;
3. After installing one of them, login using the email address and password used when creating the Heroku account:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ref&amp;gt;https://github.com/heroku/heroku&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ heroku login&lt;br /&gt;
Enter your Heroku credentials.&lt;br /&gt;
Email: adam@example.com&lt;br /&gt;
Password:&lt;br /&gt;
Could not find an existing public key.&lt;br /&gt;
Would you like to generate one? [Yn]&lt;br /&gt;
Generating new SSH public key.&lt;br /&gt;
Uploading SSH public key /Users/adam/.ssh/id_rsa.pub&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Deploying Applications'''&lt;br /&gt;
&lt;br /&gt;
Heroku uses [http://en.wikipedia.org/wiki/Git_(software) git] primarily to deploy the applications. When an application is created on Heroku, it associates the new git which is remote with the local git repository.&lt;br /&gt;
&lt;br /&gt;
As a result, deploying code is just the familiar git push, but to the heroku remote instead:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ref&amp;gt;https://devcenter.heroku.com/articles/how-heroku-works#deploying-applications&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ git push heroku master&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Vlad ==&lt;br /&gt;
&lt;br /&gt;
[[File:Vlad.png|frame|right|&amp;lt;ref&amp;gt;http://rubyhitsquad.com/Vlad_the_Deployer.html&amp;lt;/ref&amp;gt;|Vlad Logo]]&lt;br /&gt;
&lt;br /&gt;
Vlad is another automated deployment tool which is simple to use. It integrates with rake and uses standard tools like SSH, rsync etc.&lt;br /&gt;
&lt;br /&gt;
The main features of Vlad include&lt;br /&gt;
* It uses very few dependencies which are simple.&lt;br /&gt;
* It can execute commands on more than one server.&lt;br /&gt;
* It syncs files to one or more servers.&lt;br /&gt;
* It matches local and remote tasks.&lt;br /&gt;
* It runs tests very fast.&lt;br /&gt;
&lt;br /&gt;
'''Getting started with Vlad'''&amp;lt;ref&amp;gt;http://docs.seattlerb.org/vlad/doco/getting_started_txt.html&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create a deploy file, usually in “config/deploy.rb”:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set :application, &amp;quot;project&amp;quot;&lt;br /&gt;
set :domain, &amp;quot;example.com&amp;quot;&lt;br /&gt;
set :deploy_to, &amp;quot;/path/to/install&amp;quot;&lt;br /&gt;
set :repository, 'http://svn.example.com/project/branches/stable/'&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This defaults to using ‘svn export’ from repository, and a single server for app, db, and www.&lt;br /&gt;
&lt;br /&gt;
If you want a multi-config environment, change your config like so:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set :application, &amp;quot;project&amp;quot;&lt;br /&gt;
set :repository, 'http://svn.example.com/project/branches/stable/'&lt;br /&gt;
&lt;br /&gt;
task :beta do&lt;br /&gt;
  set :domain,    &amp;quot;beta.example.com&amp;quot;&lt;br /&gt;
  set :deploy_to, &amp;quot;/path/to/install-beta&amp;quot;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
task :dev do&lt;br /&gt;
  set :domain,    &amp;quot;dev.example.com&amp;quot;&lt;br /&gt;
  set :deploy_to, &amp;quot;/path/to/install-dev&amp;quot;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
task :prod do&lt;br /&gt;
  set :domain,    &amp;quot;example.com&amp;quot;&lt;br /&gt;
  set :deploy_to, &amp;quot;/path/to/install&amp;quot;&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Add the following to your Rakefile:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
begin&lt;br /&gt;
  require 'vlad'&lt;br /&gt;
  Vlad.load&lt;br /&gt;
rescue LoadError&lt;br /&gt;
  # do nothing&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Vlad.load has a lot of flexibility.&lt;br /&gt;
&lt;br /&gt;
You can install vlad via:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;% rake vlad:invoke COMMAND='sudo gem install vlad -y'&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Initial Launch&lt;br /&gt;
&amp;lt;pre&amp;gt;Run rake vlad:setup vlad:update vlad:migrate vlad:start&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ref&amp;gt;http://docs.seattlerb.org/vlad/index.html&amp;lt;/ref&amp;gt;&lt;br /&gt;
'''Running Vlad'''&lt;br /&gt;
&lt;br /&gt;
* Using rake&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
task :shazam! do&lt;br /&gt;
  Rake::Task[:action1].invoke&lt;br /&gt;
  Rake::Task[:action2].invoke&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Using SSH&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Host example.com&lt;br /&gt;
    User fluffy_bunny&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== AppFog == &lt;br /&gt;
&lt;br /&gt;
[[File:AppFog.jpg|frame|right|&amp;lt;ref&amp;gt;https://www.appfog.com/&amp;lt;/ref&amp;gt;|AppFog Logo]]&lt;br /&gt;
&lt;br /&gt;
AppFog is a PaaS built on Cloud Foundry which is another PaaS platform for deploying applications. &lt;br /&gt;
&lt;br /&gt;
Features of AppFog are&lt;br /&gt;
* It launches and runs fast.&lt;br /&gt;
* It does not require configuring servers or installing frameworks.&lt;br /&gt;
* It is compatible with code management systems like git, svn etc.&lt;br /&gt;
&lt;br /&gt;
'''Installing AppFog'''&amp;lt;ref&amp;gt;http://blog.appfog.com/getting-started-with-appfogs-command-line/&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
‘af‘ command line tool is written in Ruby for installation.&lt;br /&gt;
&lt;br /&gt;
Download and install [http://rubyinstaller.org/ Ruby Installer] for Windows. The installer already includes RubyGems.&lt;br /&gt;
&lt;br /&gt;
Be sure you use the Ruby-enabled command prompt window when you later install and use af. You access this command prompt from the Windows Start menu (All Programs &amp;gt; Ruby &amp;gt; Start Command Prompt with Ruby).&lt;br /&gt;
&lt;br /&gt;
Finally, update RubyGems from the Ruby Command Prompt:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem update --system&lt;br /&gt;
$ gem install af&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Login with:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ af login&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Finally from within your source code directory:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ af update hello-node&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Getting Started with AppFog'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
target [url]                                       Reports current target or sets a new target&lt;br /&gt;
login [email] [--email, --password]                Login&lt;br /&gt;
info                                               System and account information&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== AWS Elastic Beanstalk==&lt;br /&gt;
&lt;br /&gt;
[[File:AWSLogo.jpg|frame|right|&amp;lt;ref&amp;gt;https://aws.amazon.com&amp;lt;/ref&amp;gt;|AWS Logo]]&lt;br /&gt;
&lt;br /&gt;
Amazon Wen Services(AWS) offers [http://en.wikipedia.org/wiki/Infrastructure_as_a_service#Infrastructure_as_a_service_.28IaaS.29 Infrastructure as a Service] (IaaS) and provides a complete set of resources for the development of a web application in minutes. AWS Elastic Beanstalk is a deployment tool of the AWS cloud.&lt;br /&gt;
&lt;br /&gt;
With AWS Elastic Beanstalk, applications can be quickly deployed and managed in the AWS cloud without worrying about the infrastructure that runs those applications. AWS Elastic Beanstalk reduces management complexity without restricting choice or control. Once the application is uploaded AWS Elastic Beanstalk automatically handles the details of capacity provisioning, load balancing, scaling, and application health monitoring. AWS Elastic Beanstalk uses highly reliable and scalable services.&lt;br /&gt;
&lt;br /&gt;
'''AWS CLI'''&lt;br /&gt;
&lt;br /&gt;
AWS Elastic Beanstalk uses a command line tool Eb, which helps you to deploy your application easily.&lt;br /&gt;
&lt;br /&gt;
'''Getting Started with Eb'''&amp;lt;ref&amp;gt;http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/command-reference-get-started.html&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To get started with the beanstalk CLI, you will need to download the command line tools at the [http://aws.amazon.com/code/6752709412171743 AWS Sample Code &amp;amp; Libraries] website.&lt;br /&gt;
&lt;br /&gt;
Step 1: Initialize Your Git Repository&lt;br /&gt;
&lt;br /&gt;
Eb is a command line interface that enables you to deploy applications quickly and more easily using Git. Eb is available as part of the Elastic Beanstalk command line tools package. &lt;br /&gt;
&lt;br /&gt;
1. To install eb,install the following software onto your local computer:&lt;br /&gt;
&lt;br /&gt;
* Git 1.6.6 or later. To download Git, go to http://git-scm.com/.&lt;br /&gt;
* PowerShell 2.0.&lt;br /&gt;
&lt;br /&gt;
2. Initialize your Git repository.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git init &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Step 2: Configuring AWS Elastic Beanstalk&lt;br /&gt;
&lt;br /&gt;
1. From your directory where you created your local repository, type the following command.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
eb init&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2. When you are prompted for the access key ID, type your access key ID. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Enter your AWS Access Key ID (current value is &amp;quot;AKIAIOSFODNN7EXAMPLE&amp;quot;): &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3. When you are prompted for the secret access key, type your secret access key.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Enter your AWS Secret Access Key (current value is &amp;quot;wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY&amp;quot;): &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
4. When you are prompted for the AWS Elastic Beanstalk application name, type the name of the application. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Enter an AWS Elastic Beanstalk application name (auto-generated value is &amp;quot;windows&amp;quot;): &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Note:&lt;br /&gt;
If you have a space in your application name, make sure you do not use quotes.&lt;br /&gt;
&lt;br /&gt;
5. When you are prompted for the AWS Elastic Beanstalk environment name, type the name of the environment. AWS Elastic Beanstalk automatically creates an environment name based on your application name. If you want to accept the default, press Enter.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Enter an AWS Elastic Beanstalk environment name (current value is &amp;quot;HelloWorld-env&amp;quot;): &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
6. When you are prompted to create an Amazon RDS DB instance, type y or n. For this example, we'll type y.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Create an RDS DB Instance? [y/n]:&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
7. When you are prompted to enter your RDS user master password, type your password containing from 8 to 16 printable ASCII characters (excluding /, \, and @).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Enter an RDS DB master password: &lt;br /&gt;
Retype password to confirm: &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can now get started with the AWS Elastic Beanstalk.&lt;br /&gt;
&lt;br /&gt;
== OpenShift ==&lt;br /&gt;
&lt;br /&gt;
[[File:OpenShift.png|frame|right|&amp;lt;ref&amp;gt;https://en.wikipedia.org&amp;lt;/ref&amp;gt;|OpenShift Logo]]&lt;br /&gt;
&lt;br /&gt;
Another free and open source PaaS for deploying applications is OpenShift created by [[http://en.wikipedia.org/wiki/RedHat RedHat]]. &lt;br /&gt;
&lt;br /&gt;
'''Considerations'''&lt;br /&gt;
* Databases&lt;br /&gt;
&lt;br /&gt;
To use the application outside the OpenShift environment one needs to change the variables as the application is configured to use database in production mode in OpenShift.&lt;br /&gt;
&lt;br /&gt;
* Assets&lt;br /&gt;
&lt;br /&gt;
The assets are precompiled everytime application is pushed to OpenShift.&lt;br /&gt;
&lt;br /&gt;
* Security&lt;br /&gt;
&lt;br /&gt;
Security related variables are to be unique across the application.&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;ref&amp;gt;https://github.com/openshift/rails-example&amp;lt;/ref&amp;gt;&lt;br /&gt;
'''Installation'''&lt;br /&gt;
&lt;br /&gt;
1.	Create an account at http://openshift.redhat.com/&lt;br /&gt;
&lt;br /&gt;
2.	Create a rails application&lt;br /&gt;
	&amp;lt;pre&amp;gt;rhc app create -a railsapp -t ruby-1.9&amp;lt;/pre&amp;gt;&lt;br /&gt;
3.	Add mysql support to your application&lt;br /&gt;
	&amp;lt;pre&amp;gt;rhc cartridge add -a railsapp -c mysql-5.1&amp;lt;/pre&amp;gt;&lt;br /&gt;
4.	Add this upstream Rails quickstart repository&lt;br /&gt;
&amp;lt;pre&amp;gt;cd railsapp&lt;br /&gt;
git remote add upstream -m master git://github.com/openshift/rails-example.git&lt;br /&gt;
git pull -s recursive -X theirs upstream master&amp;lt;/pre&amp;gt;&lt;br /&gt;
5.	Push your new code&lt;br /&gt;
&amp;lt;pre&amp;gt;git push&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Cloud 66 ==&lt;br /&gt;
&lt;br /&gt;
[[File:Cloud 66.jpg|frame|right|&amp;lt;ref&amp;gt;https://www.cloud66.com/&amp;lt;/ref&amp;gt;|Cloud66 Logo]]&lt;br /&gt;
&lt;br /&gt;
Cloud 66 combines the convenience of Platform-as-a-Service (PaaS) and the flexibility and control of Infrastructure-as-a-Service (IaaS). This platform allows easy deployment of application, so there is no overhead of configuring or monitoring the servers.&lt;br /&gt;
&lt;br /&gt;
'''Cloud 66 Command line Toolbelt'''&lt;br /&gt;
&lt;br /&gt;
Toolbelt is an open source released to deploy the application.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ref&amp;gt;http://blog.cloud66.com/&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Getting Started with Cloud 66'''&lt;br /&gt;
&lt;br /&gt;
1. Go to the [https://www.cloud66.com/users/sign_up sign up] page and create a Cloud 66 account.&lt;br /&gt;
&lt;br /&gt;
2. Go to Cloud 66 Dashboard and [https://www.cloud66.com/help/first_stack build your first stack].&lt;br /&gt;
&lt;br /&gt;
'''Installation'''&lt;br /&gt;
&lt;br /&gt;
Installation of toolbelt uses the following command&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Gem install c66&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This automatically searches the newest version and installs it.&lt;br /&gt;
&lt;br /&gt;
= Model Class : assignment_participant.rb =&lt;br /&gt;
This class is a subclass of the model class named 'participant'.Several methods in this model class required refactoring. The names were changed to follow method naming convention. Deprecated code was removed and re-coded as needed. Duplicated methods were commented. Some of the methods were moved to the parent class while some other were moved to a new class.  &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;width:9%;&amp;quot;|S. No&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;|Method Name&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;|Change Made &lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;|Reason For Change&lt;br /&gt;
|''''' 1 '''''&lt;br /&gt;
|get_course_string&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Comparison between Capistrano/Vlad/Heroku/AppFog/OpenShift/Cloud66/AWS Beanstalk =&lt;br /&gt;
&lt;br /&gt;
With so many automated tools available for Code Deployment and Release Management, the decision on which to use for a particular Ruby on rails application depends on various parameters to be considered.&lt;br /&gt;
Some comparative features of the different tools are as follows :&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;width:9%;&amp;quot;|Criteria for Comparision&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;|Capistrano&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;| Vlad&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;| Heroku&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;| AppFog&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;| OpenShift&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;| Cloud66&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;| AWS Beanstalk&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
|'''''Getting started with the tool'''''&lt;br /&gt;
|It is a framework that allows one to execute commands on a remote server using tools like ssh.&lt;br /&gt;
|Vlad deployment is similar to Capistrano, but less complex.&lt;br /&gt;
|Heroku’s offers a plan with first dyno free i.e. 512 MB that can be paired with Postgres starter DB to start an application with 0 initial cost&lt;br /&gt;
|AppFog’s initial plan offers 2GB of RAM free which is enough for small to medium traffic applications. By managing options provided for DB, queue server, application server, etc all part of the intial package, this is an excellent option to try out an application&lt;br /&gt;
|OpenShift is an open source platform and its free plan for starters has 3 gears for free wherein each gear consists of some RAM and disk space.&lt;br /&gt;
|Free plan provides one server for deployment.&lt;br /&gt;
|Provides an initial free tier. Without free tier no additional cost for Beanstalk. One only needs to pay for the AWS resources used.&lt;br /&gt;
|-&lt;br /&gt;
|'''''Scaling Memory'''''&lt;br /&gt;
|Memory increase would require additional servers/unused space in existing ones.&lt;br /&gt;
|Memory increase depends on additional servers available/unused space in existing ones.&lt;br /&gt;
|Memory increased in terms of dyno each of size 512 MB.&lt;br /&gt;
|Can configure any size for memory allocation&lt;br /&gt;
| -&lt;br /&gt;
| -&lt;br /&gt;
|Can automatically up/down scale the application by adjusting the default auto scaling settings.&lt;br /&gt;
|-&lt;br /&gt;
|'''''Scaling – Cost and Ease'''''&lt;br /&gt;
|While this provides greater flexibility as user is in control of the servers, it also causes additional overhead in terms of user needing to work both on Rails application and web server deployment.&lt;br /&gt;
|It can be integrated with Rake without any hindrances.&lt;br /&gt;
|Can dynamically scale up and down an application and pay as per hourly usages. Each additional dyno costs $35/mo&lt;br /&gt;
|Scaling takes up some time and need to pay for a month at the minimum. Scaling up to 4GB increases cost to $100/mo&lt;br /&gt;
| -&lt;br /&gt;
|Scaling using Cloud66 is relatively easy and hassle free.&lt;br /&gt;
|Scaling is fast and easy.&lt;br /&gt;
|-&lt;br /&gt;
|'''''Special features'''''&lt;br /&gt;
|For sensitive applications where handing over the control to a third party for deployment is not feasible, Capistrano is the way to go.&lt;br /&gt;
|It also provides support for tools like rsync and ssh.&lt;br /&gt;
|Lacks support for cross region deployment i.e. can’t select location of server where application gets deployed&lt;br /&gt;
|Supports cross region deployment i.e. if users of application primarily in Asia, can choose a server in Asia to deploy application, thus making the site faster.&lt;br /&gt;
| -&lt;br /&gt;
| -&lt;br /&gt;
|Provides complete flexibility and control of the resources to the user including the chance to take over control of some or all.&lt;br /&gt;
|-&lt;br /&gt;
|'''''Database support'''''&lt;br /&gt;
|Provides support for DB related to rails applications&lt;br /&gt;
|Provides support for DB related to rails applications&lt;br /&gt;
|It features serious production DB like RDBMS, Postgres, etc. and many Addons such as MongoDB, ClearDB, etc.&lt;br /&gt;
|Features free shared databases such as MongoDB, MySQL, Postgres but for other production DB’s need to use Addons&lt;br /&gt;
|Databases featured are MySQL, MongoDB and Postgres&lt;br /&gt;
| -&lt;br /&gt;
|Supports DB like Amazon SimpleDB, Amazon RDS, Amazon DynamoDB.&lt;br /&gt;
|-&lt;br /&gt;
|'''''Deployment strategy'''''&lt;br /&gt;
|Capistrano provides commands to be executed for automated deployment. It supports git.&lt;br /&gt;
|It is much easier to deploy using Vlad as compared to Capistrano.&lt;br /&gt;
|Deployment as easy as ‘git push’&lt;br /&gt;
|Deployment does not support git. It uses the af tool for deployment.&lt;br /&gt;
| -&lt;br /&gt;
|Since Cloud66 provides the platform in terms of Application Stack Management as a Service, it uses the infrastructure of AWS, Virtual Private Server, etc. for actual deployment. But the user doesn’t have to worry about configuration or monitoring of the servers. Hence provides easy deployment.&lt;br /&gt;
|Deployment options include Git, AWS management console, etc.&lt;br /&gt;
|-&lt;br /&gt;
|'''''Community Support availability'''''&lt;br /&gt;
| As it has been in use for a long time there is a huge community support available for Capistrano.&lt;br /&gt;
| -&lt;br /&gt;
|Heroku also provides a huge community support given the fact that there are a lot of Heroku users.&lt;br /&gt;
|Community is limited.&lt;br /&gt;
|RedHat being a reputed provider for open source solutions, the OpenShift community is gradually increasing and receiving support from a considerable community of users.&lt;br /&gt;
|Limited community support currently&lt;br /&gt;
|Has community forums and documentation.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Conclusion =&lt;br /&gt;
&lt;br /&gt;
Comparison and contrast between various deployment automated tools such as Capistrano, Heroku, Vlad, AppFog, OpenShift, Cloud66, AWS Beanstalk shows that each has its own pros and cons. &lt;br /&gt;
For instance, in a client based application where handing over the control of the application to a third party such as the deployment tool provider is impossible, AWS Beanstalk would be the obvious choice for the developer.&lt;br /&gt;
On the other hand, a novice Rails application developer might find all he needs in the starter plan of Heroku with the added bonus of a huge support community available to him for troubleshooting as he stumbles his way across the development of the application.&lt;br /&gt;
One may also choose the tool that provides the specific database support for your application. In case of large scale corporations where budgets are not that limited, the increasing costs with up-scaling of some tools would not be an obstacle.&lt;br /&gt;
Thus, various considerations about the application such as scalability requirement, security concerns, cost, availability of own resources such as servers etc., will help determine which tool is the most suitable for that application.&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= See Also =&lt;br /&gt;
&lt;br /&gt;
* Rails Solutions: Ruby on Rails Made Easy by Justin Williams&lt;br /&gt;
* http://guides.beanstalkapp.com/deployments/best-practices.html&lt;br /&gt;
* http://www.urbancode.com/anthill3-help-3.7/html/SettingUpDeploymentProcess.html&lt;br /&gt;
* http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=UseFMSGateway_3.html&lt;br /&gt;
* http://pic.dhe.ibm.com/infocenter/tivihelp/v26r1/index.jsp?topic=%2Fcom.ibm.dtm.doc%2Fdeploysoftware%2Fc_deploysw_process.html&lt;/div&gt;</summary>
		<author><name>Npari</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch2_0e808_nsv&amp;diff=80912</id>
		<title>CSC/ECE 517 Fall 2013/ch2 0e808 nsv</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch2_0e808_nsv&amp;diff=80912"/>
		<updated>2013-10-30T17:56:31Z</updated>

		<summary type="html">&lt;p&gt;Npari: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= E808: Refactor and test Participant, AssignmentParticipant, &amp;amp; CourseParticipant =&lt;br /&gt;
&lt;br /&gt;
Code Deployment or [http://en.wikipedia.org/wiki/Software_deployment Software Deployment] and [http://en.wikipedia.org/wiki/Release_management Release management] with [http://en.wikipedia.org/wiki/Ruby_on_Rails Ruby on Rails] can be done using various tools such as [http://en.wikipedia.org/wiki/Capistrano Capistrano], [http://en.wikipedia.org/wiki/Heroku Heroku], AppFog, OpenShift, AWS, Cloud 66, Vlad, etc. These automated tools are frameworks used to write and execute commands in parallel remote machines and thus ease the process of deployment and management of various applications.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
= Introduction =&lt;br /&gt;
&lt;br /&gt;
The Deploying process involves different stages like development, testing, release management and sign-off by project teams.&lt;br /&gt;
&lt;br /&gt;
The following diagram illustrates the deployment process of an application.&lt;br /&gt;
&lt;br /&gt;
[[File:Deployment Process.jpg|frame|center|&amp;lt;ref&amp;gt;http://technet.microsoft.com/en-us/library/cc465178.aspx&amp;lt;/ref&amp;gt;]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The deployment flow has three stages: development and testing, release management and stakeholders and project teams. &lt;br /&gt;
&lt;br /&gt;
After the final release of the code in development and testing stage, the master plan is prepared for deployment of components and sites based on the sign-offs provided by the project teams, stakeholders and customers. Then, the stabilization of the deployment is calculated based on some metrics. Once the deployment is stabilized, it is reviewed and the process of deployment is complete. The final sign-off is given by the stakeholders.&lt;br /&gt;
&lt;br /&gt;
==Code Deployment==&lt;br /&gt;
&lt;br /&gt;
Code deployment is a procedure where the application is transferred onto a production server, so that it is made available for all the other users. It is the part of release management process which involves several activities. These activities are inter-dependent and need to be completed in a specific order for successful code deployment. &lt;br /&gt;
&lt;br /&gt;
'''Code Deployment Activities'''&lt;br /&gt;
&lt;br /&gt;
The various deployment activities include &amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/Software_deployment&amp;lt;/ref&amp;gt;&lt;br /&gt;
* Release : Gathering all system components in preparation for deployment&lt;br /&gt;
* Install and activate : Installing the application components and getting them in the 'ready' state&lt;br /&gt;
* Deactivate : Shutting down components that are out-dated or that may interfere with updating others&lt;br /&gt;
* Adapt : Making changes to application to accommodate changes in environment&lt;br /&gt;
* Update : Having a newer release installed in place of the old one&lt;br /&gt;
* Built-in : There are components built-into some tools for complete/semi-automating updates&lt;br /&gt;
* Version tracking : These systems help the user to know if newer versions of a software are available and if yes, help install them&lt;br /&gt;
* Uninstall : Opposite of installation and involves complete removal of software and its dependencies from the environment&lt;br /&gt;
* Retire : This involves making a software obsolete and is the end of software life cycle&lt;br /&gt;
&lt;br /&gt;
The general guidelines for the deployment process remain the same but there are variations in the specific requirements with each software system.&lt;br /&gt;
&lt;br /&gt;
==Release Management==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ref&amp;gt;http://searchitchannel.techtarget.com/definition/release-management&amp;lt;/ref&amp;gt;&lt;br /&gt;
Release management is a software process which takes care of the development, testing, deployment and support stages of software releases. The start of release management happens in the development phase, where it requests for new features or changes in the existing application. When the request is accepted, a new release is planned and designed. This design is built and then enters the testing phase, where the release is tested until it is accepted. After the release is accepted as a candidate, it enters the deployment phase where it is implemented. Once deployed, the release is made available and sent to support phase for collection of bug reports. Once the support phase is done, the bugs and other issues lead to requests for changes and the cycle is then repeated.&lt;br /&gt;
&lt;br /&gt;
= Automating Code Deployment and Release Management =&lt;br /&gt;
&amp;lt;ref&amp;gt;http://www.urbancode.com/html/solutions/deployment-automation.html&amp;lt;/ref&amp;gt;&lt;br /&gt;
Automation of a process is required when the manual process is more error prone. Also, for large real world applications, the manual process is very complex and time consuming. Incomplete documentation hampers a manual process further. Deployment also has to be done in many environments and involves varied steps to be followed in a specific order. Manual process needs repetition of same procedure to each and every environment which leads to many errors and the process becomes costly.&lt;br /&gt;
In web applications each new release has to be deployed to and tested in development, testing and production environments.The number of software releases in web applications  are more and hence the need to automate release management is also greater.&lt;br /&gt;
&lt;br /&gt;
Automation of deployment delivers applications faster and with fewer errors. The defined software deployment process can be applied across all environments consistently every time. With various automated application deployment platforms now readily available, manual deployments have become a thing of the past.&lt;br /&gt;
&lt;br /&gt;
Lets take a look at the various Deployment Automation tools available to Ruby on Rails applications. For the purposes of this article the process of manual deployment of a Ruby on Rails application is out of scope.&lt;br /&gt;
&lt;br /&gt;
= Deployment Automation tools =&lt;br /&gt;
&lt;br /&gt;
Some of the automated tools that are widely used for the process of deployment with Ruby on Rails are &lt;br /&gt;
&lt;br /&gt;
* Capistrano&lt;br /&gt;
* Heroku&lt;br /&gt;
* Vlad&lt;br /&gt;
* AppFog&lt;br /&gt;
* AWS Elastic Beanstalk&lt;br /&gt;
* OpenShift&lt;br /&gt;
* Cloud 66&lt;br /&gt;
&lt;br /&gt;
== Capistrano ==&lt;br /&gt;
&lt;br /&gt;
[[File:Capistrano.jpg|frame|right|&amp;lt;ref&amp;gt;http://www.capistranorb.com/&amp;lt;/ref&amp;gt;|Capistrano Logo]]&lt;br /&gt;
&lt;br /&gt;
Capistrano is a Ruby tool which helps deploy an application to the server. Capistrano allows deploying to multiple machines at a time. It has many advanced options which help to deploy different kinds of applications. It also supports the scripting and execution of tasks.&lt;br /&gt;
&lt;br /&gt;
Capistrano can be used to:&lt;br /&gt;
&lt;br /&gt;
* Deploy applications onto many machines simultaneously.&lt;br /&gt;
* Automate the audits&lt;br /&gt;
* Automate the common tasks of a team.&lt;br /&gt;
&lt;br /&gt;
Capistrano can be made a part of a larger software by integrating it with another Ruby software.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ref&amp;gt;http://www.capistranorb.com/documentation/getting-started/installation/&amp;lt;/ref&amp;gt;  &lt;br /&gt;
'''General Usage'''&lt;br /&gt;
&lt;br /&gt;
The following commands will clone Capistrano, build the gem and install it locally.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem install capistrano --pre --trust-policy HighSecurity&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Or grab the bleeding edge head from:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ git clone -b v3 https://github.com/capistrano/capistrano.git&lt;br /&gt;
$ cd capistrano&lt;br /&gt;
$ gem build *.gemspec&lt;br /&gt;
$ gem install *.gem&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
'''Signed Rubygems'''&lt;br /&gt;
&lt;br /&gt;
As Capistrano is a signed gem, you should always be careful to use the --trust-policy flag when installing Gems, or since Bundler 1.3 you should use the same flag:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem install capistrano --pre --trust-policy HighSecurity&lt;br /&gt;
$ bundle install --trust-policy HighSecurity&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If you get a message that looks like:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ERROR:  While executing gem ... (Gem::Security::Exception)&lt;br /&gt;
unsigned gems are not allowed by the High Security policy&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then please complain to your Gem author, and have them start signing their Gems.&lt;br /&gt;
&lt;br /&gt;
'''Usage in a Rails project'''&lt;br /&gt;
&lt;br /&gt;
Add the following lines to the Gemfile to the :development group ideally.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
group :development do&lt;br /&gt;
  gem 'capistrano-rails', '~&amp;gt; 0.0.7'&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Heroku ==&lt;br /&gt;
&lt;br /&gt;
[[File:Heroku.jpg|frame|right|&amp;lt;ref&amp;gt;https://www.heroku.com/&amp;lt;/ref&amp;gt;|Heroku Logo]]&lt;br /&gt;
&lt;br /&gt;
Heroku is a cloud [http://en.wikipedia.org/wiki/Platform_as_a_service Platform as a Service] (PaaS) which supports several programming languages. PaaS is a service model of Cloud computing wherein the provider offers resources like servers, software, database, etc. to the developer. Heroku helps manage environment-specific configurations separately from the source code, which provides greater security.&lt;br /&gt;
Heroku is not just a deployment environment but it also impacts the development process. There are several principles of the development of application on Heroku.&amp;lt;br&amp;gt;&lt;br /&gt;
•	Applications and Codebases : Most of the development of the application is done on application’s codebase which is stored in a [http://en.wikipedia.org/wiki/Version_control_system Version Control System (VCS)] &amp;lt;br&amp;gt;&lt;br /&gt;
•	Dependencies : All the application dependencies such as plugins should be declared explicitly&amp;lt;br&amp;gt;&lt;br /&gt;
•	Configuration : Configuration of an application is all that varies in different deploys&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Getting Started with Heroku'''&lt;br /&gt;
&lt;br /&gt;
1. To get started with Heroku, go to https://id.heroku.com/signup/devcenter, signup for a Heroku account. &lt;br /&gt;
&lt;br /&gt;
2. Then, download and install the Heroku toolbelt at https://toolbelt.heroku.com/ for your development system. You can also use Heroku command line instead of the online Heroku application. &lt;br /&gt;
&lt;br /&gt;
3. After installing one of them, login using the email address and password used when creating the Heroku account:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ref&amp;gt;https://github.com/heroku/heroku&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ heroku login&lt;br /&gt;
Enter your Heroku credentials.&lt;br /&gt;
Email: adam@example.com&lt;br /&gt;
Password:&lt;br /&gt;
Could not find an existing public key.&lt;br /&gt;
Would you like to generate one? [Yn]&lt;br /&gt;
Generating new SSH public key.&lt;br /&gt;
Uploading SSH public key /Users/adam/.ssh/id_rsa.pub&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Deploying Applications'''&lt;br /&gt;
&lt;br /&gt;
Heroku uses [http://en.wikipedia.org/wiki/Git_(software) git] primarily to deploy the applications. When an application is created on Heroku, it associates the new git which is remote with the local git repository.&lt;br /&gt;
&lt;br /&gt;
As a result, deploying code is just the familiar git push, but to the heroku remote instead:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ref&amp;gt;https://devcenter.heroku.com/articles/how-heroku-works#deploying-applications&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ git push heroku master&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Vlad ==&lt;br /&gt;
&lt;br /&gt;
[[File:Vlad.png|frame|right|&amp;lt;ref&amp;gt;http://rubyhitsquad.com/Vlad_the_Deployer.html&amp;lt;/ref&amp;gt;|Vlad Logo]]&lt;br /&gt;
&lt;br /&gt;
Vlad is another automated deployment tool which is simple to use. It integrates with rake and uses standard tools like SSH, rsync etc.&lt;br /&gt;
&lt;br /&gt;
The main features of Vlad include&lt;br /&gt;
* It uses very few dependencies which are simple.&lt;br /&gt;
* It can execute commands on more than one server.&lt;br /&gt;
* It syncs files to one or more servers.&lt;br /&gt;
* It matches local and remote tasks.&lt;br /&gt;
* It runs tests very fast.&lt;br /&gt;
&lt;br /&gt;
'''Getting started with Vlad'''&amp;lt;ref&amp;gt;http://docs.seattlerb.org/vlad/doco/getting_started_txt.html&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create a deploy file, usually in “config/deploy.rb”:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set :application, &amp;quot;project&amp;quot;&lt;br /&gt;
set :domain, &amp;quot;example.com&amp;quot;&lt;br /&gt;
set :deploy_to, &amp;quot;/path/to/install&amp;quot;&lt;br /&gt;
set :repository, 'http://svn.example.com/project/branches/stable/'&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This defaults to using ‘svn export’ from repository, and a single server for app, db, and www.&lt;br /&gt;
&lt;br /&gt;
If you want a multi-config environment, change your config like so:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set :application, &amp;quot;project&amp;quot;&lt;br /&gt;
set :repository, 'http://svn.example.com/project/branches/stable/'&lt;br /&gt;
&lt;br /&gt;
task :beta do&lt;br /&gt;
  set :domain,    &amp;quot;beta.example.com&amp;quot;&lt;br /&gt;
  set :deploy_to, &amp;quot;/path/to/install-beta&amp;quot;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
task :dev do&lt;br /&gt;
  set :domain,    &amp;quot;dev.example.com&amp;quot;&lt;br /&gt;
  set :deploy_to, &amp;quot;/path/to/install-dev&amp;quot;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
task :prod do&lt;br /&gt;
  set :domain,    &amp;quot;example.com&amp;quot;&lt;br /&gt;
  set :deploy_to, &amp;quot;/path/to/install&amp;quot;&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Add the following to your Rakefile:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
begin&lt;br /&gt;
  require 'vlad'&lt;br /&gt;
  Vlad.load&lt;br /&gt;
rescue LoadError&lt;br /&gt;
  # do nothing&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Vlad.load has a lot of flexibility.&lt;br /&gt;
&lt;br /&gt;
You can install vlad via:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;% rake vlad:invoke COMMAND='sudo gem install vlad -y'&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Initial Launch&lt;br /&gt;
&amp;lt;pre&amp;gt;Run rake vlad:setup vlad:update vlad:migrate vlad:start&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ref&amp;gt;http://docs.seattlerb.org/vlad/index.html&amp;lt;/ref&amp;gt;&lt;br /&gt;
'''Running Vlad'''&lt;br /&gt;
&lt;br /&gt;
* Using rake&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
task :shazam! do&lt;br /&gt;
  Rake::Task[:action1].invoke&lt;br /&gt;
  Rake::Task[:action2].invoke&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Using SSH&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Host example.com&lt;br /&gt;
    User fluffy_bunny&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== AppFog == &lt;br /&gt;
&lt;br /&gt;
[[File:AppFog.jpg|frame|right|&amp;lt;ref&amp;gt;https://www.appfog.com/&amp;lt;/ref&amp;gt;|AppFog Logo]]&lt;br /&gt;
&lt;br /&gt;
AppFog is a PaaS built on Cloud Foundry which is another PaaS platform for deploying applications. &lt;br /&gt;
&lt;br /&gt;
Features of AppFog are&lt;br /&gt;
* It launches and runs fast.&lt;br /&gt;
* It does not require configuring servers or installing frameworks.&lt;br /&gt;
* It is compatible with code management systems like git, svn etc.&lt;br /&gt;
&lt;br /&gt;
'''Installing AppFog'''&amp;lt;ref&amp;gt;http://blog.appfog.com/getting-started-with-appfogs-command-line/&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
‘af‘ command line tool is written in Ruby for installation.&lt;br /&gt;
&lt;br /&gt;
Download and install [http://rubyinstaller.org/ Ruby Installer] for Windows. The installer already includes RubyGems.&lt;br /&gt;
&lt;br /&gt;
Be sure you use the Ruby-enabled command prompt window when you later install and use af. You access this command prompt from the Windows Start menu (All Programs &amp;gt; Ruby &amp;gt; Start Command Prompt with Ruby).&lt;br /&gt;
&lt;br /&gt;
Finally, update RubyGems from the Ruby Command Prompt:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem update --system&lt;br /&gt;
$ gem install af&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Login with:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ af login&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Finally from within your source code directory:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ af update hello-node&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Getting Started with AppFog'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
target [url]                                       Reports current target or sets a new target&lt;br /&gt;
login [email] [--email, --password]                Login&lt;br /&gt;
info                                               System and account information&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== AWS Elastic Beanstalk==&lt;br /&gt;
&lt;br /&gt;
[[File:AWSLogo.jpg|frame|right|&amp;lt;ref&amp;gt;https://aws.amazon.com&amp;lt;/ref&amp;gt;|AWS Logo]]&lt;br /&gt;
&lt;br /&gt;
Amazon Wen Services(AWS) offers [http://en.wikipedia.org/wiki/Infrastructure_as_a_service#Infrastructure_as_a_service_.28IaaS.29 Infrastructure as a Service] (IaaS) and provides a complete set of resources for the development of a web application in minutes. AWS Elastic Beanstalk is a deployment tool of the AWS cloud.&lt;br /&gt;
&lt;br /&gt;
With AWS Elastic Beanstalk, applications can be quickly deployed and managed in the AWS cloud without worrying about the infrastructure that runs those applications. AWS Elastic Beanstalk reduces management complexity without restricting choice or control. Once the application is uploaded AWS Elastic Beanstalk automatically handles the details of capacity provisioning, load balancing, scaling, and application health monitoring. AWS Elastic Beanstalk uses highly reliable and scalable services.&lt;br /&gt;
&lt;br /&gt;
'''AWS CLI'''&lt;br /&gt;
&lt;br /&gt;
AWS Elastic Beanstalk uses a command line tool Eb, which helps you to deploy your application easily.&lt;br /&gt;
&lt;br /&gt;
'''Getting Started with Eb'''&amp;lt;ref&amp;gt;http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/command-reference-get-started.html&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To get started with the beanstalk CLI, you will need to download the command line tools at the [http://aws.amazon.com/code/6752709412171743 AWS Sample Code &amp;amp; Libraries] website.&lt;br /&gt;
&lt;br /&gt;
Step 1: Initialize Your Git Repository&lt;br /&gt;
&lt;br /&gt;
Eb is a command line interface that enables you to deploy applications quickly and more easily using Git. Eb is available as part of the Elastic Beanstalk command line tools package. &lt;br /&gt;
&lt;br /&gt;
1. To install eb,install the following software onto your local computer:&lt;br /&gt;
&lt;br /&gt;
* Git 1.6.6 or later. To download Git, go to http://git-scm.com/.&lt;br /&gt;
* PowerShell 2.0.&lt;br /&gt;
&lt;br /&gt;
2. Initialize your Git repository.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git init &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Step 2: Configuring AWS Elastic Beanstalk&lt;br /&gt;
&lt;br /&gt;
1. From your directory where you created your local repository, type the following command.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
eb init&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2. When you are prompted for the access key ID, type your access key ID. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Enter your AWS Access Key ID (current value is &amp;quot;AKIAIOSFODNN7EXAMPLE&amp;quot;): &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3. When you are prompted for the secret access key, type your secret access key.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Enter your AWS Secret Access Key (current value is &amp;quot;wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY&amp;quot;): &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
4. When you are prompted for the AWS Elastic Beanstalk application name, type the name of the application. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Enter an AWS Elastic Beanstalk application name (auto-generated value is &amp;quot;windows&amp;quot;): &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Note:&lt;br /&gt;
If you have a space in your application name, make sure you do not use quotes.&lt;br /&gt;
&lt;br /&gt;
5. When you are prompted for the AWS Elastic Beanstalk environment name, type the name of the environment. AWS Elastic Beanstalk automatically creates an environment name based on your application name. If you want to accept the default, press Enter.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Enter an AWS Elastic Beanstalk environment name (current value is &amp;quot;HelloWorld-env&amp;quot;): &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
6. When you are prompted to create an Amazon RDS DB instance, type y or n. For this example, we'll type y.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Create an RDS DB Instance? [y/n]:&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
7. When you are prompted to enter your RDS user master password, type your password containing from 8 to 16 printable ASCII characters (excluding /, \, and @).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Enter an RDS DB master password: &lt;br /&gt;
Retype password to confirm: &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can now get started with the AWS Elastic Beanstalk.&lt;br /&gt;
&lt;br /&gt;
== OpenShift ==&lt;br /&gt;
&lt;br /&gt;
[[File:OpenShift.png|frame|right|&amp;lt;ref&amp;gt;https://en.wikipedia.org&amp;lt;/ref&amp;gt;|OpenShift Logo]]&lt;br /&gt;
&lt;br /&gt;
Another free and open source PaaS for deploying applications is OpenShift created by [[http://en.wikipedia.org/wiki/RedHat RedHat]]. &lt;br /&gt;
&lt;br /&gt;
'''Considerations'''&lt;br /&gt;
* Databases&lt;br /&gt;
&lt;br /&gt;
To use the application outside the OpenShift environment one needs to change the variables as the application is configured to use database in production mode in OpenShift.&lt;br /&gt;
&lt;br /&gt;
* Assets&lt;br /&gt;
&lt;br /&gt;
The assets are precompiled everytime application is pushed to OpenShift.&lt;br /&gt;
&lt;br /&gt;
* Security&lt;br /&gt;
&lt;br /&gt;
Security related variables are to be unique across the application.&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;ref&amp;gt;https://github.com/openshift/rails-example&amp;lt;/ref&amp;gt;&lt;br /&gt;
'''Installation'''&lt;br /&gt;
&lt;br /&gt;
1.	Create an account at http://openshift.redhat.com/&lt;br /&gt;
&lt;br /&gt;
2.	Create a rails application&lt;br /&gt;
	&amp;lt;pre&amp;gt;rhc app create -a railsapp -t ruby-1.9&amp;lt;/pre&amp;gt;&lt;br /&gt;
3.	Add mysql support to your application&lt;br /&gt;
	&amp;lt;pre&amp;gt;rhc cartridge add -a railsapp -c mysql-5.1&amp;lt;/pre&amp;gt;&lt;br /&gt;
4.	Add this upstream Rails quickstart repository&lt;br /&gt;
&amp;lt;pre&amp;gt;cd railsapp&lt;br /&gt;
git remote add upstream -m master git://github.com/openshift/rails-example.git&lt;br /&gt;
git pull -s recursive -X theirs upstream master&amp;lt;/pre&amp;gt;&lt;br /&gt;
5.	Push your new code&lt;br /&gt;
&amp;lt;pre&amp;gt;git push&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Cloud 66 ==&lt;br /&gt;
&lt;br /&gt;
[[File:Cloud 66.jpg|frame|right|&amp;lt;ref&amp;gt;https://www.cloud66.com/&amp;lt;/ref&amp;gt;|Cloud66 Logo]]&lt;br /&gt;
&lt;br /&gt;
Cloud 66 combines the convenience of Platform-as-a-Service (PaaS) and the flexibility and control of Infrastructure-as-a-Service (IaaS). This platform allows easy deployment of application, so there is no overhead of configuring or monitoring the servers.&lt;br /&gt;
&lt;br /&gt;
'''Cloud 66 Command line Toolbelt'''&lt;br /&gt;
&lt;br /&gt;
Toolbelt is an open source released to deploy the application.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ref&amp;gt;http://blog.cloud66.com/&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Getting Started with Cloud 66'''&lt;br /&gt;
&lt;br /&gt;
1. Go to the [https://www.cloud66.com/users/sign_up sign up] page and create a Cloud 66 account.&lt;br /&gt;
&lt;br /&gt;
2. Go to Cloud 66 Dashboard and [https://www.cloud66.com/help/first_stack build your first stack].&lt;br /&gt;
&lt;br /&gt;
'''Installation'''&lt;br /&gt;
&lt;br /&gt;
Installation of toolbelt uses the following command&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Gem install c66&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This automatically searches the newest version and installs it.&lt;br /&gt;
&lt;br /&gt;
= Model Class : assignment_participant.rb =&lt;br /&gt;
This class is a subclass of the model class named 'participant'.Several methods in this model class required refactoring. The names were changed to follow method naming convention. Deprecated code was removed and re-coded as needed. Duplicated methods were commented. Some of the methods were moved to the parent class while some other were moved to a new class.  &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;width:9%;&amp;quot;|S. No&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;|Method Name&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;|Change Made &lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;|Reason For Change&lt;br /&gt;
|''''' 1 '''''&lt;br /&gt;
|get_course_string&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Comparison between Capistrano/Vlad/Heroku/AppFog/OpenShift/Cloud66/AWS Beanstalk =&lt;br /&gt;
&lt;br /&gt;
With so many automated tools available for Code Deployment and Release Management, the decision on which to use for a particular Ruby on rails application depends on various parameters to be considered.&lt;br /&gt;
Some comparative features of the different tools are as follows :&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;width:9%;&amp;quot;|Criteria for Comparision&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;|Capistrano&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;| Vlad&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;| Heroku&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;| AppFog&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;| OpenShift&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;| Cloud66&lt;br /&gt;
! style=&amp;quot;width:13%;&amp;quot;| AWS Beanstalk&lt;br /&gt;
|- style=&amp;quot;vertical-align:top;&amp;quot;&lt;br /&gt;
|'''''Getting started with the tool'''''&lt;br /&gt;
|It is a framework that allows one to execute commands on a remote server using tools like ssh.&lt;br /&gt;
|Vlad deployment is similar to Capistrano, but less complex.&lt;br /&gt;
|Heroku’s offers a plan with first dyno free i.e. 512 MB that can be paired with Postgres starter DB to start an application with 0 initial cost&lt;br /&gt;
|AppFog’s initial plan offers 2GB of RAM free which is enough for small to medium traffic applications. By managing options provided for DB, queue server, application server, etc all part of the intial package, this is an excellent option to try out an application&lt;br /&gt;
|OpenShift is an open source platform and its free plan for starters has 3 gears for free wherein each gear consists of some RAM and disk space.&lt;br /&gt;
|Free plan provides one server for deployment.&lt;br /&gt;
|Provides an initial free tier. Without free tier no additional cost for Beanstalk. One only needs to pay for the AWS resources used.&lt;br /&gt;
|-&lt;br /&gt;
|'''''Scaling Memory'''''&lt;br /&gt;
|Memory increase would require additional servers/unused space in existing ones.&lt;br /&gt;
|Memory increase depends on additional servers available/unused space in existing ones.&lt;br /&gt;
|Memory increased in terms of dyno each of size 512 MB.&lt;br /&gt;
|Can configure any size for memory allocation&lt;br /&gt;
| -&lt;br /&gt;
| -&lt;br /&gt;
|Can automatically up/down scale the application by adjusting the default auto scaling settings.&lt;br /&gt;
|-&lt;br /&gt;
|'''''Scaling – Cost and Ease'''''&lt;br /&gt;
|While this provides greater flexibility as user is in control of the servers, it also causes additional overhead in terms of user needing to work both on Rails application and web server deployment.&lt;br /&gt;
|It can be integrated with Rake without any hindrances.&lt;br /&gt;
|Can dynamically scale up and down an application and pay as per hourly usages. Each additional dyno costs $35/mo&lt;br /&gt;
|Scaling takes up some time and need to pay for a month at the minimum. Scaling up to 4GB increases cost to $100/mo&lt;br /&gt;
| -&lt;br /&gt;
|Scaling using Cloud66 is relatively easy and hassle free.&lt;br /&gt;
|Scaling is fast and easy.&lt;br /&gt;
|-&lt;br /&gt;
|'''''Special features'''''&lt;br /&gt;
|For sensitive applications where handing over the control to a third party for deployment is not feasible, Capistrano is the way to go.&lt;br /&gt;
|It also provides support for tools like rsync and ssh.&lt;br /&gt;
|Lacks support for cross region deployment i.e. can’t select location of server where application gets deployed&lt;br /&gt;
|Supports cross region deployment i.e. if users of application primarily in Asia, can choose a server in Asia to deploy application, thus making the site faster.&lt;br /&gt;
| -&lt;br /&gt;
| -&lt;br /&gt;
|Provides complete flexibility and control of the resources to the user including the chance to take over control of some or all.&lt;br /&gt;
|-&lt;br /&gt;
|'''''Database support'''''&lt;br /&gt;
|Provides support for DB related to rails applications&lt;br /&gt;
|Provides support for DB related to rails applications&lt;br /&gt;
|It features serious production DB like RDBMS, Postgres, etc. and many Addons such as MongoDB, ClearDB, etc.&lt;br /&gt;
|Features free shared databases such as MongoDB, MySQL, Postgres but for other production DB’s need to use Addons&lt;br /&gt;
|Databases featured are MySQL, MongoDB and Postgres&lt;br /&gt;
| -&lt;br /&gt;
|Supports DB like Amazon SimpleDB, Amazon RDS, Amazon DynamoDB.&lt;br /&gt;
|-&lt;br /&gt;
|'''''Deployment strategy'''''&lt;br /&gt;
|Capistrano provides commands to be executed for automated deployment. It supports git.&lt;br /&gt;
|It is much easier to deploy using Vlad as compared to Capistrano.&lt;br /&gt;
|Deployment as easy as ‘git push’&lt;br /&gt;
|Deployment does not support git. It uses the af tool for deployment.&lt;br /&gt;
| -&lt;br /&gt;
|Since Cloud66 provides the platform in terms of Application Stack Management as a Service, it uses the infrastructure of AWS, Virtual Private Server, etc. for actual deployment. But the user doesn’t have to worry about configuration or monitoring of the servers. Hence provides easy deployment.&lt;br /&gt;
|Deployment options include Git, AWS management console, etc.&lt;br /&gt;
|-&lt;br /&gt;
|'''''Community Support availability'''''&lt;br /&gt;
| As it has been in use for a long time there is a huge community support available for Capistrano.&lt;br /&gt;
| -&lt;br /&gt;
|Heroku also provides a huge community support given the fact that there are a lot of Heroku users.&lt;br /&gt;
|Community is limited.&lt;br /&gt;
|RedHat being a reputed provider for open source solutions, the OpenShift community is gradually increasing and receiving support from a considerable community of users.&lt;br /&gt;
|Limited community support currently&lt;br /&gt;
|Has community forums and documentation.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Conclusion =&lt;br /&gt;
&lt;br /&gt;
Comparison and contrast between various deployment automated tools such as Capistrano, Heroku, Vlad, AppFog, OpenShift, Cloud66, AWS Beanstalk shows that each has its own pros and cons. &lt;br /&gt;
For instance, in a client based application where handing over the control of the application to a third party such as the deployment tool provider is impossible, AWS Beanstalk would be the obvious choice for the developer.&lt;br /&gt;
On the other hand, a novice Rails application developer might find all he needs in the starter plan of Heroku with the added bonus of a huge support community available to him for troubleshooting as he stumbles his way across the development of the application.&lt;br /&gt;
One may also choose the tool that provides the specific database support for your application. In case of large scale corporations where budgets are not that limited, the increasing costs with up-scaling of some tools would not be an obstacle.&lt;br /&gt;
Thus, various considerations about the application such as scalability requirement, security concerns, cost, availability of own resources such as servers etc., will help determine which tool is the most suitable for that application.&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= See Also =&lt;br /&gt;
&lt;br /&gt;
* Rails Solutions: Ruby on Rails Made Easy by Justin Williams&lt;br /&gt;
* http://guides.beanstalkapp.com/deployments/best-practices.html&lt;br /&gt;
* http://www.urbancode.com/anthill3-help-3.7/html/SettingUpDeploymentProcess.html&lt;br /&gt;
* http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=UseFMSGateway_3.html&lt;br /&gt;
* http://pic.dhe.ibm.com/infocenter/tivihelp/v26r1/index.jsp?topic=%2Fcom.ibm.dtm.doc%2Fdeploysoftware%2Fc_deploysw_process.html&lt;/div&gt;</summary>
		<author><name>Npari</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch1_1w24_nv&amp;diff=79200</id>
		<title>CSC/ECE 517 Fall 2013/ch1 1w24 nv</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch1_1w24_nv&amp;diff=79200"/>
		<updated>2013-09-25T23:29:20Z</updated>

		<summary type="html">&lt;p&gt;Npari: /* Installing a new Gem */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Ruby Gem is a package manager for Ruby programming language. It allows users to easily download, install and use software packages on their system. The functionality of a Ruby application can be modified or extended with the help of Gems. In the version 1.9 of Ruby, Ruby Gems has been made a part of the standard library. This article would take the user on a tour of what ruby gems are all about and introduce the reader to various Ruby gems one can use to extend a Ruby application. Links for more details on Ruby gems are provided for the reader's benefit at the end of the article. &lt;br /&gt;
&lt;br /&gt;
== '''A Tour of Ruby Gems''' ==&lt;br /&gt;
=== Definition of a Ruby Gem&amp;lt;ref&amp;gt;http://guides.rubygems.org/rubygems-basics/#installing_gems Ruby Gems guide&amp;lt;/ref&amp;gt;===&lt;br /&gt;
In simple terms, a Ruby Gem is a package containing files that can be installed in a system and can help expand the functionality of a Ruby application. Ruby gems are very powerful. Ruby programmers create and publish Ruby Gems as open source in [https://github.com/ github]. It is very easy to install, upgrade and delete Gems in a system.&lt;br /&gt;
&lt;br /&gt;
=== Structure of Ruby Gem ===&lt;br /&gt;
Every Gem has a set of files and the following standard structure &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ tree -d newgem&lt;br /&gt;
|-- lib/&lt;br /&gt;
|   |-- newgem.rb&lt;br /&gt;
|   `-- newgem/&lt;br /&gt;
|       |-- base.rb&lt;br /&gt;
|       `-- version.rb&lt;br /&gt;
|-- test/&lt;br /&gt;
|-- bin/&lt;br /&gt;
|-- Rakefile&lt;br /&gt;
`-- newgem.gemspec&amp;lt;/pre&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
The ''lib'' folder has the code of the ruby gem. It has ''newgem.rb'' file and a folder named ''newgem''. This folder has two files which are ''base.rb'' and ''version.rb''. The version number is recorded in ''version.rb'' and can be changed when the gem is updated. The ''bin'' directory has any binaries that is a part of the gem file and should be distributed with the gem. A gem usually has a [http://rake.rubyforge.org/doc/rakefile_rdoc.html Rakefile]. The rake program uses this to generate code and automate tests in addition to performing other tasks. The Gem specification file ''newgem.gemspec'' contains details specific to the gem. The file has details such as the gem name,the files that are in it, the gems it depends on for  performing testing, the gems it depends on for actually running and other details.&lt;br /&gt;
&lt;br /&gt;
=== Listing existing Gems ===&lt;br /&gt;
To list the existing gems in a system ''list'' keyword can be used in the command line.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem list&lt;br /&gt;
&lt;br /&gt;
*** LOCAL GEMS ***&lt;br /&gt;
&lt;br /&gt;
actionmailer (3.2.3)&lt;br /&gt;
actionpack (3.2.3)&lt;br /&gt;
activemodel (3.2.3)&lt;br /&gt;
activerecord (3.2.3)&lt;br /&gt;
activeresource (3.2.3)&lt;br /&gt;
activesupport (3.2.3)&lt;br /&gt;
arel (3.0.2)&lt;br /&gt;
bigdecimal (1.1.0)&lt;br /&gt;
builder (3.0.4)&lt;br /&gt;
bundler (1.3.5)&lt;br /&gt;
capybara (2.1.0)&lt;br /&gt;
coffee-rails (3.2.2)&lt;br /&gt;
coffee-script (2.2.0)&lt;br /&gt;
coffee-script-source (1.6.3)&lt;br /&gt;
erubis (2.7.0)&lt;br /&gt;
execjs (2.0.1)&lt;br /&gt;
hike (1.2.3)&lt;br /&gt;
i18n (0.6.5)&lt;br /&gt;
io-console (0.3)&lt;br /&gt;
journey (1.0.4)&lt;br /&gt;
jquery-rails (3.0.4)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Installing a new Gem ===&lt;br /&gt;
The ''install'' keyword can be used in command line to install gems. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem install capybara&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Uninstalling a Gem ===&lt;br /&gt;
The ''uninstall'' keyword can be used in command line to uninstall any existing gem in the system.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem uninstall capybara&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you uninstall a dependency of a gem RubyGems will ask you for confirmation.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem uninstall rbtree&lt;br /&gt;
&lt;br /&gt;
You have requested to uninstall the gem:&lt;br /&gt;
	rbtree-0.4.1&lt;br /&gt;
&lt;br /&gt;
drip-0.0.2 depends on rbtree (&amp;gt;= 0)&lt;br /&gt;
If you remove this gem, these dependencies will not be met.&lt;br /&gt;
Continue with Uninstall? [yN]  n&lt;br /&gt;
ERROR:  While executing gem ... (Gem::DependencyRemovalException)&lt;br /&gt;
    Uninstallation aborted due to dependent gem(s)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Update all existing Gems === &lt;br /&gt;
The ''update'' keyword can be used in command line to update all existing gems in the system.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem update &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Creating a new Gem &amp;lt;ref&amp;gt;http://timelessrepo.com/making-ruby-gems Making Ruby Gems&amp;lt;/ref&amp;gt; ===&lt;br /&gt;
It is also possible to [http://guides.rubygems.org/make-your-own-gem/ create our own ruby gem] to be used later to extend our Ruby applications. Bundler is a tool that can be used to [https://github.com/radar/guides/blob/master/gem-development.md to create a ruby gem].&lt;br /&gt;
&lt;br /&gt;
=== Ruby Gem Commands ===&lt;br /&gt;
&lt;br /&gt;
There is a list of commands that can be used with Ruby Gems. More details of each of these commands can be found [http://guides.rubygems.org/command-reference/ here]&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
gem build&lt;br /&gt;
gem cert&lt;br /&gt;
gem check&lt;br /&gt;
gem cleanup&lt;br /&gt;
gem contents&lt;br /&gt;
gem dependency&lt;br /&gt;
gem environment&lt;br /&gt;
gem fetch&lt;br /&gt;
gem generate_index&lt;br /&gt;
gem help&lt;br /&gt;
gem install&lt;br /&gt;
gem list&lt;br /&gt;
gem lock&lt;br /&gt;
gem mirror&lt;br /&gt;
gem outdated&lt;br /&gt;
gem owner&lt;br /&gt;
gem pristine&lt;br /&gt;
gem push&lt;br /&gt;
gem query&lt;br /&gt;
gem rdoc&lt;br /&gt;
gem search&lt;br /&gt;
gem server&lt;br /&gt;
gem sources&lt;br /&gt;
gem specification&lt;br /&gt;
gem stale&lt;br /&gt;
gem uninstall&lt;br /&gt;
gem unpack&lt;br /&gt;
gem update&lt;br /&gt;
gem which&lt;br /&gt;
gem yank&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Useful Gems in RAILS environment ==&lt;br /&gt;
&lt;br /&gt;
There are many gems which provide easy of functionality that can be included in the rails development environment. [http://bundler.io/ Bundler]is a useful gem that enables a developer to quickly add and manage gems in a few lines of code.&lt;br /&gt;
&lt;br /&gt;
We can classify the Gems based on the usage in different layers Model, View and Controller.&lt;br /&gt;
&lt;br /&gt;
 '''MODEL layer'''&lt;br /&gt;
&lt;br /&gt;
==='''Active Record Plugins'''&amp;lt;ref&amp;gt;https://www.ruby-toolbox.com/categories/Active_Record_DB_Adapters&amp;lt;/ref&amp;gt;===&lt;br /&gt;
&lt;br /&gt;
* '''oracle-enhanced''' Oracle &amp;quot;enhanced&amp;quot; ActiveRecord adapter contains useful additional methods for working with new and legacy Oracle databases. This adapter is superset of original ActiveRecord Oracle adapter.&lt;br /&gt;
&lt;br /&gt;
* '''activerecord-jdbc-adapter''' This adapter is build on JDBC API used for connecting to the database. AR-JDBC is a database adapter for Rails' ActiveRecord component. It allows to connect to virtually any JDBC-compliant database with your JRuby on Rails application.&lt;br /&gt;
&lt;br /&gt;
* '''nulldb''' This helps in Database simulation and testing. A database backend that translates database interactions into no-ops. We can test our model business logic with wanting to experiment with real database.&lt;br /&gt;
&lt;br /&gt;
* '''oracle-enhanced-enhanced''' It includes several enhancements and customization to the standard ActiveRecord Oracle Enhapnced adapter, which is still required. Any customization to this adapter's behavior or additional Oracle-specific utilities should be added here.&lt;br /&gt;
&lt;br /&gt;
* Other useful Ruby Gems here. [https://www.ruby-toolbox.com/projects/activerecord-sqlserver-adapter '''activerecord-sqlserver-adapter'''], [https://www.ruby-toolbox.com/projects/activerecord-jdbcmysql-adapter '''activerecord-jdbcmysql-adapter'''], [https://www.ruby-toolbox.com/projects/activerecord-jdbcpostgresql-adapter '''activerecord-jdbcpostgresql-adapter'''], [https://www.ruby-toolbox.com/projects/activerecord-jdbcderby-adapter '''activerecord-jdbcderby-adapter'''],.&lt;br /&gt;
&lt;br /&gt;
==='''Active Record Index Assistants'''&amp;lt;ref&amp;gt;https://www.ruby-toolbox.com/categories/Active_Record_Index_Assistants&amp;lt;/ref&amp;gt;===&lt;br /&gt;
&lt;br /&gt;
* '''foreigner''' Adds helpers to migrations and dumps foreign keys to schema.rb.&lt;br /&gt;
&lt;br /&gt;
* '''rails_indexes''' A rake task to track down missing database indexes. does not assume that all foreign keys end with the convention of _id.&lt;br /&gt;
&lt;br /&gt;
* '''schema_plus''' SchemaPlus is an ActiveRecord extension that provides enhanced capabilities for schema definition and querying, including: enhanced and more DRY index capabilities, support and automation for foreign key constraints, and support for views.&lt;br /&gt;
&lt;br /&gt;
* '''automatic_foreign_key''' Automatic Foreign Key automatically generates foreign-key constraints when creating tables or adding columns. It uses SQL-92 syntax and as such should be compatible with most databases that support foreign-key constraints.&lt;br /&gt;
&lt;br /&gt;
* Other useful Ruby Gems here. [https://www.ruby-toolbox.com/projects/ambitious_query_indexer '''ambitious_query_indexer'''], [https://www.ruby-toolbox.com/projects/lol_dba '''lol_dba'''], [https://www.ruby-toolbox.com/projects/immigrant '''immigrant'''], [https://www.ruby-toolbox.com/projects/redhillonrails_core '''redhillonrails_core'''].&lt;br /&gt;
&lt;br /&gt;
==='''Rails DB Bootstrapping'''&amp;lt;ref&amp;gt;https://www.ruby-toolbox.com/categories/rails_db_bootstrapping&amp;lt;/ref&amp;gt;===&lt;br /&gt;
&lt;br /&gt;
* '''seed-fu''' Seed Fu is an attempt to once and for all solve the problem of inserting and maintaining seed data in a database. It uses a variety of techniques gathered from various places around the web and combines them to create what is hopefully the most robust seed data system around.&lt;br /&gt;
&lt;br /&gt;
* '''populator''' Mass populate an Active Record database.&lt;br /&gt;
&lt;br /&gt;
* '''seedbank''' Extends Rails seeds to split out complex seeds into multiple files and lets each environment have it's own seeds.&lt;br /&gt;
&lt;br /&gt;
* '''Has alter ego''' has_alter_ego makes it possible to keep seed and live data transparently in parallel. In contrast to other seed data approaches has_alter_ego synchronizes the seed definitions with your database objects automagically unless you've overridden it in the database.&lt;br /&gt;
&lt;br /&gt;
* Other useful Ruby Gems here. [https://www.ruby-toolbox.com/projects/bootstrapper '''Bootstrapper'''], [https://www.ruby-toolbox.com/projects/db-populate '''Db-populate'''], [https://www.ruby-toolbox.com/projects/seed_dumper '''seed_dumper'''], [https://www.ruby-toolbox.com/projects/dibber '''dibber'''].&lt;br /&gt;
&lt;br /&gt;
==='''Rails Search'''&amp;lt;ref&amp;gt;https://www.ruby-toolbox.com/categories/rails_search&amp;lt;/ref&amp;gt;===&lt;br /&gt;
&lt;br /&gt;
* '''Sunspot''' Sunspot is a library providing a powerful, all-ruby API for the Solr search engine. Sunspot manages the configuration of persistent Ruby classes for search and indexing and exposes Solr's most powerful features through a collection of DSLs. Complex search operations can be performed without hand-writing any boolean queries or building Solr parameters by hand.&lt;br /&gt;
&lt;br /&gt;
* '''sunspot_rails''' Sunspot::Rails is an extension to the Sunspot library for Solr search. Sunspot::Rails adds integration between Sunspot and ActiveRecord, including defining search and indexing related methods on ActiveRecord models themselves, running a Sunspot-compatible Solr instance for development and test environments, and automatically commit Solr index changes at the end of each Rails request.&lt;br /&gt;
&lt;br /&gt;
* '''Tire''' Tire is a Ruby client for the Elasticsearch search engine/database. It provides Ruby-like API for fluent communication with the Elasticsearch server and blends with ActiveModel class for convenient usage in Rails applications. It allows to delete and create indices, define mapping for them, supports the bulk API, and presents an easy-to-use DSL for constructing your queries. It has full ActiveRecord/ActiveModel compatibility, allowing you to index your models (incrementally upon saving, or in bulk), searching and paginating the results.&lt;br /&gt;
&lt;br /&gt;
* '''thinking-sphinx''' An intelligent layer for ActiveRecord (via Rails and Sinatra) for the Sphinx full-text search tool.&lt;br /&gt;
&lt;br /&gt;
* Other useful Ruby Gems here. [https://www.ruby-toolbox.com/projects/pg_search '''pg_search'''], [https://www.ruby-toolbox.com/projects/redis-search '''redis-search'''], [https://www.ruby-toolbox.com/projects/ferret '''Ferret'''], [https://www.ruby-toolbox.com/projects/searchlight '''searchlight'''].&lt;br /&gt;
&lt;br /&gt;
==='''Data Persistence'''&amp;lt;ref&amp;gt;https://www.ruby-toolbox.com/#Data_Persistence&amp;lt;/ref&amp;gt;===&lt;br /&gt;
&lt;br /&gt;
* '''Mongoid''' Mongoid is an ODM (Object Document Mapper) Framework for MongoDB, written in Ruby.&lt;br /&gt;
&lt;br /&gt;
* '''Mongomatic''' Mongomatic is a modular Ruby object mapper for Mongo.&lt;br /&gt;
&lt;br /&gt;
* '''dynamoid''' Dynamoid is an ORM for Amazon's DynamoDB that supports offline development, associations, querying, and everything else you'd expect from an ActiveRecord-style replacement.&lt;br /&gt;
&lt;br /&gt;
* '''squeel''' Squeel unlocks the power of Arel in your Rails 3 application with a handy block-based syntax. You can write subqueries, access named functions provided by your RDBMS, and more, all without writing SQL strings.&lt;br /&gt;
&lt;br /&gt;
 '''VIEW layer'''&lt;br /&gt;
&lt;br /&gt;
==='''CSS'''&amp;lt;ref&amp;gt;https://www.ruby-toolbox.com/categories/css_with_ruby&amp;lt;/ref&amp;gt;===&lt;br /&gt;
&lt;br /&gt;
* '''Sass''' Sass makes CSS fun again. Sass is an extension of CSS3, adding nested rules, variables, mixins, selector inheritance, and more. It's translated to well-formatted, standard CSS using the command line tool or a web-framework plugin.&lt;br /&gt;
&lt;br /&gt;
* '''bourbon''' The purpose of Bourbon Vanilla Sass Mixins is to provide a comprehensive framework of sass mixins that are designed to be as vanilla as possible. Meaning they should not deter from the original CSS syntax. The mixins contain vendor specific prefixes for all CSS3 properties for support amongst modern browsers. The prefixes also ensure graceful degradation for older browsers that support only CSS3 prefixed properties.&lt;br /&gt;
&lt;br /&gt;
* Other useful Ruby Gems here. [https://www.ruby-toolbox.com/projects/less '''Less'''], [https://www.ruby-toolbox.com/projects/sass-rails '''sass-rails'''], [https://www.ruby-toolbox.com/projects/stylus '''stylus'''], [https://www.ruby-toolbox.com/projects/patterns '''patterns''']&lt;br /&gt;
&lt;br /&gt;
==='''Graphing'''&amp;lt;ref&amp;gt;https://www.ruby-toolbox.com/categories/css_with_ruby&amp;lt;/ref&amp;gt;===&lt;br /&gt;
&lt;br /&gt;
* '''google_visualr''' This Ruby gem, GoogleVisualr, is a wrapper around the Google Chart Tools that allows anyone to create the same beautiful charts with just Ruby; you don't have to write any JavaScript at all.&lt;br /&gt;
&lt;br /&gt;
* '''highcharts-rails''' Gem that includes Highcharts (Interactive JavaScript charts for your web projects), in the Rails Asset Pipeline introduced in Rails 3.1.&lt;br /&gt;
&lt;br /&gt;
* '''Seer''' Gem that includes Highcharts (Interactive JavaScript charts for your web projects), in the Rails Asset Pipeline introduced in Rails 3.1.Seer is a lightweight, semantically rich wrapper for the Google Visualization API. It allows you to easily create a visualization of data in a variety of formats, including area charts, bar charts, column charts, gauges, line charts, and pie charts.&lt;br /&gt;
&lt;br /&gt;
==='''HTML &amp;amp; Markup'''&amp;lt;ref&amp;gt;https://www.ruby-toolbox.com/categories/rails_form_builders&amp;lt;/ref&amp;gt;===&lt;br /&gt;
&lt;br /&gt;
* '''formula''' Formula is a Rails form generator that generates simple clean markup. The project aims to let users create semantically beautiful forms without introducing too much syntax. The goal is to make integrating advanced layout systems as simple as possible.&lt;br /&gt;
&lt;br /&gt;
* '''Formtastic''' A Rails form builder plugin/gem with semantically rich and accessible markup.&lt;br /&gt;
&lt;br /&gt;
==='''JavaScript'''&amp;lt;ref&amp;gt;https://www.ruby-toolbox.com/categories/javascript_testing&amp;lt;/ref&amp;gt;===&lt;br /&gt;
&lt;br /&gt;
* '''Jasmine''' Test your JavaScript without any framework dependencies, in any environment, and with a nice descriptive syntax.&lt;br /&gt;
&lt;br /&gt;
* '''konacha''' Konacha is a Rails engine that allows you to test your JavaScript with the mocha test framework and chai assertion library. It is similar to Jasmine and Evergreen, but does not attempt to be framework agnostic. By sticking with Rails, Konacha can take full advantage of features such as the asset pipeline and engines&lt;br /&gt;
&lt;br /&gt;
==='''Rails In-Place Editing'''&amp;lt;ref&amp;gt;https://www.ruby-toolbox.com/categories/rails_in_place_editing&amp;lt;/ref&amp;gt;===&lt;br /&gt;
&lt;br /&gt;
* '''BestInPlace''' BestInPlace is a jQuery script and a Rails 3 helper that provide the method best_in_place to display any object field easily editable for the user by just clicking on it. It supports input data, text data, boolean data and custom dropdown data. It works with RESTful controllers.&lt;br /&gt;
&lt;br /&gt;
* '''best_in_place_mongoid''' BestInPlaceMongoid is a fork of BestInPlace jQuery script and a Rails 3 helper that provide the method best_in_place to display any object field easily editable for the user by just clicking on it. It supports input data, text data, boolean data and custom dropdown data. It works with RESTful controllers.&lt;br /&gt;
&lt;br /&gt;
 '''CONTROLLER layer'''&lt;br /&gt;
&lt;br /&gt;
==='''Background Jobs'''&amp;lt;ref&amp;gt;https://www.ruby-toolbox.com/categories/Background_Jobs&amp;lt;/ref&amp;gt;===&lt;br /&gt;
&lt;br /&gt;
* '''Resque''' Resque is a Redis-backed Ruby library for creating background jobs, placing those jobs on multiple queues, and processing them later. Background jobs can be any Ruby class or module that responds to perform. Your existing classes can easily be converted to background jobs or you can create new classes specifically to do work. Or, you can do both. Resque is heavily inspired by DelayedJob (which rocks) and is comprised of three parts: * A Ruby library for creating, querying, and processing jobs * A Rake task for starting a worker which processes jobs * A Sinatra app for monitoring queues, jobs, and workers.&lt;br /&gt;
&lt;br /&gt;
* '''Starling''' Starling is a light-weight, persistent queue server that speaks the memcached protocol. It was originally developed for Twitter's backend.&lt;br /&gt;
&lt;br /&gt;
==='''Scheduling'''&amp;lt;ref&amp;gt;https://www.ruby-toolbox.com/categories/scheduling&amp;lt;/ref&amp;gt;===&lt;br /&gt;
&lt;br /&gt;
* '''resque-scheduler''' Light weight job scheduling on top of Resque. Adds methods enqueue_at/enqueue_in to schedule jobs in the future. Also supports queueing jobs on a fixed, cron-like schedule.&lt;br /&gt;
&lt;br /&gt;
* '''Clockwork''' A scheduler process to replace cron, using a more flexible Ruby syntax running as a single long-running process. Inspired by rufus-scheduler and resque-scheduler.&lt;br /&gt;
&lt;br /&gt;
==='''Code Metrics'''&amp;lt;ref&amp;gt;https://www.ruby-toolbox.com/categories/code_metrics&amp;lt;/ref&amp;gt;===&lt;br /&gt;
&lt;br /&gt;
* '''SimpleCov''' Code coverage for Ruby 1.9 with a powerful configuration library and automatic merging of coverage across test suites.&lt;br /&gt;
&lt;br /&gt;
* '''Flay''' Flay analyzes code for structural similarities. Differences in literal values, variable, class, method names, whitespace, programming style, braces vs do/end, etc are all ignored. Making this totally rad.&lt;br /&gt;
&lt;br /&gt;
==='''E-Mail Sending'''&amp;lt;ref&amp;gt;https://www.ruby-toolbox.com/categories/e_mail&amp;lt;/ref&amp;gt;===&lt;br /&gt;
&lt;br /&gt;
* '''Action Mailer''' Email on Rails. Compose, deliver, receive, and test emails using the familiar controller/view pattern. First-class support for multipart email and attachments.&lt;br /&gt;
&lt;br /&gt;
* '''capistrano_mailer''' Capistrano Deployment Email Notification. Keep the whole team informed of each release!&lt;br /&gt;
&lt;br /&gt;
 '''TESTING'''&lt;br /&gt;
&lt;br /&gt;
==='''Browser testing'''&amp;lt;ref&amp;gt;https://www.ruby-toolbox.com/categories/browser_testing&amp;lt;/ref&amp;gt;===&lt;br /&gt;
&lt;br /&gt;
* '''Capybara''' Capybara is an integration testing tool for rack based web applications. It simulates how a user would interact with a website.&lt;br /&gt;
&lt;br /&gt;
* '''Webrat''' Webrat lets you quickly write expressive and robust acceptance tests for a Ruby web application. It supports simulating a browser inside a Ruby process to avoid the performance hit and browser dependency of Selenium or Watir, but the same API can also be used to drive real Selenium tests when necessary (eg. for testing AJAX interactions). Most Ruby web frameworks and testing frameworks are supported.&lt;br /&gt;
&lt;br /&gt;
==='''Random Data Generation'''&amp;lt;ref&amp;gt;https://www.ruby-toolbox.com/categories/random_data_generation&amp;lt;/ref&amp;gt;===&lt;br /&gt;
&lt;br /&gt;
* '''Faker''' Faker, a port of Data::Faker from Perl, is used to easily generate fake data: names, addresses, phone numbers, etc.&lt;br /&gt;
&lt;br /&gt;
* '''Forgery''' Easy and customizable generation of forged data. Can be used as a gem or a rails plugin. Includes rails generators for creating your own forgeries.&lt;br /&gt;
&lt;br /&gt;
==='''Unit Test Frameworks'''&amp;lt;ref&amp;gt;https://www.ruby-toolbox.com/categories/testing_frameworks&amp;lt;/ref&amp;gt;===&lt;br /&gt;
&lt;br /&gt;
* '''test-unit''' Ruby 1.9.x bundles minitest not Test::Unit. Test::Unit bundled in Ruby 1.8.x had not been improved but unbundled Test::Unit (test-unit) is improved actively.&lt;br /&gt;
&lt;br /&gt;
* '''Wrong''' Wrong provides a general assert method that takes a predicate block. Assertion failure messages are rich in detail. The Wrong idea is to replace all those countless assert_this, assert_that library methods which only exist to give a more useful failure message than &amp;quot;assertion failed&amp;quot;. Wrong replaces all of them in one fell swoop, since if you can write it in Ruby, Wrong can make a sensible failure message out of it. Also provided are several helper methods, like rescuing, capturing, and d.&lt;br /&gt;
&lt;br /&gt;
* Other useful Ruby Gems here. [https://www.ruby-toolbox.com/projects/testrocket '''testrocket'''], [https://www.ruby-toolbox.com/projects/kintama '''kintama'''], [https://www.ruby-toolbox.com/projects/lemon '''Lemon'''], [https://www.ruby-toolbox.com/projects/shindo '''Shindo'''].&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
[http://guides.rubygems.org/make-your-own-gem/ Gudie to create your own Ruby Gem]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://rubygems.rubyforge.org/rubygems-update/UPGRADING_rdoc.html How to Upgrade/Downgrade Ruby Gems]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://rubylearning.com/blog/ Collection of Ruby Study Notes]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://net.tutsplus.com/articles/web-roundups/24-extremely-useful-ruby-gems-for-web-development/ 24 extremely useful Ruby Gems for web development]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://railscasts.com/episodes/245-new-gem-with-bundler Screencasts to create a Ruby Gem]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://guides.rubygems.org/publishing/ How to publish your Ruby Gem?]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://www.ibm.com/developerworks/aix/library/au-aix-manage-ruby/ Manage Ruby and Gems with rvm]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://railscasts.com/episodes/183-gemcutter-jeweler Gemcutter and Jeweler railscast]&amp;lt;br&amp;gt;&lt;br /&gt;
[https://www.ruby-toolbox.com/projects/factory_girl Ruby Gem - factory girl]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://railscasts.com/episodes/192-authorization-with-cancan?view=asciicast Using cancan for authorization]&lt;br /&gt;
[https://www.ruby-toolbox.com Ruby Tool Box]&lt;br /&gt;
[https://rubyforge.org/ Ruby Forge by Ruby Central]&lt;br /&gt;
&lt;br /&gt;
== References==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;/div&gt;</summary>
		<author><name>Npari</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch1_1w24_nv&amp;diff=79158</id>
		<title>CSC/ECE 517 Fall 2013/ch1 1w24 nv</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch1_1w24_nv&amp;diff=79158"/>
		<updated>2013-09-25T03:22:01Z</updated>

		<summary type="html">&lt;p&gt;Npari: /* Useful Gems in RAILS environment */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Ruby Gem is a package manager for Ruby programming language. It allows users to easily download, install and use software packages on their system. The functionality of a Ruby application can be modified or extended with the help of Gems. In the version 1.9 of Ruby, Ruby Gems has been made a part of the standard library. This article would take the user on a tour of what ruby gems are all about and introduce the reader to various Ruby gems one can use to extend a Ruby application. Links for more details on Ruby gems are provided for the reader's benefit at the end of the article. &lt;br /&gt;
&lt;br /&gt;
== '''A Tour of Ruby Gems''' ==&lt;br /&gt;
== Definition of a Ruby Gem ==&lt;br /&gt;
In simple terms, a Ruby Gem is a package containing files that can be installed in a system and can help expand the functionality of a Ruby application. Ruby gems are very powerful. Ruby programmers create and publish Ruby Gems as open source in [https://github.com/ github]. It is very easy to install, upgrade and delete Gems in a system.&lt;br /&gt;
&lt;br /&gt;
== Structure of Ruby Gem ==&lt;br /&gt;
Every Gem has a set of files and the following standard structure &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ tree -d newgem&lt;br /&gt;
|-- lib/&lt;br /&gt;
|   |-- newgem.rb&lt;br /&gt;
|   `-- newgem/&lt;br /&gt;
|       |-- base.rb&lt;br /&gt;
|       `-- version.rb&lt;br /&gt;
|-- test/&lt;br /&gt;
|-- bin/&lt;br /&gt;
|-- Rakefile&lt;br /&gt;
`-- newgem.gemspec&amp;lt;/pre&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
The ''lib'' folder has the code of the ruby gem. It has ''newgem.rb'' file and a folder named ''newgem''. This folder has two files which are ''base.rb'' and ''version.rb''. The version number is recorded in ''version.rb'' and can be changed when the gem is updated. The ''bin'' directory has any binaries that is a part of the gem file and should be distributed with the gem. A gem usually has a [http://rake.rubyforge.org/doc/rakefile_rdoc.html Rakefile]. The rake program uses this to generate code and automate tests in addition to performing other tasks. The Gem specification file ''newgem.gemspec'' contains details specific to the gem. The file has details such as the gem name,the files that are in it, the gems it depends on for  performing testing, the gems it depends on for actually running and other details.&lt;br /&gt;
&lt;br /&gt;
== Listing existing Gems ==&lt;br /&gt;
To list the existing gems in a system ''list'' keyword can be used in the command line.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem list&lt;br /&gt;
&lt;br /&gt;
*** LOCAL GEMS ***&lt;br /&gt;
&lt;br /&gt;
actionmailer (3.2.3)&lt;br /&gt;
actionpack (3.2.3)&lt;br /&gt;
activemodel (3.2.3)&lt;br /&gt;
activerecord (3.2.3)&lt;br /&gt;
activeresource (3.2.3)&lt;br /&gt;
activesupport (3.2.3)&lt;br /&gt;
arel (3.0.2)&lt;br /&gt;
bigdecimal (1.1.0)&lt;br /&gt;
builder (3.0.4)&lt;br /&gt;
bundler (1.3.5)&lt;br /&gt;
capybara (2.1.0)&lt;br /&gt;
coffee-rails (3.2.2)&lt;br /&gt;
coffee-script (2.2.0)&lt;br /&gt;
coffee-script-source (1.6.3)&lt;br /&gt;
erubis (2.7.0)&lt;br /&gt;
execjs (2.0.1)&lt;br /&gt;
hike (1.2.3)&lt;br /&gt;
i18n (0.6.5)&lt;br /&gt;
io-console (0.3)&lt;br /&gt;
journey (1.0.4)&lt;br /&gt;
jquery-rails (3.0.4)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installing a new Gem ==&lt;br /&gt;
The ''install''[1] keyword can be used in command line to install gems. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem install capybara&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Uninstalling a Gem ==&lt;br /&gt;
The ''uninstall'' keyword can be used in command line to uninstall any existing gem in the system.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem uninstall capybara&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you uninstall a dependency of a gem RubyGems will ask you for confirmation.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem uninstall rbtree&lt;br /&gt;
&lt;br /&gt;
You have requested to uninstall the gem:&lt;br /&gt;
	rbtree-0.4.1&lt;br /&gt;
&lt;br /&gt;
drip-0.0.2 depends on rbtree (&amp;gt;= 0)&lt;br /&gt;
If you remove this gem, these dependencies will not be met.&lt;br /&gt;
Continue with Uninstall? [yN]  n&lt;br /&gt;
ERROR:  While executing gem ... (Gem::DependencyRemovalException)&lt;br /&gt;
    Uninstallation aborted due to dependent gem(s)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Update all existing Gems == &lt;br /&gt;
The ''update'' keyword can be used in command line to update all existing gems in the system.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem update &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Creating a new Gem == &lt;br /&gt;
It is also possible to [http://guides.rubygems.org/make-your-own-gem/ create our own ruby gem] to be used later to extend our Ruby applications. Bundler is a tool that can be used to [https://github.com/radar/guides/blob/master/gem-development.md to create a ruby gem].&lt;br /&gt;
&lt;br /&gt;
== Ruby Gem Commands ==&lt;br /&gt;
&lt;br /&gt;
There is a list of commands that can be used with Ruby Gems. More details of each of these commands can be found [http://guides.rubygems.org/command-reference/ here]&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
gem build&lt;br /&gt;
gem cert&lt;br /&gt;
gem check&lt;br /&gt;
gem cleanup&lt;br /&gt;
gem contents&lt;br /&gt;
gem dependency&lt;br /&gt;
gem environment&lt;br /&gt;
gem fetch&lt;br /&gt;
gem generate_index&lt;br /&gt;
gem help&lt;br /&gt;
gem install&lt;br /&gt;
gem list&lt;br /&gt;
gem lock&lt;br /&gt;
gem mirror&lt;br /&gt;
gem outdated&lt;br /&gt;
gem owner&lt;br /&gt;
gem pristine&lt;br /&gt;
gem push&lt;br /&gt;
gem query&lt;br /&gt;
gem rdoc&lt;br /&gt;
gem search&lt;br /&gt;
gem server&lt;br /&gt;
gem sources&lt;br /&gt;
gem specification&lt;br /&gt;
gem stale&lt;br /&gt;
gem uninstall&lt;br /&gt;
gem unpack&lt;br /&gt;
gem update&lt;br /&gt;
gem which&lt;br /&gt;
gem yank&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Useful Gems in RAILS environment ==&lt;br /&gt;
&lt;br /&gt;
There are many gems which provide easy of functionality that can be included in the rails development environment. [http://bundler.io/ Bundler]is a useful gem that enables a developer to quickly add and manage gems in a few lines of code.&lt;br /&gt;
&lt;br /&gt;
We can classify the Gems based on the usage in different layers Model, View and Controller.&lt;br /&gt;
&lt;br /&gt;
 '''MODEL layer'''&lt;br /&gt;
&lt;br /&gt;
'''Active Record Plugins''' &lt;br /&gt;
&lt;br /&gt;
* '''oracle-enhanced''' Oracle &amp;quot;enhanced&amp;quot; ActiveRecord adapter contains useful additional methods for working with new and legacy Oracle databases. This adapter is superset of original ActiveRecord Oracle adapter.&lt;br /&gt;
&lt;br /&gt;
* '''activerecord-jdbc-adapter''' This adapter is build on JDBC API used for connecting to the database. AR-JDBC is a database adapter for Rails' ActiveRecord component. It allows to connect to virtually any JDBC-compliant database with your JRuby on Rails application.&lt;br /&gt;
&lt;br /&gt;
* '''nulldb''' This helps in Database simulation and testing. A database backend that translates database interactions into no-ops. We can test our model business logic with wanting to experiment with real database.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/oracle-enhanced-enhanced '''oracle-enhanced-enhanced'''] It includes several enhancements and customization to the standard ActiveRecord Oracle Enhapnced adapter, which is still required. Any customization to this adapter's behavior or additional Oracle-specific utilities should be added here.&lt;br /&gt;
&lt;br /&gt;
* Other useful Ruby Gems here. [https://www.ruby-toolbox.com/projects/activerecord-sqlserver-adapter '''activerecord-sqlserver-adapter'''], [https://www.ruby-toolbox.com/projects/activerecord-jdbcmysql-adapter '''activerecord-jdbcmysql-adapter'''], [https://www.ruby-toolbox.com/projects/activerecord-jdbcpostgresql-adapter '''activerecord-jdbcpostgresql-adapter'''], [https://www.ruby-toolbox.com/projects/activerecord-jdbcderby-adapter '''activerecord-jdbcderby-adapter'''],.&lt;br /&gt;
&lt;br /&gt;
'''Active Record Index Assistants'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/foreigner '''foreigner'''] Adds helpers to migrations and dumps foreign keys to schema.rb.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/rails_indexes '''rails_indexes'''] A rake task to track down missing database indexes. does not assume that all foreign keys end with the convention of _id.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/schema_plus '''schema_plus'''] SchemaPlus is an ActiveRecord extension that provides enhanced capabilities for schema definition and querying, including: enhanced and more DRY index capabilities, support and automation for foreign key constraints, and support for views.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/automatic_foreign_key '''automatic_foreign_key'''] Automatic Foreign Key automatically generates foreign-key constraints when creating tables or adding columns. It uses SQL-92 syntax and as such should be compatible with most databases that support foreign-key constraints.&lt;br /&gt;
&lt;br /&gt;
* Other useful Ruby Gems here. [https://www.ruby-toolbox.com/projects/ambitious_query_indexer '''ambitious_query_indexer'''], [https://www.ruby-toolbox.com/projects/lol_dba '''lol_dba'''], [https://www.ruby-toolbox.com/projects/immigrant '''immigrant'''], [https://www.ruby-toolbox.com/projects/redhillonrails_core '''redhillonrails_core'''].&lt;br /&gt;
&lt;br /&gt;
'''Rails DB Bootstrapping'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/seed-fu '''seed-fu'''] Seed Fu is an attempt to once and for all solve the problem of inserting and maintaining seed data in a database. It uses a variety of techniques gathered from various places around the web and combines them to create what is hopefully the most robust seed data system around.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/populator '''populator'''] Mass populate an Active Record database.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/seedbank '''seedbank'''] Extends Rails seeds to split out complex seeds into multiple files and lets each environment have it's own seeds.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/has_alter_ego '''Has alter ego'''] has_alter_ego makes it possible to keep seed and live data transparently in parallel. In contrast to other seed data approaches has_alter_ego synchronizes the seed definitions with your database objects automagically unless you've overridden it in the database.&lt;br /&gt;
&lt;br /&gt;
* Other useful Ruby Gems here. [https://www.ruby-toolbox.com/projects/bootstrapper '''Bootstrapper'''], [https://www.ruby-toolbox.com/projects/db-populate '''Db-populate'''], [https://www.ruby-toolbox.com/projects/seed_dumper '''seed_dumper'''], [https://www.ruby-toolbox.com/projects/dibber '''dibber'''].&lt;br /&gt;
&lt;br /&gt;
'''Rails Search'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/Sunspot '''Sunspot'''] Sunspot is a library providing a powerful, all-ruby API for the Solr search engine. Sunspot manages the configuration of persistent Ruby classes for search and indexing and exposes Solr's most powerful features through a collection of DSLs. Complex search operations can be performed without hand-writing any boolean queries or building Solr parameters by hand.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/sunspot_rails '''sunspot_rails'''] Sunspot::Rails is an extension to the Sunspot library for Solr search. Sunspot::Rails adds integration between Sunspot and ActiveRecord, including defining search and indexing related methods on ActiveRecord models themselves, running a Sunspot-compatible Solr instance for development and test environments, and automatically commit Solr index changes at the end of each Rails request.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/tire '''Tire'''] Tire is a Ruby client for the Elasticsearch search engine/database. It provides Ruby-like API for fluent communication with the Elasticsearch server and blends with ActiveModel class for convenient usage in Rails applications. It allows to delete and create indices, define mapping for them, supports the bulk API, and presents an easy-to-use DSL for constructing your queries. It has full ActiveRecord/ActiveModel compatibility, allowing you to index your models (incrementally upon saving, or in bulk), searching and paginating the results.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/thinking-sphinx '''thinking-sphinx'''] An intelligent layer for ActiveRecord (via Rails and Sinatra) for the Sphinx full-text search tool.&lt;br /&gt;
&lt;br /&gt;
* Other useful Ruby Gems here. [https://www.ruby-toolbox.com/projects/pg_search '''pg_search'''], [https://www.ruby-toolbox.com/projects/redis-search '''redis-search'''], [https://www.ruby-toolbox.com/projects/ferret '''Ferret'''], [https://www.ruby-toolbox.com/projects/searchlight '''searchlight'''].&lt;br /&gt;
&lt;br /&gt;
'''Data Persistence'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/mongoid '''Mongoid'''] Mongoid is an ODM (Object Document Mapper) Framework for MongoDB, written in Ruby.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/mongomatic '''Mongomatic'''] Mongomatic is a modular Ruby object mapper for Mongo.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/dynamoid '''dynamoid'''] Dynamoid is an ORM for Amazon's DynamoDB that supports offline development, associations, querying, and everything else you'd expect from an ActiveRecord-style replacement.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/squeel '''squeel'''] Squeel unlocks the power of Arel in your Rails 3 application with a handy block-based syntax. You can write subqueries, access named functions provided by your RDBMS, and more, all without writing SQL strings.&lt;br /&gt;
&lt;br /&gt;
 '''VIEW layer'''&lt;br /&gt;
&lt;br /&gt;
'''CSS'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/sass '''Sass'''] Sass makes CSS fun again. Sass is an extension of CSS3, adding nested rules, variables, mixins, selector inheritance, and more. It's translated to well-formatted, standard CSS using the command line tool or a web-framework plugin.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/bourbon '''bourbon'''] The purpose of Bourbon Vanilla Sass Mixins is to provide a comprehensive framework of sass mixins that are designed to be as vanilla as possible. Meaning they should not deter from the original CSS syntax. The mixins contain vendor specific prefixes for all CSS3 properties for support amongst modern browsers. The prefixes also ensure graceful degradation for older browsers that support only CSS3 prefixed properties.&lt;br /&gt;
&lt;br /&gt;
* Other useful Ruby Gems here. [https://www.ruby-toolbox.com/projects/less '''Less'''], [https://www.ruby-toolbox.com/projects/sass-rails '''sass-rails'''], [https://www.ruby-toolbox.com/projects/stylus '''stylus'''], [https://www.ruby-toolbox.com/projects/patterns '''patterns''']&lt;br /&gt;
&lt;br /&gt;
'''Graphing'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/google_visualr '''google_visualr'''] This Ruby gem, GoogleVisualr, is a wrapper around the Google Chart Tools that allows anyone to create the same beautiful charts with just Ruby; you don't have to write any JavaScript at all.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/highcharts-rails '''highcharts-rails'''] Gem that includes Highcharts (Interactive JavaScript charts for your web projects), in the Rails Asset Pipeline introduced in Rails 3.1.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/seer '''Seer'''] Gem that includes Highcharts (Interactive JavaScript charts for your web projects), in the Rails Asset Pipeline introduced in Rails 3.1.Seer is a lightweight, semantically rich wrapper for the Google Visualization API. It allows you to easily create a visualization of data in a variety of formats, including area charts, bar charts, column charts, gauges, line charts, and pie charts.&lt;br /&gt;
&lt;br /&gt;
'''HTML &amp;amp; Markup'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/formula '''formula'''] Formula is a Rails form generator that generates simple clean markup. The project aims to let users create semantically beautiful forms without introducing too much syntax. The goal is to make integrating advanced layout systems as simple as possible.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/formtastic '''Formtastic'''] A Rails form builder plugin/gem with semantically rich and accessible markup.&lt;br /&gt;
&lt;br /&gt;
'''JavaScript'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/jasmine '''Jasmine'''] Test your JavaScript without any framework dependencies, in any environment, and with a nice descriptive syntax.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/konacha '''konacha'''] Konacha is a Rails engine that allows you to test your JavaScript with the mocha test framework and chai assertion library. It is similar to Jasmine and Evergreen, but does not attempt to be framework agnostic. By sticking with Rails, Konacha can take full advantage of features such as the asset pipeline and engines&lt;br /&gt;
&lt;br /&gt;
'''Rails In-Place Editing'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/best_in_place '''BestInPlace'''] BestInPlace is a jQuery script and a Rails 3 helper that provide the method best_in_place to display any object field easily editable for the user by just clicking on it. It supports input data, text data, boolean data and custom dropdown data. It works with RESTful controllers.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/best_in_place_mongoid '''best_in_place_mongoid'''] BestInPlaceMongoid is a fork of BestInPlace jQuery script and a Rails 3 helper that provide the method best_in_place to display any object field easily editable for the user by just clicking on it. It supports input data, text data, boolean data and custom dropdown data. It works with RESTful controllers.&lt;br /&gt;
&lt;br /&gt;
 '''CONTROLLER layer'''&lt;br /&gt;
&lt;br /&gt;
'''Background Jobs'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/resque '''Resque'''] Resque is a Redis-backed Ruby library for creating background jobs, placing those jobs on multiple queues, and processing them later. Background jobs can be any Ruby class or module that responds to perform. Your existing classes can easily be converted to background jobs or you can create new classes specifically to do work. Or, you can do both. Resque is heavily inspired by DelayedJob (which rocks) and is comprised of three parts: * A Ruby library for creating, querying, and processing jobs * A Rake task for starting a worker which processes jobs * A Sinatra app for monitoring queues, jobs, and workers.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/starling '''Starling'''] Starling is a light-weight, persistent queue server that speaks the memcached protocol. It was originally developed for Twitter's backend.&lt;br /&gt;
&lt;br /&gt;
'''Scheduling'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/resque-scheduler '''resque-scheduler'''] Light weight job scheduling on top of Resque. Adds methods enqueue_at/enqueue_in to schedule jobs in the future. Also supports queueing jobs on a fixed, cron-like schedule.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/clockwork '''Clockwork'''] A scheduler process to replace cron, using a more flexible Ruby syntax running as a single long-running process. Inspired by rufus-scheduler and resque-scheduler.&lt;br /&gt;
&lt;br /&gt;
'''Code Metrics'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/simpleCov '''SimpleCov'''] Code coverage for Ruby 1.9 with a powerful configuration library and automatic merging of coverage across test suites.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/flay '''Flay'''] Flay analyzes code for structural similarities. Differences in literal values, variable, class, method names, whitespace, programming style, braces vs do/end, etc are all ignored. Making this totally rad.&lt;br /&gt;
&lt;br /&gt;
'''E-Mail Sending'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/actionmailer '''Action Mailer'''] Email on Rails. Compose, deliver, receive, and test emails using the familiar controller/view pattern. First-class support for multipart email and attachments.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/capistrano_mailer '''capistrano_mailer'''] Capistrano Deployment Email Notification. Keep the whole team informed of each release!&lt;br /&gt;
&lt;br /&gt;
 '''TESTING'''&lt;br /&gt;
&lt;br /&gt;
'''Browser testing'''&lt;br /&gt;
&lt;br /&gt;
* [http://rubygems.org/gems/capybara '''Capybara'''] Capybara is an integration testing tool for rack based web applications. It simulates how a user would interact with a website.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/webrat '''Webrat'''] Webrat lets you quickly write expressive and robust acceptance tests for a Ruby web application. It supports simulating a browser inside a Ruby process to avoid the performance hit and browser dependency of Selenium or Watir, but the same API can also be used to drive real Selenium tests when necessary (eg. for testing AJAX interactions). Most Ruby web frameworks and testing frameworks are supported.&lt;br /&gt;
&lt;br /&gt;
'''Random Data Generation'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/faker '''Faker'''] Faker, a port of Data::Faker from Perl, is used to easily generate fake data: names, addresses, phone numbers, etc.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/forgery '''Forgery'''] Easy and customizable generation of forged data. Can be used as a gem or a rails plugin. Includes rails generators for creating your own forgeries.&lt;br /&gt;
&lt;br /&gt;
'''Unit Test Frameworks'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/test-unit '''test-unit'''] Ruby 1.9.x bundles minitest not Test::Unit. Test::Unit bundled in Ruby 1.8.x had not been improved but unbundled Test::Unit (test-unit) is improved actively.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/wrong '''Wrong'''] Wrong provides a general assert method that takes a predicate block. Assertion failure messages are rich in detail. The Wrong idea is to replace all those countless assert_this, assert_that library methods which only exist to give a more useful failure message than &amp;quot;assertion failed&amp;quot;. Wrong replaces all of them in one fell swoop, since if you can write it in Ruby, Wrong can make a sensible failure message out of it. Also provided are several helper methods, like rescuing, capturing, and d.&lt;br /&gt;
&lt;br /&gt;
* Other useful Ruby Gems here. [https://www.ruby-toolbox.com/projects/testrocket '''testrocket'''], [https://www.ruby-toolbox.com/projects/kintama '''kintama'''], [https://www.ruby-toolbox.com/projects/lemon '''Lemon'''], [https://www.ruby-toolbox.com/projects/shindo '''Shindo'''].&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
[http://guides.rubygems.org/make-your-own-gem/ Gudie to create your own Ruby Gem]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://rubygems.rubyforge.org/rubygems-update/UPGRADING_rdoc.html How to Upgrade/Downgrade Ruby Gems]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://rubylearning.com/blog/ Collection of Ruby Study Notes]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://net.tutsplus.com/articles/web-roundups/24-extremely-useful-ruby-gems-for-web-development/ 24 extremely useful Ruby Gems for web development]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://railscasts.com/episodes/245-new-gem-with-bundler Screencasts to create a Ruby Gem]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://guides.rubygems.org/publishing/ How to publish your Ruby Gem?]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://www.ibm.com/developerworks/aix/library/au-aix-manage-ruby/ Manage Ruby and Gems with rvm]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://railscasts.com/episodes/183-gemcutter-jeweler Gemcutter and Jeweler railscast]&amp;lt;br&amp;gt;&lt;br /&gt;
[https://www.ruby-toolbox.com/projects/factory_girl Ruby Gem - factory girl]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://railscasts.com/episodes/192-authorization-with-cancan?view=asciicast Using cancan for authorization]&lt;br /&gt;
&lt;br /&gt;
== References==&lt;br /&gt;
[1] [http://guides.rubygems.org/rubygems-basics/#installing_gems Ruby Gems guide]&amp;lt;br&amp;gt;&lt;br /&gt;
[2] [http://timelessrepo.com/making-ruby-gems Making Ruby Gems]&amp;lt;br&amp;gt;&lt;br /&gt;
[3] [https://www.ruby-toolbox.com Ruby Tool Box]&amp;lt;br&amp;gt;&lt;br /&gt;
[4] [https://rubyforge.org/ Ruby Forge by Ruby Central]&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Npari</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch1_1w24_nv&amp;diff=79155</id>
		<title>CSC/ECE 517 Fall 2013/ch1 1w24 nv</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch1_1w24_nv&amp;diff=79155"/>
		<updated>2013-09-25T03:20:09Z</updated>

		<summary type="html">&lt;p&gt;Npari: /* Installing a new Gem */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Ruby Gem is a package manager for Ruby programming language. It allows users to easily download, install and use software packages on their system. The functionality of a Ruby application can be modified or extended with the help of Gems. In the version 1.9 of Ruby, Ruby Gems has been made a part of the standard library. This article would take the user on a tour of what ruby gems are all about and introduce the reader to various Ruby gems one can use to extend a Ruby application. Links for more details on Ruby gems are provided for the reader's benefit at the end of the article. &lt;br /&gt;
&lt;br /&gt;
== '''A Tour of Ruby Gems''' ==&lt;br /&gt;
== Definition of a Ruby Gem ==&lt;br /&gt;
In simple terms, a Ruby Gem is a package containing files that can be installed in a system and can help expand the functionality of a Ruby application. Ruby gems are very powerful. Ruby programmers create and publish Ruby Gems as open source in [https://github.com/ github]. It is very easy to install, upgrade and delete Gems in a system.&lt;br /&gt;
&lt;br /&gt;
== Structure of Ruby Gem ==&lt;br /&gt;
Every Gem has a set of files and the following standard structure &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ tree -d newgem&lt;br /&gt;
|-- lib/&lt;br /&gt;
|   |-- newgem.rb&lt;br /&gt;
|   `-- newgem/&lt;br /&gt;
|       |-- base.rb&lt;br /&gt;
|       `-- version.rb&lt;br /&gt;
|-- test/&lt;br /&gt;
|-- bin/&lt;br /&gt;
|-- Rakefile&lt;br /&gt;
`-- newgem.gemspec&amp;lt;/pre&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
The ''lib'' folder has the code of the ruby gem. It has ''newgem.rb'' file and a folder named ''newgem''. This folder has two files which are ''base.rb'' and ''version.rb''. The version number is recorded in ''version.rb'' and can be changed when the gem is updated. The ''bin'' directory has any binaries that is a part of the gem file and should be distributed with the gem. A gem usually has a [http://rake.rubyforge.org/doc/rakefile_rdoc.html Rakefile]. The rake program uses this to generate code and automate tests in addition to performing other tasks. The Gem specification file ''newgem.gemspec'' contains details specific to the gem. The file has details such as the gem name,the files that are in it, the gems it depends on for  performing testing, the gems it depends on for actually running and other details.&lt;br /&gt;
&lt;br /&gt;
== Listing existing Gems ==&lt;br /&gt;
To list the existing gems in a system ''list'' keyword can be used in the command line.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem list&lt;br /&gt;
&lt;br /&gt;
*** LOCAL GEMS ***&lt;br /&gt;
&lt;br /&gt;
actionmailer (3.2.3)&lt;br /&gt;
actionpack (3.2.3)&lt;br /&gt;
activemodel (3.2.3)&lt;br /&gt;
activerecord (3.2.3)&lt;br /&gt;
activeresource (3.2.3)&lt;br /&gt;
activesupport (3.2.3)&lt;br /&gt;
arel (3.0.2)&lt;br /&gt;
bigdecimal (1.1.0)&lt;br /&gt;
builder (3.0.4)&lt;br /&gt;
bundler (1.3.5)&lt;br /&gt;
capybara (2.1.0)&lt;br /&gt;
coffee-rails (3.2.2)&lt;br /&gt;
coffee-script (2.2.0)&lt;br /&gt;
coffee-script-source (1.6.3)&lt;br /&gt;
erubis (2.7.0)&lt;br /&gt;
execjs (2.0.1)&lt;br /&gt;
hike (1.2.3)&lt;br /&gt;
i18n (0.6.5)&lt;br /&gt;
io-console (0.3)&lt;br /&gt;
journey (1.0.4)&lt;br /&gt;
jquery-rails (3.0.4)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installing a new Gem ==&lt;br /&gt;
The ''install''[1] keyword can be used in command line to install gems. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem install capybara&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Uninstalling a Gem ==&lt;br /&gt;
The ''uninstall'' keyword can be used in command line to uninstall any existing gem in the system.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem uninstall capybara&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you uninstall a dependency of a gem RubyGems will ask you for confirmation.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem uninstall rbtree&lt;br /&gt;
&lt;br /&gt;
You have requested to uninstall the gem:&lt;br /&gt;
	rbtree-0.4.1&lt;br /&gt;
&lt;br /&gt;
drip-0.0.2 depends on rbtree (&amp;gt;= 0)&lt;br /&gt;
If you remove this gem, these dependencies will not be met.&lt;br /&gt;
Continue with Uninstall? [yN]  n&lt;br /&gt;
ERROR:  While executing gem ... (Gem::DependencyRemovalException)&lt;br /&gt;
    Uninstallation aborted due to dependent gem(s)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Update all existing Gems == &lt;br /&gt;
The ''update'' keyword can be used in command line to update all existing gems in the system.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem update &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Creating a new Gem == &lt;br /&gt;
It is also possible to [http://guides.rubygems.org/make-your-own-gem/ create our own ruby gem] to be used later to extend our Ruby applications. Bundler is a tool that can be used to [https://github.com/radar/guides/blob/master/gem-development.md to create a ruby gem].&lt;br /&gt;
&lt;br /&gt;
== Ruby Gem Commands ==&lt;br /&gt;
&lt;br /&gt;
There is a list of commands that can be used with Ruby Gems. More details of each of these commands can be found [http://guides.rubygems.org/command-reference/ here]&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
gem build&lt;br /&gt;
gem cert&lt;br /&gt;
gem check&lt;br /&gt;
gem cleanup&lt;br /&gt;
gem contents&lt;br /&gt;
gem dependency&lt;br /&gt;
gem environment&lt;br /&gt;
gem fetch&lt;br /&gt;
gem generate_index&lt;br /&gt;
gem help&lt;br /&gt;
gem install&lt;br /&gt;
gem list&lt;br /&gt;
gem lock&lt;br /&gt;
gem mirror&lt;br /&gt;
gem outdated&lt;br /&gt;
gem owner&lt;br /&gt;
gem pristine&lt;br /&gt;
gem push&lt;br /&gt;
gem query&lt;br /&gt;
gem rdoc&lt;br /&gt;
gem search&lt;br /&gt;
gem server&lt;br /&gt;
gem sources&lt;br /&gt;
gem specification&lt;br /&gt;
gem stale&lt;br /&gt;
gem uninstall&lt;br /&gt;
gem unpack&lt;br /&gt;
gem update&lt;br /&gt;
gem which&lt;br /&gt;
gem yank&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Useful Gems in RAILS environment ==&lt;br /&gt;
&lt;br /&gt;
There are many gems which provide easy of functionality that can be included in the rails development environment. [http://bundler.io/ Bundler]is a useful gem that enables a developer to quickly add and manage gems in a few lines of code.&lt;br /&gt;
&lt;br /&gt;
We can classify the Gems based on the usage in different layers Model, View and Controller.&lt;br /&gt;
&lt;br /&gt;
 '''MODEL layer'''&lt;br /&gt;
&lt;br /&gt;
'''Active Record Plugins''' &lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/activerecord-oracle_enhanced-adapter '''oracle-enhanced'''] Oracle &amp;quot;enhanced&amp;quot; ActiveRecord adapter contains useful additional methods for working with new and legacy Oracle databases. This adapter is superset of original ActiveRecord Oracle adapter.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/activerecord-jdbc-adapter '''activerecord-jdbc-adapter'''] This adapter is build on JDBC API used for connecting to the database. AR-JDBC is a database adapter for Rails' ActiveRecord component. It allows to connect to virtually any JDBC-compliant database with your JRuby on Rails application.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/activerecord-nulldb-adapter '''nulldb'''] .This helps in Database simulation and testing. A database backend that translates database interactions into no-ops. We can test our model business logic with wanting to experiment with real database.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/oracle-enhanced-enhanced '''oracle-enhanced-enhanced'''] It includes several enhancements and customization to the standard ActiveRecord Oracle Enhapnced adapter, which is still required. Any customization to this adapter's behavior or additional Oracle-specific utilities should be added here.&lt;br /&gt;
&lt;br /&gt;
* Other useful Ruby Gems here. [https://www.ruby-toolbox.com/projects/activerecord-sqlserver-adapter '''activerecord-sqlserver-adapter'''], [https://www.ruby-toolbox.com/projects/activerecord-jdbcmysql-adapter '''activerecord-jdbcmysql-adapter'''], [https://www.ruby-toolbox.com/projects/activerecord-jdbcpostgresql-adapter '''activerecord-jdbcpostgresql-adapter'''], [https://www.ruby-toolbox.com/projects/activerecord-jdbcderby-adapter '''activerecord-jdbcderby-adapter'''],.&lt;br /&gt;
&lt;br /&gt;
'''Active Record Index Assistants'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/foreigner '''foreigner'''] Adds helpers to migrations and dumps foreign keys to schema.rb.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/rails_indexes '''rails_indexes'''] A rake task to track down missing database indexes. does not assume that all foreign keys end with the convention of _id.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/schema_plus '''schema_plus'''] SchemaPlus is an ActiveRecord extension that provides enhanced capabilities for schema definition and querying, including: enhanced and more DRY index capabilities, support and automation for foreign key constraints, and support for views.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/automatic_foreign_key '''automatic_foreign_key'''] Automatic Foreign Key automatically generates foreign-key constraints when creating tables or adding columns. It uses SQL-92 syntax and as such should be compatible with most databases that support foreign-key constraints.&lt;br /&gt;
&lt;br /&gt;
* Other useful Ruby Gems here. [https://www.ruby-toolbox.com/projects/ambitious_query_indexer '''ambitious_query_indexer'''], [https://www.ruby-toolbox.com/projects/lol_dba '''lol_dba'''], [https://www.ruby-toolbox.com/projects/immigrant '''immigrant'''], [https://www.ruby-toolbox.com/projects/redhillonrails_core '''redhillonrails_core'''].&lt;br /&gt;
&lt;br /&gt;
'''Rails DB Bootstrapping'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/seed-fu '''seed-fu'''] Seed Fu is an attempt to once and for all solve the problem of inserting and maintaining seed data in a database. It uses a variety of techniques gathered from various places around the web and combines them to create what is hopefully the most robust seed data system around.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/populator '''populator'''] Mass populate an Active Record database.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/seedbank '''seedbank'''] Extends Rails seeds to split out complex seeds into multiple files and lets each environment have it's own seeds.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/has_alter_ego '''Has alter ego'''] has_alter_ego makes it possible to keep seed and live data transparently in parallel. In contrast to other seed data approaches has_alter_ego synchronizes the seed definitions with your database objects automagically unless you've overridden it in the database.&lt;br /&gt;
&lt;br /&gt;
* Other useful Ruby Gems here. [https://www.ruby-toolbox.com/projects/bootstrapper '''Bootstrapper'''], [https://www.ruby-toolbox.com/projects/db-populate '''Db-populate'''], [https://www.ruby-toolbox.com/projects/seed_dumper '''seed_dumper'''], [https://www.ruby-toolbox.com/projects/dibber '''dibber'''].&lt;br /&gt;
&lt;br /&gt;
'''Rails Search'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/Sunspot '''Sunspot'''] Sunspot is a library providing a powerful, all-ruby API for the Solr search engine. Sunspot manages the configuration of persistent Ruby classes for search and indexing and exposes Solr's most powerful features through a collection of DSLs. Complex search operations can be performed without hand-writing any boolean queries or building Solr parameters by hand.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/sunspot_rails '''sunspot_rails'''] Sunspot::Rails is an extension to the Sunspot library for Solr search. Sunspot::Rails adds integration between Sunspot and ActiveRecord, including defining search and indexing related methods on ActiveRecord models themselves, running a Sunspot-compatible Solr instance for development and test environments, and automatically commit Solr index changes at the end of each Rails request.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/tire '''Tire'''] Tire is a Ruby client for the Elasticsearch search engine/database. It provides Ruby-like API for fluent communication with the Elasticsearch server and blends with ActiveModel class for convenient usage in Rails applications. It allows to delete and create indices, define mapping for them, supports the bulk API, and presents an easy-to-use DSL for constructing your queries. It has full ActiveRecord/ActiveModel compatibility, allowing you to index your models (incrementally upon saving, or in bulk), searching and paginating the results.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/thinking-sphinx '''thinking-sphinx'''] An intelligent layer for ActiveRecord (via Rails and Sinatra) for the Sphinx full-text search tool.&lt;br /&gt;
&lt;br /&gt;
* Other useful Ruby Gems here. [https://www.ruby-toolbox.com/projects/pg_search '''pg_search'''], [https://www.ruby-toolbox.com/projects/redis-search '''redis-search'''], [https://www.ruby-toolbox.com/projects/ferret '''Ferret'''], [https://www.ruby-toolbox.com/projects/searchlight '''searchlight'''].&lt;br /&gt;
&lt;br /&gt;
'''Data Persistence'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/mongoid '''Mongoid'''] Mongoid is an ODM (Object Document Mapper) Framework for MongoDB, written in Ruby.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/mongomatic '''Mongomatic'''] Mongomatic is a modular Ruby object mapper for Mongo.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/dynamoid '''dynamoid'''] Dynamoid is an ORM for Amazon's DynamoDB that supports offline development, associations, querying, and everything else you'd expect from an ActiveRecord-style replacement.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/squeel '''squeel'''] Squeel unlocks the power of Arel in your Rails 3 application with a handy block-based syntax. You can write subqueries, access named functions provided by your RDBMS, and more, all without writing SQL strings.&lt;br /&gt;
&lt;br /&gt;
 '''VIEW layer'''&lt;br /&gt;
&lt;br /&gt;
'''CSS'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/sass '''Sass'''] Sass makes CSS fun again. Sass is an extension of CSS3, adding nested rules, variables, mixins, selector inheritance, and more. It's translated to well-formatted, standard CSS using the command line tool or a web-framework plugin.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/bourbon '''bourbon'''] The purpose of Bourbon Vanilla Sass Mixins is to provide a comprehensive framework of sass mixins that are designed to be as vanilla as possible. Meaning they should not deter from the original CSS syntax. The mixins contain vendor specific prefixes for all CSS3 properties for support amongst modern browsers. The prefixes also ensure graceful degradation for older browsers that support only CSS3 prefixed properties.&lt;br /&gt;
&lt;br /&gt;
* Other useful Ruby Gems here. [https://www.ruby-toolbox.com/projects/less '''Less'''], [https://www.ruby-toolbox.com/projects/sass-rails '''sass-rails'''], [https://www.ruby-toolbox.com/projects/stylus '''stylus'''], [https://www.ruby-toolbox.com/projects/patterns '''patterns''']&lt;br /&gt;
&lt;br /&gt;
'''Graphing'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/google_visualr '''google_visualr'''] This Ruby gem, GoogleVisualr, is a wrapper around the Google Chart Tools that allows anyone to create the same beautiful charts with just Ruby; you don't have to write any JavaScript at all.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/highcharts-rails '''highcharts-rails'''] Gem that includes Highcharts (Interactive JavaScript charts for your web projects), in the Rails Asset Pipeline introduced in Rails 3.1.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/seer '''Seer'''] Gem that includes Highcharts (Interactive JavaScript charts for your web projects), in the Rails Asset Pipeline introduced in Rails 3.1.Seer is a lightweight, semantically rich wrapper for the Google Visualization API. It allows you to easily create a visualization of data in a variety of formats, including area charts, bar charts, column charts, gauges, line charts, and pie charts.&lt;br /&gt;
&lt;br /&gt;
'''HTML &amp;amp; Markup'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/formula '''formula'''] Formula is a Rails form generator that generates simple clean markup. The project aims to let users create semantically beautiful forms without introducing too much syntax. The goal is to make integrating advanced layout systems as simple as possible.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/formtastic '''Formtastic'''] A Rails form builder plugin/gem with semantically rich and accessible markup.&lt;br /&gt;
&lt;br /&gt;
'''JavaScript'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/jasmine '''Jasmine'''] Test your JavaScript without any framework dependencies, in any environment, and with a nice descriptive syntax.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/konacha '''konacha'''] Konacha is a Rails engine that allows you to test your JavaScript with the mocha test framework and chai assertion library. It is similar to Jasmine and Evergreen, but does not attempt to be framework agnostic. By sticking with Rails, Konacha can take full advantage of features such as the asset pipeline and engines&lt;br /&gt;
&lt;br /&gt;
'''Rails In-Place Editing'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/best_in_place '''BestInPlace'''] BestInPlace is a jQuery script and a Rails 3 helper that provide the method best_in_place to display any object field easily editable for the user by just clicking on it. It supports input data, text data, boolean data and custom dropdown data. It works with RESTful controllers.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/best_in_place_mongoid '''best_in_place_mongoid'''] BestInPlaceMongoid is a fork of BestInPlace jQuery script and a Rails 3 helper that provide the method best_in_place to display any object field easily editable for the user by just clicking on it. It supports input data, text data, boolean data and custom dropdown data. It works with RESTful controllers.&lt;br /&gt;
&lt;br /&gt;
 '''CONTROLLER layer'''&lt;br /&gt;
&lt;br /&gt;
'''Background Jobs'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/resque '''Resque'''] Resque is a Redis-backed Ruby library for creating background jobs, placing those jobs on multiple queues, and processing them later. Background jobs can be any Ruby class or module that responds to perform. Your existing classes can easily be converted to background jobs or you can create new classes specifically to do work. Or, you can do both. Resque is heavily inspired by DelayedJob (which rocks) and is comprised of three parts: * A Ruby library for creating, querying, and processing jobs * A Rake task for starting a worker which processes jobs * A Sinatra app for monitoring queues, jobs, and workers.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/starling '''Starling'''] Starling is a light-weight, persistent queue server that speaks the memcached protocol. It was originally developed for Twitter's backend.&lt;br /&gt;
&lt;br /&gt;
'''Scheduling'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/resque-scheduler '''resque-scheduler'''] Light weight job scheduling on top of Resque. Adds methods enqueue_at/enqueue_in to schedule jobs in the future. Also supports queueing jobs on a fixed, cron-like schedule.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/clockwork '''Clockwork'''] A scheduler process to replace cron, using a more flexible Ruby syntax running as a single long-running process. Inspired by rufus-scheduler and resque-scheduler.&lt;br /&gt;
&lt;br /&gt;
'''Code Metrics'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/simpleCov '''SimpleCov'''] Code coverage for Ruby 1.9 with a powerful configuration library and automatic merging of coverage across test suites.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/flay '''Flay'''] Flay analyzes code for structural similarities. Differences in literal values, variable, class, method names, whitespace, programming style, braces vs do/end, etc are all ignored. Making this totally rad.&lt;br /&gt;
&lt;br /&gt;
'''E-Mail Sending'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/actionmailer '''Action Mailer'''] Email on Rails. Compose, deliver, receive, and test emails using the familiar controller/view pattern. First-class support for multipart email and attachments.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/capistrano_mailer '''capistrano_mailer'''] Capistrano Deployment Email Notification. Keep the whole team informed of each release!&lt;br /&gt;
&lt;br /&gt;
 '''TESTING'''&lt;br /&gt;
&lt;br /&gt;
'''Browser testing'''&lt;br /&gt;
&lt;br /&gt;
* [http://rubygems.org/gems/capybara '''Capybara'''] Capybara is an integration testing tool for rack based web applications. It simulates how a user would interact with a website.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/webrat '''Webrat'''] Webrat lets you quickly write expressive and robust acceptance tests for a Ruby web application. It supports simulating a browser inside a Ruby process to avoid the performance hit and browser dependency of Selenium or Watir, but the same API can also be used to drive real Selenium tests when necessary (eg. for testing AJAX interactions). Most Ruby web frameworks and testing frameworks are supported.&lt;br /&gt;
&lt;br /&gt;
'''Random Data Generation'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/faker '''Faker'''] Faker, a port of Data::Faker from Perl, is used to easily generate fake data: names, addresses, phone numbers, etc.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/forgery '''Forgery'''] Easy and customizable generation of forged data. Can be used as a gem or a rails plugin. Includes rails generators for creating your own forgeries.&lt;br /&gt;
&lt;br /&gt;
'''Unit Test Frameworks'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/test-unit '''test-unit'''] Ruby 1.9.x bundles minitest not Test::Unit. Test::Unit bundled in Ruby 1.8.x had not been improved but unbundled Test::Unit (test-unit) is improved actively.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/wrong '''Wrong'''] Wrong provides a general assert method that takes a predicate block. Assertion failure messages are rich in detail. The Wrong idea is to replace all those countless assert_this, assert_that library methods which only exist to give a more useful failure message than &amp;quot;assertion failed&amp;quot;. Wrong replaces all of them in one fell swoop, since if you can write it in Ruby, Wrong can make a sensible failure message out of it. Also provided are several helper methods, like rescuing, capturing, and d.&lt;br /&gt;
&lt;br /&gt;
* Other useful Ruby Gems here. [https://www.ruby-toolbox.com/projects/testrocket '''testrocket'''], [https://www.ruby-toolbox.com/projects/kintama '''kintama'''], [https://www.ruby-toolbox.com/projects/lemon '''Lemon'''], [https://www.ruby-toolbox.com/projects/shindo '''Shindo'''].&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
[http://guides.rubygems.org/make-your-own-gem/ Gudie to create your own Ruby Gem]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://rubygems.rubyforge.org/rubygems-update/UPGRADING_rdoc.html How to Upgrade/Downgrade Ruby Gems]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://rubylearning.com/blog/ Collection of Ruby Study Notes]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://net.tutsplus.com/articles/web-roundups/24-extremely-useful-ruby-gems-for-web-development/ 24 extremely useful Ruby Gems for web development]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://railscasts.com/episodes/245-new-gem-with-bundler Screencasts to create a Ruby Gem]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://guides.rubygems.org/publishing/ How to publish your Ruby Gem?]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://www.ibm.com/developerworks/aix/library/au-aix-manage-ruby/ Manage Ruby and Gems with rvm]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://railscasts.com/episodes/183-gemcutter-jeweler Gemcutter and Jeweler railscast]&amp;lt;br&amp;gt;&lt;br /&gt;
[https://www.ruby-toolbox.com/projects/factory_girl Ruby Gem - factory girl]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://railscasts.com/episodes/192-authorization-with-cancan?view=asciicast Using cancan for authorization]&lt;br /&gt;
&lt;br /&gt;
== References==&lt;br /&gt;
[1] [http://guides.rubygems.org/rubygems-basics/#installing_gems Ruby Gems guide]&amp;lt;br&amp;gt;&lt;br /&gt;
[2] [http://timelessrepo.com/making-ruby-gems Making Ruby Gems]&amp;lt;br&amp;gt;&lt;br /&gt;
[3] [https://www.ruby-toolbox.com Ruby Tool Box]&amp;lt;br&amp;gt;&lt;br /&gt;
[4] [https://rubyforge.org/ Ruby Forge by Ruby Central]&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Npari</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch1_1w24_nv&amp;diff=79150</id>
		<title>CSC/ECE 517 Fall 2013/ch1 1w24 nv</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch1_1w24_nv&amp;diff=79150"/>
		<updated>2013-09-25T03:16:19Z</updated>

		<summary type="html">&lt;p&gt;Npari: /* References */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Ruby Gem is a package manager for Ruby programming language. It allows users to easily download, install and use software packages on their system. The functionality of a Ruby application can be modified or extended with the help of Gems. In the version 1.9 of Ruby, Ruby Gems has been made a part of the standard library. This article would take the user on a tour of what ruby gems are all about and introduce the reader to various Ruby gems one can use to extend a Ruby application. Links for more details on Ruby gems are provided for the reader's benefit at the end of the article. &lt;br /&gt;
&lt;br /&gt;
== '''A Tour of Ruby Gems''' ==&lt;br /&gt;
== Definition of a Ruby Gem ==&lt;br /&gt;
In simple terms, a Ruby Gem is a package containing files that can be installed in a system and can help expand the functionality of a Ruby application. Ruby gems are very powerful. Ruby programmers create and publish Ruby Gems as open source in [https://github.com/ github]. It is very easy to install, upgrade and delete Gems in a system.&lt;br /&gt;
&lt;br /&gt;
== Structure of Ruby Gem ==&lt;br /&gt;
Every Gem has a set of files and the following standard structure &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ tree -d newgem&lt;br /&gt;
|-- lib/&lt;br /&gt;
|   |-- newgem.rb&lt;br /&gt;
|   `-- newgem/&lt;br /&gt;
|       |-- base.rb&lt;br /&gt;
|       `-- version.rb&lt;br /&gt;
|-- test/&lt;br /&gt;
|-- bin/&lt;br /&gt;
|-- Rakefile&lt;br /&gt;
`-- newgem.gemspec&amp;lt;/pre&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
The ''lib'' folder has the code of the ruby gem. It has ''newgem.rb'' file and a folder named ''newgem''. This folder has two files which are ''base.rb'' and ''version.rb''. The version number is recorded in ''version.rb'' and can be changed when the gem is updated. The ''bin'' directory has any binaries that is a part of the gem file and should be distributed with the gem. A gem usually has a [http://rake.rubyforge.org/doc/rakefile_rdoc.html Rakefile]. The rake program uses this to generate code and automate tests in addition to performing other tasks. The Gem specification file ''newgem.gemspec'' contains details specific to the gem. The file has details such as the gem name,the files that are in it, the gems it depends on for  performing testing, the gems it depends on for actually running and other details.&lt;br /&gt;
&lt;br /&gt;
== Listing existing Gems ==&lt;br /&gt;
To list the existing gems in a system ''list'' keyword can be used in the command line.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem list&lt;br /&gt;
&lt;br /&gt;
*** LOCAL GEMS ***&lt;br /&gt;
&lt;br /&gt;
actionmailer (3.2.3)&lt;br /&gt;
actionpack (3.2.3)&lt;br /&gt;
activemodel (3.2.3)&lt;br /&gt;
activerecord (3.2.3)&lt;br /&gt;
activeresource (3.2.3)&lt;br /&gt;
activesupport (3.2.3)&lt;br /&gt;
arel (3.0.2)&lt;br /&gt;
bigdecimal (1.1.0)&lt;br /&gt;
builder (3.0.4)&lt;br /&gt;
bundler (1.3.5)&lt;br /&gt;
capybara (2.1.0)&lt;br /&gt;
coffee-rails (3.2.2)&lt;br /&gt;
coffee-script (2.2.0)&lt;br /&gt;
coffee-script-source (1.6.3)&lt;br /&gt;
erubis (2.7.0)&lt;br /&gt;
execjs (2.0.1)&lt;br /&gt;
hike (1.2.3)&lt;br /&gt;
i18n (0.6.5)&lt;br /&gt;
io-console (0.3)&lt;br /&gt;
journey (1.0.4)&lt;br /&gt;
jquery-rails (3.0.4)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installing a new Gem ==&lt;br /&gt;
The ''install'' keyword can be used in command line to install gems. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem install capybara&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Uninstalling a Gem ==&lt;br /&gt;
The ''uninstall'' keyword can be used in command line to uninstall any existing gem in the system.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem uninstall capybara&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you uninstall a dependency of a gem RubyGems will ask you for confirmation.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem uninstall rbtree&lt;br /&gt;
&lt;br /&gt;
You have requested to uninstall the gem:&lt;br /&gt;
	rbtree-0.4.1&lt;br /&gt;
&lt;br /&gt;
drip-0.0.2 depends on rbtree (&amp;gt;= 0)&lt;br /&gt;
If you remove this gem, these dependencies will not be met.&lt;br /&gt;
Continue with Uninstall? [yN]  n&lt;br /&gt;
ERROR:  While executing gem ... (Gem::DependencyRemovalException)&lt;br /&gt;
    Uninstallation aborted due to dependent gem(s)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Update all existing Gems == &lt;br /&gt;
The ''update'' keyword can be used in command line to update all existing gems in the system.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem update &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Creating a new Gem == &lt;br /&gt;
It is also possible to [http://guides.rubygems.org/make-your-own-gem/ create our own ruby gem] to be used later to extend our Ruby applications. Bundler is a tool that can be used to [https://github.com/radar/guides/blob/master/gem-development.md to create a ruby gem].&lt;br /&gt;
&lt;br /&gt;
== Ruby Gem Commands ==&lt;br /&gt;
&lt;br /&gt;
There is a list of commands that can be used with Ruby Gems. More details of each of these commands can be found [http://guides.rubygems.org/command-reference/ here]&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
gem build&lt;br /&gt;
gem cert&lt;br /&gt;
gem check&lt;br /&gt;
gem cleanup&lt;br /&gt;
gem contents&lt;br /&gt;
gem dependency&lt;br /&gt;
gem environment&lt;br /&gt;
gem fetch&lt;br /&gt;
gem generate_index&lt;br /&gt;
gem help&lt;br /&gt;
gem install&lt;br /&gt;
gem list&lt;br /&gt;
gem lock&lt;br /&gt;
gem mirror&lt;br /&gt;
gem outdated&lt;br /&gt;
gem owner&lt;br /&gt;
gem pristine&lt;br /&gt;
gem push&lt;br /&gt;
gem query&lt;br /&gt;
gem rdoc&lt;br /&gt;
gem search&lt;br /&gt;
gem server&lt;br /&gt;
gem sources&lt;br /&gt;
gem specification&lt;br /&gt;
gem stale&lt;br /&gt;
gem uninstall&lt;br /&gt;
gem unpack&lt;br /&gt;
gem update&lt;br /&gt;
gem which&lt;br /&gt;
gem yank&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Useful Gems in RAILS environment ==&lt;br /&gt;
&lt;br /&gt;
There are many gems which provide easy of functionality that can be included in the rails development environment. [http://bundler.io/ Bundler]is a useful gem that enables a developer to quickly add and manage gems in a few lines of code.&lt;br /&gt;
&lt;br /&gt;
We can classify the Gems based on the usage in different layers Model, View and Controller.&lt;br /&gt;
&lt;br /&gt;
 '''MODEL layer'''&lt;br /&gt;
&lt;br /&gt;
'''Active Record Plugins''' &lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/activerecord-oracle_enhanced-adapter '''oracle-enhanced'''] Oracle &amp;quot;enhanced&amp;quot; ActiveRecord adapter contains useful additional methods for working with new and legacy Oracle databases. This adapter is superset of original ActiveRecord Oracle adapter.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/activerecord-jdbc-adapter '''activerecord-jdbc-adapter'''] This adapter is build on JDBC API used for connecting to the database. AR-JDBC is a database adapter for Rails' ActiveRecord component. It allows to connect to virtually any JDBC-compliant database with your JRuby on Rails application.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/activerecord-nulldb-adapter '''nulldb'''] .This helps in Database simulation and testing. A database backend that translates database interactions into no-ops. We can test our model business logic with wanting to experiment with real database.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/oracle-enhanced-enhanced '''oracle-enhanced-enhanced'''] It includes several enhancements and customization to the standard ActiveRecord Oracle Enhapnced adapter, which is still required. Any customization to this adapter's behavior or additional Oracle-specific utilities should be added here.&lt;br /&gt;
&lt;br /&gt;
* Other useful Ruby Gems here. [https://www.ruby-toolbox.com/projects/activerecord-sqlserver-adapter '''activerecord-sqlserver-adapter'''], [https://www.ruby-toolbox.com/projects/activerecord-jdbcmysql-adapter '''activerecord-jdbcmysql-adapter'''], [https://www.ruby-toolbox.com/projects/activerecord-jdbcpostgresql-adapter '''activerecord-jdbcpostgresql-adapter'''], [https://www.ruby-toolbox.com/projects/activerecord-jdbcderby-adapter '''activerecord-jdbcderby-adapter'''],.&lt;br /&gt;
&lt;br /&gt;
'''Active Record Index Assistants'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/foreigner '''foreigner'''] Adds helpers to migrations and dumps foreign keys to schema.rb.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/rails_indexes '''rails_indexes'''] A rake task to track down missing database indexes. does not assume that all foreign keys end with the convention of _id.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/schema_plus '''schema_plus'''] SchemaPlus is an ActiveRecord extension that provides enhanced capabilities for schema definition and querying, including: enhanced and more DRY index capabilities, support and automation for foreign key constraints, and support for views.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/automatic_foreign_key '''automatic_foreign_key'''] Automatic Foreign Key automatically generates foreign-key constraints when creating tables or adding columns. It uses SQL-92 syntax and as such should be compatible with most databases that support foreign-key constraints.&lt;br /&gt;
&lt;br /&gt;
* Other useful Ruby Gems here. [https://www.ruby-toolbox.com/projects/ambitious_query_indexer '''ambitious_query_indexer'''], [https://www.ruby-toolbox.com/projects/lol_dba '''lol_dba'''], [https://www.ruby-toolbox.com/projects/immigrant '''immigrant'''], [https://www.ruby-toolbox.com/projects/redhillonrails_core '''redhillonrails_core'''].&lt;br /&gt;
&lt;br /&gt;
'''Rails DB Bootstrapping'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/seed-fu '''seed-fu'''] Seed Fu is an attempt to once and for all solve the problem of inserting and maintaining seed data in a database. It uses a variety of techniques gathered from various places around the web and combines them to create what is hopefully the most robust seed data system around.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/populator '''populator'''] Mass populate an Active Record database.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/seedbank '''seedbank'''] Extends Rails seeds to split out complex seeds into multiple files and lets each environment have it's own seeds.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/has_alter_ego '''Has alter ego'''] has_alter_ego makes it possible to keep seed and live data transparently in parallel. In contrast to other seed data approaches has_alter_ego synchronizes the seed definitions with your database objects automagically unless you've overridden it in the database.&lt;br /&gt;
&lt;br /&gt;
* Other useful Ruby Gems here. [https://www.ruby-toolbox.com/projects/bootstrapper '''Bootstrapper'''], [https://www.ruby-toolbox.com/projects/db-populate '''Db-populate'''], [https://www.ruby-toolbox.com/projects/seed_dumper '''seed_dumper'''], [https://www.ruby-toolbox.com/projects/dibber '''dibber'''].&lt;br /&gt;
&lt;br /&gt;
'''Rails Search'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/Sunspot '''Sunspot'''] Sunspot is a library providing a powerful, all-ruby API for the Solr search engine. Sunspot manages the configuration of persistent Ruby classes for search and indexing and exposes Solr's most powerful features through a collection of DSLs. Complex search operations can be performed without hand-writing any boolean queries or building Solr parameters by hand.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/sunspot_rails '''sunspot_rails'''] Sunspot::Rails is an extension to the Sunspot library for Solr search. Sunspot::Rails adds integration between Sunspot and ActiveRecord, including defining search and indexing related methods on ActiveRecord models themselves, running a Sunspot-compatible Solr instance for development and test environments, and automatically commit Solr index changes at the end of each Rails request.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/tire '''Tire'''] Tire is a Ruby client for the Elasticsearch search engine/database. It provides Ruby-like API for fluent communication with the Elasticsearch server and blends with ActiveModel class for convenient usage in Rails applications. It allows to delete and create indices, define mapping for them, supports the bulk API, and presents an easy-to-use DSL for constructing your queries. It has full ActiveRecord/ActiveModel compatibility, allowing you to index your models (incrementally upon saving, or in bulk), searching and paginating the results.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/thinking-sphinx '''thinking-sphinx'''] An intelligent layer for ActiveRecord (via Rails and Sinatra) for the Sphinx full-text search tool.&lt;br /&gt;
&lt;br /&gt;
* Other useful Ruby Gems here. [https://www.ruby-toolbox.com/projects/pg_search '''pg_search'''], [https://www.ruby-toolbox.com/projects/redis-search '''redis-search'''], [https://www.ruby-toolbox.com/projects/ferret '''Ferret'''], [https://www.ruby-toolbox.com/projects/searchlight '''searchlight'''].&lt;br /&gt;
&lt;br /&gt;
'''Data Persistence'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/mongoid '''Mongoid'''] Mongoid is an ODM (Object Document Mapper) Framework for MongoDB, written in Ruby.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/mongomatic '''Mongomatic'''] Mongomatic is a modular Ruby object mapper for Mongo.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/dynamoid '''dynamoid'''] Dynamoid is an ORM for Amazon's DynamoDB that supports offline development, associations, querying, and everything else you'd expect from an ActiveRecord-style replacement.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/squeel '''squeel'''] Squeel unlocks the power of Arel in your Rails 3 application with a handy block-based syntax. You can write subqueries, access named functions provided by your RDBMS, and more, all without writing SQL strings.&lt;br /&gt;
&lt;br /&gt;
 '''VIEW layer'''&lt;br /&gt;
&lt;br /&gt;
'''CSS'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/sass '''Sass'''] Sass makes CSS fun again. Sass is an extension of CSS3, adding nested rules, variables, mixins, selector inheritance, and more. It's translated to well-formatted, standard CSS using the command line tool or a web-framework plugin.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/bourbon '''bourbon'''] The purpose of Bourbon Vanilla Sass Mixins is to provide a comprehensive framework of sass mixins that are designed to be as vanilla as possible. Meaning they should not deter from the original CSS syntax. The mixins contain vendor specific prefixes for all CSS3 properties for support amongst modern browsers. The prefixes also ensure graceful degradation for older browsers that support only CSS3 prefixed properties.&lt;br /&gt;
&lt;br /&gt;
* Other useful Ruby Gems here. [https://www.ruby-toolbox.com/projects/less '''Less'''], [https://www.ruby-toolbox.com/projects/sass-rails '''sass-rails'''], [https://www.ruby-toolbox.com/projects/stylus '''stylus'''], [https://www.ruby-toolbox.com/projects/patterns '''patterns''']&lt;br /&gt;
&lt;br /&gt;
'''Graphing'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/google_visualr '''google_visualr'''] This Ruby gem, GoogleVisualr, is a wrapper around the Google Chart Tools that allows anyone to create the same beautiful charts with just Ruby; you don't have to write any JavaScript at all.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/highcharts-rails '''highcharts-rails'''] Gem that includes Highcharts (Interactive JavaScript charts for your web projects), in the Rails Asset Pipeline introduced in Rails 3.1.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/seer '''Seer'''] Gem that includes Highcharts (Interactive JavaScript charts for your web projects), in the Rails Asset Pipeline introduced in Rails 3.1.Seer is a lightweight, semantically rich wrapper for the Google Visualization API. It allows you to easily create a visualization of data in a variety of formats, including area charts, bar charts, column charts, gauges, line charts, and pie charts.&lt;br /&gt;
&lt;br /&gt;
'''HTML &amp;amp; Markup'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/formula '''formula'''] Formula is a Rails form generator that generates simple clean markup. The project aims to let users create semantically beautiful forms without introducing too much syntax. The goal is to make integrating advanced layout systems as simple as possible.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/formtastic '''Formtastic'''] A Rails form builder plugin/gem with semantically rich and accessible markup.&lt;br /&gt;
&lt;br /&gt;
'''JavaScript'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/jasmine '''Jasmine'''] Test your JavaScript without any framework dependencies, in any environment, and with a nice descriptive syntax.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/konacha '''konacha'''] Konacha is a Rails engine that allows you to test your JavaScript with the mocha test framework and chai assertion library. It is similar to Jasmine and Evergreen, but does not attempt to be framework agnostic. By sticking with Rails, Konacha can take full advantage of features such as the asset pipeline and engines&lt;br /&gt;
&lt;br /&gt;
'''Rails In-Place Editing'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/best_in_place '''BestInPlace'''] BestInPlace is a jQuery script and a Rails 3 helper that provide the method best_in_place to display any object field easily editable for the user by just clicking on it. It supports input data, text data, boolean data and custom dropdown data. It works with RESTful controllers.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/best_in_place_mongoid '''best_in_place_mongoid'''] BestInPlaceMongoid is a fork of BestInPlace jQuery script and a Rails 3 helper that provide the method best_in_place to display any object field easily editable for the user by just clicking on it. It supports input data, text data, boolean data and custom dropdown data. It works with RESTful controllers.&lt;br /&gt;
&lt;br /&gt;
 '''CONTROLLER layer'''&lt;br /&gt;
&lt;br /&gt;
'''Background Jobs'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/resque '''Resque'''] Resque is a Redis-backed Ruby library for creating background jobs, placing those jobs on multiple queues, and processing them later. Background jobs can be any Ruby class or module that responds to perform. Your existing classes can easily be converted to background jobs or you can create new classes specifically to do work. Or, you can do both. Resque is heavily inspired by DelayedJob (which rocks) and is comprised of three parts: * A Ruby library for creating, querying, and processing jobs * A Rake task for starting a worker which processes jobs * A Sinatra app for monitoring queues, jobs, and workers.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/starling '''Starling'''] Starling is a light-weight, persistent queue server that speaks the memcached protocol. It was originally developed for Twitter's backend.&lt;br /&gt;
&lt;br /&gt;
'''Scheduling'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/resque-scheduler '''resque-scheduler'''] Light weight job scheduling on top of Resque. Adds methods enqueue_at/enqueue_in to schedule jobs in the future. Also supports queueing jobs on a fixed, cron-like schedule.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/clockwork '''Clockwork'''] A scheduler process to replace cron, using a more flexible Ruby syntax running as a single long-running process. Inspired by rufus-scheduler and resque-scheduler.&lt;br /&gt;
&lt;br /&gt;
'''Code Metrics'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/simpleCov '''SimpleCov'''] Code coverage for Ruby 1.9 with a powerful configuration library and automatic merging of coverage across test suites.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/flay '''Flay'''] Flay analyzes code for structural similarities. Differences in literal values, variable, class, method names, whitespace, programming style, braces vs do/end, etc are all ignored. Making this totally rad.&lt;br /&gt;
&lt;br /&gt;
'''E-Mail Sending'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/actionmailer '''Action Mailer'''] Email on Rails. Compose, deliver, receive, and test emails using the familiar controller/view pattern. First-class support for multipart email and attachments.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/capistrano_mailer '''capistrano_mailer'''] Capistrano Deployment Email Notification. Keep the whole team informed of each release!&lt;br /&gt;
&lt;br /&gt;
 '''TESTING'''&lt;br /&gt;
&lt;br /&gt;
'''Browser testing'''&lt;br /&gt;
&lt;br /&gt;
* [http://rubygems.org/gems/capybara '''Capybara'''] Capybara is an integration testing tool for rack based web applications. It simulates how a user would interact with a website.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/webrat '''Webrat'''] Webrat lets you quickly write expressive and robust acceptance tests for a Ruby web application. It supports simulating a browser inside a Ruby process to avoid the performance hit and browser dependency of Selenium or Watir, but the same API can also be used to drive real Selenium tests when necessary (eg. for testing AJAX interactions). Most Ruby web frameworks and testing frameworks are supported.&lt;br /&gt;
&lt;br /&gt;
'''Random Data Generation'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/faker '''Faker'''] Faker, a port of Data::Faker from Perl, is used to easily generate fake data: names, addresses, phone numbers, etc.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/forgery '''Forgery'''] Easy and customizable generation of forged data. Can be used as a gem or a rails plugin. Includes rails generators for creating your own forgeries.&lt;br /&gt;
&lt;br /&gt;
'''Unit Test Frameworks'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/test-unit '''test-unit'''] Ruby 1.9.x bundles minitest not Test::Unit. Test::Unit bundled in Ruby 1.8.x had not been improved but unbundled Test::Unit (test-unit) is improved actively.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/wrong '''Wrong'''] Wrong provides a general assert method that takes a predicate block. Assertion failure messages are rich in detail. The Wrong idea is to replace all those countless assert_this, assert_that library methods which only exist to give a more useful failure message than &amp;quot;assertion failed&amp;quot;. Wrong replaces all of them in one fell swoop, since if you can write it in Ruby, Wrong can make a sensible failure message out of it. Also provided are several helper methods, like rescuing, capturing, and d.&lt;br /&gt;
&lt;br /&gt;
* Other useful Ruby Gems here. [https://www.ruby-toolbox.com/projects/testrocket '''testrocket'''], [https://www.ruby-toolbox.com/projects/kintama '''kintama'''], [https://www.ruby-toolbox.com/projects/lemon '''Lemon'''], [https://www.ruby-toolbox.com/projects/shindo '''Shindo'''].&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
[http://guides.rubygems.org/make-your-own-gem/ Gudie to create your own Ruby Gem]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://rubygems.rubyforge.org/rubygems-update/UPGRADING_rdoc.html How to Upgrade/Downgrade Ruby Gems]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://rubylearning.com/blog/ Collection of Ruby Study Notes]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://net.tutsplus.com/articles/web-roundups/24-extremely-useful-ruby-gems-for-web-development/ 24 extremely useful Ruby Gems for web development]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://railscasts.com/episodes/245-new-gem-with-bundler Screencasts to create a Ruby Gem]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://guides.rubygems.org/publishing/ How to publish your Ruby Gem?]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://www.ibm.com/developerworks/aix/library/au-aix-manage-ruby/ Manage Ruby and Gems with rvm]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://railscasts.com/episodes/183-gemcutter-jeweler Gemcutter and Jeweler railscast]&amp;lt;br&amp;gt;&lt;br /&gt;
[https://www.ruby-toolbox.com/projects/factory_girl Ruby Gem - factory girl]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://railscasts.com/episodes/192-authorization-with-cancan?view=asciicast Using cancan for authorization]&lt;br /&gt;
&lt;br /&gt;
== References==&lt;br /&gt;
[1] [http://guides.rubygems.org/rubygems-basics/#installing_gems Ruby Gems guide]&amp;lt;br&amp;gt;&lt;br /&gt;
[2] [http://timelessrepo.com/making-ruby-gems Making Ruby Gems]&amp;lt;br&amp;gt;&lt;br /&gt;
[3] [https://www.ruby-toolbox.com Ruby Tool Box]&amp;lt;br&amp;gt;&lt;br /&gt;
[4] [https://rubyforge.org/ Ruby Forge by Ruby Central]&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Npari</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch1_1w24_nv&amp;diff=79148</id>
		<title>CSC/ECE 517 Fall 2013/ch1 1w24 nv</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch1_1w24_nv&amp;diff=79148"/>
		<updated>2013-09-25T03:14:39Z</updated>

		<summary type="html">&lt;p&gt;Npari: /* Some important Gems that are useful in RAILS environment */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Ruby Gem is a package manager for Ruby programming language. It allows users to easily download, install and use software packages on their system. The functionality of a Ruby application can be modified or extended with the help of Gems. In the version 1.9 of Ruby, Ruby Gems has been made a part of the standard library. This article would take the user on a tour of what ruby gems are all about and introduce the reader to various Ruby gems one can use to extend a Ruby application. Links for more details on Ruby gems are provided for the reader's benefit at the end of the article. &lt;br /&gt;
&lt;br /&gt;
== '''A Tour of Ruby Gems''' ==&lt;br /&gt;
== Definition of a Ruby Gem ==&lt;br /&gt;
In simple terms, a Ruby Gem is a package containing files that can be installed in a system and can help expand the functionality of a Ruby application. Ruby gems are very powerful. Ruby programmers create and publish Ruby Gems as open source in [https://github.com/ github]. It is very easy to install, upgrade and delete Gems in a system.&lt;br /&gt;
&lt;br /&gt;
== Structure of Ruby Gem ==&lt;br /&gt;
Every Gem has a set of files and the following standard structure &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ tree -d newgem&lt;br /&gt;
|-- lib/&lt;br /&gt;
|   |-- newgem.rb&lt;br /&gt;
|   `-- newgem/&lt;br /&gt;
|       |-- base.rb&lt;br /&gt;
|       `-- version.rb&lt;br /&gt;
|-- test/&lt;br /&gt;
|-- bin/&lt;br /&gt;
|-- Rakefile&lt;br /&gt;
`-- newgem.gemspec&amp;lt;/pre&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
The ''lib'' folder has the code of the ruby gem. It has ''newgem.rb'' file and a folder named ''newgem''. This folder has two files which are ''base.rb'' and ''version.rb''. The version number is recorded in ''version.rb'' and can be changed when the gem is updated. The ''bin'' directory has any binaries that is a part of the gem file and should be distributed with the gem. A gem usually has a [http://rake.rubyforge.org/doc/rakefile_rdoc.html Rakefile]. The rake program uses this to generate code and automate tests in addition to performing other tasks. The Gem specification file ''newgem.gemspec'' contains details specific to the gem. The file has details such as the gem name,the files that are in it, the gems it depends on for  performing testing, the gems it depends on for actually running and other details.&lt;br /&gt;
&lt;br /&gt;
== Listing existing Gems ==&lt;br /&gt;
To list the existing gems in a system ''list'' keyword can be used in the command line.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem list&lt;br /&gt;
&lt;br /&gt;
*** LOCAL GEMS ***&lt;br /&gt;
&lt;br /&gt;
actionmailer (3.2.3)&lt;br /&gt;
actionpack (3.2.3)&lt;br /&gt;
activemodel (3.2.3)&lt;br /&gt;
activerecord (3.2.3)&lt;br /&gt;
activeresource (3.2.3)&lt;br /&gt;
activesupport (3.2.3)&lt;br /&gt;
arel (3.0.2)&lt;br /&gt;
bigdecimal (1.1.0)&lt;br /&gt;
builder (3.0.4)&lt;br /&gt;
bundler (1.3.5)&lt;br /&gt;
capybara (2.1.0)&lt;br /&gt;
coffee-rails (3.2.2)&lt;br /&gt;
coffee-script (2.2.0)&lt;br /&gt;
coffee-script-source (1.6.3)&lt;br /&gt;
erubis (2.7.0)&lt;br /&gt;
execjs (2.0.1)&lt;br /&gt;
hike (1.2.3)&lt;br /&gt;
i18n (0.6.5)&lt;br /&gt;
io-console (0.3)&lt;br /&gt;
journey (1.0.4)&lt;br /&gt;
jquery-rails (3.0.4)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installing a new Gem ==&lt;br /&gt;
The ''install'' keyword can be used in command line to install gems. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem install capybara&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Uninstalling a Gem ==&lt;br /&gt;
The ''uninstall'' keyword can be used in command line to uninstall any existing gem in the system.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem uninstall capybara&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you uninstall a dependency of a gem RubyGems will ask you for confirmation.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem uninstall rbtree&lt;br /&gt;
&lt;br /&gt;
You have requested to uninstall the gem:&lt;br /&gt;
	rbtree-0.4.1&lt;br /&gt;
&lt;br /&gt;
drip-0.0.2 depends on rbtree (&amp;gt;= 0)&lt;br /&gt;
If you remove this gem, these dependencies will not be met.&lt;br /&gt;
Continue with Uninstall? [yN]  n&lt;br /&gt;
ERROR:  While executing gem ... (Gem::DependencyRemovalException)&lt;br /&gt;
    Uninstallation aborted due to dependent gem(s)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Update all existing Gems == &lt;br /&gt;
The ''update'' keyword can be used in command line to update all existing gems in the system.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem update &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Creating a new Gem == &lt;br /&gt;
It is also possible to [http://guides.rubygems.org/make-your-own-gem/ create our own ruby gem] to be used later to extend our Ruby applications. Bundler is a tool that can be used to [https://github.com/radar/guides/blob/master/gem-development.md to create a ruby gem].&lt;br /&gt;
&lt;br /&gt;
== Ruby Gem Commands ==&lt;br /&gt;
&lt;br /&gt;
There is a list of commands that can be used with Ruby Gems. More details of each of these commands can be found [http://guides.rubygems.org/command-reference/ here]&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
gem build&lt;br /&gt;
gem cert&lt;br /&gt;
gem check&lt;br /&gt;
gem cleanup&lt;br /&gt;
gem contents&lt;br /&gt;
gem dependency&lt;br /&gt;
gem environment&lt;br /&gt;
gem fetch&lt;br /&gt;
gem generate_index&lt;br /&gt;
gem help&lt;br /&gt;
gem install&lt;br /&gt;
gem list&lt;br /&gt;
gem lock&lt;br /&gt;
gem mirror&lt;br /&gt;
gem outdated&lt;br /&gt;
gem owner&lt;br /&gt;
gem pristine&lt;br /&gt;
gem push&lt;br /&gt;
gem query&lt;br /&gt;
gem rdoc&lt;br /&gt;
gem search&lt;br /&gt;
gem server&lt;br /&gt;
gem sources&lt;br /&gt;
gem specification&lt;br /&gt;
gem stale&lt;br /&gt;
gem uninstall&lt;br /&gt;
gem unpack&lt;br /&gt;
gem update&lt;br /&gt;
gem which&lt;br /&gt;
gem yank&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Useful Gems in RAILS environment ==&lt;br /&gt;
&lt;br /&gt;
There are many gems which provide easy of functionality that can be included in the rails development environment. [http://bundler.io/ Bundler]is a useful gem that enables a developer to quickly add and manage gems in a few lines of code.&lt;br /&gt;
&lt;br /&gt;
We can classify the Gems based on the usage in different layers Model, View and Controller.&lt;br /&gt;
&lt;br /&gt;
 '''MODEL layer'''&lt;br /&gt;
&lt;br /&gt;
'''Active Record Plugins''' &lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/activerecord-oracle_enhanced-adapter '''oracle-enhanced'''] Oracle &amp;quot;enhanced&amp;quot; ActiveRecord adapter contains useful additional methods for working with new and legacy Oracle databases. This adapter is superset of original ActiveRecord Oracle adapter.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/activerecord-jdbc-adapter '''activerecord-jdbc-adapter'''] This adapter is build on JDBC API used for connecting to the database. AR-JDBC is a database adapter for Rails' ActiveRecord component. It allows to connect to virtually any JDBC-compliant database with your JRuby on Rails application.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/activerecord-nulldb-adapter '''nulldb'''] .This helps in Database simulation and testing. A database backend that translates database interactions into no-ops. We can test our model business logic with wanting to experiment with real database.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/oracle-enhanced-enhanced '''oracle-enhanced-enhanced'''] It includes several enhancements and customization to the standard ActiveRecord Oracle Enhapnced adapter, which is still required. Any customization to this adapter's behavior or additional Oracle-specific utilities should be added here.&lt;br /&gt;
&lt;br /&gt;
* Other useful Ruby Gems here. [https://www.ruby-toolbox.com/projects/activerecord-sqlserver-adapter '''activerecord-sqlserver-adapter'''], [https://www.ruby-toolbox.com/projects/activerecord-jdbcmysql-adapter '''activerecord-jdbcmysql-adapter'''], [https://www.ruby-toolbox.com/projects/activerecord-jdbcpostgresql-adapter '''activerecord-jdbcpostgresql-adapter'''], [https://www.ruby-toolbox.com/projects/activerecord-jdbcderby-adapter '''activerecord-jdbcderby-adapter'''],.&lt;br /&gt;
&lt;br /&gt;
'''Active Record Index Assistants'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/foreigner '''foreigner'''] Adds helpers to migrations and dumps foreign keys to schema.rb.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/rails_indexes '''rails_indexes'''] A rake task to track down missing database indexes. does not assume that all foreign keys end with the convention of _id.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/schema_plus '''schema_plus'''] SchemaPlus is an ActiveRecord extension that provides enhanced capabilities for schema definition and querying, including: enhanced and more DRY index capabilities, support and automation for foreign key constraints, and support for views.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/automatic_foreign_key '''automatic_foreign_key'''] Automatic Foreign Key automatically generates foreign-key constraints when creating tables or adding columns. It uses SQL-92 syntax and as such should be compatible with most databases that support foreign-key constraints.&lt;br /&gt;
&lt;br /&gt;
* Other useful Ruby Gems here. [https://www.ruby-toolbox.com/projects/ambitious_query_indexer '''ambitious_query_indexer'''], [https://www.ruby-toolbox.com/projects/lol_dba '''lol_dba'''], [https://www.ruby-toolbox.com/projects/immigrant '''immigrant'''], [https://www.ruby-toolbox.com/projects/redhillonrails_core '''redhillonrails_core'''].&lt;br /&gt;
&lt;br /&gt;
'''Rails DB Bootstrapping'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/seed-fu '''seed-fu'''] Seed Fu is an attempt to once and for all solve the problem of inserting and maintaining seed data in a database. It uses a variety of techniques gathered from various places around the web and combines them to create what is hopefully the most robust seed data system around.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/populator '''populator'''] Mass populate an Active Record database.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/seedbank '''seedbank'''] Extends Rails seeds to split out complex seeds into multiple files and lets each environment have it's own seeds.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/has_alter_ego '''Has alter ego'''] has_alter_ego makes it possible to keep seed and live data transparently in parallel. In contrast to other seed data approaches has_alter_ego synchronizes the seed definitions with your database objects automagically unless you've overridden it in the database.&lt;br /&gt;
&lt;br /&gt;
* Other useful Ruby Gems here. [https://www.ruby-toolbox.com/projects/bootstrapper '''Bootstrapper'''], [https://www.ruby-toolbox.com/projects/db-populate '''Db-populate'''], [https://www.ruby-toolbox.com/projects/seed_dumper '''seed_dumper'''], [https://www.ruby-toolbox.com/projects/dibber '''dibber'''].&lt;br /&gt;
&lt;br /&gt;
'''Rails Search'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/Sunspot '''Sunspot'''] Sunspot is a library providing a powerful, all-ruby API for the Solr search engine. Sunspot manages the configuration of persistent Ruby classes for search and indexing and exposes Solr's most powerful features through a collection of DSLs. Complex search operations can be performed without hand-writing any boolean queries or building Solr parameters by hand.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/sunspot_rails '''sunspot_rails'''] Sunspot::Rails is an extension to the Sunspot library for Solr search. Sunspot::Rails adds integration between Sunspot and ActiveRecord, including defining search and indexing related methods on ActiveRecord models themselves, running a Sunspot-compatible Solr instance for development and test environments, and automatically commit Solr index changes at the end of each Rails request.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/tire '''Tire'''] Tire is a Ruby client for the Elasticsearch search engine/database. It provides Ruby-like API for fluent communication with the Elasticsearch server and blends with ActiveModel class for convenient usage in Rails applications. It allows to delete and create indices, define mapping for them, supports the bulk API, and presents an easy-to-use DSL for constructing your queries. It has full ActiveRecord/ActiveModel compatibility, allowing you to index your models (incrementally upon saving, or in bulk), searching and paginating the results.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/thinking-sphinx '''thinking-sphinx'''] An intelligent layer for ActiveRecord (via Rails and Sinatra) for the Sphinx full-text search tool.&lt;br /&gt;
&lt;br /&gt;
* Other useful Ruby Gems here. [https://www.ruby-toolbox.com/projects/pg_search '''pg_search'''], [https://www.ruby-toolbox.com/projects/redis-search '''redis-search'''], [https://www.ruby-toolbox.com/projects/ferret '''Ferret'''], [https://www.ruby-toolbox.com/projects/searchlight '''searchlight'''].&lt;br /&gt;
&lt;br /&gt;
'''Data Persistence'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/mongoid '''Mongoid'''] Mongoid is an ODM (Object Document Mapper) Framework for MongoDB, written in Ruby.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/mongomatic '''Mongomatic'''] Mongomatic is a modular Ruby object mapper for Mongo.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/dynamoid '''dynamoid'''] Dynamoid is an ORM for Amazon's DynamoDB that supports offline development, associations, querying, and everything else you'd expect from an ActiveRecord-style replacement.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/squeel '''squeel'''] Squeel unlocks the power of Arel in your Rails 3 application with a handy block-based syntax. You can write subqueries, access named functions provided by your RDBMS, and more, all without writing SQL strings.&lt;br /&gt;
&lt;br /&gt;
 '''VIEW layer'''&lt;br /&gt;
&lt;br /&gt;
'''CSS'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/sass '''Sass'''] Sass makes CSS fun again. Sass is an extension of CSS3, adding nested rules, variables, mixins, selector inheritance, and more. It's translated to well-formatted, standard CSS using the command line tool or a web-framework plugin.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/bourbon '''bourbon'''] The purpose of Bourbon Vanilla Sass Mixins is to provide a comprehensive framework of sass mixins that are designed to be as vanilla as possible. Meaning they should not deter from the original CSS syntax. The mixins contain vendor specific prefixes for all CSS3 properties for support amongst modern browsers. The prefixes also ensure graceful degradation for older browsers that support only CSS3 prefixed properties.&lt;br /&gt;
&lt;br /&gt;
* Other useful Ruby Gems here. [https://www.ruby-toolbox.com/projects/less '''Less'''], [https://www.ruby-toolbox.com/projects/sass-rails '''sass-rails'''], [https://www.ruby-toolbox.com/projects/stylus '''stylus'''], [https://www.ruby-toolbox.com/projects/patterns '''patterns''']&lt;br /&gt;
&lt;br /&gt;
'''Graphing'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/google_visualr '''google_visualr'''] This Ruby gem, GoogleVisualr, is a wrapper around the Google Chart Tools that allows anyone to create the same beautiful charts with just Ruby; you don't have to write any JavaScript at all.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/highcharts-rails '''highcharts-rails'''] Gem that includes Highcharts (Interactive JavaScript charts for your web projects), in the Rails Asset Pipeline introduced in Rails 3.1.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/seer '''Seer'''] Gem that includes Highcharts (Interactive JavaScript charts for your web projects), in the Rails Asset Pipeline introduced in Rails 3.1.Seer is a lightweight, semantically rich wrapper for the Google Visualization API. It allows you to easily create a visualization of data in a variety of formats, including area charts, bar charts, column charts, gauges, line charts, and pie charts.&lt;br /&gt;
&lt;br /&gt;
'''HTML &amp;amp; Markup'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/formula '''formula'''] Formula is a Rails form generator that generates simple clean markup. The project aims to let users create semantically beautiful forms without introducing too much syntax. The goal is to make integrating advanced layout systems as simple as possible.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/formtastic '''Formtastic'''] A Rails form builder plugin/gem with semantically rich and accessible markup.&lt;br /&gt;
&lt;br /&gt;
'''JavaScript'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/jasmine '''Jasmine'''] Test your JavaScript without any framework dependencies, in any environment, and with a nice descriptive syntax.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/konacha '''konacha'''] Konacha is a Rails engine that allows you to test your JavaScript with the mocha test framework and chai assertion library. It is similar to Jasmine and Evergreen, but does not attempt to be framework agnostic. By sticking with Rails, Konacha can take full advantage of features such as the asset pipeline and engines&lt;br /&gt;
&lt;br /&gt;
'''Rails In-Place Editing'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/best_in_place '''BestInPlace'''] BestInPlace is a jQuery script and a Rails 3 helper that provide the method best_in_place to display any object field easily editable for the user by just clicking on it. It supports input data, text data, boolean data and custom dropdown data. It works with RESTful controllers.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/best_in_place_mongoid '''best_in_place_mongoid'''] BestInPlaceMongoid is a fork of BestInPlace jQuery script and a Rails 3 helper that provide the method best_in_place to display any object field easily editable for the user by just clicking on it. It supports input data, text data, boolean data and custom dropdown data. It works with RESTful controllers.&lt;br /&gt;
&lt;br /&gt;
 '''CONTROLLER layer'''&lt;br /&gt;
&lt;br /&gt;
'''Background Jobs'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/resque '''Resque'''] Resque is a Redis-backed Ruby library for creating background jobs, placing those jobs on multiple queues, and processing them later. Background jobs can be any Ruby class or module that responds to perform. Your existing classes can easily be converted to background jobs or you can create new classes specifically to do work. Or, you can do both. Resque is heavily inspired by DelayedJob (which rocks) and is comprised of three parts: * A Ruby library for creating, querying, and processing jobs * A Rake task for starting a worker which processes jobs * A Sinatra app for monitoring queues, jobs, and workers.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/starling '''Starling'''] Starling is a light-weight, persistent queue server that speaks the memcached protocol. It was originally developed for Twitter's backend.&lt;br /&gt;
&lt;br /&gt;
'''Scheduling'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/resque-scheduler '''resque-scheduler'''] Light weight job scheduling on top of Resque. Adds methods enqueue_at/enqueue_in to schedule jobs in the future. Also supports queueing jobs on a fixed, cron-like schedule.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/clockwork '''Clockwork'''] A scheduler process to replace cron, using a more flexible Ruby syntax running as a single long-running process. Inspired by rufus-scheduler and resque-scheduler.&lt;br /&gt;
&lt;br /&gt;
'''Code Metrics'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/simpleCov '''SimpleCov'''] Code coverage for Ruby 1.9 with a powerful configuration library and automatic merging of coverage across test suites.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/flay '''Flay'''] Flay analyzes code for structural similarities. Differences in literal values, variable, class, method names, whitespace, programming style, braces vs do/end, etc are all ignored. Making this totally rad.&lt;br /&gt;
&lt;br /&gt;
'''E-Mail Sending'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/actionmailer '''Action Mailer'''] Email on Rails. Compose, deliver, receive, and test emails using the familiar controller/view pattern. First-class support for multipart email and attachments.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/capistrano_mailer '''capistrano_mailer'''] Capistrano Deployment Email Notification. Keep the whole team informed of each release!&lt;br /&gt;
&lt;br /&gt;
 '''TESTING'''&lt;br /&gt;
&lt;br /&gt;
'''Browser testing'''&lt;br /&gt;
&lt;br /&gt;
* [http://rubygems.org/gems/capybara '''Capybara'''] Capybara is an integration testing tool for rack based web applications. It simulates how a user would interact with a website.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/webrat '''Webrat'''] Webrat lets you quickly write expressive and robust acceptance tests for a Ruby web application. It supports simulating a browser inside a Ruby process to avoid the performance hit and browser dependency of Selenium or Watir, but the same API can also be used to drive real Selenium tests when necessary (eg. for testing AJAX interactions). Most Ruby web frameworks and testing frameworks are supported.&lt;br /&gt;
&lt;br /&gt;
'''Random Data Generation'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/faker '''Faker'''] Faker, a port of Data::Faker from Perl, is used to easily generate fake data: names, addresses, phone numbers, etc.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/forgery '''Forgery'''] Easy and customizable generation of forged data. Can be used as a gem or a rails plugin. Includes rails generators for creating your own forgeries.&lt;br /&gt;
&lt;br /&gt;
'''Unit Test Frameworks'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/test-unit '''test-unit'''] Ruby 1.9.x bundles minitest not Test::Unit. Test::Unit bundled in Ruby 1.8.x had not been improved but unbundled Test::Unit (test-unit) is improved actively.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/wrong '''Wrong'''] Wrong provides a general assert method that takes a predicate block. Assertion failure messages are rich in detail. The Wrong idea is to replace all those countless assert_this, assert_that library methods which only exist to give a more useful failure message than &amp;quot;assertion failed&amp;quot;. Wrong replaces all of them in one fell swoop, since if you can write it in Ruby, Wrong can make a sensible failure message out of it. Also provided are several helper methods, like rescuing, capturing, and d.&lt;br /&gt;
&lt;br /&gt;
* Other useful Ruby Gems here. [https://www.ruby-toolbox.com/projects/testrocket '''testrocket'''], [https://www.ruby-toolbox.com/projects/kintama '''kintama'''], [https://www.ruby-toolbox.com/projects/lemon '''Lemon'''], [https://www.ruby-toolbox.com/projects/shindo '''Shindo'''].&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
[http://guides.rubygems.org/make-your-own-gem/ Gudie to create your own Ruby Gem]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://rubygems.rubyforge.org/rubygems-update/UPGRADING_rdoc.html How to Upgrade/Downgrade Ruby Gems]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://rubylearning.com/blog/ Collection of Ruby Study Notes]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://net.tutsplus.com/articles/web-roundups/24-extremely-useful-ruby-gems-for-web-development/ 24 extremely useful Ruby Gems for web development]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://railscasts.com/episodes/245-new-gem-with-bundler Screencasts to create a Ruby Gem]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://guides.rubygems.org/publishing/ How to publish your Ruby Gem?]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://www.ibm.com/developerworks/aix/library/au-aix-manage-ruby/ Manage Ruby and Gems with rvm]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://railscasts.com/episodes/183-gemcutter-jeweler Gemcutter and Jeweler railscast]&amp;lt;br&amp;gt;&lt;br /&gt;
[https://www.ruby-toolbox.com/projects/factory_girl Ruby Gem - factory girl]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://railscasts.com/episodes/192-authorization-with-cancan?view=asciicast Using cancan for authorization]&lt;br /&gt;
&lt;br /&gt;
== References==&lt;br /&gt;
1. [http://guides.rubygems.org/rubygems-basics/#installing_gems Ruby Gems guide]&amp;lt;br&amp;gt;&lt;br /&gt;
2. [http://timelessrepo.com/making-ruby-gems Making Ruby Gems]&amp;lt;br&amp;gt;&lt;br /&gt;
3. [https://www.ruby-toolbox.com Ruby Tool Box]&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Npari</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch1_1w24_nv&amp;diff=79147</id>
		<title>CSC/ECE 517 Fall 2013/ch1 1w24 nv</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch1_1w24_nv&amp;diff=79147"/>
		<updated>2013-09-25T03:13:54Z</updated>

		<summary type="html">&lt;p&gt;Npari: /* Definition of a Ruby Gem */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Ruby Gem is a package manager for Ruby programming language. It allows users to easily download, install and use software packages on their system. The functionality of a Ruby application can be modified or extended with the help of Gems. In the version 1.9 of Ruby, Ruby Gems has been made a part of the standard library. This article would take the user on a tour of what ruby gems are all about and introduce the reader to various Ruby gems one can use to extend a Ruby application. Links for more details on Ruby gems are provided for the reader's benefit at the end of the article. &lt;br /&gt;
&lt;br /&gt;
== '''A Tour of Ruby Gems''' ==&lt;br /&gt;
== Definition of a Ruby Gem ==&lt;br /&gt;
In simple terms, a Ruby Gem is a package containing files that can be installed in a system and can help expand the functionality of a Ruby application. Ruby gems are very powerful. Ruby programmers create and publish Ruby Gems as open source in [https://github.com/ github]. It is very easy to install, upgrade and delete Gems in a system.&lt;br /&gt;
&lt;br /&gt;
== Structure of Ruby Gem ==&lt;br /&gt;
Every Gem has a set of files and the following standard structure &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ tree -d newgem&lt;br /&gt;
|-- lib/&lt;br /&gt;
|   |-- newgem.rb&lt;br /&gt;
|   `-- newgem/&lt;br /&gt;
|       |-- base.rb&lt;br /&gt;
|       `-- version.rb&lt;br /&gt;
|-- test/&lt;br /&gt;
|-- bin/&lt;br /&gt;
|-- Rakefile&lt;br /&gt;
`-- newgem.gemspec&amp;lt;/pre&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
The ''lib'' folder has the code of the ruby gem. It has ''newgem.rb'' file and a folder named ''newgem''. This folder has two files which are ''base.rb'' and ''version.rb''. The version number is recorded in ''version.rb'' and can be changed when the gem is updated. The ''bin'' directory has any binaries that is a part of the gem file and should be distributed with the gem. A gem usually has a [http://rake.rubyforge.org/doc/rakefile_rdoc.html Rakefile]. The rake program uses this to generate code and automate tests in addition to performing other tasks. The Gem specification file ''newgem.gemspec'' contains details specific to the gem. The file has details such as the gem name,the files that are in it, the gems it depends on for  performing testing, the gems it depends on for actually running and other details.&lt;br /&gt;
&lt;br /&gt;
== Listing existing Gems ==&lt;br /&gt;
To list the existing gems in a system ''list'' keyword can be used in the command line.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem list&lt;br /&gt;
&lt;br /&gt;
*** LOCAL GEMS ***&lt;br /&gt;
&lt;br /&gt;
actionmailer (3.2.3)&lt;br /&gt;
actionpack (3.2.3)&lt;br /&gt;
activemodel (3.2.3)&lt;br /&gt;
activerecord (3.2.3)&lt;br /&gt;
activeresource (3.2.3)&lt;br /&gt;
activesupport (3.2.3)&lt;br /&gt;
arel (3.0.2)&lt;br /&gt;
bigdecimal (1.1.0)&lt;br /&gt;
builder (3.0.4)&lt;br /&gt;
bundler (1.3.5)&lt;br /&gt;
capybara (2.1.0)&lt;br /&gt;
coffee-rails (3.2.2)&lt;br /&gt;
coffee-script (2.2.0)&lt;br /&gt;
coffee-script-source (1.6.3)&lt;br /&gt;
erubis (2.7.0)&lt;br /&gt;
execjs (2.0.1)&lt;br /&gt;
hike (1.2.3)&lt;br /&gt;
i18n (0.6.5)&lt;br /&gt;
io-console (0.3)&lt;br /&gt;
journey (1.0.4)&lt;br /&gt;
jquery-rails (3.0.4)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installing a new Gem ==&lt;br /&gt;
The ''install'' keyword can be used in command line to install gems. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem install capybara&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Uninstalling a Gem ==&lt;br /&gt;
The ''uninstall'' keyword can be used in command line to uninstall any existing gem in the system.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem uninstall capybara&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you uninstall a dependency of a gem RubyGems will ask you for confirmation.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem uninstall rbtree&lt;br /&gt;
&lt;br /&gt;
You have requested to uninstall the gem:&lt;br /&gt;
	rbtree-0.4.1&lt;br /&gt;
&lt;br /&gt;
drip-0.0.2 depends on rbtree (&amp;gt;= 0)&lt;br /&gt;
If you remove this gem, these dependencies will not be met.&lt;br /&gt;
Continue with Uninstall? [yN]  n&lt;br /&gt;
ERROR:  While executing gem ... (Gem::DependencyRemovalException)&lt;br /&gt;
    Uninstallation aborted due to dependent gem(s)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Update all existing Gems == &lt;br /&gt;
The ''update'' keyword can be used in command line to update all existing gems in the system.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem update &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Creating a new Gem == &lt;br /&gt;
It is also possible to [http://guides.rubygems.org/make-your-own-gem/ create our own ruby gem] to be used later to extend our Ruby applications. Bundler is a tool that can be used to [https://github.com/radar/guides/blob/master/gem-development.md to create a ruby gem].&lt;br /&gt;
&lt;br /&gt;
== Ruby Gem Commands ==&lt;br /&gt;
&lt;br /&gt;
There is a list of commands that can be used with Ruby Gems. More details of each of these commands can be found [http://guides.rubygems.org/command-reference/ here]&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
gem build&lt;br /&gt;
gem cert&lt;br /&gt;
gem check&lt;br /&gt;
gem cleanup&lt;br /&gt;
gem contents&lt;br /&gt;
gem dependency&lt;br /&gt;
gem environment&lt;br /&gt;
gem fetch&lt;br /&gt;
gem generate_index&lt;br /&gt;
gem help&lt;br /&gt;
gem install&lt;br /&gt;
gem list&lt;br /&gt;
gem lock&lt;br /&gt;
gem mirror&lt;br /&gt;
gem outdated&lt;br /&gt;
gem owner&lt;br /&gt;
gem pristine&lt;br /&gt;
gem push&lt;br /&gt;
gem query&lt;br /&gt;
gem rdoc&lt;br /&gt;
gem search&lt;br /&gt;
gem server&lt;br /&gt;
gem sources&lt;br /&gt;
gem specification&lt;br /&gt;
gem stale&lt;br /&gt;
gem uninstall&lt;br /&gt;
gem unpack&lt;br /&gt;
gem update&lt;br /&gt;
gem which&lt;br /&gt;
gem yank&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Some important Gems that are useful in RAILS environment ==&lt;br /&gt;
&lt;br /&gt;
There are many gems which provide easy of functionality that can be included in the rails development environment. [http://bundler.io/ Bundler]is a useful gem that enables a developer to quickly add and manage gems in a few lines of code.&lt;br /&gt;
&lt;br /&gt;
We can classify the Gems based on the usage in different layers Model, View and Controller.&lt;br /&gt;
&lt;br /&gt;
 '''MODEL layer'''&lt;br /&gt;
&lt;br /&gt;
'''Active Record Plugins''' &lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/activerecord-oracle_enhanced-adapter '''oracle-enhanced'''] Oracle &amp;quot;enhanced&amp;quot; ActiveRecord adapter contains useful additional methods for working with new and legacy Oracle databases. This adapter is superset of original ActiveRecord Oracle adapter.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/activerecord-jdbc-adapter '''activerecord-jdbc-adapter'''] This adapter is build on JDBC API used for connecting to the database. AR-JDBC is a database adapter for Rails' ActiveRecord component. It allows to connect to virtually any JDBC-compliant database with your JRuby on Rails application.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/activerecord-nulldb-adapter '''nulldb'''] .This helps in Database simulation and testing. A database backend that translates database interactions into no-ops. We can test our model business logic with wanting to experiment with real database.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/oracle-enhanced-enhanced '''oracle-enhanced-enhanced'''] It includes several enhancements and customization to the standard ActiveRecord Oracle Enhapnced adapter, which is still required. Any customization to this adapter's behavior or additional Oracle-specific utilities should be added here.&lt;br /&gt;
&lt;br /&gt;
* Other useful Ruby Gems here. [https://www.ruby-toolbox.com/projects/activerecord-sqlserver-adapter '''activerecord-sqlserver-adapter'''], [https://www.ruby-toolbox.com/projects/activerecord-jdbcmysql-adapter '''activerecord-jdbcmysql-adapter'''], [https://www.ruby-toolbox.com/projects/activerecord-jdbcpostgresql-adapter '''activerecord-jdbcpostgresql-adapter'''], [https://www.ruby-toolbox.com/projects/activerecord-jdbcderby-adapter '''activerecord-jdbcderby-adapter'''],.&lt;br /&gt;
&lt;br /&gt;
'''Active Record Index Assistants'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/foreigner '''foreigner'''] Adds helpers to migrations and dumps foreign keys to schema.rb.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/rails_indexes '''rails_indexes'''] A rake task to track down missing database indexes. does not assume that all foreign keys end with the convention of _id.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/schema_plus '''schema_plus'''] SchemaPlus is an ActiveRecord extension that provides enhanced capabilities for schema definition and querying, including: enhanced and more DRY index capabilities, support and automation for foreign key constraints, and support for views.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/automatic_foreign_key '''automatic_foreign_key'''] Automatic Foreign Key automatically generates foreign-key constraints when creating tables or adding columns. It uses SQL-92 syntax and as such should be compatible with most databases that support foreign-key constraints.&lt;br /&gt;
&lt;br /&gt;
* Other useful Ruby Gems here. [https://www.ruby-toolbox.com/projects/ambitious_query_indexer '''ambitious_query_indexer'''], [https://www.ruby-toolbox.com/projects/lol_dba '''lol_dba'''], [https://www.ruby-toolbox.com/projects/immigrant '''immigrant'''], [https://www.ruby-toolbox.com/projects/redhillonrails_core '''redhillonrails_core'''].&lt;br /&gt;
&lt;br /&gt;
'''Rails DB Bootstrapping'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/seed-fu '''seed-fu'''] Seed Fu is an attempt to once and for all solve the problem of inserting and maintaining seed data in a database. It uses a variety of techniques gathered from various places around the web and combines them to create what is hopefully the most robust seed data system around.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/populator '''populator'''] Mass populate an Active Record database.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/seedbank '''seedbank'''] Extends Rails seeds to split out complex seeds into multiple files and lets each environment have it's own seeds.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/has_alter_ego '''Has alter ego'''] has_alter_ego makes it possible to keep seed and live data transparently in parallel. In contrast to other seed data approaches has_alter_ego synchronizes the seed definitions with your database objects automagically unless you've overridden it in the database.&lt;br /&gt;
&lt;br /&gt;
* Other useful Ruby Gems here. [https://www.ruby-toolbox.com/projects/bootstrapper '''Bootstrapper'''], [https://www.ruby-toolbox.com/projects/db-populate '''Db-populate'''], [https://www.ruby-toolbox.com/projects/seed_dumper '''seed_dumper'''], [https://www.ruby-toolbox.com/projects/dibber '''dibber'''].&lt;br /&gt;
&lt;br /&gt;
'''Rails Search'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/Sunspot '''Sunspot'''] Sunspot is a library providing a powerful, all-ruby API for the Solr search engine. Sunspot manages the configuration of persistent Ruby classes for search and indexing and exposes Solr's most powerful features through a collection of DSLs. Complex search operations can be performed without hand-writing any boolean queries or building Solr parameters by hand.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/sunspot_rails '''sunspot_rails'''] Sunspot::Rails is an extension to the Sunspot library for Solr search. Sunspot::Rails adds integration between Sunspot and ActiveRecord, including defining search and indexing related methods on ActiveRecord models themselves, running a Sunspot-compatible Solr instance for development and test environments, and automatically commit Solr index changes at the end of each Rails request.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/tire '''Tire'''] Tire is a Ruby client for the Elasticsearch search engine/database. It provides Ruby-like API for fluent communication with the Elasticsearch server and blends with ActiveModel class for convenient usage in Rails applications. It allows to delete and create indices, define mapping for them, supports the bulk API, and presents an easy-to-use DSL for constructing your queries. It has full ActiveRecord/ActiveModel compatibility, allowing you to index your models (incrementally upon saving, or in bulk), searching and paginating the results.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/thinking-sphinx '''thinking-sphinx'''] An intelligent layer for ActiveRecord (via Rails and Sinatra) for the Sphinx full-text search tool.&lt;br /&gt;
&lt;br /&gt;
* Other useful Ruby Gems here. [https://www.ruby-toolbox.com/projects/pg_search '''pg_search'''], [https://www.ruby-toolbox.com/projects/redis-search '''redis-search'''], [https://www.ruby-toolbox.com/projects/ferret '''Ferret'''], [https://www.ruby-toolbox.com/projects/searchlight '''searchlight'''].&lt;br /&gt;
&lt;br /&gt;
'''Data Persistence'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/mongoid '''Mongoid'''] Mongoid is an ODM (Object Document Mapper) Framework for MongoDB, written in Ruby.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/mongomatic '''Mongomatic'''] Mongomatic is a modular Ruby object mapper for Mongo.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/dynamoid '''dynamoid'''] Dynamoid is an ORM for Amazon's DynamoDB that supports offline development, associations, querying, and everything else you'd expect from an ActiveRecord-style replacement.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/squeel '''squeel'''] Squeel unlocks the power of Arel in your Rails 3 application with a handy block-based syntax. You can write subqueries, access named functions provided by your RDBMS, and more, all without writing SQL strings.&lt;br /&gt;
&lt;br /&gt;
 '''VIEW layer'''&lt;br /&gt;
&lt;br /&gt;
'''CSS'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/sass '''Sass'''] Sass makes CSS fun again. Sass is an extension of CSS3, adding nested rules, variables, mixins, selector inheritance, and more. It's translated to well-formatted, standard CSS using the command line tool or a web-framework plugin.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/bourbon '''bourbon'''] The purpose of Bourbon Vanilla Sass Mixins is to provide a comprehensive framework of sass mixins that are designed to be as vanilla as possible. Meaning they should not deter from the original CSS syntax. The mixins contain vendor specific prefixes for all CSS3 properties for support amongst modern browsers. The prefixes also ensure graceful degradation for older browsers that support only CSS3 prefixed properties.&lt;br /&gt;
&lt;br /&gt;
* Other useful Ruby Gems here. [https://www.ruby-toolbox.com/projects/less '''Less'''], [https://www.ruby-toolbox.com/projects/sass-rails '''sass-rails'''], [https://www.ruby-toolbox.com/projects/stylus '''stylus'''], [https://www.ruby-toolbox.com/projects/patterns '''patterns''']&lt;br /&gt;
&lt;br /&gt;
'''Graphing'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/google_visualr '''google_visualr'''] This Ruby gem, GoogleVisualr, is a wrapper around the Google Chart Tools that allows anyone to create the same beautiful charts with just Ruby; you don't have to write any JavaScript at all.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/highcharts-rails '''highcharts-rails'''] Gem that includes Highcharts (Interactive JavaScript charts for your web projects), in the Rails Asset Pipeline introduced in Rails 3.1.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/seer '''Seer'''] Gem that includes Highcharts (Interactive JavaScript charts for your web projects), in the Rails Asset Pipeline introduced in Rails 3.1.Seer is a lightweight, semantically rich wrapper for the Google Visualization API. It allows you to easily create a visualization of data in a variety of formats, including area charts, bar charts, column charts, gauges, line charts, and pie charts.&lt;br /&gt;
&lt;br /&gt;
'''HTML &amp;amp; Markup'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/formula '''formula'''] Formula is a Rails form generator that generates simple clean markup. The project aims to let users create semantically beautiful forms without introducing too much syntax. The goal is to make integrating advanced layout systems as simple as possible.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/formtastic '''Formtastic'''] A Rails form builder plugin/gem with semantically rich and accessible markup.&lt;br /&gt;
&lt;br /&gt;
'''JavaScript'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/jasmine '''Jasmine'''] Test your JavaScript without any framework dependencies, in any environment, and with a nice descriptive syntax.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/konacha '''konacha'''] Konacha is a Rails engine that allows you to test your JavaScript with the mocha test framework and chai assertion library. It is similar to Jasmine and Evergreen, but does not attempt to be framework agnostic. By sticking with Rails, Konacha can take full advantage of features such as the asset pipeline and engines&lt;br /&gt;
&lt;br /&gt;
'''Rails In-Place Editing'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/best_in_place '''BestInPlace'''] BestInPlace is a jQuery script and a Rails 3 helper that provide the method best_in_place to display any object field easily editable for the user by just clicking on it. It supports input data, text data, boolean data and custom dropdown data. It works with RESTful controllers.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/best_in_place_mongoid '''best_in_place_mongoid'''] BestInPlaceMongoid is a fork of BestInPlace jQuery script and a Rails 3 helper that provide the method best_in_place to display any object field easily editable for the user by just clicking on it. It supports input data, text data, boolean data and custom dropdown data. It works with RESTful controllers.&lt;br /&gt;
&lt;br /&gt;
 '''CONTROLLER layer'''&lt;br /&gt;
&lt;br /&gt;
'''Background Jobs'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/resque '''Resque'''] Resque is a Redis-backed Ruby library for creating background jobs, placing those jobs on multiple queues, and processing them later. Background jobs can be any Ruby class or module that responds to perform. Your existing classes can easily be converted to background jobs or you can create new classes specifically to do work. Or, you can do both. Resque is heavily inspired by DelayedJob (which rocks) and is comprised of three parts: * A Ruby library for creating, querying, and processing jobs * A Rake task for starting a worker which processes jobs * A Sinatra app for monitoring queues, jobs, and workers.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/starling '''Starling'''] Starling is a light-weight, persistent queue server that speaks the memcached protocol. It was originally developed for Twitter's backend.&lt;br /&gt;
&lt;br /&gt;
'''Scheduling'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/resque-scheduler '''resque-scheduler'''] Light weight job scheduling on top of Resque. Adds methods enqueue_at/enqueue_in to schedule jobs in the future. Also supports queueing jobs on a fixed, cron-like schedule.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/clockwork '''Clockwork'''] A scheduler process to replace cron, using a more flexible Ruby syntax running as a single long-running process. Inspired by rufus-scheduler and resque-scheduler.&lt;br /&gt;
&lt;br /&gt;
'''Code Metrics'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/simpleCov '''SimpleCov'''] Code coverage for Ruby 1.9 with a powerful configuration library and automatic merging of coverage across test suites.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/flay '''Flay'''] Flay analyzes code for structural similarities. Differences in literal values, variable, class, method names, whitespace, programming style, braces vs do/end, etc are all ignored. Making this totally rad.&lt;br /&gt;
&lt;br /&gt;
'''E-Mail Sending'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/actionmailer '''Action Mailer'''] Email on Rails. Compose, deliver, receive, and test emails using the familiar controller/view pattern. First-class support for multipart email and attachments.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/capistrano_mailer '''capistrano_mailer'''] Capistrano Deployment Email Notification. Keep the whole team informed of each release!&lt;br /&gt;
&lt;br /&gt;
 '''TESTING'''&lt;br /&gt;
&lt;br /&gt;
'''Browser testing'''&lt;br /&gt;
&lt;br /&gt;
* [http://rubygems.org/gems/capybara '''Capybara'''] Capybara is an integration testing tool for rack based web applications. It simulates how a user would interact with a website.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/webrat '''Webrat'''] Webrat lets you quickly write expressive and robust acceptance tests for a Ruby web application. It supports simulating a browser inside a Ruby process to avoid the performance hit and browser dependency of Selenium or Watir, but the same API can also be used to drive real Selenium tests when necessary (eg. for testing AJAX interactions). Most Ruby web frameworks and testing frameworks are supported.&lt;br /&gt;
&lt;br /&gt;
'''Random Data Generation'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/faker '''Faker'''] Faker, a port of Data::Faker from Perl, is used to easily generate fake data: names, addresses, phone numbers, etc.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/forgery '''Forgery'''] Easy and customizable generation of forged data. Can be used as a gem or a rails plugin. Includes rails generators for creating your own forgeries.&lt;br /&gt;
&lt;br /&gt;
'''Unit Test Frameworks'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/test-unit '''test-unit'''] Ruby 1.9.x bundles minitest not Test::Unit. Test::Unit bundled in Ruby 1.8.x had not been improved but unbundled Test::Unit (test-unit) is improved actively.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/wrong '''Wrong'''] Wrong provides a general assert method that takes a predicate block. Assertion failure messages are rich in detail. The Wrong idea is to replace all those countless assert_this, assert_that library methods which only exist to give a more useful failure message than &amp;quot;assertion failed&amp;quot;. Wrong replaces all of them in one fell swoop, since if you can write it in Ruby, Wrong can make a sensible failure message out of it. Also provided are several helper methods, like rescuing, capturing, and d.&lt;br /&gt;
&lt;br /&gt;
* Other useful Ruby Gems here. [https://www.ruby-toolbox.com/projects/testrocket '''testrocket'''], [https://www.ruby-toolbox.com/projects/kintama '''kintama'''], [https://www.ruby-toolbox.com/projects/lemon '''Lemon'''], [https://www.ruby-toolbox.com/projects/shindo '''Shindo'''].&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
[http://guides.rubygems.org/make-your-own-gem/ Gudie to create your own Ruby Gem]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://rubygems.rubyforge.org/rubygems-update/UPGRADING_rdoc.html How to Upgrade/Downgrade Ruby Gems]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://rubylearning.com/blog/ Collection of Ruby Study Notes]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://net.tutsplus.com/articles/web-roundups/24-extremely-useful-ruby-gems-for-web-development/ 24 extremely useful Ruby Gems for web development]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://railscasts.com/episodes/245-new-gem-with-bundler Screencasts to create a Ruby Gem]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://guides.rubygems.org/publishing/ How to publish your Ruby Gem?]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://www.ibm.com/developerworks/aix/library/au-aix-manage-ruby/ Manage Ruby and Gems with rvm]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://railscasts.com/episodes/183-gemcutter-jeweler Gemcutter and Jeweler railscast]&amp;lt;br&amp;gt;&lt;br /&gt;
[https://www.ruby-toolbox.com/projects/factory_girl Ruby Gem - factory girl]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://railscasts.com/episodes/192-authorization-with-cancan?view=asciicast Using cancan for authorization]&lt;br /&gt;
&lt;br /&gt;
== References==&lt;br /&gt;
1. [http://guides.rubygems.org/rubygems-basics/#installing_gems Ruby Gems guide]&amp;lt;br&amp;gt;&lt;br /&gt;
2. [http://timelessrepo.com/making-ruby-gems Making Ruby Gems]&amp;lt;br&amp;gt;&lt;br /&gt;
3. [https://www.ruby-toolbox.com Ruby Tool Box]&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Npari</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch1_1w24_nv&amp;diff=79145</id>
		<title>CSC/ECE 517 Fall 2013/ch1 1w24 nv</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch1_1w24_nv&amp;diff=79145"/>
		<updated>2013-09-25T03:09:54Z</updated>

		<summary type="html">&lt;p&gt;Npari: /* See Also */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Ruby Gem is a package manager for Ruby programming language. It allows users to easily download, install and use software packages on their system. The functionality of a Ruby application can be modified or extended with the help of Gems. In the version 1.9 of Ruby, Ruby Gems has been made a part of the standard library. This article would take the user on a tour of what ruby gems are all about and introduce the reader to various Ruby gems one can use to extend a Ruby application. Links for more details on Ruby gems are provided for the reader's benefit at the end of the article. &lt;br /&gt;
&lt;br /&gt;
== '''A Tour of Ruby Gems''' ==&lt;br /&gt;
== Definition of a Ruby Gem ==&lt;br /&gt;
In simple terms, a Ruby Gem is a package containing files that can be installed in a system and can help expand the functionality of a Ruby application. Ruby gems are very powerful. Ruby programmers create and publish Ruby Gems as open source in [https://github.com/ github]. It is very east to install, upgrade and delete Gems in a system.&lt;br /&gt;
&lt;br /&gt;
== Structure of Ruby Gem ==&lt;br /&gt;
Every Gem has a set of files and the following standard structure &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ tree -d newgem&lt;br /&gt;
|-- lib/&lt;br /&gt;
|   |-- newgem.rb&lt;br /&gt;
|   `-- newgem/&lt;br /&gt;
|       |-- base.rb&lt;br /&gt;
|       `-- version.rb&lt;br /&gt;
|-- test/&lt;br /&gt;
|-- bin/&lt;br /&gt;
|-- Rakefile&lt;br /&gt;
`-- newgem.gemspec&amp;lt;/pre&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
The ''lib'' folder has the code of the ruby gem. It has ''newgem.rb'' file and a folder named ''newgem''. This folder has two files which are ''base.rb'' and ''version.rb''. The version number is recorded in ''version.rb'' and can be changed when the gem is updated. The ''bin'' directory has any binaries that is a part of the gem file and should be distributed with the gem. A gem usually has a [http://rake.rubyforge.org/doc/rakefile_rdoc.html Rakefile]. The rake program uses this to generate code and automate tests in addition to performing other tasks. The Gem specification file ''newgem.gemspec'' contains details specific to the gem. The file has details such as the gem name,the files that are in it, the gems it depends on for  performing testing, the gems it depends on for actually running and other details.&lt;br /&gt;
&lt;br /&gt;
== Listing existing Gems ==&lt;br /&gt;
To list the existing gems in a system ''list'' keyword can be used in the command line.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem list&lt;br /&gt;
&lt;br /&gt;
*** LOCAL GEMS ***&lt;br /&gt;
&lt;br /&gt;
actionmailer (3.2.3)&lt;br /&gt;
actionpack (3.2.3)&lt;br /&gt;
activemodel (3.2.3)&lt;br /&gt;
activerecord (3.2.3)&lt;br /&gt;
activeresource (3.2.3)&lt;br /&gt;
activesupport (3.2.3)&lt;br /&gt;
arel (3.0.2)&lt;br /&gt;
bigdecimal (1.1.0)&lt;br /&gt;
builder (3.0.4)&lt;br /&gt;
bundler (1.3.5)&lt;br /&gt;
capybara (2.1.0)&lt;br /&gt;
coffee-rails (3.2.2)&lt;br /&gt;
coffee-script (2.2.0)&lt;br /&gt;
coffee-script-source (1.6.3)&lt;br /&gt;
erubis (2.7.0)&lt;br /&gt;
execjs (2.0.1)&lt;br /&gt;
hike (1.2.3)&lt;br /&gt;
i18n (0.6.5)&lt;br /&gt;
io-console (0.3)&lt;br /&gt;
journey (1.0.4)&lt;br /&gt;
jquery-rails (3.0.4)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installing a new Gem ==&lt;br /&gt;
The ''install'' keyword can be used in command line to install gems. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem install capybara&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Uninstalling a Gem ==&lt;br /&gt;
The ''uninstall'' keyword can be used in command line to uninstall any existing gem in the system.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem uninstall capybara&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you uninstall a dependency of a gem RubyGems will ask you for confirmation.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem uninstall rbtree&lt;br /&gt;
&lt;br /&gt;
You have requested to uninstall the gem:&lt;br /&gt;
	rbtree-0.4.1&lt;br /&gt;
&lt;br /&gt;
drip-0.0.2 depends on rbtree (&amp;gt;= 0)&lt;br /&gt;
If you remove this gem, these dependencies will not be met.&lt;br /&gt;
Continue with Uninstall? [yN]  n&lt;br /&gt;
ERROR:  While executing gem ... (Gem::DependencyRemovalException)&lt;br /&gt;
    Uninstallation aborted due to dependent gem(s)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Update all existing Gems == &lt;br /&gt;
The ''update'' keyword can be used in command line to update all existing gems in the system.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem update &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Creating a new Gem == &lt;br /&gt;
It is also possible to [http://guides.rubygems.org/make-your-own-gem/ create our own ruby gem] to be used later to extend our Ruby applications. Bundler is a tool that can be used to [https://github.com/radar/guides/blob/master/gem-development.md to create a ruby gem].&lt;br /&gt;
&lt;br /&gt;
== Ruby Gem Commands ==&lt;br /&gt;
&lt;br /&gt;
There is a list of commands that can be used with Ruby Gems. More details of each of these commands can be found [http://guides.rubygems.org/command-reference/ here]&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
gem build&lt;br /&gt;
gem cert&lt;br /&gt;
gem check&lt;br /&gt;
gem cleanup&lt;br /&gt;
gem contents&lt;br /&gt;
gem dependency&lt;br /&gt;
gem environment&lt;br /&gt;
gem fetch&lt;br /&gt;
gem generate_index&lt;br /&gt;
gem help&lt;br /&gt;
gem install&lt;br /&gt;
gem list&lt;br /&gt;
gem lock&lt;br /&gt;
gem mirror&lt;br /&gt;
gem outdated&lt;br /&gt;
gem owner&lt;br /&gt;
gem pristine&lt;br /&gt;
gem push&lt;br /&gt;
gem query&lt;br /&gt;
gem rdoc&lt;br /&gt;
gem search&lt;br /&gt;
gem server&lt;br /&gt;
gem sources&lt;br /&gt;
gem specification&lt;br /&gt;
gem stale&lt;br /&gt;
gem uninstall&lt;br /&gt;
gem unpack&lt;br /&gt;
gem update&lt;br /&gt;
gem which&lt;br /&gt;
gem yank&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Some important Gems that are useful in RAILS environment ==&lt;br /&gt;
&lt;br /&gt;
There are many gems which provide easy of functionality that can be included in the rails development environment. [http://bundler.io/ Bundler]is a useful gem that enables a developer to quickly add and manage gems in a few lines of code.&lt;br /&gt;
&lt;br /&gt;
We can classify the Gems based on the usage in different layers Model, View and Controller.&lt;br /&gt;
&lt;br /&gt;
 '''MODEL layer'''&lt;br /&gt;
&lt;br /&gt;
'''Active Record Plugins''' &lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/activerecord-oracle_enhanced-adapter '''oracle-enhanced'''] Oracle &amp;quot;enhanced&amp;quot; ActiveRecord adapter contains useful additional methods for working with new and legacy Oracle databases. This adapter is superset of original ActiveRecord Oracle adapter.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/activerecord-jdbc-adapter '''activerecord-jdbc-adapter'''] This adapter is build on JDBC API used for connecting to the database. AR-JDBC is a database adapter for Rails' ActiveRecord component. It allows to connect to virtually any JDBC-compliant database with your JRuby on Rails application.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/activerecord-nulldb-adapter '''nulldb'''] .This helps in Database simulation and testing. A database backend that translates database interactions into no-ops. We can test our model business logic with wanting to experiment with real database.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/oracle-enhanced-enhanced '''oracle-enhanced-enhanced'''] It includes several enhancements and customization to the standard ActiveRecord Oracle Enhapnced adapter, which is still required. Any customization to this adapter's behavior or additional Oracle-specific utilities should be added here.&lt;br /&gt;
&lt;br /&gt;
* Other useful Ruby Gems here. [https://www.ruby-toolbox.com/projects/activerecord-sqlserver-adapter '''activerecord-sqlserver-adapter'''], [https://www.ruby-toolbox.com/projects/activerecord-jdbcmysql-adapter '''activerecord-jdbcmysql-adapter'''], [https://www.ruby-toolbox.com/projects/activerecord-jdbcpostgresql-adapter '''activerecord-jdbcpostgresql-adapter'''], [https://www.ruby-toolbox.com/projects/activerecord-jdbcderby-adapter '''activerecord-jdbcderby-adapter'''],.&lt;br /&gt;
&lt;br /&gt;
'''Active Record Index Assistants'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/foreigner '''foreigner'''] Adds helpers to migrations and dumps foreign keys to schema.rb.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/rails_indexes '''rails_indexes'''] A rake task to track down missing database indexes. does not assume that all foreign keys end with the convention of _id.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/schema_plus '''schema_plus'''] SchemaPlus is an ActiveRecord extension that provides enhanced capabilities for schema definition and querying, including: enhanced and more DRY index capabilities, support and automation for foreign key constraints, and support for views.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/automatic_foreign_key '''automatic_foreign_key'''] Automatic Foreign Key automatically generates foreign-key constraints when creating tables or adding columns. It uses SQL-92 syntax and as such should be compatible with most databases that support foreign-key constraints.&lt;br /&gt;
&lt;br /&gt;
* Other useful Ruby Gems here. [https://www.ruby-toolbox.com/projects/ambitious_query_indexer '''ambitious_query_indexer'''], [https://www.ruby-toolbox.com/projects/lol_dba '''lol_dba'''], [https://www.ruby-toolbox.com/projects/immigrant '''immigrant'''], [https://www.ruby-toolbox.com/projects/redhillonrails_core '''redhillonrails_core'''].&lt;br /&gt;
&lt;br /&gt;
'''Rails DB Bootstrapping'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/seed-fu '''seed-fu'''] Seed Fu is an attempt to once and for all solve the problem of inserting and maintaining seed data in a database. It uses a variety of techniques gathered from various places around the web and combines them to create what is hopefully the most robust seed data system around.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/populator '''populator'''] Mass populate an Active Record database.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/seedbank '''seedbank'''] Extends Rails seeds to split out complex seeds into multiple files and lets each environment have it's own seeds.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/has_alter_ego '''Has alter ego'''] has_alter_ego makes it possible to keep seed and live data transparently in parallel. In contrast to other seed data approaches has_alter_ego synchronizes the seed definitions with your database objects automagically unless you've overridden it in the database.&lt;br /&gt;
&lt;br /&gt;
* Other useful Ruby Gems here. [https://www.ruby-toolbox.com/projects/bootstrapper '''Bootstrapper'''], [https://www.ruby-toolbox.com/projects/db-populate '''Db-populate'''], [https://www.ruby-toolbox.com/projects/seed_dumper '''seed_dumper'''], [https://www.ruby-toolbox.com/projects/dibber '''dibber'''].&lt;br /&gt;
&lt;br /&gt;
'''Rails Search'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/Sunspot '''Sunspot'''] Sunspot is a library providing a powerful, all-ruby API for the Solr search engine. Sunspot manages the configuration of persistent Ruby classes for search and indexing and exposes Solr's most powerful features through a collection of DSLs. Complex search operations can be performed without hand-writing any boolean queries or building Solr parameters by hand.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/sunspot_rails '''sunspot_rails'''] Sunspot::Rails is an extension to the Sunspot library for Solr search. Sunspot::Rails adds integration between Sunspot and ActiveRecord, including defining search and indexing related methods on ActiveRecord models themselves, running a Sunspot-compatible Solr instance for development and test environments, and automatically commit Solr index changes at the end of each Rails request.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/tire '''Tire'''] Tire is a Ruby client for the Elasticsearch search engine/database. It provides Ruby-like API for fluent communication with the Elasticsearch server and blends with ActiveModel class for convenient usage in Rails applications. It allows to delete and create indices, define mapping for them, supports the bulk API, and presents an easy-to-use DSL for constructing your queries. It has full ActiveRecord/ActiveModel compatibility, allowing you to index your models (incrementally upon saving, or in bulk), searching and paginating the results.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/thinking-sphinx '''thinking-sphinx'''] An intelligent layer for ActiveRecord (via Rails and Sinatra) for the Sphinx full-text search tool.&lt;br /&gt;
&lt;br /&gt;
* Other useful Ruby Gems here. [https://www.ruby-toolbox.com/projects/pg_search '''pg_search'''], [https://www.ruby-toolbox.com/projects/redis-search '''redis-search'''], [https://www.ruby-toolbox.com/projects/ferret '''Ferret'''], [https://www.ruby-toolbox.com/projects/searchlight '''searchlight'''].&lt;br /&gt;
&lt;br /&gt;
'''Data Persistence'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/mongoid '''Mongoid'''] Mongoid is an ODM (Object Document Mapper) Framework for MongoDB, written in Ruby.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/mongomatic '''Mongomatic'''] Mongomatic is a modular Ruby object mapper for Mongo.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/dynamoid '''dynamoid'''] Dynamoid is an ORM for Amazon's DynamoDB that supports offline development, associations, querying, and everything else you'd expect from an ActiveRecord-style replacement.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/squeel '''squeel'''] Squeel unlocks the power of Arel in your Rails 3 application with a handy block-based syntax. You can write subqueries, access named functions provided by your RDBMS, and more, all without writing SQL strings.&lt;br /&gt;
&lt;br /&gt;
 '''VIEW layer'''&lt;br /&gt;
&lt;br /&gt;
'''CSS'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/sass '''Sass'''] Sass makes CSS fun again. Sass is an extension of CSS3, adding nested rules, variables, mixins, selector inheritance, and more. It's translated to well-formatted, standard CSS using the command line tool or a web-framework plugin.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/bourbon '''bourbon'''] The purpose of Bourbon Vanilla Sass Mixins is to provide a comprehensive framework of sass mixins that are designed to be as vanilla as possible. Meaning they should not deter from the original CSS syntax. The mixins contain vendor specific prefixes for all CSS3 properties for support amongst modern browsers. The prefixes also ensure graceful degradation for older browsers that support only CSS3 prefixed properties.&lt;br /&gt;
&lt;br /&gt;
* Other useful Ruby Gems here. [https://www.ruby-toolbox.com/projects/less '''Less'''], [https://www.ruby-toolbox.com/projects/sass-rails '''sass-rails'''], [https://www.ruby-toolbox.com/projects/stylus '''stylus'''], [https://www.ruby-toolbox.com/projects/patterns '''patterns''']&lt;br /&gt;
&lt;br /&gt;
'''Graphing'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/google_visualr '''google_visualr'''] This Ruby gem, GoogleVisualr, is a wrapper around the Google Chart Tools that allows anyone to create the same beautiful charts with just Ruby; you don't have to write any JavaScript at all.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/highcharts-rails '''highcharts-rails'''] Gem that includes Highcharts (Interactive JavaScript charts for your web projects), in the Rails Asset Pipeline introduced in Rails 3.1.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/seer '''Seer'''] Gem that includes Highcharts (Interactive JavaScript charts for your web projects), in the Rails Asset Pipeline introduced in Rails 3.1.Seer is a lightweight, semantically rich wrapper for the Google Visualization API. It allows you to easily create a visualization of data in a variety of formats, including area charts, bar charts, column charts, gauges, line charts, and pie charts.&lt;br /&gt;
&lt;br /&gt;
'''HTML &amp;amp; Markup'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/formula '''formula'''] Formula is a Rails form generator that generates simple clean markup. The project aims to let users create semantically beautiful forms without introducing too much syntax. The goal is to make integrating advanced layout systems as simple as possible.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/formtastic '''Formtastic'''] A Rails form builder plugin/gem with semantically rich and accessible markup.&lt;br /&gt;
&lt;br /&gt;
'''JavaScript'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/jasmine '''Jasmine'''] Test your JavaScript without any framework dependencies, in any environment, and with a nice descriptive syntax.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/konacha '''konacha'''] Konacha is a Rails engine that allows you to test your JavaScript with the mocha test framework and chai assertion library. It is similar to Jasmine and Evergreen, but does not attempt to be framework agnostic. By sticking with Rails, Konacha can take full advantage of features such as the asset pipeline and engines&lt;br /&gt;
&lt;br /&gt;
'''Rails In-Place Editing'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/best_in_place '''BestInPlace'''] BestInPlace is a jQuery script and a Rails 3 helper that provide the method best_in_place to display any object field easily editable for the user by just clicking on it. It supports input data, text data, boolean data and custom dropdown data. It works with RESTful controllers.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/best_in_place_mongoid '''best_in_place_mongoid'''] BestInPlaceMongoid is a fork of BestInPlace jQuery script and a Rails 3 helper that provide the method best_in_place to display any object field easily editable for the user by just clicking on it. It supports input data, text data, boolean data and custom dropdown data. It works with RESTful controllers.&lt;br /&gt;
&lt;br /&gt;
 '''CONTROLLER layer'''&lt;br /&gt;
&lt;br /&gt;
'''Background Jobs'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/resque '''Resque'''] Resque is a Redis-backed Ruby library for creating background jobs, placing those jobs on multiple queues, and processing them later. Background jobs can be any Ruby class or module that responds to perform. Your existing classes can easily be converted to background jobs or you can create new classes specifically to do work. Or, you can do both. Resque is heavily inspired by DelayedJob (which rocks) and is comprised of three parts: * A Ruby library for creating, querying, and processing jobs * A Rake task for starting a worker which processes jobs * A Sinatra app for monitoring queues, jobs, and workers.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/starling '''Starling'''] Starling is a light-weight, persistent queue server that speaks the memcached protocol. It was originally developed for Twitter's backend.&lt;br /&gt;
&lt;br /&gt;
'''Scheduling'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/resque-scheduler '''resque-scheduler'''] Light weight job scheduling on top of Resque. Adds methods enqueue_at/enqueue_in to schedule jobs in the future. Also supports queueing jobs on a fixed, cron-like schedule.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/clockwork '''Clockwork'''] A scheduler process to replace cron, using a more flexible Ruby syntax running as a single long-running process. Inspired by rufus-scheduler and resque-scheduler.&lt;br /&gt;
&lt;br /&gt;
'''Code Metrics'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/simpleCov '''SimpleCov'''] Code coverage for Ruby 1.9 with a powerful configuration library and automatic merging of coverage across test suites.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/flay '''Flay'''] Flay analyzes code for structural similarities. Differences in literal values, variable, class, method names, whitespace, programming style, braces vs do/end, etc are all ignored. Making this totally rad.&lt;br /&gt;
&lt;br /&gt;
'''E-Mail Sending'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/actionmailer '''Action Mailer'''] Email on Rails. Compose, deliver, receive, and test emails using the familiar controller/view pattern. First-class support for multipart email and attachments.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/capistrano_mailer '''capistrano_mailer'''] Capistrano Deployment Email Notification. Keep the whole team informed of each release!&lt;br /&gt;
&lt;br /&gt;
 '''TESTING'''&lt;br /&gt;
&lt;br /&gt;
'''Browser testing'''&lt;br /&gt;
&lt;br /&gt;
* [http://rubygems.org/gems/capybara '''Capybara'''] Capybara is an integration testing tool for rack based web applications. It simulates how a user would interact with a website.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/webrat '''Webrat'''] Webrat lets you quickly write expressive and robust acceptance tests for a Ruby web application. It supports simulating a browser inside a Ruby process to avoid the performance hit and browser dependency of Selenium or Watir, but the same API can also be used to drive real Selenium tests when necessary (eg. for testing AJAX interactions). Most Ruby web frameworks and testing frameworks are supported.&lt;br /&gt;
&lt;br /&gt;
'''Random Data Generation'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/faker '''Faker'''] Faker, a port of Data::Faker from Perl, is used to easily generate fake data: names, addresses, phone numbers, etc.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/forgery '''Forgery'''] Easy and customizable generation of forged data. Can be used as a gem or a rails plugin. Includes rails generators for creating your own forgeries.&lt;br /&gt;
&lt;br /&gt;
'''Unit Test Frameworks'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/test-unit '''test-unit'''] Ruby 1.9.x bundles minitest not Test::Unit. Test::Unit bundled in Ruby 1.8.x had not been improved but unbundled Test::Unit (test-unit) is improved actively.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/wrong '''Wrong'''] Wrong provides a general assert method that takes a predicate block. Assertion failure messages are rich in detail. The Wrong idea is to replace all those countless assert_this, assert_that library methods which only exist to give a more useful failure message than &amp;quot;assertion failed&amp;quot;. Wrong replaces all of them in one fell swoop, since if you can write it in Ruby, Wrong can make a sensible failure message out of it. Also provided are several helper methods, like rescuing, capturing, and d.&lt;br /&gt;
&lt;br /&gt;
* Other useful Ruby Gems here. [https://www.ruby-toolbox.com/projects/testrocket '''testrocket'''], [https://www.ruby-toolbox.com/projects/kintama '''kintama'''], [https://www.ruby-toolbox.com/projects/lemon '''Lemon'''], [https://www.ruby-toolbox.com/projects/shindo '''Shindo'''].&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
[http://guides.rubygems.org/make-your-own-gem/ Gudie to create your own Ruby Gem]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://rubygems.rubyforge.org/rubygems-update/UPGRADING_rdoc.html How to Upgrade/Downgrade Ruby Gems]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://rubylearning.com/blog/ Collection of Ruby Study Notes]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://net.tutsplus.com/articles/web-roundups/24-extremely-useful-ruby-gems-for-web-development/ 24 extremely useful Ruby Gems for web development]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://railscasts.com/episodes/245-new-gem-with-bundler Screencasts to create a Ruby Gem]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://guides.rubygems.org/publishing/ How to publish your Ruby Gem?]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://www.ibm.com/developerworks/aix/library/au-aix-manage-ruby/ Manage Ruby and Gems with rvm]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://railscasts.com/episodes/183-gemcutter-jeweler Gemcutter and Jeweler railscast]&amp;lt;br&amp;gt;&lt;br /&gt;
[https://www.ruby-toolbox.com/projects/factory_girl Ruby Gem - factory girl]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://railscasts.com/episodes/192-authorization-with-cancan?view=asciicast Using cancan for authorization]&lt;br /&gt;
&lt;br /&gt;
== References==&lt;br /&gt;
1. [http://guides.rubygems.org/rubygems-basics/#installing_gems Ruby Gems guide]&amp;lt;br&amp;gt;&lt;br /&gt;
2. [http://timelessrepo.com/making-ruby-gems Making Ruby Gems]&amp;lt;br&amp;gt;&lt;br /&gt;
3. [https://www.ruby-toolbox.com Ruby Tool Box]&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Npari</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch1_1w24_nv&amp;diff=79144</id>
		<title>CSC/ECE 517 Fall 2013/ch1 1w24 nv</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch1_1w24_nv&amp;diff=79144"/>
		<updated>2013-09-25T03:06:05Z</updated>

		<summary type="html">&lt;p&gt;Npari: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Ruby Gem is a package manager for Ruby programming language. It allows users to easily download, install and use software packages on their system. The functionality of a Ruby application can be modified or extended with the help of Gems. In the version 1.9 of Ruby, Ruby Gems has been made a part of the standard library. This article would take the user on a tour of what ruby gems are all about and introduce the reader to various Ruby gems one can use to extend a Ruby application. Links for more details on Ruby gems are provided for the reader's benefit at the end of the article. &lt;br /&gt;
&lt;br /&gt;
== '''A Tour of Ruby Gems''' ==&lt;br /&gt;
== Definition of a Ruby Gem ==&lt;br /&gt;
In simple terms, a Ruby Gem is a package containing files that can be installed in a system and can help expand the functionality of a Ruby application. Ruby gems are very powerful. Ruby programmers create and publish Ruby Gems as open source in [https://github.com/ github]. It is very east to install, upgrade and delete Gems in a system.&lt;br /&gt;
&lt;br /&gt;
== Structure of Ruby Gem ==&lt;br /&gt;
Every Gem has a set of files and the following standard structure &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ tree -d newgem&lt;br /&gt;
|-- lib/&lt;br /&gt;
|   |-- newgem.rb&lt;br /&gt;
|   `-- newgem/&lt;br /&gt;
|       |-- base.rb&lt;br /&gt;
|       `-- version.rb&lt;br /&gt;
|-- test/&lt;br /&gt;
|-- bin/&lt;br /&gt;
|-- Rakefile&lt;br /&gt;
`-- newgem.gemspec&amp;lt;/pre&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
The ''lib'' folder has the code of the ruby gem. It has ''newgem.rb'' file and a folder named ''newgem''. This folder has two files which are ''base.rb'' and ''version.rb''. The version number is recorded in ''version.rb'' and can be changed when the gem is updated. The ''bin'' directory has any binaries that is a part of the gem file and should be distributed with the gem. A gem usually has a [http://rake.rubyforge.org/doc/rakefile_rdoc.html Rakefile]. The rake program uses this to generate code and automate tests in addition to performing other tasks. The Gem specification file ''newgem.gemspec'' contains details specific to the gem. The file has details such as the gem name,the files that are in it, the gems it depends on for  performing testing, the gems it depends on for actually running and other details.&lt;br /&gt;
&lt;br /&gt;
== Listing existing Gems ==&lt;br /&gt;
To list the existing gems in a system ''list'' keyword can be used in the command line.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem list&lt;br /&gt;
&lt;br /&gt;
*** LOCAL GEMS ***&lt;br /&gt;
&lt;br /&gt;
actionmailer (3.2.3)&lt;br /&gt;
actionpack (3.2.3)&lt;br /&gt;
activemodel (3.2.3)&lt;br /&gt;
activerecord (3.2.3)&lt;br /&gt;
activeresource (3.2.3)&lt;br /&gt;
activesupport (3.2.3)&lt;br /&gt;
arel (3.0.2)&lt;br /&gt;
bigdecimal (1.1.0)&lt;br /&gt;
builder (3.0.4)&lt;br /&gt;
bundler (1.3.5)&lt;br /&gt;
capybara (2.1.0)&lt;br /&gt;
coffee-rails (3.2.2)&lt;br /&gt;
coffee-script (2.2.0)&lt;br /&gt;
coffee-script-source (1.6.3)&lt;br /&gt;
erubis (2.7.0)&lt;br /&gt;
execjs (2.0.1)&lt;br /&gt;
hike (1.2.3)&lt;br /&gt;
i18n (0.6.5)&lt;br /&gt;
io-console (0.3)&lt;br /&gt;
journey (1.0.4)&lt;br /&gt;
jquery-rails (3.0.4)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installing a new Gem ==&lt;br /&gt;
The ''install'' keyword can be used in command line to install gems. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem install capybara&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Uninstalling a Gem ==&lt;br /&gt;
The ''uninstall'' keyword can be used in command line to uninstall any existing gem in the system.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem uninstall capybara&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you uninstall a dependency of a gem RubyGems will ask you for confirmation.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem uninstall rbtree&lt;br /&gt;
&lt;br /&gt;
You have requested to uninstall the gem:&lt;br /&gt;
	rbtree-0.4.1&lt;br /&gt;
&lt;br /&gt;
drip-0.0.2 depends on rbtree (&amp;gt;= 0)&lt;br /&gt;
If you remove this gem, these dependencies will not be met.&lt;br /&gt;
Continue with Uninstall? [yN]  n&lt;br /&gt;
ERROR:  While executing gem ... (Gem::DependencyRemovalException)&lt;br /&gt;
    Uninstallation aborted due to dependent gem(s)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Update all existing Gems == &lt;br /&gt;
The ''update'' keyword can be used in command line to update all existing gems in the system.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem update &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Creating a new Gem == &lt;br /&gt;
It is also possible to [http://guides.rubygems.org/make-your-own-gem/ create our own ruby gem] to be used later to extend our Ruby applications. Bundler is a tool that can be used to [https://github.com/radar/guides/blob/master/gem-development.md to create a ruby gem].&lt;br /&gt;
&lt;br /&gt;
== Ruby Gem Commands ==&lt;br /&gt;
&lt;br /&gt;
There is a list of commands that can be used with Ruby Gems. More details of each of these commands can be found [http://guides.rubygems.org/command-reference/ here]&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
gem build&lt;br /&gt;
gem cert&lt;br /&gt;
gem check&lt;br /&gt;
gem cleanup&lt;br /&gt;
gem contents&lt;br /&gt;
gem dependency&lt;br /&gt;
gem environment&lt;br /&gt;
gem fetch&lt;br /&gt;
gem generate_index&lt;br /&gt;
gem help&lt;br /&gt;
gem install&lt;br /&gt;
gem list&lt;br /&gt;
gem lock&lt;br /&gt;
gem mirror&lt;br /&gt;
gem outdated&lt;br /&gt;
gem owner&lt;br /&gt;
gem pristine&lt;br /&gt;
gem push&lt;br /&gt;
gem query&lt;br /&gt;
gem rdoc&lt;br /&gt;
gem search&lt;br /&gt;
gem server&lt;br /&gt;
gem sources&lt;br /&gt;
gem specification&lt;br /&gt;
gem stale&lt;br /&gt;
gem uninstall&lt;br /&gt;
gem unpack&lt;br /&gt;
gem update&lt;br /&gt;
gem which&lt;br /&gt;
gem yank&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Some important Gems that are useful in RAILS environment ==&lt;br /&gt;
&lt;br /&gt;
There are many gems which provide easy of functionality that can be included in the rails development environment. [http://bundler.io/ Bundler]is a useful gem that enables a developer to quickly add and manage gems in a few lines of code.&lt;br /&gt;
&lt;br /&gt;
We can classify the Gems based on the usage in different layers Model, View and Controller.&lt;br /&gt;
&lt;br /&gt;
 '''MODEL layer'''&lt;br /&gt;
&lt;br /&gt;
'''Active Record Plugins''' &lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/activerecord-oracle_enhanced-adapter '''oracle-enhanced'''] Oracle &amp;quot;enhanced&amp;quot; ActiveRecord adapter contains useful additional methods for working with new and legacy Oracle databases. This adapter is superset of original ActiveRecord Oracle adapter.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/activerecord-jdbc-adapter '''activerecord-jdbc-adapter'''] This adapter is build on JDBC API used for connecting to the database. AR-JDBC is a database adapter for Rails' ActiveRecord component. It allows to connect to virtually any JDBC-compliant database with your JRuby on Rails application.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/activerecord-nulldb-adapter '''nulldb'''] .This helps in Database simulation and testing. A database backend that translates database interactions into no-ops. We can test our model business logic with wanting to experiment with real database.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/oracle-enhanced-enhanced '''oracle-enhanced-enhanced'''] It includes several enhancements and customization to the standard ActiveRecord Oracle Enhapnced adapter, which is still required. Any customization to this adapter's behavior or additional Oracle-specific utilities should be added here.&lt;br /&gt;
&lt;br /&gt;
* Other useful Ruby Gems here. [https://www.ruby-toolbox.com/projects/activerecord-sqlserver-adapter '''activerecord-sqlserver-adapter'''], [https://www.ruby-toolbox.com/projects/activerecord-jdbcmysql-adapter '''activerecord-jdbcmysql-adapter'''], [https://www.ruby-toolbox.com/projects/activerecord-jdbcpostgresql-adapter '''activerecord-jdbcpostgresql-adapter'''], [https://www.ruby-toolbox.com/projects/activerecord-jdbcderby-adapter '''activerecord-jdbcderby-adapter'''],.&lt;br /&gt;
&lt;br /&gt;
'''Active Record Index Assistants'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/foreigner '''foreigner'''] Adds helpers to migrations and dumps foreign keys to schema.rb.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/rails_indexes '''rails_indexes'''] A rake task to track down missing database indexes. does not assume that all foreign keys end with the convention of _id.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/schema_plus '''schema_plus'''] SchemaPlus is an ActiveRecord extension that provides enhanced capabilities for schema definition and querying, including: enhanced and more DRY index capabilities, support and automation for foreign key constraints, and support for views.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/automatic_foreign_key '''automatic_foreign_key'''] Automatic Foreign Key automatically generates foreign-key constraints when creating tables or adding columns. It uses SQL-92 syntax and as such should be compatible with most databases that support foreign-key constraints.&lt;br /&gt;
&lt;br /&gt;
* Other useful Ruby Gems here. [https://www.ruby-toolbox.com/projects/ambitious_query_indexer '''ambitious_query_indexer'''], [https://www.ruby-toolbox.com/projects/lol_dba '''lol_dba'''], [https://www.ruby-toolbox.com/projects/immigrant '''immigrant'''], [https://www.ruby-toolbox.com/projects/redhillonrails_core '''redhillonrails_core'''].&lt;br /&gt;
&lt;br /&gt;
'''Rails DB Bootstrapping'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/seed-fu '''seed-fu'''] Seed Fu is an attempt to once and for all solve the problem of inserting and maintaining seed data in a database. It uses a variety of techniques gathered from various places around the web and combines them to create what is hopefully the most robust seed data system around.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/populator '''populator'''] Mass populate an Active Record database.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/seedbank '''seedbank'''] Extends Rails seeds to split out complex seeds into multiple files and lets each environment have it's own seeds.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/has_alter_ego '''Has alter ego'''] has_alter_ego makes it possible to keep seed and live data transparently in parallel. In contrast to other seed data approaches has_alter_ego synchronizes the seed definitions with your database objects automagically unless you've overridden it in the database.&lt;br /&gt;
&lt;br /&gt;
* Other useful Ruby Gems here. [https://www.ruby-toolbox.com/projects/bootstrapper '''Bootstrapper'''], [https://www.ruby-toolbox.com/projects/db-populate '''Db-populate'''], [https://www.ruby-toolbox.com/projects/seed_dumper '''seed_dumper'''], [https://www.ruby-toolbox.com/projects/dibber '''dibber'''].&lt;br /&gt;
&lt;br /&gt;
'''Rails Search'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/Sunspot '''Sunspot'''] Sunspot is a library providing a powerful, all-ruby API for the Solr search engine. Sunspot manages the configuration of persistent Ruby classes for search and indexing and exposes Solr's most powerful features through a collection of DSLs. Complex search operations can be performed without hand-writing any boolean queries or building Solr parameters by hand.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/sunspot_rails '''sunspot_rails'''] Sunspot::Rails is an extension to the Sunspot library for Solr search. Sunspot::Rails adds integration between Sunspot and ActiveRecord, including defining search and indexing related methods on ActiveRecord models themselves, running a Sunspot-compatible Solr instance for development and test environments, and automatically commit Solr index changes at the end of each Rails request.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/tire '''Tire'''] Tire is a Ruby client for the Elasticsearch search engine/database. It provides Ruby-like API for fluent communication with the Elasticsearch server and blends with ActiveModel class for convenient usage in Rails applications. It allows to delete and create indices, define mapping for them, supports the bulk API, and presents an easy-to-use DSL for constructing your queries. It has full ActiveRecord/ActiveModel compatibility, allowing you to index your models (incrementally upon saving, or in bulk), searching and paginating the results.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/thinking-sphinx '''thinking-sphinx'''] An intelligent layer for ActiveRecord (via Rails and Sinatra) for the Sphinx full-text search tool.&lt;br /&gt;
&lt;br /&gt;
* Other useful Ruby Gems here. [https://www.ruby-toolbox.com/projects/pg_search '''pg_search'''], [https://www.ruby-toolbox.com/projects/redis-search '''redis-search'''], [https://www.ruby-toolbox.com/projects/ferret '''Ferret'''], [https://www.ruby-toolbox.com/projects/searchlight '''searchlight'''].&lt;br /&gt;
&lt;br /&gt;
'''Data Persistence'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/mongoid '''Mongoid'''] Mongoid is an ODM (Object Document Mapper) Framework for MongoDB, written in Ruby.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/mongomatic '''Mongomatic'''] Mongomatic is a modular Ruby object mapper for Mongo.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/dynamoid '''dynamoid'''] Dynamoid is an ORM for Amazon's DynamoDB that supports offline development, associations, querying, and everything else you'd expect from an ActiveRecord-style replacement.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/squeel '''squeel'''] Squeel unlocks the power of Arel in your Rails 3 application with a handy block-based syntax. You can write subqueries, access named functions provided by your RDBMS, and more, all without writing SQL strings.&lt;br /&gt;
&lt;br /&gt;
 '''VIEW layer'''&lt;br /&gt;
&lt;br /&gt;
'''CSS'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/sass '''Sass'''] Sass makes CSS fun again. Sass is an extension of CSS3, adding nested rules, variables, mixins, selector inheritance, and more. It's translated to well-formatted, standard CSS using the command line tool or a web-framework plugin.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/bourbon '''bourbon'''] The purpose of Bourbon Vanilla Sass Mixins is to provide a comprehensive framework of sass mixins that are designed to be as vanilla as possible. Meaning they should not deter from the original CSS syntax. The mixins contain vendor specific prefixes for all CSS3 properties for support amongst modern browsers. The prefixes also ensure graceful degradation for older browsers that support only CSS3 prefixed properties.&lt;br /&gt;
&lt;br /&gt;
* Other useful Ruby Gems here. [https://www.ruby-toolbox.com/projects/less '''Less'''], [https://www.ruby-toolbox.com/projects/sass-rails '''sass-rails'''], [https://www.ruby-toolbox.com/projects/stylus '''stylus'''], [https://www.ruby-toolbox.com/projects/patterns '''patterns''']&lt;br /&gt;
&lt;br /&gt;
'''Graphing'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/google_visualr '''google_visualr'''] This Ruby gem, GoogleVisualr, is a wrapper around the Google Chart Tools that allows anyone to create the same beautiful charts with just Ruby; you don't have to write any JavaScript at all.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/highcharts-rails '''highcharts-rails'''] Gem that includes Highcharts (Interactive JavaScript charts for your web projects), in the Rails Asset Pipeline introduced in Rails 3.1.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/seer '''Seer'''] Gem that includes Highcharts (Interactive JavaScript charts for your web projects), in the Rails Asset Pipeline introduced in Rails 3.1.Seer is a lightweight, semantically rich wrapper for the Google Visualization API. It allows you to easily create a visualization of data in a variety of formats, including area charts, bar charts, column charts, gauges, line charts, and pie charts.&lt;br /&gt;
&lt;br /&gt;
'''HTML &amp;amp; Markup'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/formula '''formula'''] Formula is a Rails form generator that generates simple clean markup. The project aims to let users create semantically beautiful forms without introducing too much syntax. The goal is to make integrating advanced layout systems as simple as possible.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/formtastic '''Formtastic'''] A Rails form builder plugin/gem with semantically rich and accessible markup.&lt;br /&gt;
&lt;br /&gt;
'''JavaScript'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/jasmine '''Jasmine'''] Test your JavaScript without any framework dependencies, in any environment, and with a nice descriptive syntax.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/konacha '''konacha'''] Konacha is a Rails engine that allows you to test your JavaScript with the mocha test framework and chai assertion library. It is similar to Jasmine and Evergreen, but does not attempt to be framework agnostic. By sticking with Rails, Konacha can take full advantage of features such as the asset pipeline and engines&lt;br /&gt;
&lt;br /&gt;
'''Rails In-Place Editing'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/best_in_place '''BestInPlace'''] BestInPlace is a jQuery script and a Rails 3 helper that provide the method best_in_place to display any object field easily editable for the user by just clicking on it. It supports input data, text data, boolean data and custom dropdown data. It works with RESTful controllers.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/best_in_place_mongoid '''best_in_place_mongoid'''] BestInPlaceMongoid is a fork of BestInPlace jQuery script and a Rails 3 helper that provide the method best_in_place to display any object field easily editable for the user by just clicking on it. It supports input data, text data, boolean data and custom dropdown data. It works with RESTful controllers.&lt;br /&gt;
&lt;br /&gt;
 '''CONTROLLER layer'''&lt;br /&gt;
&lt;br /&gt;
'''Background Jobs'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/resque '''Resque'''] Resque is a Redis-backed Ruby library for creating background jobs, placing those jobs on multiple queues, and processing them later. Background jobs can be any Ruby class or module that responds to perform. Your existing classes can easily be converted to background jobs or you can create new classes specifically to do work. Or, you can do both. Resque is heavily inspired by DelayedJob (which rocks) and is comprised of three parts: * A Ruby library for creating, querying, and processing jobs * A Rake task for starting a worker which processes jobs * A Sinatra app for monitoring queues, jobs, and workers.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/starling '''Starling'''] Starling is a light-weight, persistent queue server that speaks the memcached protocol. It was originally developed for Twitter's backend.&lt;br /&gt;
&lt;br /&gt;
'''Scheduling'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/resque-scheduler '''resque-scheduler'''] Light weight job scheduling on top of Resque. Adds methods enqueue_at/enqueue_in to schedule jobs in the future. Also supports queueing jobs on a fixed, cron-like schedule.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/clockwork '''Clockwork'''] A scheduler process to replace cron, using a more flexible Ruby syntax running as a single long-running process. Inspired by rufus-scheduler and resque-scheduler.&lt;br /&gt;
&lt;br /&gt;
'''Code Metrics'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/simpleCov '''SimpleCov'''] Code coverage for Ruby 1.9 with a powerful configuration library and automatic merging of coverage across test suites.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/flay '''Flay'''] Flay analyzes code for structural similarities. Differences in literal values, variable, class, method names, whitespace, programming style, braces vs do/end, etc are all ignored. Making this totally rad.&lt;br /&gt;
&lt;br /&gt;
'''E-Mail Sending'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/actionmailer '''Action Mailer'''] Email on Rails. Compose, deliver, receive, and test emails using the familiar controller/view pattern. First-class support for multipart email and attachments.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/capistrano_mailer '''capistrano_mailer'''] Capistrano Deployment Email Notification. Keep the whole team informed of each release!&lt;br /&gt;
&lt;br /&gt;
 '''TESTING'''&lt;br /&gt;
&lt;br /&gt;
'''Browser testing'''&lt;br /&gt;
&lt;br /&gt;
* [http://rubygems.org/gems/capybara '''Capybara'''] Capybara is an integration testing tool for rack based web applications. It simulates how a user would interact with a website.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/webrat '''Webrat'''] Webrat lets you quickly write expressive and robust acceptance tests for a Ruby web application. It supports simulating a browser inside a Ruby process to avoid the performance hit and browser dependency of Selenium or Watir, but the same API can also be used to drive real Selenium tests when necessary (eg. for testing AJAX interactions). Most Ruby web frameworks and testing frameworks are supported.&lt;br /&gt;
&lt;br /&gt;
'''Random Data Generation'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/faker '''Faker'''] Faker, a port of Data::Faker from Perl, is used to easily generate fake data: names, addresses, phone numbers, etc.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/forgery '''Forgery'''] Easy and customizable generation of forged data. Can be used as a gem or a rails plugin. Includes rails generators for creating your own forgeries.&lt;br /&gt;
&lt;br /&gt;
'''Unit Test Frameworks'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/test-unit '''test-unit'''] Ruby 1.9.x bundles minitest not Test::Unit. Test::Unit bundled in Ruby 1.8.x had not been improved but unbundled Test::Unit (test-unit) is improved actively.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/wrong '''Wrong'''] Wrong provides a general assert method that takes a predicate block. Assertion failure messages are rich in detail. The Wrong idea is to replace all those countless assert_this, assert_that library methods which only exist to give a more useful failure message than &amp;quot;assertion failed&amp;quot;. Wrong replaces all of them in one fell swoop, since if you can write it in Ruby, Wrong can make a sensible failure message out of it. Also provided are several helper methods, like rescuing, capturing, and d.&lt;br /&gt;
&lt;br /&gt;
* Other useful Ruby Gems here. [https://www.ruby-toolbox.com/projects/testrocket '''testrocket'''], [https://www.ruby-toolbox.com/projects/kintama '''kintama'''], [https://www.ruby-toolbox.com/projects/lemon '''Lemon'''], [https://www.ruby-toolbox.com/projects/shindo '''Shindo'''].&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
[http://guides.rubygems.org/make-your-own-gem/ Gudie to create your own Ruby Gem]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://rubygems.rubyforge.org/rubygems-update/UPGRADING_rdoc.html How to Upgrade/Downgrade Ruby Gems]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://rubylearning.com/blog/ Collection of Ruby Study Notes]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://net.tutsplus.com/articles/web-roundups/24-extremely-useful-ruby-gems-for-web-development/ 24 extremely useful Ruby Gems for web development]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://railscasts.com/episodes/245-new-gem-with-bundler Screencasts to create a Ruby Gem]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://guides.rubygems.org/publishing/ How to publish your Ruby Gem?]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://www.ibm.com/developerworks/aix/library/au-aix-manage-ruby/ Manage Ruby and Gems with rvm]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://railscasts.com/episodes/183-gemcutter-jeweler Gemcutter and Jeweler railscast]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== References==&lt;br /&gt;
1. [http://guides.rubygems.org/rubygems-basics/#installing_gems Ruby Gems guide]&amp;lt;br&amp;gt;&lt;br /&gt;
2. [http://timelessrepo.com/making-ruby-gems Making Ruby Gems]&amp;lt;br&amp;gt;&lt;br /&gt;
3. [https://www.ruby-toolbox.com Ruby Tool Box]&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Npari</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch1_1w24_nv&amp;diff=79143</id>
		<title>CSC/ECE 517 Fall 2013/ch1 1w24 nv</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch1_1w24_nv&amp;diff=79143"/>
		<updated>2013-09-25T03:05:28Z</updated>

		<summary type="html">&lt;p&gt;Npari: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Ruby Gem is a package manager for Ruby programming language. It allows users to easily download, install and use software packages on their system. The functionality of a Ruby application can be modified or extended with the help of Gems. In the version 1.9 of Ruby, Ruby Gems has been made a part of the standard library. This article would take the user on a tour of what ruby gems are all about and introduce the reader to various Ruby gems one can use to make better a developers Ruby application. Links for more details on Ruby gems are provided for the reader's benefit in the end of the article. &lt;br /&gt;
&lt;br /&gt;
== '''A Tour of Ruby Gems''' ==&lt;br /&gt;
== Definition of a Ruby Gem ==&lt;br /&gt;
In simple terms, a Ruby Gem is a package containing files that can be installed in a system and can help expand the functionality of a Ruby application. Ruby gems are very powerful. Ruby programmers create and publish Ruby Gems as open source in [https://github.com/ github]. It is very east to install, upgrade and delete Gems in a system.&lt;br /&gt;
&lt;br /&gt;
== Structure of Ruby Gem ==&lt;br /&gt;
Every Gem has a set of files and the following standard structure &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ tree -d newgem&lt;br /&gt;
|-- lib/&lt;br /&gt;
|   |-- newgem.rb&lt;br /&gt;
|   `-- newgem/&lt;br /&gt;
|       |-- base.rb&lt;br /&gt;
|       `-- version.rb&lt;br /&gt;
|-- test/&lt;br /&gt;
|-- bin/&lt;br /&gt;
|-- Rakefile&lt;br /&gt;
`-- newgem.gemspec&amp;lt;/pre&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
The ''lib'' folder has the code of the ruby gem. It has ''newgem.rb'' file and a folder named ''newgem''. This folder has two files which are ''base.rb'' and ''version.rb''. The version number is recorded in ''version.rb'' and can be changed when the gem is updated. The ''bin'' directory has any binaries that is a part of the gem file and should be distributed with the gem. A gem usually has a [http://rake.rubyforge.org/doc/rakefile_rdoc.html Rakefile]. The rake program uses this to generate code and automate tests in addition to performing other tasks. The Gem specification file ''newgem.gemspec'' contains details specific to the gem. The file has details such as the gem name,the files that are in it, the gems it depends on for  performing testing, the gems it depends on for actually running and other details.&lt;br /&gt;
&lt;br /&gt;
== Listing existing Gems ==&lt;br /&gt;
To list the existing gems in a system ''list'' keyword can be used in the command line.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem list&lt;br /&gt;
&lt;br /&gt;
*** LOCAL GEMS ***&lt;br /&gt;
&lt;br /&gt;
actionmailer (3.2.3)&lt;br /&gt;
actionpack (3.2.3)&lt;br /&gt;
activemodel (3.2.3)&lt;br /&gt;
activerecord (3.2.3)&lt;br /&gt;
activeresource (3.2.3)&lt;br /&gt;
activesupport (3.2.3)&lt;br /&gt;
arel (3.0.2)&lt;br /&gt;
bigdecimal (1.1.0)&lt;br /&gt;
builder (3.0.4)&lt;br /&gt;
bundler (1.3.5)&lt;br /&gt;
capybara (2.1.0)&lt;br /&gt;
coffee-rails (3.2.2)&lt;br /&gt;
coffee-script (2.2.0)&lt;br /&gt;
coffee-script-source (1.6.3)&lt;br /&gt;
erubis (2.7.0)&lt;br /&gt;
execjs (2.0.1)&lt;br /&gt;
hike (1.2.3)&lt;br /&gt;
i18n (0.6.5)&lt;br /&gt;
io-console (0.3)&lt;br /&gt;
journey (1.0.4)&lt;br /&gt;
jquery-rails (3.0.4)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installing a new Gem ==&lt;br /&gt;
The ''install'' keyword can be used in command line to install gems. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem install capybara&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Uninstalling a Gem ==&lt;br /&gt;
The ''uninstall'' keyword can be used in command line to uninstall any existing gem in the system.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem uninstall capybara&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you uninstall a dependency of a gem RubyGems will ask you for confirmation.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem uninstall rbtree&lt;br /&gt;
&lt;br /&gt;
You have requested to uninstall the gem:&lt;br /&gt;
	rbtree-0.4.1&lt;br /&gt;
&lt;br /&gt;
drip-0.0.2 depends on rbtree (&amp;gt;= 0)&lt;br /&gt;
If you remove this gem, these dependencies will not be met.&lt;br /&gt;
Continue with Uninstall? [yN]  n&lt;br /&gt;
ERROR:  While executing gem ... (Gem::DependencyRemovalException)&lt;br /&gt;
    Uninstallation aborted due to dependent gem(s)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Update all existing Gems == &lt;br /&gt;
The ''update'' keyword can be used in command line to update all existing gems in the system.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem update &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Creating a new Gem == &lt;br /&gt;
It is also possible to [http://guides.rubygems.org/make-your-own-gem/ create our own ruby gem] to be used later to extend our Ruby applications. Bundler is a tool that can be used to [https://github.com/radar/guides/blob/master/gem-development.md to create a ruby gem].&lt;br /&gt;
&lt;br /&gt;
== Ruby Gem Commands ==&lt;br /&gt;
&lt;br /&gt;
There is a list of commands that can be used with Ruby Gems. More details of each of these commands can be found [http://guides.rubygems.org/command-reference/ here]&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
gem build&lt;br /&gt;
gem cert&lt;br /&gt;
gem check&lt;br /&gt;
gem cleanup&lt;br /&gt;
gem contents&lt;br /&gt;
gem dependency&lt;br /&gt;
gem environment&lt;br /&gt;
gem fetch&lt;br /&gt;
gem generate_index&lt;br /&gt;
gem help&lt;br /&gt;
gem install&lt;br /&gt;
gem list&lt;br /&gt;
gem lock&lt;br /&gt;
gem mirror&lt;br /&gt;
gem outdated&lt;br /&gt;
gem owner&lt;br /&gt;
gem pristine&lt;br /&gt;
gem push&lt;br /&gt;
gem query&lt;br /&gt;
gem rdoc&lt;br /&gt;
gem search&lt;br /&gt;
gem server&lt;br /&gt;
gem sources&lt;br /&gt;
gem specification&lt;br /&gt;
gem stale&lt;br /&gt;
gem uninstall&lt;br /&gt;
gem unpack&lt;br /&gt;
gem update&lt;br /&gt;
gem which&lt;br /&gt;
gem yank&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Some important Gems that are useful in RAILS environment ==&lt;br /&gt;
&lt;br /&gt;
There are many gems which provide easy of functionality that can be included in the rails development environment. [http://bundler.io/ Bundler]is a useful gem that enables a developer to quickly add and manage gems in a few lines of code.&lt;br /&gt;
&lt;br /&gt;
We can classify the Gems based on the usage in different layers Model, View and Controller.&lt;br /&gt;
&lt;br /&gt;
 '''MODEL layer'''&lt;br /&gt;
&lt;br /&gt;
'''Active Record Plugins''' &lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/activerecord-oracle_enhanced-adapter '''oracle-enhanced'''] Oracle &amp;quot;enhanced&amp;quot; ActiveRecord adapter contains useful additional methods for working with new and legacy Oracle databases. This adapter is superset of original ActiveRecord Oracle adapter.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/activerecord-jdbc-adapter '''activerecord-jdbc-adapter'''] This adapter is build on JDBC API used for connecting to the database. AR-JDBC is a database adapter for Rails' ActiveRecord component. It allows to connect to virtually any JDBC-compliant database with your JRuby on Rails application.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/activerecord-nulldb-adapter '''nulldb'''] .This helps in Database simulation and testing. A database backend that translates database interactions into no-ops. We can test our model business logic with wanting to experiment with real database.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/oracle-enhanced-enhanced '''oracle-enhanced-enhanced'''] It includes several enhancements and customization to the standard ActiveRecord Oracle Enhapnced adapter, which is still required. Any customization to this adapter's behavior or additional Oracle-specific utilities should be added here.&lt;br /&gt;
&lt;br /&gt;
* Other useful Ruby Gems here. [https://www.ruby-toolbox.com/projects/activerecord-sqlserver-adapter '''activerecord-sqlserver-adapter'''], [https://www.ruby-toolbox.com/projects/activerecord-jdbcmysql-adapter '''activerecord-jdbcmysql-adapter'''], [https://www.ruby-toolbox.com/projects/activerecord-jdbcpostgresql-adapter '''activerecord-jdbcpostgresql-adapter'''], [https://www.ruby-toolbox.com/projects/activerecord-jdbcderby-adapter '''activerecord-jdbcderby-adapter'''],.&lt;br /&gt;
&lt;br /&gt;
'''Active Record Index Assistants'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/foreigner '''foreigner'''] Adds helpers to migrations and dumps foreign keys to schema.rb.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/rails_indexes '''rails_indexes'''] A rake task to track down missing database indexes. does not assume that all foreign keys end with the convention of _id.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/schema_plus '''schema_plus'''] SchemaPlus is an ActiveRecord extension that provides enhanced capabilities for schema definition and querying, including: enhanced and more DRY index capabilities, support and automation for foreign key constraints, and support for views.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/automatic_foreign_key '''automatic_foreign_key'''] Automatic Foreign Key automatically generates foreign-key constraints when creating tables or adding columns. It uses SQL-92 syntax and as such should be compatible with most databases that support foreign-key constraints.&lt;br /&gt;
&lt;br /&gt;
* Other useful Ruby Gems here. [https://www.ruby-toolbox.com/projects/ambitious_query_indexer '''ambitious_query_indexer'''], [https://www.ruby-toolbox.com/projects/lol_dba '''lol_dba'''], [https://www.ruby-toolbox.com/projects/immigrant '''immigrant'''], [https://www.ruby-toolbox.com/projects/redhillonrails_core '''redhillonrails_core'''].&lt;br /&gt;
&lt;br /&gt;
'''Rails DB Bootstrapping'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/seed-fu '''seed-fu'''] Seed Fu is an attempt to once and for all solve the problem of inserting and maintaining seed data in a database. It uses a variety of techniques gathered from various places around the web and combines them to create what is hopefully the most robust seed data system around.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/populator '''populator'''] Mass populate an Active Record database.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/seedbank '''seedbank'''] Extends Rails seeds to split out complex seeds into multiple files and lets each environment have it's own seeds.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/has_alter_ego '''Has alter ego'''] has_alter_ego makes it possible to keep seed and live data transparently in parallel. In contrast to other seed data approaches has_alter_ego synchronizes the seed definitions with your database objects automagically unless you've overridden it in the database.&lt;br /&gt;
&lt;br /&gt;
* Other useful Ruby Gems here. [https://www.ruby-toolbox.com/projects/bootstrapper '''Bootstrapper'''], [https://www.ruby-toolbox.com/projects/db-populate '''Db-populate'''], [https://www.ruby-toolbox.com/projects/seed_dumper '''seed_dumper'''], [https://www.ruby-toolbox.com/projects/dibber '''dibber'''].&lt;br /&gt;
&lt;br /&gt;
'''Rails Search'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/Sunspot '''Sunspot'''] Sunspot is a library providing a powerful, all-ruby API for the Solr search engine. Sunspot manages the configuration of persistent Ruby classes for search and indexing and exposes Solr's most powerful features through a collection of DSLs. Complex search operations can be performed without hand-writing any boolean queries or building Solr parameters by hand.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/sunspot_rails '''sunspot_rails'''] Sunspot::Rails is an extension to the Sunspot library for Solr search. Sunspot::Rails adds integration between Sunspot and ActiveRecord, including defining search and indexing related methods on ActiveRecord models themselves, running a Sunspot-compatible Solr instance for development and test environments, and automatically commit Solr index changes at the end of each Rails request.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/tire '''Tire'''] Tire is a Ruby client for the Elasticsearch search engine/database. It provides Ruby-like API for fluent communication with the Elasticsearch server and blends with ActiveModel class for convenient usage in Rails applications. It allows to delete and create indices, define mapping for them, supports the bulk API, and presents an easy-to-use DSL for constructing your queries. It has full ActiveRecord/ActiveModel compatibility, allowing you to index your models (incrementally upon saving, or in bulk), searching and paginating the results.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/thinking-sphinx '''thinking-sphinx'''] An intelligent layer for ActiveRecord (via Rails and Sinatra) for the Sphinx full-text search tool.&lt;br /&gt;
&lt;br /&gt;
* Other useful Ruby Gems here. [https://www.ruby-toolbox.com/projects/pg_search '''pg_search'''], [https://www.ruby-toolbox.com/projects/redis-search '''redis-search'''], [https://www.ruby-toolbox.com/projects/ferret '''Ferret'''], [https://www.ruby-toolbox.com/projects/searchlight '''searchlight'''].&lt;br /&gt;
&lt;br /&gt;
'''Data Persistence'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/mongoid '''Mongoid'''] Mongoid is an ODM (Object Document Mapper) Framework for MongoDB, written in Ruby.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/mongomatic '''Mongomatic'''] Mongomatic is a modular Ruby object mapper for Mongo.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/dynamoid '''dynamoid'''] Dynamoid is an ORM for Amazon's DynamoDB that supports offline development, associations, querying, and everything else you'd expect from an ActiveRecord-style replacement.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/squeel '''squeel'''] Squeel unlocks the power of Arel in your Rails 3 application with a handy block-based syntax. You can write subqueries, access named functions provided by your RDBMS, and more, all without writing SQL strings.&lt;br /&gt;
&lt;br /&gt;
 '''VIEW layer'''&lt;br /&gt;
&lt;br /&gt;
'''CSS'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/sass '''Sass'''] Sass makes CSS fun again. Sass is an extension of CSS3, adding nested rules, variables, mixins, selector inheritance, and more. It's translated to well-formatted, standard CSS using the command line tool or a web-framework plugin.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/bourbon '''bourbon'''] The purpose of Bourbon Vanilla Sass Mixins is to provide a comprehensive framework of sass mixins that are designed to be as vanilla as possible. Meaning they should not deter from the original CSS syntax. The mixins contain vendor specific prefixes for all CSS3 properties for support amongst modern browsers. The prefixes also ensure graceful degradation for older browsers that support only CSS3 prefixed properties.&lt;br /&gt;
&lt;br /&gt;
* Other useful Ruby Gems here. [https://www.ruby-toolbox.com/projects/less '''Less'''], [https://www.ruby-toolbox.com/projects/sass-rails '''sass-rails'''], [https://www.ruby-toolbox.com/projects/stylus '''stylus'''], [https://www.ruby-toolbox.com/projects/patterns '''patterns''']&lt;br /&gt;
&lt;br /&gt;
'''Graphing'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/google_visualr '''google_visualr'''] This Ruby gem, GoogleVisualr, is a wrapper around the Google Chart Tools that allows anyone to create the same beautiful charts with just Ruby; you don't have to write any JavaScript at all.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/highcharts-rails '''highcharts-rails'''] Gem that includes Highcharts (Interactive JavaScript charts for your web projects), in the Rails Asset Pipeline introduced in Rails 3.1.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/seer '''Seer'''] Gem that includes Highcharts (Interactive JavaScript charts for your web projects), in the Rails Asset Pipeline introduced in Rails 3.1.Seer is a lightweight, semantically rich wrapper for the Google Visualization API. It allows you to easily create a visualization of data in a variety of formats, including area charts, bar charts, column charts, gauges, line charts, and pie charts.&lt;br /&gt;
&lt;br /&gt;
'''HTML &amp;amp; Markup'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/formula '''formula'''] Formula is a Rails form generator that generates simple clean markup. The project aims to let users create semantically beautiful forms without introducing too much syntax. The goal is to make integrating advanced layout systems as simple as possible.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/formtastic '''Formtastic'''] A Rails form builder plugin/gem with semantically rich and accessible markup.&lt;br /&gt;
&lt;br /&gt;
'''JavaScript'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/jasmine '''Jasmine'''] Test your JavaScript without any framework dependencies, in any environment, and with a nice descriptive syntax.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/konacha '''konacha'''] Konacha is a Rails engine that allows you to test your JavaScript with the mocha test framework and chai assertion library. It is similar to Jasmine and Evergreen, but does not attempt to be framework agnostic. By sticking with Rails, Konacha can take full advantage of features such as the asset pipeline and engines&lt;br /&gt;
&lt;br /&gt;
'''Rails In-Place Editing'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/best_in_place '''BestInPlace'''] BestInPlace is a jQuery script and a Rails 3 helper that provide the method best_in_place to display any object field easily editable for the user by just clicking on it. It supports input data, text data, boolean data and custom dropdown data. It works with RESTful controllers.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/best_in_place_mongoid '''best_in_place_mongoid'''] BestInPlaceMongoid is a fork of BestInPlace jQuery script and a Rails 3 helper that provide the method best_in_place to display any object field easily editable for the user by just clicking on it. It supports input data, text data, boolean data and custom dropdown data. It works with RESTful controllers.&lt;br /&gt;
&lt;br /&gt;
 '''CONTROLLER layer'''&lt;br /&gt;
&lt;br /&gt;
'''Background Jobs'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/resque '''Resque'''] Resque is a Redis-backed Ruby library for creating background jobs, placing those jobs on multiple queues, and processing them later. Background jobs can be any Ruby class or module that responds to perform. Your existing classes can easily be converted to background jobs or you can create new classes specifically to do work. Or, you can do both. Resque is heavily inspired by DelayedJob (which rocks) and is comprised of three parts: * A Ruby library for creating, querying, and processing jobs * A Rake task for starting a worker which processes jobs * A Sinatra app for monitoring queues, jobs, and workers.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/starling '''Starling'''] Starling is a light-weight, persistent queue server that speaks the memcached protocol. It was originally developed for Twitter's backend.&lt;br /&gt;
&lt;br /&gt;
'''Scheduling'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/resque-scheduler '''resque-scheduler'''] Light weight job scheduling on top of Resque. Adds methods enqueue_at/enqueue_in to schedule jobs in the future. Also supports queueing jobs on a fixed, cron-like schedule.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/clockwork '''Clockwork'''] A scheduler process to replace cron, using a more flexible Ruby syntax running as a single long-running process. Inspired by rufus-scheduler and resque-scheduler.&lt;br /&gt;
&lt;br /&gt;
'''Code Metrics'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/simpleCov '''SimpleCov'''] Code coverage for Ruby 1.9 with a powerful configuration library and automatic merging of coverage across test suites.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/flay '''Flay'''] Flay analyzes code for structural similarities. Differences in literal values, variable, class, method names, whitespace, programming style, braces vs do/end, etc are all ignored. Making this totally rad.&lt;br /&gt;
&lt;br /&gt;
'''E-Mail Sending'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/actionmailer '''Action Mailer'''] Email on Rails. Compose, deliver, receive, and test emails using the familiar controller/view pattern. First-class support for multipart email and attachments.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/capistrano_mailer '''capistrano_mailer'''] Capistrano Deployment Email Notification. Keep the whole team informed of each release!&lt;br /&gt;
&lt;br /&gt;
 '''TESTING'''&lt;br /&gt;
&lt;br /&gt;
'''Browser testing'''&lt;br /&gt;
&lt;br /&gt;
* [http://rubygems.org/gems/capybara '''Capybara'''] Capybara is an integration testing tool for rack based web applications. It simulates how a user would interact with a website.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/webrat '''Webrat'''] Webrat lets you quickly write expressive and robust acceptance tests for a Ruby web application. It supports simulating a browser inside a Ruby process to avoid the performance hit and browser dependency of Selenium or Watir, but the same API can also be used to drive real Selenium tests when necessary (eg. for testing AJAX interactions). Most Ruby web frameworks and testing frameworks are supported.&lt;br /&gt;
&lt;br /&gt;
'''Random Data Generation'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/faker '''Faker'''] Faker, a port of Data::Faker from Perl, is used to easily generate fake data: names, addresses, phone numbers, etc.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/forgery '''Forgery'''] Easy and customizable generation of forged data. Can be used as a gem or a rails plugin. Includes rails generators for creating your own forgeries.&lt;br /&gt;
&lt;br /&gt;
'''Unit Test Frameworks'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/test-unit '''test-unit'''] Ruby 1.9.x bundles minitest not Test::Unit. Test::Unit bundled in Ruby 1.8.x had not been improved but unbundled Test::Unit (test-unit) is improved actively.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/wrong '''Wrong'''] Wrong provides a general assert method that takes a predicate block. Assertion failure messages are rich in detail. The Wrong idea is to replace all those countless assert_this, assert_that library methods which only exist to give a more useful failure message than &amp;quot;assertion failed&amp;quot;. Wrong replaces all of them in one fell swoop, since if you can write it in Ruby, Wrong can make a sensible failure message out of it. Also provided are several helper methods, like rescuing, capturing, and d.&lt;br /&gt;
&lt;br /&gt;
* Other useful Ruby Gems here. [https://www.ruby-toolbox.com/projects/testrocket '''testrocket'''], [https://www.ruby-toolbox.com/projects/kintama '''kintama'''], [https://www.ruby-toolbox.com/projects/lemon '''Lemon'''], [https://www.ruby-toolbox.com/projects/shindo '''Shindo'''].&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
[http://guides.rubygems.org/make-your-own-gem/ Gudie to create your own Ruby Gem]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://rubygems.rubyforge.org/rubygems-update/UPGRADING_rdoc.html How to Upgrade/Downgrade Ruby Gems]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://rubylearning.com/blog/ Collection of Ruby Study Notes]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://net.tutsplus.com/articles/web-roundups/24-extremely-useful-ruby-gems-for-web-development/ 24 extremely useful Ruby Gems for web development]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://railscasts.com/episodes/245-new-gem-with-bundler Screencasts to create a Ruby Gem]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://guides.rubygems.org/publishing/ How to publish your Ruby Gem?]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://www.ibm.com/developerworks/aix/library/au-aix-manage-ruby/ Manage Ruby and Gems with rvm]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://railscasts.com/episodes/183-gemcutter-jeweler Gemcutter and Jeweler railscast]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== References==&lt;br /&gt;
1. [http://guides.rubygems.org/rubygems-basics/#installing_gems Ruby Gems guide]&amp;lt;br&amp;gt;&lt;br /&gt;
2. [http://timelessrepo.com/making-ruby-gems Making Ruby Gems]&amp;lt;br&amp;gt;&lt;br /&gt;
3. [https://www.ruby-toolbox.com Ruby Tool Box]&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Npari</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch1_1w24_nv&amp;diff=79141</id>
		<title>CSC/ECE 517 Fall 2013/ch1 1w24 nv</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch1_1w24_nv&amp;diff=79141"/>
		<updated>2013-09-25T03:04:26Z</updated>

		<summary type="html">&lt;p&gt;Npari: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Ruby Gem is a package manager for Ruby programming language. It allows users to easily download, install and use software packages on their system. The functionality of a Ruby application can be modified or extended with the help of Gems. In the version 1.9 of Ruby, Ruby Gems has been made a part of the standard library. This article would take the user on at tour of what ruby gems is all about and what all gems one can use to make better a developers Ruby application. Links for more details on Ruby gems are provided for the reader's benefit in the end of the article. &lt;br /&gt;
&lt;br /&gt;
== '''A Tour of Ruby Gems''' ==&lt;br /&gt;
== Definition of a Ruby Gem ==&lt;br /&gt;
In simple terms, a Ruby Gem is a package containing files that can be installed in a system and can help expand the functionality of a Ruby application. Ruby gems are very powerful. Ruby programmers create and publish Ruby Gems as open source in [https://github.com/ github]. It is very east to install, upgrade and delete Gems in a system.&lt;br /&gt;
&lt;br /&gt;
== Structure of Ruby Gem ==&lt;br /&gt;
Every Gem has a set of files and the following standard structure &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ tree -d newgem&lt;br /&gt;
|-- lib/&lt;br /&gt;
|   |-- newgem.rb&lt;br /&gt;
|   `-- newgem/&lt;br /&gt;
|       |-- base.rb&lt;br /&gt;
|       `-- version.rb&lt;br /&gt;
|-- test/&lt;br /&gt;
|-- bin/&lt;br /&gt;
|-- Rakefile&lt;br /&gt;
`-- newgem.gemspec&amp;lt;/pre&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
The ''lib'' folder has the code of the ruby gem. It has ''newgem.rb'' file and a folder named ''newgem''. This folder has two files which are ''base.rb'' and ''version.rb''. The version number is recorded in ''version.rb'' and can be changed when the gem is updated. The ''bin'' directory has any binaries that is a part of the gem file and should be distributed with the gem. A gem usually has a [http://rake.rubyforge.org/doc/rakefile_rdoc.html Rakefile]. The rake program uses this to generate code and automate tests in addition to performing other tasks. The Gem specification file ''newgem.gemspec'' contains details specific to the gem. The file has details such as the gem name,the files that are in it, the gems it depends on for  performing testing, the gems it depends on for actually running and other details.&lt;br /&gt;
&lt;br /&gt;
== Listing existing Gems ==&lt;br /&gt;
To list the existing gems in a system ''list'' keyword can be used in the command line.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem list&lt;br /&gt;
&lt;br /&gt;
*** LOCAL GEMS ***&lt;br /&gt;
&lt;br /&gt;
actionmailer (3.2.3)&lt;br /&gt;
actionpack (3.2.3)&lt;br /&gt;
activemodel (3.2.3)&lt;br /&gt;
activerecord (3.2.3)&lt;br /&gt;
activeresource (3.2.3)&lt;br /&gt;
activesupport (3.2.3)&lt;br /&gt;
arel (3.0.2)&lt;br /&gt;
bigdecimal (1.1.0)&lt;br /&gt;
builder (3.0.4)&lt;br /&gt;
bundler (1.3.5)&lt;br /&gt;
capybara (2.1.0)&lt;br /&gt;
coffee-rails (3.2.2)&lt;br /&gt;
coffee-script (2.2.0)&lt;br /&gt;
coffee-script-source (1.6.3)&lt;br /&gt;
erubis (2.7.0)&lt;br /&gt;
execjs (2.0.1)&lt;br /&gt;
hike (1.2.3)&lt;br /&gt;
i18n (0.6.5)&lt;br /&gt;
io-console (0.3)&lt;br /&gt;
journey (1.0.4)&lt;br /&gt;
jquery-rails (3.0.4)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installing a new Gem ==&lt;br /&gt;
The ''install'' keyword can be used in command line to install gems. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem install capybara&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Uninstalling a Gem ==&lt;br /&gt;
The ''uninstall'' keyword can be used in command line to uninstall any existing gem in the system.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem uninstall capybara&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you uninstall a dependency of a gem RubyGems will ask you for confirmation.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem uninstall rbtree&lt;br /&gt;
&lt;br /&gt;
You have requested to uninstall the gem:&lt;br /&gt;
	rbtree-0.4.1&lt;br /&gt;
&lt;br /&gt;
drip-0.0.2 depends on rbtree (&amp;gt;= 0)&lt;br /&gt;
If you remove this gem, these dependencies will not be met.&lt;br /&gt;
Continue with Uninstall? [yN]  n&lt;br /&gt;
ERROR:  While executing gem ... (Gem::DependencyRemovalException)&lt;br /&gt;
    Uninstallation aborted due to dependent gem(s)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Update all existing Gems == &lt;br /&gt;
The ''update'' keyword can be used in command line to update all existing gems in the system.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem update &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Creating a new Gem == &lt;br /&gt;
It is also possible to [http://guides.rubygems.org/make-your-own-gem/ create our own ruby gem] to be used later to extend our Ruby applications. Bundler is a tool that can be used to [https://github.com/radar/guides/blob/master/gem-development.md to create a ruby gem].&lt;br /&gt;
&lt;br /&gt;
== Ruby Gem Commands ==&lt;br /&gt;
&lt;br /&gt;
There is a list of commands that can be used with Ruby Gems. More details of each of these commands can be found [http://guides.rubygems.org/command-reference/ here]&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
gem build&lt;br /&gt;
gem cert&lt;br /&gt;
gem check&lt;br /&gt;
gem cleanup&lt;br /&gt;
gem contents&lt;br /&gt;
gem dependency&lt;br /&gt;
gem environment&lt;br /&gt;
gem fetch&lt;br /&gt;
gem generate_index&lt;br /&gt;
gem help&lt;br /&gt;
gem install&lt;br /&gt;
gem list&lt;br /&gt;
gem lock&lt;br /&gt;
gem mirror&lt;br /&gt;
gem outdated&lt;br /&gt;
gem owner&lt;br /&gt;
gem pristine&lt;br /&gt;
gem push&lt;br /&gt;
gem query&lt;br /&gt;
gem rdoc&lt;br /&gt;
gem search&lt;br /&gt;
gem server&lt;br /&gt;
gem sources&lt;br /&gt;
gem specification&lt;br /&gt;
gem stale&lt;br /&gt;
gem uninstall&lt;br /&gt;
gem unpack&lt;br /&gt;
gem update&lt;br /&gt;
gem which&lt;br /&gt;
gem yank&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Some important Gems that are useful in RAILS environment ==&lt;br /&gt;
&lt;br /&gt;
There are many gems which provide easy of functionality that can be included in the rails development environment. [http://bundler.io/ Bundler]is a useful gem that enables a developer to quickly add and manage gems in a few lines of code.&lt;br /&gt;
&lt;br /&gt;
We can classify the Gems based on the usage in different layers Model, View and Controller.&lt;br /&gt;
&lt;br /&gt;
 '''MODEL layer'''&lt;br /&gt;
&lt;br /&gt;
'''Active Record Plugins''' &lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/activerecord-oracle_enhanced-adapter '''oracle-enhanced'''] Oracle &amp;quot;enhanced&amp;quot; ActiveRecord adapter contains useful additional methods for working with new and legacy Oracle databases. This adapter is superset of original ActiveRecord Oracle adapter.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/activerecord-jdbc-adapter '''activerecord-jdbc-adapter'''] This adapter is build on JDBC API used for connecting to the database. AR-JDBC is a database adapter for Rails' ActiveRecord component. It allows to connect to virtually any JDBC-compliant database with your JRuby on Rails application.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/activerecord-nulldb-adapter '''nulldb'''] .This helps in Database simulation and testing. A database backend that translates database interactions into no-ops. We can test our model business logic with wanting to experiment with real database.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/oracle-enhanced-enhanced '''oracle-enhanced-enhanced'''] It includes several enhancements and customization to the standard ActiveRecord Oracle Enhapnced adapter, which is still required. Any customization to this adapter's behavior or additional Oracle-specific utilities should be added here.&lt;br /&gt;
&lt;br /&gt;
* Other useful Ruby Gems here. [https://www.ruby-toolbox.com/projects/activerecord-sqlserver-adapter '''activerecord-sqlserver-adapter'''], [https://www.ruby-toolbox.com/projects/activerecord-jdbcmysql-adapter '''activerecord-jdbcmysql-adapter'''], [https://www.ruby-toolbox.com/projects/activerecord-jdbcpostgresql-adapter '''activerecord-jdbcpostgresql-adapter'''], [https://www.ruby-toolbox.com/projects/activerecord-jdbcderby-adapter '''activerecord-jdbcderby-adapter'''],.&lt;br /&gt;
&lt;br /&gt;
'''Active Record Index Assistants'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/foreigner '''foreigner'''] Adds helpers to migrations and dumps foreign keys to schema.rb.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/rails_indexes '''rails_indexes'''] A rake task to track down missing database indexes. does not assume that all foreign keys end with the convention of _id.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/schema_plus '''schema_plus'''] SchemaPlus is an ActiveRecord extension that provides enhanced capabilities for schema definition and querying, including: enhanced and more DRY index capabilities, support and automation for foreign key constraints, and support for views.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/automatic_foreign_key '''automatic_foreign_key'''] Automatic Foreign Key automatically generates foreign-key constraints when creating tables or adding columns. It uses SQL-92 syntax and as such should be compatible with most databases that support foreign-key constraints.&lt;br /&gt;
&lt;br /&gt;
* Other useful Ruby Gems here. [https://www.ruby-toolbox.com/projects/ambitious_query_indexer '''ambitious_query_indexer'''], [https://www.ruby-toolbox.com/projects/lol_dba '''lol_dba'''], [https://www.ruby-toolbox.com/projects/immigrant '''immigrant'''], [https://www.ruby-toolbox.com/projects/redhillonrails_core '''redhillonrails_core'''].&lt;br /&gt;
&lt;br /&gt;
'''Rails DB Bootstrapping'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/seed-fu '''seed-fu'''] Seed Fu is an attempt to once and for all solve the problem of inserting and maintaining seed data in a database. It uses a variety of techniques gathered from various places around the web and combines them to create what is hopefully the most robust seed data system around.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/populator '''populator'''] Mass populate an Active Record database.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/seedbank '''seedbank'''] Extends Rails seeds to split out complex seeds into multiple files and lets each environment have it's own seeds.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/has_alter_ego '''Has alter ego'''] has_alter_ego makes it possible to keep seed and live data transparently in parallel. In contrast to other seed data approaches has_alter_ego synchronizes the seed definitions with your database objects automagically unless you've overridden it in the database.&lt;br /&gt;
&lt;br /&gt;
* Other useful Ruby Gems here. [https://www.ruby-toolbox.com/projects/bootstrapper '''Bootstrapper'''], [https://www.ruby-toolbox.com/projects/db-populate '''Db-populate'''], [https://www.ruby-toolbox.com/projects/seed_dumper '''seed_dumper'''], [https://www.ruby-toolbox.com/projects/dibber '''dibber'''].&lt;br /&gt;
&lt;br /&gt;
'''Rails Search'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/Sunspot '''Sunspot'''] Sunspot is a library providing a powerful, all-ruby API for the Solr search engine. Sunspot manages the configuration of persistent Ruby classes for search and indexing and exposes Solr's most powerful features through a collection of DSLs. Complex search operations can be performed without hand-writing any boolean queries or building Solr parameters by hand.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/sunspot_rails '''sunspot_rails'''] Sunspot::Rails is an extension to the Sunspot library for Solr search. Sunspot::Rails adds integration between Sunspot and ActiveRecord, including defining search and indexing related methods on ActiveRecord models themselves, running a Sunspot-compatible Solr instance for development and test environments, and automatically commit Solr index changes at the end of each Rails request.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/tire '''Tire'''] Tire is a Ruby client for the Elasticsearch search engine/database. It provides Ruby-like API for fluent communication with the Elasticsearch server and blends with ActiveModel class for convenient usage in Rails applications. It allows to delete and create indices, define mapping for them, supports the bulk API, and presents an easy-to-use DSL for constructing your queries. It has full ActiveRecord/ActiveModel compatibility, allowing you to index your models (incrementally upon saving, or in bulk), searching and paginating the results.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/thinking-sphinx '''thinking-sphinx'''] An intelligent layer for ActiveRecord (via Rails and Sinatra) for the Sphinx full-text search tool.&lt;br /&gt;
&lt;br /&gt;
* Other useful Ruby Gems here. [https://www.ruby-toolbox.com/projects/pg_search '''pg_search'''], [https://www.ruby-toolbox.com/projects/redis-search '''redis-search'''], [https://www.ruby-toolbox.com/projects/ferret '''Ferret'''], [https://www.ruby-toolbox.com/projects/searchlight '''searchlight'''].&lt;br /&gt;
&lt;br /&gt;
'''Data Persistence'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/mongoid '''Mongoid'''] Mongoid is an ODM (Object Document Mapper) Framework for MongoDB, written in Ruby.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/mongomatic '''Mongomatic'''] Mongomatic is a modular Ruby object mapper for Mongo.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/dynamoid '''dynamoid'''] Dynamoid is an ORM for Amazon's DynamoDB that supports offline development, associations, querying, and everything else you'd expect from an ActiveRecord-style replacement.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/squeel '''squeel'''] Squeel unlocks the power of Arel in your Rails 3 application with a handy block-based syntax. You can write subqueries, access named functions provided by your RDBMS, and more, all without writing SQL strings.&lt;br /&gt;
&lt;br /&gt;
 '''VIEW layer'''&lt;br /&gt;
&lt;br /&gt;
'''CSS'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/sass '''Sass'''] Sass makes CSS fun again. Sass is an extension of CSS3, adding nested rules, variables, mixins, selector inheritance, and more. It's translated to well-formatted, standard CSS using the command line tool or a web-framework plugin.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/bourbon '''bourbon'''] The purpose of Bourbon Vanilla Sass Mixins is to provide a comprehensive framework of sass mixins that are designed to be as vanilla as possible. Meaning they should not deter from the original CSS syntax. The mixins contain vendor specific prefixes for all CSS3 properties for support amongst modern browsers. The prefixes also ensure graceful degradation for older browsers that support only CSS3 prefixed properties.&lt;br /&gt;
&lt;br /&gt;
* Other useful Ruby Gems here. [https://www.ruby-toolbox.com/projects/less '''Less'''], [https://www.ruby-toolbox.com/projects/sass-rails '''sass-rails'''], [https://www.ruby-toolbox.com/projects/stylus '''stylus'''], [https://www.ruby-toolbox.com/projects/patterns '''patterns''']&lt;br /&gt;
&lt;br /&gt;
'''Graphing'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/google_visualr '''google_visualr'''] This Ruby gem, GoogleVisualr, is a wrapper around the Google Chart Tools that allows anyone to create the same beautiful charts with just Ruby; you don't have to write any JavaScript at all.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/highcharts-rails '''highcharts-rails'''] Gem that includes Highcharts (Interactive JavaScript charts for your web projects), in the Rails Asset Pipeline introduced in Rails 3.1.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/seer '''Seer'''] Gem that includes Highcharts (Interactive JavaScript charts for your web projects), in the Rails Asset Pipeline introduced in Rails 3.1.Seer is a lightweight, semantically rich wrapper for the Google Visualization API. It allows you to easily create a visualization of data in a variety of formats, including area charts, bar charts, column charts, gauges, line charts, and pie charts.&lt;br /&gt;
&lt;br /&gt;
'''HTML &amp;amp; Markup'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/formula '''formula'''] Formula is a Rails form generator that generates simple clean markup. The project aims to let users create semantically beautiful forms without introducing too much syntax. The goal is to make integrating advanced layout systems as simple as possible.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/formtastic '''Formtastic'''] A Rails form builder plugin/gem with semantically rich and accessible markup.&lt;br /&gt;
&lt;br /&gt;
'''JavaScript'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/jasmine '''Jasmine'''] Test your JavaScript without any framework dependencies, in any environment, and with a nice descriptive syntax.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/konacha '''konacha'''] Konacha is a Rails engine that allows you to test your JavaScript with the mocha test framework and chai assertion library. It is similar to Jasmine and Evergreen, but does not attempt to be framework agnostic. By sticking with Rails, Konacha can take full advantage of features such as the asset pipeline and engines&lt;br /&gt;
&lt;br /&gt;
'''Rails In-Place Editing'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/best_in_place '''BestInPlace'''] BestInPlace is a jQuery script and a Rails 3 helper that provide the method best_in_place to display any object field easily editable for the user by just clicking on it. It supports input data, text data, boolean data and custom dropdown data. It works with RESTful controllers.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/best_in_place_mongoid '''best_in_place_mongoid'''] BestInPlaceMongoid is a fork of BestInPlace jQuery script and a Rails 3 helper that provide the method best_in_place to display any object field easily editable for the user by just clicking on it. It supports input data, text data, boolean data and custom dropdown data. It works with RESTful controllers.&lt;br /&gt;
&lt;br /&gt;
 '''CONTROLLER layer'''&lt;br /&gt;
&lt;br /&gt;
'''Background Jobs'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/resque '''Resque'''] Resque is a Redis-backed Ruby library for creating background jobs, placing those jobs on multiple queues, and processing them later. Background jobs can be any Ruby class or module that responds to perform. Your existing classes can easily be converted to background jobs or you can create new classes specifically to do work. Or, you can do both. Resque is heavily inspired by DelayedJob (which rocks) and is comprised of three parts: * A Ruby library for creating, querying, and processing jobs * A Rake task for starting a worker which processes jobs * A Sinatra app for monitoring queues, jobs, and workers.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/starling '''Starling'''] Starling is a light-weight, persistent queue server that speaks the memcached protocol. It was originally developed for Twitter's backend.&lt;br /&gt;
&lt;br /&gt;
'''Scheduling'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/resque-scheduler '''resque-scheduler'''] Light weight job scheduling on top of Resque. Adds methods enqueue_at/enqueue_in to schedule jobs in the future. Also supports queueing jobs on a fixed, cron-like schedule.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/clockwork '''Clockwork'''] A scheduler process to replace cron, using a more flexible Ruby syntax running as a single long-running process. Inspired by rufus-scheduler and resque-scheduler.&lt;br /&gt;
&lt;br /&gt;
'''Code Metrics'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/simpleCov '''SimpleCov'''] Code coverage for Ruby 1.9 with a powerful configuration library and automatic merging of coverage across test suites.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/flay '''Flay'''] Flay analyzes code for structural similarities. Differences in literal values, variable, class, method names, whitespace, programming style, braces vs do/end, etc are all ignored. Making this totally rad.&lt;br /&gt;
&lt;br /&gt;
'''E-Mail Sending'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/actionmailer '''Action Mailer'''] Email on Rails. Compose, deliver, receive, and test emails using the familiar controller/view pattern. First-class support for multipart email and attachments.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/capistrano_mailer '''capistrano_mailer'''] Capistrano Deployment Email Notification. Keep the whole team informed of each release!&lt;br /&gt;
&lt;br /&gt;
 '''TESTING'''&lt;br /&gt;
&lt;br /&gt;
'''Browser testing'''&lt;br /&gt;
&lt;br /&gt;
* [http://rubygems.org/gems/capybara '''Capybara'''] Capybara is an integration testing tool for rack based web applications. It simulates how a user would interact with a website.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/webrat '''Webrat'''] Webrat lets you quickly write expressive and robust acceptance tests for a Ruby web application. It supports simulating a browser inside a Ruby process to avoid the performance hit and browser dependency of Selenium or Watir, but the same API can also be used to drive real Selenium tests when necessary (eg. for testing AJAX interactions). Most Ruby web frameworks and testing frameworks are supported.&lt;br /&gt;
&lt;br /&gt;
'''Random Data Generation'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/faker '''Faker'''] Faker, a port of Data::Faker from Perl, is used to easily generate fake data: names, addresses, phone numbers, etc.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/forgery '''Forgery'''] Easy and customizable generation of forged data. Can be used as a gem or a rails plugin. Includes rails generators for creating your own forgeries.&lt;br /&gt;
&lt;br /&gt;
'''Unit Test Frameworks'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/test-unit '''test-unit'''] Ruby 1.9.x bundles minitest not Test::Unit. Test::Unit bundled in Ruby 1.8.x had not been improved but unbundled Test::Unit (test-unit) is improved actively.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/wrong '''Wrong'''] Wrong provides a general assert method that takes a predicate block. Assertion failure messages are rich in detail. The Wrong idea is to replace all those countless assert_this, assert_that library methods which only exist to give a more useful failure message than &amp;quot;assertion failed&amp;quot;. Wrong replaces all of them in one fell swoop, since if you can write it in Ruby, Wrong can make a sensible failure message out of it. Also provided are several helper methods, like rescuing, capturing, and d.&lt;br /&gt;
&lt;br /&gt;
* Other useful Ruby Gems here. [https://www.ruby-toolbox.com/projects/testrocket '''testrocket'''], [https://www.ruby-toolbox.com/projects/kintama '''kintama'''], [https://www.ruby-toolbox.com/projects/lemon '''Lemon'''], [https://www.ruby-toolbox.com/projects/shindo '''Shindo'''].&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
[http://guides.rubygems.org/make-your-own-gem/ Gudie to create your own Ruby Gem]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://rubygems.rubyforge.org/rubygems-update/UPGRADING_rdoc.html How to Upgrade/Downgrade Ruby Gems]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://rubylearning.com/blog/ Collection of Ruby Study Notes]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://net.tutsplus.com/articles/web-roundups/24-extremely-useful-ruby-gems-for-web-development/ 24 extremely useful Ruby Gems for web development]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://railscasts.com/episodes/245-new-gem-with-bundler Screencasts to create a Ruby Gem]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://guides.rubygems.org/publishing/ How to publish your Ruby Gem?]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://www.ibm.com/developerworks/aix/library/au-aix-manage-ruby/ Manage Ruby and Gems with rvm]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://railscasts.com/episodes/183-gemcutter-jeweler Gemcutter and Jeweler railscast]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== References==&lt;br /&gt;
1. [http://guides.rubygems.org/rubygems-basics/#installing_gems Ruby Gems guide]&amp;lt;br&amp;gt;&lt;br /&gt;
2. [http://timelessrepo.com/making-ruby-gems Making Ruby Gems]&amp;lt;br&amp;gt;&lt;br /&gt;
3. [https://www.ruby-toolbox.com Ruby Tool Box]&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Npari</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch1_1w24_nv&amp;diff=79139</id>
		<title>CSC/ECE 517 Fall 2013/ch1 1w24 nv</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch1_1w24_nv&amp;diff=79139"/>
		<updated>2013-09-25T03:01:37Z</updated>

		<summary type="html">&lt;p&gt;Npari: /* See Also */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Ruby Gem is a package manager for Ruby programming language. It allows users to easily download, install and use software packages on their system. The functionality of a Ruby application can be modified or extended with the help of Gems. In the version 1.9 of Ruby, Ruby Gems has been made a part of the standard library.&lt;br /&gt;
&lt;br /&gt;
== '''A Tour of Ruby Gems''' ==&lt;br /&gt;
== Definition of a Ruby Gem ==&lt;br /&gt;
In simple terms, a Ruby Gem is a package containing files that can be installed in a system and can help expand the functionality of a Ruby application. Ruby gems are very powerful. Ruby programmers create and publish Ruby Gems as open source in [https://github.com/ github]. It is very east to install, upgrade and delete Gems in a system.&lt;br /&gt;
&lt;br /&gt;
== Structure of Ruby Gem ==&lt;br /&gt;
Every Gem has a set of files and the following standard structure &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ tree -d newgem&lt;br /&gt;
|-- lib/&lt;br /&gt;
|   |-- newgem.rb&lt;br /&gt;
|   `-- newgem/&lt;br /&gt;
|       |-- base.rb&lt;br /&gt;
|       `-- version.rb&lt;br /&gt;
|-- test/&lt;br /&gt;
|-- bin/&lt;br /&gt;
|-- Rakefile&lt;br /&gt;
`-- newgem.gemspec&amp;lt;/pre&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
The ''lib'' folder has the code of the ruby gem. It has ''newgem.rb'' file and a folder named ''newgem''. This folder has two files which are ''base.rb'' and ''version.rb''. The version number is recorded in ''version.rb'' and can be changed when the gem is updated. The ''bin'' directory has any binaries that is a part of the gem file and should be distributed with the gem. A gem usually has a [http://rake.rubyforge.org/doc/rakefile_rdoc.html Rakefile]. The rake program uses this to generate code and automate tests in addition to performing other tasks. The Gem specification file ''newgem.gemspec'' contains details specific to the gem. The file has details such as the gem name,the files that are in it, the gems it depends on for  performing testing, the gems it depends on for actually running and other details.&lt;br /&gt;
&lt;br /&gt;
== Listing existing Gems ==&lt;br /&gt;
To list the existing gems in a system ''list'' keyword can be used in the command line.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem list&lt;br /&gt;
&lt;br /&gt;
*** LOCAL GEMS ***&lt;br /&gt;
&lt;br /&gt;
actionmailer (3.2.3)&lt;br /&gt;
actionpack (3.2.3)&lt;br /&gt;
activemodel (3.2.3)&lt;br /&gt;
activerecord (3.2.3)&lt;br /&gt;
activeresource (3.2.3)&lt;br /&gt;
activesupport (3.2.3)&lt;br /&gt;
arel (3.0.2)&lt;br /&gt;
bigdecimal (1.1.0)&lt;br /&gt;
builder (3.0.4)&lt;br /&gt;
bundler (1.3.5)&lt;br /&gt;
capybara (2.1.0)&lt;br /&gt;
coffee-rails (3.2.2)&lt;br /&gt;
coffee-script (2.2.0)&lt;br /&gt;
coffee-script-source (1.6.3)&lt;br /&gt;
erubis (2.7.0)&lt;br /&gt;
execjs (2.0.1)&lt;br /&gt;
hike (1.2.3)&lt;br /&gt;
i18n (0.6.5)&lt;br /&gt;
io-console (0.3)&lt;br /&gt;
journey (1.0.4)&lt;br /&gt;
jquery-rails (3.0.4)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installing a new Gem ==&lt;br /&gt;
The ''install'' keyword can be used in command line to install gems. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem install capybara&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Uninstalling a Gem ==&lt;br /&gt;
The ''uninstall'' keyword can be used in command line to uninstall any existing gem in the system.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem uninstall capybara&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you uninstall a dependency of a gem RubyGems will ask you for confirmation.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem uninstall rbtree&lt;br /&gt;
&lt;br /&gt;
You have requested to uninstall the gem:&lt;br /&gt;
	rbtree-0.4.1&lt;br /&gt;
&lt;br /&gt;
drip-0.0.2 depends on rbtree (&amp;gt;= 0)&lt;br /&gt;
If you remove this gem, these dependencies will not be met.&lt;br /&gt;
Continue with Uninstall? [yN]  n&lt;br /&gt;
ERROR:  While executing gem ... (Gem::DependencyRemovalException)&lt;br /&gt;
    Uninstallation aborted due to dependent gem(s)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Update all existing Gems == &lt;br /&gt;
The ''update'' keyword can be used in command line to update all existing gems in the system.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem update &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Creating a new Gem == &lt;br /&gt;
It is also possible to [http://guides.rubygems.org/make-your-own-gem/ create our own ruby gem] to be used later to extend our Ruby applications. Bundler is a tool that can be used to [https://github.com/radar/guides/blob/master/gem-development.md to create a ruby gem].&lt;br /&gt;
&lt;br /&gt;
== Ruby Gem Commands ==&lt;br /&gt;
&lt;br /&gt;
There is a list of commands that can be used with Ruby Gems. More details of each of these commands can be found [http://guides.rubygems.org/command-reference/ here]&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
gem build&lt;br /&gt;
gem cert&lt;br /&gt;
gem check&lt;br /&gt;
gem cleanup&lt;br /&gt;
gem contents&lt;br /&gt;
gem dependency&lt;br /&gt;
gem environment&lt;br /&gt;
gem fetch&lt;br /&gt;
gem generate_index&lt;br /&gt;
gem help&lt;br /&gt;
gem install&lt;br /&gt;
gem list&lt;br /&gt;
gem lock&lt;br /&gt;
gem mirror&lt;br /&gt;
gem outdated&lt;br /&gt;
gem owner&lt;br /&gt;
gem pristine&lt;br /&gt;
gem push&lt;br /&gt;
gem query&lt;br /&gt;
gem rdoc&lt;br /&gt;
gem search&lt;br /&gt;
gem server&lt;br /&gt;
gem sources&lt;br /&gt;
gem specification&lt;br /&gt;
gem stale&lt;br /&gt;
gem uninstall&lt;br /&gt;
gem unpack&lt;br /&gt;
gem update&lt;br /&gt;
gem which&lt;br /&gt;
gem yank&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Some important Gems that are useful in RAILS environment ==&lt;br /&gt;
&lt;br /&gt;
There are many gems which provide easy of functionality that can be included in the rails development environment. [http://bundler.io/ Bundler]is a useful gem that enables a developer to quickly add and manage gems in a few lines of code.&lt;br /&gt;
&lt;br /&gt;
We can classify the Gems based on the usage in different layers Model, View and Controller.&lt;br /&gt;
&lt;br /&gt;
 '''MODEL layer'''&lt;br /&gt;
&lt;br /&gt;
'''Active Record Plugins''' &lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/activerecord-oracle_enhanced-adapter '''oracle-enhanced'''] Oracle &amp;quot;enhanced&amp;quot; ActiveRecord adapter contains useful additional methods for working with new and legacy Oracle databases. This adapter is superset of original ActiveRecord Oracle adapter.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/activerecord-jdbc-adapter '''activerecord-jdbc-adapter'''] This adapter is build on JDBC API used for connecting to the database. AR-JDBC is a database adapter for Rails' ActiveRecord component. It allows to connect to virtually any JDBC-compliant database with your JRuby on Rails application.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/activerecord-nulldb-adapter '''nulldb'''] .This helps in Database simulation and testing. A database backend that translates database interactions into no-ops. We can test our model business logic with wanting to experiment with real database.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/oracle-enhanced-enhanced '''oracle-enhanced-enhanced'''] It includes several enhancements and customization to the standard ActiveRecord Oracle Enhapnced adapter, which is still required. Any customization to this adapter's behavior or additional Oracle-specific utilities should be added here.&lt;br /&gt;
&lt;br /&gt;
* Other useful Ruby Gems here. [https://www.ruby-toolbox.com/projects/activerecord-sqlserver-adapter '''activerecord-sqlserver-adapter'''], [https://www.ruby-toolbox.com/projects/activerecord-jdbcmysql-adapter '''activerecord-jdbcmysql-adapter'''], [https://www.ruby-toolbox.com/projects/activerecord-jdbcpostgresql-adapter '''activerecord-jdbcpostgresql-adapter'''], [https://www.ruby-toolbox.com/projects/activerecord-jdbcderby-adapter '''activerecord-jdbcderby-adapter'''],.&lt;br /&gt;
&lt;br /&gt;
'''Active Record Index Assistants'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/foreigner '''foreigner'''] Adds helpers to migrations and dumps foreign keys to schema.rb.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/rails_indexes '''rails_indexes'''] A rake task to track down missing database indexes. does not assume that all foreign keys end with the convention of _id.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/schema_plus '''schema_plus'''] SchemaPlus is an ActiveRecord extension that provides enhanced capabilities for schema definition and querying, including: enhanced and more DRY index capabilities, support and automation for foreign key constraints, and support for views.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/automatic_foreign_key '''automatic_foreign_key'''] Automatic Foreign Key automatically generates foreign-key constraints when creating tables or adding columns. It uses SQL-92 syntax and as such should be compatible with most databases that support foreign-key constraints.&lt;br /&gt;
&lt;br /&gt;
* Other useful Ruby Gems here. [https://www.ruby-toolbox.com/projects/ambitious_query_indexer '''ambitious_query_indexer'''], [https://www.ruby-toolbox.com/projects/lol_dba '''lol_dba'''], [https://www.ruby-toolbox.com/projects/immigrant '''immigrant'''], [https://www.ruby-toolbox.com/projects/redhillonrails_core '''redhillonrails_core'''].&lt;br /&gt;
&lt;br /&gt;
'''Rails DB Bootstrapping'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/seed-fu '''seed-fu'''] Seed Fu is an attempt to once and for all solve the problem of inserting and maintaining seed data in a database. It uses a variety of techniques gathered from various places around the web and combines them to create what is hopefully the most robust seed data system around.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/populator '''populator'''] Mass populate an Active Record database.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/seedbank '''seedbank'''] Extends Rails seeds to split out complex seeds into multiple files and lets each environment have it's own seeds.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/has_alter_ego '''Has alter ego'''] has_alter_ego makes it possible to keep seed and live data transparently in parallel. In contrast to other seed data approaches has_alter_ego synchronizes the seed definitions with your database objects automagically unless you've overridden it in the database.&lt;br /&gt;
&lt;br /&gt;
* Other useful Ruby Gems here. [https://www.ruby-toolbox.com/projects/bootstrapper '''Bootstrapper'''], [https://www.ruby-toolbox.com/projects/db-populate '''Db-populate'''], [https://www.ruby-toolbox.com/projects/seed_dumper '''seed_dumper'''], [https://www.ruby-toolbox.com/projects/dibber '''dibber'''].&lt;br /&gt;
&lt;br /&gt;
'''Rails Search'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/Sunspot '''Sunspot'''] Sunspot is a library providing a powerful, all-ruby API for the Solr search engine. Sunspot manages the configuration of persistent Ruby classes for search and indexing and exposes Solr's most powerful features through a collection of DSLs. Complex search operations can be performed without hand-writing any boolean queries or building Solr parameters by hand.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/sunspot_rails '''sunspot_rails'''] Sunspot::Rails is an extension to the Sunspot library for Solr search. Sunspot::Rails adds integration between Sunspot and ActiveRecord, including defining search and indexing related methods on ActiveRecord models themselves, running a Sunspot-compatible Solr instance for development and test environments, and automatically commit Solr index changes at the end of each Rails request.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/tire '''Tire'''] Tire is a Ruby client for the Elasticsearch search engine/database. It provides Ruby-like API for fluent communication with the Elasticsearch server and blends with ActiveModel class for convenient usage in Rails applications. It allows to delete and create indices, define mapping for them, supports the bulk API, and presents an easy-to-use DSL for constructing your queries. It has full ActiveRecord/ActiveModel compatibility, allowing you to index your models (incrementally upon saving, or in bulk), searching and paginating the results.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/thinking-sphinx '''thinking-sphinx'''] An intelligent layer for ActiveRecord (via Rails and Sinatra) for the Sphinx full-text search tool.&lt;br /&gt;
&lt;br /&gt;
* Other useful Ruby Gems here. [https://www.ruby-toolbox.com/projects/pg_search '''pg_search'''], [https://www.ruby-toolbox.com/projects/redis-search '''redis-search'''], [https://www.ruby-toolbox.com/projects/ferret '''Ferret'''], [https://www.ruby-toolbox.com/projects/searchlight '''searchlight'''].&lt;br /&gt;
&lt;br /&gt;
'''Data Persistence'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/mongoid '''Mongoid'''] Mongoid is an ODM (Object Document Mapper) Framework for MongoDB, written in Ruby.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/mongomatic '''Mongomatic'''] Mongomatic is a modular Ruby object mapper for Mongo.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/dynamoid '''dynamoid'''] Dynamoid is an ORM for Amazon's DynamoDB that supports offline development, associations, querying, and everything else you'd expect from an ActiveRecord-style replacement.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/squeel '''squeel'''] Squeel unlocks the power of Arel in your Rails 3 application with a handy block-based syntax. You can write subqueries, access named functions provided by your RDBMS, and more, all without writing SQL strings.&lt;br /&gt;
&lt;br /&gt;
 '''VIEW layer'''&lt;br /&gt;
&lt;br /&gt;
'''CSS'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/sass '''Sass'''] Sass makes CSS fun again. Sass is an extension of CSS3, adding nested rules, variables, mixins, selector inheritance, and more. It's translated to well-formatted, standard CSS using the command line tool or a web-framework plugin.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/bourbon '''bourbon'''] The purpose of Bourbon Vanilla Sass Mixins is to provide a comprehensive framework of sass mixins that are designed to be as vanilla as possible. Meaning they should not deter from the original CSS syntax. The mixins contain vendor specific prefixes for all CSS3 properties for support amongst modern browsers. The prefixes also ensure graceful degradation for older browsers that support only CSS3 prefixed properties.&lt;br /&gt;
&lt;br /&gt;
* Other useful Ruby Gems here. [https://www.ruby-toolbox.com/projects/less '''Less'''], [https://www.ruby-toolbox.com/projects/sass-rails '''sass-rails'''], [https://www.ruby-toolbox.com/projects/stylus '''stylus'''], [https://www.ruby-toolbox.com/projects/patterns '''patterns''']&lt;br /&gt;
&lt;br /&gt;
'''Graphing'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/google_visualr '''google_visualr'''] This Ruby gem, GoogleVisualr, is a wrapper around the Google Chart Tools that allows anyone to create the same beautiful charts with just Ruby; you don't have to write any JavaScript at all.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/highcharts-rails '''highcharts-rails'''] Gem that includes Highcharts (Interactive JavaScript charts for your web projects), in the Rails Asset Pipeline introduced in Rails 3.1.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/seer '''Seer'''] Gem that includes Highcharts (Interactive JavaScript charts for your web projects), in the Rails Asset Pipeline introduced in Rails 3.1.Seer is a lightweight, semantically rich wrapper for the Google Visualization API. It allows you to easily create a visualization of data in a variety of formats, including area charts, bar charts, column charts, gauges, line charts, and pie charts.&lt;br /&gt;
&lt;br /&gt;
'''HTML &amp;amp; Markup'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/formula '''formula'''] Formula is a Rails form generator that generates simple clean markup. The project aims to let users create semantically beautiful forms without introducing too much syntax. The goal is to make integrating advanced layout systems as simple as possible.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/formtastic '''Formtastic'''] A Rails form builder plugin/gem with semantically rich and accessible markup.&lt;br /&gt;
&lt;br /&gt;
'''JavaScript'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/jasmine '''Jasmine'''] Test your JavaScript without any framework dependencies, in any environment, and with a nice descriptive syntax.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/konacha '''konacha'''] Konacha is a Rails engine that allows you to test your JavaScript with the mocha test framework and chai assertion library. It is similar to Jasmine and Evergreen, but does not attempt to be framework agnostic. By sticking with Rails, Konacha can take full advantage of features such as the asset pipeline and engines&lt;br /&gt;
&lt;br /&gt;
'''Rails In-Place Editing'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/best_in_place '''BestInPlace'''] BestInPlace is a jQuery script and a Rails 3 helper that provide the method best_in_place to display any object field easily editable for the user by just clicking on it. It supports input data, text data, boolean data and custom dropdown data. It works with RESTful controllers.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/best_in_place_mongoid '''best_in_place_mongoid'''] BestInPlaceMongoid is a fork of BestInPlace jQuery script and a Rails 3 helper that provide the method best_in_place to display any object field easily editable for the user by just clicking on it. It supports input data, text data, boolean data and custom dropdown data. It works with RESTful controllers.&lt;br /&gt;
&lt;br /&gt;
 '''CONTROLLER layer'''&lt;br /&gt;
&lt;br /&gt;
'''Background Jobs'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/resque '''Resque'''] Resque is a Redis-backed Ruby library for creating background jobs, placing those jobs on multiple queues, and processing them later. Background jobs can be any Ruby class or module that responds to perform. Your existing classes can easily be converted to background jobs or you can create new classes specifically to do work. Or, you can do both. Resque is heavily inspired by DelayedJob (which rocks) and is comprised of three parts: * A Ruby library for creating, querying, and processing jobs * A Rake task for starting a worker which processes jobs * A Sinatra app for monitoring queues, jobs, and workers.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/starling '''Starling'''] Starling is a light-weight, persistent queue server that speaks the memcached protocol. It was originally developed for Twitter's backend.&lt;br /&gt;
&lt;br /&gt;
'''Scheduling'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/resque-scheduler '''resque-scheduler'''] Light weight job scheduling on top of Resque. Adds methods enqueue_at/enqueue_in to schedule jobs in the future. Also supports queueing jobs on a fixed, cron-like schedule.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/clockwork '''Clockwork'''] A scheduler process to replace cron, using a more flexible Ruby syntax running as a single long-running process. Inspired by rufus-scheduler and resque-scheduler.&lt;br /&gt;
&lt;br /&gt;
'''Code Metrics'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/simpleCov '''SimpleCov'''] Code coverage for Ruby 1.9 with a powerful configuration library and automatic merging of coverage across test suites.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/flay '''Flay'''] Flay analyzes code for structural similarities. Differences in literal values, variable, class, method names, whitespace, programming style, braces vs do/end, etc are all ignored. Making this totally rad.&lt;br /&gt;
&lt;br /&gt;
'''E-Mail Sending'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/actionmailer '''Action Mailer'''] Email on Rails. Compose, deliver, receive, and test emails using the familiar controller/view pattern. First-class support for multipart email and attachments.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/capistrano_mailer '''capistrano_mailer'''] Capistrano Deployment Email Notification. Keep the whole team informed of each release!&lt;br /&gt;
&lt;br /&gt;
 '''TESTING'''&lt;br /&gt;
&lt;br /&gt;
'''Browser testing'''&lt;br /&gt;
&lt;br /&gt;
* [http://rubygems.org/gems/capybara '''Capybara'''] Capybara is an integration testing tool for rack based web applications. It simulates how a user would interact with a website.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/webrat '''Webrat'''] Webrat lets you quickly write expressive and robust acceptance tests for a Ruby web application. It supports simulating a browser inside a Ruby process to avoid the performance hit and browser dependency of Selenium or Watir, but the same API can also be used to drive real Selenium tests when necessary (eg. for testing AJAX interactions). Most Ruby web frameworks and testing frameworks are supported.&lt;br /&gt;
&lt;br /&gt;
'''Random Data Generation'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/faker '''Faker'''] Faker, a port of Data::Faker from Perl, is used to easily generate fake data: names, addresses, phone numbers, etc.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/forgery '''Forgery'''] Easy and customizable generation of forged data. Can be used as a gem or a rails plugin. Includes rails generators for creating your own forgeries.&lt;br /&gt;
&lt;br /&gt;
'''Unit Test Frameworks'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/test-unit '''test-unit'''] Ruby 1.9.x bundles minitest not Test::Unit. Test::Unit bundled in Ruby 1.8.x had not been improved but unbundled Test::Unit (test-unit) is improved actively.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/wrong '''Wrong'''] Wrong provides a general assert method that takes a predicate block. Assertion failure messages are rich in detail. The Wrong idea is to replace all those countless assert_this, assert_that library methods which only exist to give a more useful failure message than &amp;quot;assertion failed&amp;quot;. Wrong replaces all of them in one fell swoop, since if you can write it in Ruby, Wrong can make a sensible failure message out of it. Also provided are several helper methods, like rescuing, capturing, and d.&lt;br /&gt;
&lt;br /&gt;
* Other useful Ruby Gems here. [https://www.ruby-toolbox.com/projects/testrocket '''testrocket'''], [https://www.ruby-toolbox.com/projects/kintama '''kintama'''], [https://www.ruby-toolbox.com/projects/lemon '''Lemon'''], [https://www.ruby-toolbox.com/projects/shindo '''Shindo'''].&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
[http://guides.rubygems.org/make-your-own-gem/ Gudie to create your own Ruby Gem]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://rubygems.rubyforge.org/rubygems-update/UPGRADING_rdoc.html How to Upgrade/Downgrade Ruby Gems]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://rubylearning.com/blog/ Collection of Ruby Study Notes]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://net.tutsplus.com/articles/web-roundups/24-extremely-useful-ruby-gems-for-web-development/ 24 extremely useful Ruby Gems for web development]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://railscasts.com/episodes/245-new-gem-with-bundler Screencasts to create a Ruby Gem]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://guides.rubygems.org/publishing/ How to publish your Ruby Gem?]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://www.ibm.com/developerworks/aix/library/au-aix-manage-ruby/ Manage Ruby and Gems with rvm]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://railscasts.com/episodes/183-gemcutter-jeweler Gemcutter and Jeweler railscast]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== References==&lt;br /&gt;
1. [http://guides.rubygems.org/rubygems-basics/#installing_gems Ruby Gems guide]&amp;lt;br&amp;gt;&lt;br /&gt;
2. [http://timelessrepo.com/making-ruby-gems Making Ruby Gems]&amp;lt;br&amp;gt;&lt;br /&gt;
3. [https://www.ruby-toolbox.com Ruby Tool Box]&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Npari</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch1_1w24_nv&amp;diff=79138</id>
		<title>CSC/ECE 517 Fall 2013/ch1 1w24 nv</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch1_1w24_nv&amp;diff=79138"/>
		<updated>2013-09-25T02:59:45Z</updated>

		<summary type="html">&lt;p&gt;Npari: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Ruby Gem is a package manager for Ruby programming language. It allows users to easily download, install and use software packages on their system. The functionality of a Ruby application can be modified or extended with the help of Gems. In the version 1.9 of Ruby, Ruby Gems has been made a part of the standard library.&lt;br /&gt;
&lt;br /&gt;
== '''A Tour of Ruby Gems''' ==&lt;br /&gt;
== Definition of a Ruby Gem ==&lt;br /&gt;
In simple terms, a Ruby Gem is a package containing files that can be installed in a system and can help expand the functionality of a Ruby application. Ruby gems are very powerful. Ruby programmers create and publish Ruby Gems as open source in [https://github.com/ github]. It is very east to install, upgrade and delete Gems in a system.&lt;br /&gt;
&lt;br /&gt;
== Structure of Ruby Gem ==&lt;br /&gt;
Every Gem has a set of files and the following standard structure &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ tree -d newgem&lt;br /&gt;
|-- lib/&lt;br /&gt;
|   |-- newgem.rb&lt;br /&gt;
|   `-- newgem/&lt;br /&gt;
|       |-- base.rb&lt;br /&gt;
|       `-- version.rb&lt;br /&gt;
|-- test/&lt;br /&gt;
|-- bin/&lt;br /&gt;
|-- Rakefile&lt;br /&gt;
`-- newgem.gemspec&amp;lt;/pre&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
The ''lib'' folder has the code of the ruby gem. It has ''newgem.rb'' file and a folder named ''newgem''. This folder has two files which are ''base.rb'' and ''version.rb''. The version number is recorded in ''version.rb'' and can be changed when the gem is updated. The ''bin'' directory has any binaries that is a part of the gem file and should be distributed with the gem. A gem usually has a [http://rake.rubyforge.org/doc/rakefile_rdoc.html Rakefile]. The rake program uses this to generate code and automate tests in addition to performing other tasks. The Gem specification file ''newgem.gemspec'' contains details specific to the gem. The file has details such as the gem name,the files that are in it, the gems it depends on for  performing testing, the gems it depends on for actually running and other details.&lt;br /&gt;
&lt;br /&gt;
== Listing existing Gems ==&lt;br /&gt;
To list the existing gems in a system ''list'' keyword can be used in the command line.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem list&lt;br /&gt;
&lt;br /&gt;
*** LOCAL GEMS ***&lt;br /&gt;
&lt;br /&gt;
actionmailer (3.2.3)&lt;br /&gt;
actionpack (3.2.3)&lt;br /&gt;
activemodel (3.2.3)&lt;br /&gt;
activerecord (3.2.3)&lt;br /&gt;
activeresource (3.2.3)&lt;br /&gt;
activesupport (3.2.3)&lt;br /&gt;
arel (3.0.2)&lt;br /&gt;
bigdecimal (1.1.0)&lt;br /&gt;
builder (3.0.4)&lt;br /&gt;
bundler (1.3.5)&lt;br /&gt;
capybara (2.1.0)&lt;br /&gt;
coffee-rails (3.2.2)&lt;br /&gt;
coffee-script (2.2.0)&lt;br /&gt;
coffee-script-source (1.6.3)&lt;br /&gt;
erubis (2.7.0)&lt;br /&gt;
execjs (2.0.1)&lt;br /&gt;
hike (1.2.3)&lt;br /&gt;
i18n (0.6.5)&lt;br /&gt;
io-console (0.3)&lt;br /&gt;
journey (1.0.4)&lt;br /&gt;
jquery-rails (3.0.4)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installing a new Gem ==&lt;br /&gt;
The ''install'' keyword can be used in command line to install gems. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem install capybara&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Uninstalling a Gem ==&lt;br /&gt;
The ''uninstall'' keyword can be used in command line to uninstall any existing gem in the system.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem uninstall capybara&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you uninstall a dependency of a gem RubyGems will ask you for confirmation.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem uninstall rbtree&lt;br /&gt;
&lt;br /&gt;
You have requested to uninstall the gem:&lt;br /&gt;
	rbtree-0.4.1&lt;br /&gt;
&lt;br /&gt;
drip-0.0.2 depends on rbtree (&amp;gt;= 0)&lt;br /&gt;
If you remove this gem, these dependencies will not be met.&lt;br /&gt;
Continue with Uninstall? [yN]  n&lt;br /&gt;
ERROR:  While executing gem ... (Gem::DependencyRemovalException)&lt;br /&gt;
    Uninstallation aborted due to dependent gem(s)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Update all existing Gems == &lt;br /&gt;
The ''update'' keyword can be used in command line to update all existing gems in the system.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem update &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Creating a new Gem == &lt;br /&gt;
It is also possible to [http://guides.rubygems.org/make-your-own-gem/ create our own ruby gem] to be used later to extend our Ruby applications. Bundler is a tool that can be used to [https://github.com/radar/guides/blob/master/gem-development.md to create a ruby gem].&lt;br /&gt;
&lt;br /&gt;
== Ruby Gem Commands ==&lt;br /&gt;
&lt;br /&gt;
There is a list of commands that can be used with Ruby Gems. More details of each of these commands can be found [http://guides.rubygems.org/command-reference/ here]&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
gem build&lt;br /&gt;
gem cert&lt;br /&gt;
gem check&lt;br /&gt;
gem cleanup&lt;br /&gt;
gem contents&lt;br /&gt;
gem dependency&lt;br /&gt;
gem environment&lt;br /&gt;
gem fetch&lt;br /&gt;
gem generate_index&lt;br /&gt;
gem help&lt;br /&gt;
gem install&lt;br /&gt;
gem list&lt;br /&gt;
gem lock&lt;br /&gt;
gem mirror&lt;br /&gt;
gem outdated&lt;br /&gt;
gem owner&lt;br /&gt;
gem pristine&lt;br /&gt;
gem push&lt;br /&gt;
gem query&lt;br /&gt;
gem rdoc&lt;br /&gt;
gem search&lt;br /&gt;
gem server&lt;br /&gt;
gem sources&lt;br /&gt;
gem specification&lt;br /&gt;
gem stale&lt;br /&gt;
gem uninstall&lt;br /&gt;
gem unpack&lt;br /&gt;
gem update&lt;br /&gt;
gem which&lt;br /&gt;
gem yank&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Some important Gems that are useful in RAILS environment ==&lt;br /&gt;
&lt;br /&gt;
There are many gems which provide easy of functionality that can be included in the rails development environment. [http://bundler.io/ Bundler]is a useful gem that enables a developer to quickly add and manage gems in a few lines of code.&lt;br /&gt;
&lt;br /&gt;
We can classify the Gems based on the usage in different layers Model, View and Controller.&lt;br /&gt;
&lt;br /&gt;
 '''MODEL layer'''&lt;br /&gt;
&lt;br /&gt;
'''Active Record Plugins''' &lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/activerecord-oracle_enhanced-adapter '''oracle-enhanced'''] Oracle &amp;quot;enhanced&amp;quot; ActiveRecord adapter contains useful additional methods for working with new and legacy Oracle databases. This adapter is superset of original ActiveRecord Oracle adapter.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/activerecord-jdbc-adapter '''activerecord-jdbc-adapter'''] This adapter is build on JDBC API used for connecting to the database. AR-JDBC is a database adapter for Rails' ActiveRecord component. It allows to connect to virtually any JDBC-compliant database with your JRuby on Rails application.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/activerecord-nulldb-adapter '''nulldb'''] .This helps in Database simulation and testing. A database backend that translates database interactions into no-ops. We can test our model business logic with wanting to experiment with real database.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/oracle-enhanced-enhanced '''oracle-enhanced-enhanced'''] It includes several enhancements and customization to the standard ActiveRecord Oracle Enhapnced adapter, which is still required. Any customization to this adapter's behavior or additional Oracle-specific utilities should be added here.&lt;br /&gt;
&lt;br /&gt;
* Other useful Ruby Gems here. [https://www.ruby-toolbox.com/projects/activerecord-sqlserver-adapter '''activerecord-sqlserver-adapter'''], [https://www.ruby-toolbox.com/projects/activerecord-jdbcmysql-adapter '''activerecord-jdbcmysql-adapter'''], [https://www.ruby-toolbox.com/projects/activerecord-jdbcpostgresql-adapter '''activerecord-jdbcpostgresql-adapter'''], [https://www.ruby-toolbox.com/projects/activerecord-jdbcderby-adapter '''activerecord-jdbcderby-adapter'''],.&lt;br /&gt;
&lt;br /&gt;
'''Active Record Index Assistants'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/foreigner '''foreigner'''] Adds helpers to migrations and dumps foreign keys to schema.rb.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/rails_indexes '''rails_indexes'''] A rake task to track down missing database indexes. does not assume that all foreign keys end with the convention of _id.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/schema_plus '''schema_plus'''] SchemaPlus is an ActiveRecord extension that provides enhanced capabilities for schema definition and querying, including: enhanced and more DRY index capabilities, support and automation for foreign key constraints, and support for views.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/automatic_foreign_key '''automatic_foreign_key'''] Automatic Foreign Key automatically generates foreign-key constraints when creating tables or adding columns. It uses SQL-92 syntax and as such should be compatible with most databases that support foreign-key constraints.&lt;br /&gt;
&lt;br /&gt;
* Other useful Ruby Gems here. [https://www.ruby-toolbox.com/projects/ambitious_query_indexer '''ambitious_query_indexer'''], [https://www.ruby-toolbox.com/projects/lol_dba '''lol_dba'''], [https://www.ruby-toolbox.com/projects/immigrant '''immigrant'''], [https://www.ruby-toolbox.com/projects/redhillonrails_core '''redhillonrails_core'''].&lt;br /&gt;
&lt;br /&gt;
'''Rails DB Bootstrapping'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/seed-fu '''seed-fu'''] Seed Fu is an attempt to once and for all solve the problem of inserting and maintaining seed data in a database. It uses a variety of techniques gathered from various places around the web and combines them to create what is hopefully the most robust seed data system around.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/populator '''populator'''] Mass populate an Active Record database.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/seedbank '''seedbank'''] Extends Rails seeds to split out complex seeds into multiple files and lets each environment have it's own seeds.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/has_alter_ego '''Has alter ego'''] has_alter_ego makes it possible to keep seed and live data transparently in parallel. In contrast to other seed data approaches has_alter_ego synchronizes the seed definitions with your database objects automagically unless you've overridden it in the database.&lt;br /&gt;
&lt;br /&gt;
* Other useful Ruby Gems here. [https://www.ruby-toolbox.com/projects/bootstrapper '''Bootstrapper'''], [https://www.ruby-toolbox.com/projects/db-populate '''Db-populate'''], [https://www.ruby-toolbox.com/projects/seed_dumper '''seed_dumper'''], [https://www.ruby-toolbox.com/projects/dibber '''dibber'''].&lt;br /&gt;
&lt;br /&gt;
'''Rails Search'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/Sunspot '''Sunspot'''] Sunspot is a library providing a powerful, all-ruby API for the Solr search engine. Sunspot manages the configuration of persistent Ruby classes for search and indexing and exposes Solr's most powerful features through a collection of DSLs. Complex search operations can be performed without hand-writing any boolean queries or building Solr parameters by hand.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/sunspot_rails '''sunspot_rails'''] Sunspot::Rails is an extension to the Sunspot library for Solr search. Sunspot::Rails adds integration between Sunspot and ActiveRecord, including defining search and indexing related methods on ActiveRecord models themselves, running a Sunspot-compatible Solr instance for development and test environments, and automatically commit Solr index changes at the end of each Rails request.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/tire '''Tire'''] Tire is a Ruby client for the Elasticsearch search engine/database. It provides Ruby-like API for fluent communication with the Elasticsearch server and blends with ActiveModel class for convenient usage in Rails applications. It allows to delete and create indices, define mapping for them, supports the bulk API, and presents an easy-to-use DSL for constructing your queries. It has full ActiveRecord/ActiveModel compatibility, allowing you to index your models (incrementally upon saving, or in bulk), searching and paginating the results.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/thinking-sphinx '''thinking-sphinx'''] An intelligent layer for ActiveRecord (via Rails and Sinatra) for the Sphinx full-text search tool.&lt;br /&gt;
&lt;br /&gt;
* Other useful Ruby Gems here. [https://www.ruby-toolbox.com/projects/pg_search '''pg_search'''], [https://www.ruby-toolbox.com/projects/redis-search '''redis-search'''], [https://www.ruby-toolbox.com/projects/ferret '''Ferret'''], [https://www.ruby-toolbox.com/projects/searchlight '''searchlight'''].&lt;br /&gt;
&lt;br /&gt;
'''Data Persistence'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/mongoid '''Mongoid'''] Mongoid is an ODM (Object Document Mapper) Framework for MongoDB, written in Ruby.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/mongomatic '''Mongomatic'''] Mongomatic is a modular Ruby object mapper for Mongo.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/dynamoid '''dynamoid'''] Dynamoid is an ORM for Amazon's DynamoDB that supports offline development, associations, querying, and everything else you'd expect from an ActiveRecord-style replacement.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/squeel '''squeel'''] Squeel unlocks the power of Arel in your Rails 3 application with a handy block-based syntax. You can write subqueries, access named functions provided by your RDBMS, and more, all without writing SQL strings.&lt;br /&gt;
&lt;br /&gt;
 '''VIEW layer'''&lt;br /&gt;
&lt;br /&gt;
'''CSS'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/sass '''Sass'''] Sass makes CSS fun again. Sass is an extension of CSS3, adding nested rules, variables, mixins, selector inheritance, and more. It's translated to well-formatted, standard CSS using the command line tool or a web-framework plugin.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/bourbon '''bourbon'''] The purpose of Bourbon Vanilla Sass Mixins is to provide a comprehensive framework of sass mixins that are designed to be as vanilla as possible. Meaning they should not deter from the original CSS syntax. The mixins contain vendor specific prefixes for all CSS3 properties for support amongst modern browsers. The prefixes also ensure graceful degradation for older browsers that support only CSS3 prefixed properties.&lt;br /&gt;
&lt;br /&gt;
* Other useful Ruby Gems here. [https://www.ruby-toolbox.com/projects/less '''Less'''], [https://www.ruby-toolbox.com/projects/sass-rails '''sass-rails'''], [https://www.ruby-toolbox.com/projects/stylus '''stylus'''], [https://www.ruby-toolbox.com/projects/patterns '''patterns''']&lt;br /&gt;
&lt;br /&gt;
'''Graphing'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/google_visualr '''google_visualr'''] This Ruby gem, GoogleVisualr, is a wrapper around the Google Chart Tools that allows anyone to create the same beautiful charts with just Ruby; you don't have to write any JavaScript at all.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/highcharts-rails '''highcharts-rails'''] Gem that includes Highcharts (Interactive JavaScript charts for your web projects), in the Rails Asset Pipeline introduced in Rails 3.1.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/seer '''Seer'''] Gem that includes Highcharts (Interactive JavaScript charts for your web projects), in the Rails Asset Pipeline introduced in Rails 3.1.Seer is a lightweight, semantically rich wrapper for the Google Visualization API. It allows you to easily create a visualization of data in a variety of formats, including area charts, bar charts, column charts, gauges, line charts, and pie charts.&lt;br /&gt;
&lt;br /&gt;
'''HTML &amp;amp; Markup'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/formula '''formula'''] Formula is a Rails form generator that generates simple clean markup. The project aims to let users create semantically beautiful forms without introducing too much syntax. The goal is to make integrating advanced layout systems as simple as possible.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/formtastic '''Formtastic'''] A Rails form builder plugin/gem with semantically rich and accessible markup.&lt;br /&gt;
&lt;br /&gt;
'''JavaScript'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/jasmine '''Jasmine'''] Test your JavaScript without any framework dependencies, in any environment, and with a nice descriptive syntax.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/konacha '''konacha'''] Konacha is a Rails engine that allows you to test your JavaScript with the mocha test framework and chai assertion library. It is similar to Jasmine and Evergreen, but does not attempt to be framework agnostic. By sticking with Rails, Konacha can take full advantage of features such as the asset pipeline and engines&lt;br /&gt;
&lt;br /&gt;
'''Rails In-Place Editing'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/best_in_place '''BestInPlace'''] BestInPlace is a jQuery script and a Rails 3 helper that provide the method best_in_place to display any object field easily editable for the user by just clicking on it. It supports input data, text data, boolean data and custom dropdown data. It works with RESTful controllers.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/best_in_place_mongoid '''best_in_place_mongoid'''] BestInPlaceMongoid is a fork of BestInPlace jQuery script and a Rails 3 helper that provide the method best_in_place to display any object field easily editable for the user by just clicking on it. It supports input data, text data, boolean data and custom dropdown data. It works with RESTful controllers.&lt;br /&gt;
&lt;br /&gt;
 '''CONTROLLER layer'''&lt;br /&gt;
&lt;br /&gt;
'''Background Jobs'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/resque '''Resque'''] Resque is a Redis-backed Ruby library for creating background jobs, placing those jobs on multiple queues, and processing them later. Background jobs can be any Ruby class or module that responds to perform. Your existing classes can easily be converted to background jobs or you can create new classes specifically to do work. Or, you can do both. Resque is heavily inspired by DelayedJob (which rocks) and is comprised of three parts: * A Ruby library for creating, querying, and processing jobs * A Rake task for starting a worker which processes jobs * A Sinatra app for monitoring queues, jobs, and workers.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/starling '''Starling'''] Starling is a light-weight, persistent queue server that speaks the memcached protocol. It was originally developed for Twitter's backend.&lt;br /&gt;
&lt;br /&gt;
'''Scheduling'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/resque-scheduler '''resque-scheduler'''] Light weight job scheduling on top of Resque. Adds methods enqueue_at/enqueue_in to schedule jobs in the future. Also supports queueing jobs on a fixed, cron-like schedule.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/clockwork '''Clockwork'''] A scheduler process to replace cron, using a more flexible Ruby syntax running as a single long-running process. Inspired by rufus-scheduler and resque-scheduler.&lt;br /&gt;
&lt;br /&gt;
'''Code Metrics'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/simpleCov '''SimpleCov'''] Code coverage for Ruby 1.9 with a powerful configuration library and automatic merging of coverage across test suites.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/flay '''Flay'''] Flay analyzes code for structural similarities. Differences in literal values, variable, class, method names, whitespace, programming style, braces vs do/end, etc are all ignored. Making this totally rad.&lt;br /&gt;
&lt;br /&gt;
'''E-Mail Sending'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/actionmailer '''Action Mailer'''] Email on Rails. Compose, deliver, receive, and test emails using the familiar controller/view pattern. First-class support for multipart email and attachments.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/capistrano_mailer '''capistrano_mailer'''] Capistrano Deployment Email Notification. Keep the whole team informed of each release!&lt;br /&gt;
&lt;br /&gt;
 '''TESTING'''&lt;br /&gt;
&lt;br /&gt;
'''Browser testing'''&lt;br /&gt;
&lt;br /&gt;
* [http://rubygems.org/gems/capybara '''Capybara'''] Capybara is an integration testing tool for rack based web applications. It simulates how a user would interact with a website.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/webrat '''Webrat'''] Webrat lets you quickly write expressive and robust acceptance tests for a Ruby web application. It supports simulating a browser inside a Ruby process to avoid the performance hit and browser dependency of Selenium or Watir, but the same API can also be used to drive real Selenium tests when necessary (eg. for testing AJAX interactions). Most Ruby web frameworks and testing frameworks are supported.&lt;br /&gt;
&lt;br /&gt;
'''Random Data Generation'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/faker '''Faker'''] Faker, a port of Data::Faker from Perl, is used to easily generate fake data: names, addresses, phone numbers, etc.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/forgery '''Forgery'''] Easy and customizable generation of forged data. Can be used as a gem or a rails plugin. Includes rails generators for creating your own forgeries.&lt;br /&gt;
&lt;br /&gt;
'''Unit Test Frameworks'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/test-unit '''test-unit'''] Ruby 1.9.x bundles minitest not Test::Unit. Test::Unit bundled in Ruby 1.8.x had not been improved but unbundled Test::Unit (test-unit) is improved actively.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/wrong '''Wrong'''] Wrong provides a general assert method that takes a predicate block. Assertion failure messages are rich in detail. The Wrong idea is to replace all those countless assert_this, assert_that library methods which only exist to give a more useful failure message than &amp;quot;assertion failed&amp;quot;. Wrong replaces all of them in one fell swoop, since if you can write it in Ruby, Wrong can make a sensible failure message out of it. Also provided are several helper methods, like rescuing, capturing, and d.&lt;br /&gt;
&lt;br /&gt;
* Other useful Ruby Gems here. [https://www.ruby-toolbox.com/projects/testrocket '''testrocket'''], [https://www.ruby-toolbox.com/projects/kintama '''kintama'''], [https://www.ruby-toolbox.com/projects/lemon '''Lemon'''], [https://www.ruby-toolbox.com/projects/shindo '''Shindo'''].&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
[http://guides.rubygems.org/make-your-own-gem/ Gudie to create your own Ruby Gem]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://rubygems.rubyforge.org/rubygems-update/UPGRADING_rdoc.html How to Upgrade/Downgrade Ruby Gems]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://rubylearning.com/blog/ Collection of Ruby Study Notes]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://net.tutsplus.com/articles/web-roundups/24-extremely-useful-ruby-gems-for-web-development/ 24 extremely useful Ruby Gems for web development]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://railscasts.com/episodes/245-new-gem-with-bundler Screencasts to create a Ruby Gem]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://guides.rubygems.org/publishing/ How to publish your Ruby Gem?]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://www.ibm.com/developerworks/aix/library/au-aix-manage-ruby/ Manage Ruby and Gems with rvm]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== References==&lt;br /&gt;
1. [http://guides.rubygems.org/rubygems-basics/#installing_gems Ruby Gems guide]&amp;lt;br&amp;gt;&lt;br /&gt;
2. [http://timelessrepo.com/making-ruby-gems Making Ruby Gems]&amp;lt;br&amp;gt;&lt;br /&gt;
3. [https://www.ruby-toolbox.com Ruby Tool Box]&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Npari</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch1_1w24_nv&amp;diff=79135</id>
		<title>CSC/ECE 517 Fall 2013/ch1 1w24 nv</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch1_1w24_nv&amp;diff=79135"/>
		<updated>2013-09-25T02:53:00Z</updated>

		<summary type="html">&lt;p&gt;Npari: /* Ruby Gem Commands */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Ruby Gem is a package manager for Ruby programming language. It allows users to easily download, install and use software packages on their system. The functionality of a Ruby application can be modified or extended with the help of Gems. In the version 1.9 of Ruby, Ruby Gems has been made a part of the standard library.&lt;br /&gt;
&lt;br /&gt;
== '''A Tour of Ruby Gems''' ==&lt;br /&gt;
== Definition of a Ruby Gem ==&lt;br /&gt;
In simple terms, a Ruby Gem is a package containing files that can be installed in a system and can help expand the functionality of a Ruby application. Ruby gems are very powerful. Ruby programmers create and publish Ruby Gems as open source in [https://github.com/ github]. It is very east to install, upgrade and delete Gems in a system.&lt;br /&gt;
&lt;br /&gt;
== Structure of Ruby Gem ==&lt;br /&gt;
Every Gem has a set of files and the following standard structure &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ tree -d newgem&lt;br /&gt;
|-- lib/&lt;br /&gt;
|   |-- newgem.rb&lt;br /&gt;
|   `-- newgem/&lt;br /&gt;
|       |-- base.rb&lt;br /&gt;
|       `-- version.rb&lt;br /&gt;
|-- test/&lt;br /&gt;
|-- bin/&lt;br /&gt;
|-- Rakefile&lt;br /&gt;
`-- newgem.gemspec&amp;lt;/pre&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
The ''lib'' folder has the code of the ruby gem. It has ''newgem.rb'' file and a folder named ''newgem''. This folder has two files which are ''base.rb'' and ''version.rb''. The version number is recorded in ''version.rb'' and can be changed when the gem is updated. The ''bin'' directory has any binaries that is a part of the gem file and should be distributed with the gem. A gem usually has a [http://rake.rubyforge.org/doc/rakefile_rdoc.html Rakefile]. The rake program uses this to generate code and automate tests in addition to performing other tasks. The Gem specification file ''newgem.gemspec'' contains details specific to the gem. The file has details such as the gem name,the files that are in it, the gems it depends on for  performing testing, the gems it depends on for actually running and other details.&lt;br /&gt;
&lt;br /&gt;
== Listing existing Gems ==&lt;br /&gt;
To list the existing gems in a system ''list'' keyword can be used in the command line.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem list&lt;br /&gt;
&lt;br /&gt;
*** LOCAL GEMS ***&lt;br /&gt;
&lt;br /&gt;
actionmailer (3.2.3)&lt;br /&gt;
actionpack (3.2.3)&lt;br /&gt;
activemodel (3.2.3)&lt;br /&gt;
activerecord (3.2.3)&lt;br /&gt;
activeresource (3.2.3)&lt;br /&gt;
activesupport (3.2.3)&lt;br /&gt;
arel (3.0.2)&lt;br /&gt;
bigdecimal (1.1.0)&lt;br /&gt;
builder (3.0.4)&lt;br /&gt;
bundler (1.3.5)&lt;br /&gt;
capybara (2.1.0)&lt;br /&gt;
coffee-rails (3.2.2)&lt;br /&gt;
coffee-script (2.2.0)&lt;br /&gt;
coffee-script-source (1.6.3)&lt;br /&gt;
erubis (2.7.0)&lt;br /&gt;
execjs (2.0.1)&lt;br /&gt;
hike (1.2.3)&lt;br /&gt;
i18n (0.6.5)&lt;br /&gt;
io-console (0.3)&lt;br /&gt;
journey (1.0.4)&lt;br /&gt;
jquery-rails (3.0.4)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installing a new Gem ==&lt;br /&gt;
The ''install'' keyword can be used in command line to install gems. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem install capybara&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Uninstalling a Gem ==&lt;br /&gt;
The ''uninstall'' keyword can be used in command line to uninstall any existing gem in the system.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem uninstall capybara&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you uninstall a dependency of a gem RubyGems will ask you for confirmation.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem uninstall rbtree&lt;br /&gt;
&lt;br /&gt;
You have requested to uninstall the gem:&lt;br /&gt;
	rbtree-0.4.1&lt;br /&gt;
&lt;br /&gt;
drip-0.0.2 depends on rbtree (&amp;gt;= 0)&lt;br /&gt;
If you remove this gem, these dependencies will not be met.&lt;br /&gt;
Continue with Uninstall? [yN]  n&lt;br /&gt;
ERROR:  While executing gem ... (Gem::DependencyRemovalException)&lt;br /&gt;
    Uninstallation aborted due to dependent gem(s)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Update all existing Gems == &lt;br /&gt;
The ''update'' keyword can be used in command line to update all existing gems in the system.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem update &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Creating a new Gem == &lt;br /&gt;
It is also possible to [http://guides.rubygems.org/make-your-own-gem/ create our own ruby gem] to be used later to extend our Ruby applications. Bundler is a tool that can be used to [https://github.com/radar/guides/blob/master/gem-development.md to create a ruby gem].&lt;br /&gt;
&lt;br /&gt;
== Ruby Gem Commands ==&lt;br /&gt;
&lt;br /&gt;
There is a list of commands that can be used with Ruby Gems. More details of each of these commands can be found [http://guides.rubygems.org/command-reference/ here]&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
gem build&lt;br /&gt;
gem cert&lt;br /&gt;
gem check&lt;br /&gt;
gem cleanup&lt;br /&gt;
gem contents&lt;br /&gt;
gem dependency&lt;br /&gt;
gem environment&lt;br /&gt;
gem fetch&lt;br /&gt;
gem generate_index&lt;br /&gt;
gem help&lt;br /&gt;
gem install&lt;br /&gt;
gem list&lt;br /&gt;
gem lock&lt;br /&gt;
gem mirror&lt;br /&gt;
gem outdated&lt;br /&gt;
gem owner&lt;br /&gt;
gem pristine&lt;br /&gt;
gem push&lt;br /&gt;
gem query&lt;br /&gt;
gem rdoc&lt;br /&gt;
gem search&lt;br /&gt;
gem server&lt;br /&gt;
gem sources&lt;br /&gt;
gem specification&lt;br /&gt;
gem stale&lt;br /&gt;
gem uninstall&lt;br /&gt;
gem unpack&lt;br /&gt;
gem update&lt;br /&gt;
gem which&lt;br /&gt;
gem yank&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Some important Gems that are useful in RAILS environment ==&lt;br /&gt;
&lt;br /&gt;
There are many gems which provide easy of functionality that can be included in the rails development environment. [http://bundler.io/ Bundler]is a useful gem that enables a developer to quickly add and manage gems in a few lines of code.&lt;br /&gt;
&lt;br /&gt;
We can classify the Gems based on the usage in different layers Model, View and Controller.&lt;br /&gt;
&lt;br /&gt;
 '''MODEL layer'''&lt;br /&gt;
&lt;br /&gt;
'''Active Record Plugins''' &lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/activerecord-oracle_enhanced-adapter '''oracle-enhanced'''] Oracle &amp;quot;enhanced&amp;quot; ActiveRecord adapter contains useful additional methods for working with new and legacy Oracle databases. This adapter is superset of original ActiveRecord Oracle adapter.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/activerecord-jdbc-adapter '''activerecord-jdbc-adapter'''] This adapter is build on JDBC API used for connecting to the database. AR-JDBC is a database adapter for Rails' ActiveRecord component. It allows to connect to virtually any JDBC-compliant database with your JRuby on Rails application.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/activerecord-nulldb-adapter '''nulldb'''] .This helps in Database simulation and testing. A database backend that translates database interactions into no-ops. We can test our model business logic with wanting to experiment with real database.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/oracle-enhanced-enhanced '''oracle-enhanced-enhanced'''] It includes several enhancements and customization to the standard ActiveRecord Oracle Enhapnced adapter, which is still required. Any customization to this adapter's behavior or additional Oracle-specific utilities should be added here.&lt;br /&gt;
&lt;br /&gt;
* Other useful Ruby Gems here. [https://www.ruby-toolbox.com/projects/activerecord-sqlserver-adapter '''activerecord-sqlserver-adapter'''], [https://www.ruby-toolbox.com/projects/activerecord-jdbcmysql-adapter '''activerecord-jdbcmysql-adapter'''], [https://www.ruby-toolbox.com/projects/activerecord-jdbcpostgresql-adapter '''activerecord-jdbcpostgresql-adapter'''], [https://www.ruby-toolbox.com/projects/activerecord-jdbcderby-adapter '''activerecord-jdbcderby-adapter'''],.&lt;br /&gt;
&lt;br /&gt;
'''Active Record Index Assistants'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/foreigner '''foreigner'''] Adds helpers to migrations and dumps foreign keys to schema.rb.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/rails_indexes '''rails_indexes'''] A rake task to track down missing database indexes. does not assume that all foreign keys end with the convention of _id.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/schema_plus '''schema_plus'''] SchemaPlus is an ActiveRecord extension that provides enhanced capabilities for schema definition and querying, including: enhanced and more DRY index capabilities, support and automation for foreign key constraints, and support for views.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/automatic_foreign_key '''automatic_foreign_key'''] Automatic Foreign Key automatically generates foreign-key constraints when creating tables or adding columns. It uses SQL-92 syntax and as such should be compatible with most databases that support foreign-key constraints.&lt;br /&gt;
&lt;br /&gt;
* Other useful Ruby Gems here. [https://www.ruby-toolbox.com/projects/ambitious_query_indexer '''ambitious_query_indexer'''], [https://www.ruby-toolbox.com/projects/lol_dba '''lol_dba'''], [https://www.ruby-toolbox.com/projects/immigrant '''immigrant'''], [https://www.ruby-toolbox.com/projects/redhillonrails_core '''redhillonrails_core'''].&lt;br /&gt;
&lt;br /&gt;
'''Rails DB Bootstrapping'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/seed-fu '''seed-fu'''] Seed Fu is an attempt to once and for all solve the problem of inserting and maintaining seed data in a database. It uses a variety of techniques gathered from various places around the web and combines them to create what is hopefully the most robust seed data system around.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/populator '''populator'''] Mass populate an Active Record database.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/seedbank '''seedbank'''] Extends Rails seeds to split out complex seeds into multiple files and lets each environment have it's own seeds.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/has_alter_ego '''Has alter ego'''] has_alter_ego makes it possible to keep seed and live data transparently in parallel. In contrast to other seed data approaches has_alter_ego synchronizes the seed definitions with your database objects automagically unless you've overridden it in the database.&lt;br /&gt;
&lt;br /&gt;
* Other useful Ruby Gems here. [https://www.ruby-toolbox.com/projects/bootstrapper '''Bootstrapper'''], [https://www.ruby-toolbox.com/projects/db-populate '''Db-populate'''], [https://www.ruby-toolbox.com/projects/seed_dumper '''seed_dumper'''], [https://www.ruby-toolbox.com/projects/dibber '''dibber'''].&lt;br /&gt;
&lt;br /&gt;
'''Rails Search'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/Sunspot '''Sunspot'''] Sunspot is a library providing a powerful, all-ruby API for the Solr search engine. Sunspot manages the configuration of persistent Ruby classes for search and indexing and exposes Solr's most powerful features through a collection of DSLs. Complex search operations can be performed without hand-writing any boolean queries or building Solr parameters by hand.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/sunspot_rails '''sunspot_rails'''] Sunspot::Rails is an extension to the Sunspot library for Solr search. Sunspot::Rails adds integration between Sunspot and ActiveRecord, including defining search and indexing related methods on ActiveRecord models themselves, running a Sunspot-compatible Solr instance for development and test environments, and automatically commit Solr index changes at the end of each Rails request.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/tire '''Tire'''] Tire is a Ruby client for the Elasticsearch search engine/database. It provides Ruby-like API for fluent communication with the Elasticsearch server and blends with ActiveModel class for convenient usage in Rails applications. It allows to delete and create indices, define mapping for them, supports the bulk API, and presents an easy-to-use DSL for constructing your queries. It has full ActiveRecord/ActiveModel compatibility, allowing you to index your models (incrementally upon saving, or in bulk), searching and paginating the results.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/thinking-sphinx '''thinking-sphinx'''] An intelligent layer for ActiveRecord (via Rails and Sinatra) for the Sphinx full-text search tool.&lt;br /&gt;
&lt;br /&gt;
* Other useful Ruby Gems here. [https://www.ruby-toolbox.com/projects/pg_search '''pg_search'''], [https://www.ruby-toolbox.com/projects/redis-search '''redis-search'''], [https://www.ruby-toolbox.com/projects/ferret '''Ferret'''], [https://www.ruby-toolbox.com/projects/searchlight '''searchlight'''].&lt;br /&gt;
&lt;br /&gt;
'''Data Persistence'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/mongoid '''Mongoid'''] Mongoid is an ODM (Object Document Mapper) Framework for MongoDB, written in Ruby.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/mongomatic '''Mongomatic'''] Mongomatic is a modular Ruby object mapper for Mongo.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/dynamoid '''dynamoid'''] Dynamoid is an ORM for Amazon's DynamoDB that supports offline development, associations, querying, and everything else you'd expect from an ActiveRecord-style replacement.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/squeel '''squeel'''] Squeel unlocks the power of Arel in your Rails 3 application with a handy block-based syntax. You can write subqueries, access named functions provided by your RDBMS, and more, all without writing SQL strings.&lt;br /&gt;
&lt;br /&gt;
 '''VIEW layer'''&lt;br /&gt;
&lt;br /&gt;
'''CSS'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/sass '''Sass'''] Sass makes CSS fun again. Sass is an extension of CSS3, adding nested rules, variables, mixins, selector inheritance, and more. It's translated to well-formatted, standard CSS using the command line tool or a web-framework plugin.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/bourbon '''bourbon'''] The purpose of Bourbon Vanilla Sass Mixins is to provide a comprehensive framework of sass mixins that are designed to be as vanilla as possible. Meaning they should not deter from the original CSS syntax. The mixins contain vendor specific prefixes for all CSS3 properties for support amongst modern browsers. The prefixes also ensure graceful degradation for older browsers that support only CSS3 prefixed properties.&lt;br /&gt;
&lt;br /&gt;
* Other useful Ruby Gems here. [https://www.ruby-toolbox.com/projects/less '''Less'''], [https://www.ruby-toolbox.com/projects/sass-rails '''sass-rails'''], [https://www.ruby-toolbox.com/projects/stylus '''stylus'''], [https://www.ruby-toolbox.com/projects/patterns '''patterns''']&lt;br /&gt;
&lt;br /&gt;
'''Graphing'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/google_visualr '''google_visualr'''] This Ruby gem, GoogleVisualr, is a wrapper around the Google Chart Tools that allows anyone to create the same beautiful charts with just Ruby; you don't have to write any JavaScript at all.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/highcharts-rails '''highcharts-rails'''] Gem that includes Highcharts (Interactive JavaScript charts for your web projects), in the Rails Asset Pipeline introduced in Rails 3.1.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/seer '''Seer'''] Gem that includes Highcharts (Interactive JavaScript charts for your web projects), in the Rails Asset Pipeline introduced in Rails 3.1.Seer is a lightweight, semantically rich wrapper for the Google Visualization API. It allows you to easily create a visualization of data in a variety of formats, including area charts, bar charts, column charts, gauges, line charts, and pie charts.&lt;br /&gt;
&lt;br /&gt;
'''HTML &amp;amp; Markup'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/formula '''formula'''] Formula is a Rails form generator that generates simple clean markup. The project aims to let users create semantically beautiful forms without introducing too much syntax. The goal is to make integrating advanced layout systems as simple as possible.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/formtastic '''Formtastic'''] A Rails form builder plugin/gem with semantically rich and accessible markup.&lt;br /&gt;
&lt;br /&gt;
'''JavaScript'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/jasmine '''Jasmine'''] Test your JavaScript without any framework dependencies, in any environment, and with a nice descriptive syntax.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/konacha '''konacha'''] Konacha is a Rails engine that allows you to test your JavaScript with the mocha test framework and chai assertion library. It is similar to Jasmine and Evergreen, but does not attempt to be framework agnostic. By sticking with Rails, Konacha can take full advantage of features such as the asset pipeline and engines&lt;br /&gt;
&lt;br /&gt;
'''Rails In-Place Editing'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/best_in_place '''BestInPlace'''] BestInPlace is a jQuery script and a Rails 3 helper that provide the method best_in_place to display any object field easily editable for the user by just clicking on it. It supports input data, text data, boolean data and custom dropdown data. It works with RESTful controllers.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/best_in_place_mongoid '''best_in_place_mongoid'''] BestInPlaceMongoid is a fork of BestInPlace jQuery script and a Rails 3 helper that provide the method best_in_place to display any object field easily editable for the user by just clicking on it. It supports input data, text data, boolean data and custom dropdown data. It works with RESTful controllers.&lt;br /&gt;
&lt;br /&gt;
 '''CONTROLLER layer'''&lt;br /&gt;
&lt;br /&gt;
'''Background Jobs'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/resque '''Resque'''] Resque is a Redis-backed Ruby library for creating background jobs, placing those jobs on multiple queues, and processing them later. Background jobs can be any Ruby class or module that responds to perform. Your existing classes can easily be converted to background jobs or you can create new classes specifically to do work. Or, you can do both. Resque is heavily inspired by DelayedJob (which rocks) and is comprised of three parts: * A Ruby library for creating, querying, and processing jobs * A Rake task for starting a worker which processes jobs * A Sinatra app for monitoring queues, jobs, and workers.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/starling '''Starling'''] Starling is a light-weight, persistent queue server that speaks the memcached protocol. It was originally developed for Twitter's backend.&lt;br /&gt;
&lt;br /&gt;
'''Scheduling'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/resque-scheduler '''resque-scheduler'''] Light weight job scheduling on top of Resque. Adds methods enqueue_at/enqueue_in to schedule jobs in the future. Also supports queueing jobs on a fixed, cron-like schedule.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/clockwork '''Clockwork'''] A scheduler process to replace cron, using a more flexible Ruby syntax running as a single long-running process. Inspired by rufus-scheduler and resque-scheduler.&lt;br /&gt;
&lt;br /&gt;
'''Code Metrics'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/simpleCov '''SimpleCov'''] Code coverage for Ruby 1.9 with a powerful configuration library and automatic merging of coverage across test suites.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/flay '''Flay'''] Flay analyzes code for structural similarities. Differences in literal values, variable, class, method names, whitespace, programming style, braces vs do/end, etc are all ignored. Making this totally rad.&lt;br /&gt;
&lt;br /&gt;
'''E-Mail Sending'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/actionmailer '''Action Mailer'''] Email on Rails. Compose, deliver, receive, and test emails using the familiar controller/view pattern. First-class support for multipart email and attachments.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/capistrano_mailer '''capistrano_mailer'''] Capistrano Deployment Email Notification. Keep the whole team informed of each release!&lt;br /&gt;
&lt;br /&gt;
 '''TESTING'''&lt;br /&gt;
&lt;br /&gt;
'''Browser testing'''&lt;br /&gt;
&lt;br /&gt;
* [http://rubygems.org/gems/capybara '''Capybara'''] Capybara is an integration testing tool for rack based web applications. It simulates how a user would interact with a website.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/webrat '''Webrat'''] Webrat lets you quickly write expressive and robust acceptance tests for a Ruby web application. It supports simulating a browser inside a Ruby process to avoid the performance hit and browser dependency of Selenium or Watir, but the same API can also be used to drive real Selenium tests when necessary (eg. for testing AJAX interactions). Most Ruby web frameworks and testing frameworks are supported.&lt;br /&gt;
&lt;br /&gt;
'''Random Data Generation'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/faker '''Faker'''] Faker, a port of Data::Faker from Perl, is used to easily generate fake data: names, addresses, phone numbers, etc.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/forgery '''Forgery'''] Easy and customizable generation of forged data. Can be used as a gem or a rails plugin. Includes rails generators for creating your own forgeries.&lt;br /&gt;
&lt;br /&gt;
'''Unit Test Frameworks'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/test-unit '''test-unit'''] Ruby 1.9.x bundles minitest not Test::Unit. Test::Unit bundled in Ruby 1.8.x had not been improved but unbundled Test::Unit (test-unit) is improved actively.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/wrong '''Wrong'''] Wrong provides a general assert method that takes a predicate block. Assertion failure messages are rich in detail. The Wrong idea is to replace all those countless assert_this, assert_that library methods which only exist to give a more useful failure message than &amp;quot;assertion failed&amp;quot;. Wrong replaces all of them in one fell swoop, since if you can write it in Ruby, Wrong can make a sensible failure message out of it. Also provided are several helper methods, like rescuing, capturing, and d.&lt;br /&gt;
&lt;br /&gt;
* Other useful Ruby Gems here. [https://www.ruby-toolbox.com/projects/testrocket '''testrocket'''], [https://www.ruby-toolbox.com/projects/kintama '''kintama'''], [https://www.ruby-toolbox.com/projects/lemon '''Lemon'''], [https://www.ruby-toolbox.com/projects/shindo '''Shindo'''].&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
[http://guides.rubygems.org/make-your-own-gem/ Gudie to create your own Ruby Gem]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://rubygems.rubyforge.org/rubygems-update/UPGRADING_rdoc.html How to Upgrade/Downgrade Ruby Gems]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://rubylearning.com/blog/ Collection of Ruby Study Notes]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://net.tutsplus.com/articles/web-roundups/24-extremely-useful-ruby-gems-for-web-development/ 24 extremely useful Ruby Gems for web development]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://railscasts.com/episodes/245-new-gem-with-bundler Screencasts to create a Ruby Gem]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://guides.rubygems.org/publishing/ How to publish your Ruby Gem?]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== References==&lt;br /&gt;
1. [http://guides.rubygems.org/rubygems-basics/#installing_gems Ruby Gems guide]&amp;lt;br&amp;gt;&lt;br /&gt;
2. [http://timelessrepo.com/making-ruby-gems Making Ruby Gems]&amp;lt;br&amp;gt;&lt;br /&gt;
3. [https://www.ruby-toolbox.com Ruby Tool Box]&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Npari</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch1_1w24_nv&amp;diff=79133</id>
		<title>CSC/ECE 517 Fall 2013/ch1 1w24 nv</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch1_1w24_nv&amp;diff=79133"/>
		<updated>2013-09-25T02:52:27Z</updated>

		<summary type="html">&lt;p&gt;Npari: /* Ruby Gem Commands */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Ruby Gem is a package manager for Ruby programming language. It allows users to easily download, install and use software packages on their system. The functionality of a Ruby application can be modified or extended with the help of Gems. In the version 1.9 of Ruby, Ruby Gems has been made a part of the standard library.&lt;br /&gt;
&lt;br /&gt;
== '''A Tour of Ruby Gems''' ==&lt;br /&gt;
== Definition of a Ruby Gem ==&lt;br /&gt;
In simple terms, a Ruby Gem is a package containing files that can be installed in a system and can help expand the functionality of a Ruby application. Ruby gems are very powerful. Ruby programmers create and publish Ruby Gems as open source in [https://github.com/ github]. It is very east to install, upgrade and delete Gems in a system.&lt;br /&gt;
&lt;br /&gt;
== Structure of Ruby Gem ==&lt;br /&gt;
Every Gem has a set of files and the following standard structure &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ tree -d newgem&lt;br /&gt;
|-- lib/&lt;br /&gt;
|   |-- newgem.rb&lt;br /&gt;
|   `-- newgem/&lt;br /&gt;
|       |-- base.rb&lt;br /&gt;
|       `-- version.rb&lt;br /&gt;
|-- test/&lt;br /&gt;
|-- bin/&lt;br /&gt;
|-- Rakefile&lt;br /&gt;
`-- newgem.gemspec&amp;lt;/pre&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
The ''lib'' folder has the code of the ruby gem. It has ''newgem.rb'' file and a folder named ''newgem''. This folder has two files which are ''base.rb'' and ''version.rb''. The version number is recorded in ''version.rb'' and can be changed when the gem is updated. The ''bin'' directory has any binaries that is a part of the gem file and should be distributed with the gem. A gem usually has a [http://rake.rubyforge.org/doc/rakefile_rdoc.html Rakefile]. The rake program uses this to generate code and automate tests in addition to performing other tasks. The Gem specification file ''newgem.gemspec'' contains details specific to the gem. The file has details such as the gem name,the files that are in it, the gems it depends on for  performing testing, the gems it depends on for actually running and other details.&lt;br /&gt;
&lt;br /&gt;
== Listing existing Gems ==&lt;br /&gt;
To list the existing gems in a system ''list'' keyword can be used in the command line.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem list&lt;br /&gt;
&lt;br /&gt;
*** LOCAL GEMS ***&lt;br /&gt;
&lt;br /&gt;
actionmailer (3.2.3)&lt;br /&gt;
actionpack (3.2.3)&lt;br /&gt;
activemodel (3.2.3)&lt;br /&gt;
activerecord (3.2.3)&lt;br /&gt;
activeresource (3.2.3)&lt;br /&gt;
activesupport (3.2.3)&lt;br /&gt;
arel (3.0.2)&lt;br /&gt;
bigdecimal (1.1.0)&lt;br /&gt;
builder (3.0.4)&lt;br /&gt;
bundler (1.3.5)&lt;br /&gt;
capybara (2.1.0)&lt;br /&gt;
coffee-rails (3.2.2)&lt;br /&gt;
coffee-script (2.2.0)&lt;br /&gt;
coffee-script-source (1.6.3)&lt;br /&gt;
erubis (2.7.0)&lt;br /&gt;
execjs (2.0.1)&lt;br /&gt;
hike (1.2.3)&lt;br /&gt;
i18n (0.6.5)&lt;br /&gt;
io-console (0.3)&lt;br /&gt;
journey (1.0.4)&lt;br /&gt;
jquery-rails (3.0.4)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installing a new Gem ==&lt;br /&gt;
The ''install'' keyword can be used in command line to install gems. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem install capybara&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Uninstalling a Gem ==&lt;br /&gt;
The ''uninstall'' keyword can be used in command line to uninstall any existing gem in the system.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem uninstall capybara&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you uninstall a dependency of a gem RubyGems will ask you for confirmation.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem uninstall rbtree&lt;br /&gt;
&lt;br /&gt;
You have requested to uninstall the gem:&lt;br /&gt;
	rbtree-0.4.1&lt;br /&gt;
&lt;br /&gt;
drip-0.0.2 depends on rbtree (&amp;gt;= 0)&lt;br /&gt;
If you remove this gem, these dependencies will not be met.&lt;br /&gt;
Continue with Uninstall? [yN]  n&lt;br /&gt;
ERROR:  While executing gem ... (Gem::DependencyRemovalException)&lt;br /&gt;
    Uninstallation aborted due to dependent gem(s)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Update all existing Gems == &lt;br /&gt;
The ''update'' keyword can be used in command line to update all existing gems in the system.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem update &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Creating a new Gem == &lt;br /&gt;
It is also possible to [http://guides.rubygems.org/make-your-own-gem/ create our own ruby gem] to be used later to extend our Ruby applications. Bundler is a tool that can be used to [https://github.com/radar/guides/blob/master/gem-development.md to create a ruby gem].&lt;br /&gt;
&lt;br /&gt;
== Ruby Gem Commands ==&lt;br /&gt;
&lt;br /&gt;
There is a list of commands that can be used with Ruby Gems. More details of each of these commands can be found [http://guides.rubygems.org/command-reference/ here]&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
gem build&amp;lt;br&amp;gt;&lt;br /&gt;
gem cert&amp;lt;br&amp;gt;&lt;br /&gt;
gem check&amp;lt;br&amp;gt;&lt;br /&gt;
gem cleanup&amp;lt;br&amp;gt;&lt;br /&gt;
gem contents&amp;lt;br&amp;gt;&lt;br /&gt;
gem dependency&amp;lt;br&amp;gt;&lt;br /&gt;
gem environment&amp;lt;br&amp;gt;&lt;br /&gt;
gem fetch&amp;lt;br&amp;gt;&lt;br /&gt;
gem generate_index&amp;lt;br&amp;gt;&lt;br /&gt;
gem help&amp;lt;br&amp;gt;&lt;br /&gt;
gem install&amp;lt;br&amp;gt;&lt;br /&gt;
gem list&amp;lt;br&amp;gt;&lt;br /&gt;
gem lock&amp;lt;br&amp;gt;&lt;br /&gt;
gem mirror&amp;lt;br&amp;gt;&lt;br /&gt;
gem outdated&amp;lt;br&amp;gt;&lt;br /&gt;
gem owner&amp;lt;br&amp;gt;&lt;br /&gt;
gem pristine&amp;lt;br&amp;gt;&lt;br /&gt;
gem push&amp;lt;br&amp;gt;&lt;br /&gt;
gem query&amp;lt;br&amp;gt;&lt;br /&gt;
gem rdoc&amp;lt;br&amp;gt;&lt;br /&gt;
gem search&amp;lt;br&amp;gt;&lt;br /&gt;
gem server&amp;lt;br&amp;gt;&lt;br /&gt;
gem sources&amp;lt;br&amp;gt;&lt;br /&gt;
gem specification&amp;lt;br&amp;gt;&lt;br /&gt;
gem stale&amp;lt;br&amp;gt;&lt;br /&gt;
gem uninstall&amp;lt;br&amp;gt;&lt;br /&gt;
gem unpack&amp;lt;br&amp;gt;&lt;br /&gt;
gem update&amp;lt;br&amp;gt;&lt;br /&gt;
gem which&amp;lt;br&amp;gt;&lt;br /&gt;
gem yank&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Some important Gems that are useful in RAILS environment ==&lt;br /&gt;
&lt;br /&gt;
There are many gems which provide easy of functionality that can be included in the rails development environment. [http://bundler.io/ Bundler]is a useful gem that enables a developer to quickly add and manage gems in a few lines of code.&lt;br /&gt;
&lt;br /&gt;
We can classify the Gems based on the usage in different layers Model, View and Controller.&lt;br /&gt;
&lt;br /&gt;
 '''MODEL layer'''&lt;br /&gt;
&lt;br /&gt;
'''Active Record Plugins''' &lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/activerecord-oracle_enhanced-adapter '''oracle-enhanced'''] Oracle &amp;quot;enhanced&amp;quot; ActiveRecord adapter contains useful additional methods for working with new and legacy Oracle databases. This adapter is superset of original ActiveRecord Oracle adapter.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/activerecord-jdbc-adapter '''activerecord-jdbc-adapter'''] This adapter is build on JDBC API used for connecting to the database. AR-JDBC is a database adapter for Rails' ActiveRecord component. It allows to connect to virtually any JDBC-compliant database with your JRuby on Rails application.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/activerecord-nulldb-adapter '''nulldb'''] .This helps in Database simulation and testing. A database backend that translates database interactions into no-ops. We can test our model business logic with wanting to experiment with real database.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/oracle-enhanced-enhanced '''oracle-enhanced-enhanced'''] It includes several enhancements and customization to the standard ActiveRecord Oracle Enhapnced adapter, which is still required. Any customization to this adapter's behavior or additional Oracle-specific utilities should be added here.&lt;br /&gt;
&lt;br /&gt;
* Other useful Ruby Gems here. [https://www.ruby-toolbox.com/projects/activerecord-sqlserver-adapter '''activerecord-sqlserver-adapter'''], [https://www.ruby-toolbox.com/projects/activerecord-jdbcmysql-adapter '''activerecord-jdbcmysql-adapter'''], [https://www.ruby-toolbox.com/projects/activerecord-jdbcpostgresql-adapter '''activerecord-jdbcpostgresql-adapter'''], [https://www.ruby-toolbox.com/projects/activerecord-jdbcderby-adapter '''activerecord-jdbcderby-adapter'''],.&lt;br /&gt;
&lt;br /&gt;
'''Active Record Index Assistants'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/foreigner '''foreigner'''] Adds helpers to migrations and dumps foreign keys to schema.rb.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/rails_indexes '''rails_indexes'''] A rake task to track down missing database indexes. does not assume that all foreign keys end with the convention of _id.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/schema_plus '''schema_plus'''] SchemaPlus is an ActiveRecord extension that provides enhanced capabilities for schema definition and querying, including: enhanced and more DRY index capabilities, support and automation for foreign key constraints, and support for views.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/automatic_foreign_key '''automatic_foreign_key'''] Automatic Foreign Key automatically generates foreign-key constraints when creating tables or adding columns. It uses SQL-92 syntax and as such should be compatible with most databases that support foreign-key constraints.&lt;br /&gt;
&lt;br /&gt;
* Other useful Ruby Gems here. [https://www.ruby-toolbox.com/projects/ambitious_query_indexer '''ambitious_query_indexer'''], [https://www.ruby-toolbox.com/projects/lol_dba '''lol_dba'''], [https://www.ruby-toolbox.com/projects/immigrant '''immigrant'''], [https://www.ruby-toolbox.com/projects/redhillonrails_core '''redhillonrails_core'''].&lt;br /&gt;
&lt;br /&gt;
'''Rails DB Bootstrapping'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/seed-fu '''seed-fu'''] Seed Fu is an attempt to once and for all solve the problem of inserting and maintaining seed data in a database. It uses a variety of techniques gathered from various places around the web and combines them to create what is hopefully the most robust seed data system around.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/populator '''populator'''] Mass populate an Active Record database.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/seedbank '''seedbank'''] Extends Rails seeds to split out complex seeds into multiple files and lets each environment have it's own seeds.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/has_alter_ego '''Has alter ego'''] has_alter_ego makes it possible to keep seed and live data transparently in parallel. In contrast to other seed data approaches has_alter_ego synchronizes the seed definitions with your database objects automagically unless you've overridden it in the database.&lt;br /&gt;
&lt;br /&gt;
* Other useful Ruby Gems here. [https://www.ruby-toolbox.com/projects/bootstrapper '''Bootstrapper'''], [https://www.ruby-toolbox.com/projects/db-populate '''Db-populate'''], [https://www.ruby-toolbox.com/projects/seed_dumper '''seed_dumper'''], [https://www.ruby-toolbox.com/projects/dibber '''dibber'''].&lt;br /&gt;
&lt;br /&gt;
'''Rails Search'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/Sunspot '''Sunspot'''] Sunspot is a library providing a powerful, all-ruby API for the Solr search engine. Sunspot manages the configuration of persistent Ruby classes for search and indexing and exposes Solr's most powerful features through a collection of DSLs. Complex search operations can be performed without hand-writing any boolean queries or building Solr parameters by hand.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/sunspot_rails '''sunspot_rails'''] Sunspot::Rails is an extension to the Sunspot library for Solr search. Sunspot::Rails adds integration between Sunspot and ActiveRecord, including defining search and indexing related methods on ActiveRecord models themselves, running a Sunspot-compatible Solr instance for development and test environments, and automatically commit Solr index changes at the end of each Rails request.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/tire '''Tire'''] Tire is a Ruby client for the Elasticsearch search engine/database. It provides Ruby-like API for fluent communication with the Elasticsearch server and blends with ActiveModel class for convenient usage in Rails applications. It allows to delete and create indices, define mapping for them, supports the bulk API, and presents an easy-to-use DSL for constructing your queries. It has full ActiveRecord/ActiveModel compatibility, allowing you to index your models (incrementally upon saving, or in bulk), searching and paginating the results.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/thinking-sphinx '''thinking-sphinx'''] An intelligent layer for ActiveRecord (via Rails and Sinatra) for the Sphinx full-text search tool.&lt;br /&gt;
&lt;br /&gt;
* Other useful Ruby Gems here. [https://www.ruby-toolbox.com/projects/pg_search '''pg_search'''], [https://www.ruby-toolbox.com/projects/redis-search '''redis-search'''], [https://www.ruby-toolbox.com/projects/ferret '''Ferret'''], [https://www.ruby-toolbox.com/projects/searchlight '''searchlight'''].&lt;br /&gt;
&lt;br /&gt;
'''Data Persistence'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/mongoid '''Mongoid'''] Mongoid is an ODM (Object Document Mapper) Framework for MongoDB, written in Ruby.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/mongomatic '''Mongomatic'''] Mongomatic is a modular Ruby object mapper for Mongo.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/dynamoid '''dynamoid'''] Dynamoid is an ORM for Amazon's DynamoDB that supports offline development, associations, querying, and everything else you'd expect from an ActiveRecord-style replacement.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/squeel '''squeel'''] Squeel unlocks the power of Arel in your Rails 3 application with a handy block-based syntax. You can write subqueries, access named functions provided by your RDBMS, and more, all without writing SQL strings.&lt;br /&gt;
&lt;br /&gt;
 '''VIEW layer'''&lt;br /&gt;
&lt;br /&gt;
'''CSS'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/sass '''Sass'''] Sass makes CSS fun again. Sass is an extension of CSS3, adding nested rules, variables, mixins, selector inheritance, and more. It's translated to well-formatted, standard CSS using the command line tool or a web-framework plugin.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/bourbon '''bourbon'''] The purpose of Bourbon Vanilla Sass Mixins is to provide a comprehensive framework of sass mixins that are designed to be as vanilla as possible. Meaning they should not deter from the original CSS syntax. The mixins contain vendor specific prefixes for all CSS3 properties for support amongst modern browsers. The prefixes also ensure graceful degradation for older browsers that support only CSS3 prefixed properties.&lt;br /&gt;
&lt;br /&gt;
* Other useful Ruby Gems here. [https://www.ruby-toolbox.com/projects/less '''Less'''], [https://www.ruby-toolbox.com/projects/sass-rails '''sass-rails'''], [https://www.ruby-toolbox.com/projects/stylus '''stylus'''], [https://www.ruby-toolbox.com/projects/patterns '''patterns''']&lt;br /&gt;
&lt;br /&gt;
'''Graphing'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/google_visualr '''google_visualr'''] This Ruby gem, GoogleVisualr, is a wrapper around the Google Chart Tools that allows anyone to create the same beautiful charts with just Ruby; you don't have to write any JavaScript at all.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/highcharts-rails '''highcharts-rails'''] Gem that includes Highcharts (Interactive JavaScript charts for your web projects), in the Rails Asset Pipeline introduced in Rails 3.1.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/seer '''Seer'''] Gem that includes Highcharts (Interactive JavaScript charts for your web projects), in the Rails Asset Pipeline introduced in Rails 3.1.Seer is a lightweight, semantically rich wrapper for the Google Visualization API. It allows you to easily create a visualization of data in a variety of formats, including area charts, bar charts, column charts, gauges, line charts, and pie charts.&lt;br /&gt;
&lt;br /&gt;
'''HTML &amp;amp; Markup'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/formula '''formula'''] Formula is a Rails form generator that generates simple clean markup. The project aims to let users create semantically beautiful forms without introducing too much syntax. The goal is to make integrating advanced layout systems as simple as possible.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/formtastic '''Formtastic'''] A Rails form builder plugin/gem with semantically rich and accessible markup.&lt;br /&gt;
&lt;br /&gt;
'''JavaScript'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/jasmine '''Jasmine'''] Test your JavaScript without any framework dependencies, in any environment, and with a nice descriptive syntax.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/konacha '''konacha'''] Konacha is a Rails engine that allows you to test your JavaScript with the mocha test framework and chai assertion library. It is similar to Jasmine and Evergreen, but does not attempt to be framework agnostic. By sticking with Rails, Konacha can take full advantage of features such as the asset pipeline and engines&lt;br /&gt;
&lt;br /&gt;
'''Rails In-Place Editing'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/best_in_place '''BestInPlace'''] BestInPlace is a jQuery script and a Rails 3 helper that provide the method best_in_place to display any object field easily editable for the user by just clicking on it. It supports input data, text data, boolean data and custom dropdown data. It works with RESTful controllers.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/best_in_place_mongoid '''best_in_place_mongoid'''] BestInPlaceMongoid is a fork of BestInPlace jQuery script and a Rails 3 helper that provide the method best_in_place to display any object field easily editable for the user by just clicking on it. It supports input data, text data, boolean data and custom dropdown data. It works with RESTful controllers.&lt;br /&gt;
&lt;br /&gt;
 '''CONTROLLER layer'''&lt;br /&gt;
&lt;br /&gt;
'''Background Jobs'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/resque '''Resque'''] Resque is a Redis-backed Ruby library for creating background jobs, placing those jobs on multiple queues, and processing them later. Background jobs can be any Ruby class or module that responds to perform. Your existing classes can easily be converted to background jobs or you can create new classes specifically to do work. Or, you can do both. Resque is heavily inspired by DelayedJob (which rocks) and is comprised of three parts: * A Ruby library for creating, querying, and processing jobs * A Rake task for starting a worker which processes jobs * A Sinatra app for monitoring queues, jobs, and workers.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/starling '''Starling'''] Starling is a light-weight, persistent queue server that speaks the memcached protocol. It was originally developed for Twitter's backend.&lt;br /&gt;
&lt;br /&gt;
'''Scheduling'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/resque-scheduler '''resque-scheduler'''] Light weight job scheduling on top of Resque. Adds methods enqueue_at/enqueue_in to schedule jobs in the future. Also supports queueing jobs on a fixed, cron-like schedule.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/clockwork '''Clockwork'''] A scheduler process to replace cron, using a more flexible Ruby syntax running as a single long-running process. Inspired by rufus-scheduler and resque-scheduler.&lt;br /&gt;
&lt;br /&gt;
'''Code Metrics'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/simpleCov '''SimpleCov'''] Code coverage for Ruby 1.9 with a powerful configuration library and automatic merging of coverage across test suites.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/flay '''Flay'''] Flay analyzes code for structural similarities. Differences in literal values, variable, class, method names, whitespace, programming style, braces vs do/end, etc are all ignored. Making this totally rad.&lt;br /&gt;
&lt;br /&gt;
'''E-Mail Sending'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/actionmailer '''Action Mailer'''] Email on Rails. Compose, deliver, receive, and test emails using the familiar controller/view pattern. First-class support for multipart email and attachments.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/capistrano_mailer '''capistrano_mailer'''] Capistrano Deployment Email Notification. Keep the whole team informed of each release!&lt;br /&gt;
&lt;br /&gt;
 '''TESTING'''&lt;br /&gt;
&lt;br /&gt;
'''Browser testing'''&lt;br /&gt;
&lt;br /&gt;
* [http://rubygems.org/gems/capybara '''Capybara'''] Capybara is an integration testing tool for rack based web applications. It simulates how a user would interact with a website.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/webrat '''Webrat'''] Webrat lets you quickly write expressive and robust acceptance tests for a Ruby web application. It supports simulating a browser inside a Ruby process to avoid the performance hit and browser dependency of Selenium or Watir, but the same API can also be used to drive real Selenium tests when necessary (eg. for testing AJAX interactions). Most Ruby web frameworks and testing frameworks are supported.&lt;br /&gt;
&lt;br /&gt;
'''Random Data Generation'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/faker '''Faker'''] Faker, a port of Data::Faker from Perl, is used to easily generate fake data: names, addresses, phone numbers, etc.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/forgery '''Forgery'''] Easy and customizable generation of forged data. Can be used as a gem or a rails plugin. Includes rails generators for creating your own forgeries.&lt;br /&gt;
&lt;br /&gt;
'''Unit Test Frameworks'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/test-unit '''test-unit'''] Ruby 1.9.x bundles minitest not Test::Unit. Test::Unit bundled in Ruby 1.8.x had not been improved but unbundled Test::Unit (test-unit) is improved actively.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/wrong '''Wrong'''] Wrong provides a general assert method that takes a predicate block. Assertion failure messages are rich in detail. The Wrong idea is to replace all those countless assert_this, assert_that library methods which only exist to give a more useful failure message than &amp;quot;assertion failed&amp;quot;. Wrong replaces all of them in one fell swoop, since if you can write it in Ruby, Wrong can make a sensible failure message out of it. Also provided are several helper methods, like rescuing, capturing, and d.&lt;br /&gt;
&lt;br /&gt;
* Other useful Ruby Gems here. [https://www.ruby-toolbox.com/projects/testrocket '''testrocket'''], [https://www.ruby-toolbox.com/projects/kintama '''kintama'''], [https://www.ruby-toolbox.com/projects/lemon '''Lemon'''], [https://www.ruby-toolbox.com/projects/shindo '''Shindo'''].&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
[http://guides.rubygems.org/make-your-own-gem/ Gudie to create your own Ruby Gem]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://rubygems.rubyforge.org/rubygems-update/UPGRADING_rdoc.html How to Upgrade/Downgrade Ruby Gems]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://rubylearning.com/blog/ Collection of Ruby Study Notes]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://net.tutsplus.com/articles/web-roundups/24-extremely-useful-ruby-gems-for-web-development/ 24 extremely useful Ruby Gems for web development]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://railscasts.com/episodes/245-new-gem-with-bundler Screencasts to create a Ruby Gem]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://guides.rubygems.org/publishing/ How to publish your Ruby Gem?]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== References==&lt;br /&gt;
1. [http://guides.rubygems.org/rubygems-basics/#installing_gems Ruby Gems guide]&amp;lt;br&amp;gt;&lt;br /&gt;
2. [http://timelessrepo.com/making-ruby-gems Making Ruby Gems]&amp;lt;br&amp;gt;&lt;br /&gt;
3. [https://www.ruby-toolbox.com Ruby Tool Box]&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Npari</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch1_1w24_nv&amp;diff=79132</id>
		<title>CSC/ECE 517 Fall 2013/ch1 1w24 nv</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch1_1w24_nv&amp;diff=79132"/>
		<updated>2013-09-25T02:51:59Z</updated>

		<summary type="html">&lt;p&gt;Npari: /* Ruby Gem Commands */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Ruby Gem is a package manager for Ruby programming language. It allows users to easily download, install and use software packages on their system. The functionality of a Ruby application can be modified or extended with the help of Gems. In the version 1.9 of Ruby, Ruby Gems has been made a part of the standard library.&lt;br /&gt;
&lt;br /&gt;
== '''A Tour of Ruby Gems''' ==&lt;br /&gt;
== Definition of a Ruby Gem ==&lt;br /&gt;
In simple terms, a Ruby Gem is a package containing files that can be installed in a system and can help expand the functionality of a Ruby application. Ruby gems are very powerful. Ruby programmers create and publish Ruby Gems as open source in [https://github.com/ github]. It is very east to install, upgrade and delete Gems in a system.&lt;br /&gt;
&lt;br /&gt;
== Structure of Ruby Gem ==&lt;br /&gt;
Every Gem has a set of files and the following standard structure &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ tree -d newgem&lt;br /&gt;
|-- lib/&lt;br /&gt;
|   |-- newgem.rb&lt;br /&gt;
|   `-- newgem/&lt;br /&gt;
|       |-- base.rb&lt;br /&gt;
|       `-- version.rb&lt;br /&gt;
|-- test/&lt;br /&gt;
|-- bin/&lt;br /&gt;
|-- Rakefile&lt;br /&gt;
`-- newgem.gemspec&amp;lt;/pre&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
The ''lib'' folder has the code of the ruby gem. It has ''newgem.rb'' file and a folder named ''newgem''. This folder has two files which are ''base.rb'' and ''version.rb''. The version number is recorded in ''version.rb'' and can be changed when the gem is updated. The ''bin'' directory has any binaries that is a part of the gem file and should be distributed with the gem. A gem usually has a [http://rake.rubyforge.org/doc/rakefile_rdoc.html Rakefile]. The rake program uses this to generate code and automate tests in addition to performing other tasks. The Gem specification file ''newgem.gemspec'' contains details specific to the gem. The file has details such as the gem name,the files that are in it, the gems it depends on for  performing testing, the gems it depends on for actually running and other details.&lt;br /&gt;
&lt;br /&gt;
== Listing existing Gems ==&lt;br /&gt;
To list the existing gems in a system ''list'' keyword can be used in the command line.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem list&lt;br /&gt;
&lt;br /&gt;
*** LOCAL GEMS ***&lt;br /&gt;
&lt;br /&gt;
actionmailer (3.2.3)&lt;br /&gt;
actionpack (3.2.3)&lt;br /&gt;
activemodel (3.2.3)&lt;br /&gt;
activerecord (3.2.3)&lt;br /&gt;
activeresource (3.2.3)&lt;br /&gt;
activesupport (3.2.3)&lt;br /&gt;
arel (3.0.2)&lt;br /&gt;
bigdecimal (1.1.0)&lt;br /&gt;
builder (3.0.4)&lt;br /&gt;
bundler (1.3.5)&lt;br /&gt;
capybara (2.1.0)&lt;br /&gt;
coffee-rails (3.2.2)&lt;br /&gt;
coffee-script (2.2.0)&lt;br /&gt;
coffee-script-source (1.6.3)&lt;br /&gt;
erubis (2.7.0)&lt;br /&gt;
execjs (2.0.1)&lt;br /&gt;
hike (1.2.3)&lt;br /&gt;
i18n (0.6.5)&lt;br /&gt;
io-console (0.3)&lt;br /&gt;
journey (1.0.4)&lt;br /&gt;
jquery-rails (3.0.4)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installing a new Gem ==&lt;br /&gt;
The ''install'' keyword can be used in command line to install gems. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem install capybara&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Uninstalling a Gem ==&lt;br /&gt;
The ''uninstall'' keyword can be used in command line to uninstall any existing gem in the system.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem uninstall capybara&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you uninstall a dependency of a gem RubyGems will ask you for confirmation.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem uninstall rbtree&lt;br /&gt;
&lt;br /&gt;
You have requested to uninstall the gem:&lt;br /&gt;
	rbtree-0.4.1&lt;br /&gt;
&lt;br /&gt;
drip-0.0.2 depends on rbtree (&amp;gt;= 0)&lt;br /&gt;
If you remove this gem, these dependencies will not be met.&lt;br /&gt;
Continue with Uninstall? [yN]  n&lt;br /&gt;
ERROR:  While executing gem ... (Gem::DependencyRemovalException)&lt;br /&gt;
    Uninstallation aborted due to dependent gem(s)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Update all existing Gems == &lt;br /&gt;
The ''update'' keyword can be used in command line to update all existing gems in the system.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem update &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Creating a new Gem == &lt;br /&gt;
It is also possible to [http://guides.rubygems.org/make-your-own-gem/ create our own ruby gem] to be used later to extend our Ruby applications. Bundler is a tool that can be used to [https://github.com/radar/guides/blob/master/gem-development.md to create a ruby gem].&lt;br /&gt;
&lt;br /&gt;
== Ruby Gem Commands ==&lt;br /&gt;
&lt;br /&gt;
There is a list of commands that can be used with Ruby Gems. More details of each of these commands can be found [http://guides.rubygems.org/command-reference/ here]&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;per&amp;gt;&lt;br /&gt;
gem build&amp;lt;br&amp;gt;&lt;br /&gt;
gem cert&amp;lt;br&amp;gt;&lt;br /&gt;
gem check&amp;lt;br&amp;gt;&lt;br /&gt;
gem cleanup&amp;lt;br&amp;gt;&lt;br /&gt;
gem contents&amp;lt;br&amp;gt;&lt;br /&gt;
gem dependency&amp;lt;br&amp;gt;&lt;br /&gt;
gem environment&amp;lt;br&amp;gt;&lt;br /&gt;
gem fetch&amp;lt;br&amp;gt;&lt;br /&gt;
gem generate_index&amp;lt;br&amp;gt;&lt;br /&gt;
gem help&amp;lt;br&amp;gt;&lt;br /&gt;
gem install&amp;lt;br&amp;gt;&lt;br /&gt;
gem list&amp;lt;br&amp;gt;&lt;br /&gt;
gem lock&amp;lt;br&amp;gt;&lt;br /&gt;
gem mirror&amp;lt;br&amp;gt;&lt;br /&gt;
gem outdated&amp;lt;br&amp;gt;&lt;br /&gt;
gem owner&amp;lt;br&amp;gt;&lt;br /&gt;
gem pristine&amp;lt;br&amp;gt;&lt;br /&gt;
gem push&amp;lt;br&amp;gt;&lt;br /&gt;
gem query&amp;lt;br&amp;gt;&lt;br /&gt;
gem rdoc&amp;lt;br&amp;gt;&lt;br /&gt;
gem search&amp;lt;br&amp;gt;&lt;br /&gt;
gem server&amp;lt;br&amp;gt;&lt;br /&gt;
gem sources&amp;lt;br&amp;gt;&lt;br /&gt;
gem specification&amp;lt;br&amp;gt;&lt;br /&gt;
gem stale&amp;lt;br&amp;gt;&lt;br /&gt;
gem uninstall&amp;lt;br&amp;gt;&lt;br /&gt;
gem unpack&amp;lt;br&amp;gt;&lt;br /&gt;
gem update&amp;lt;br&amp;gt;&lt;br /&gt;
gem which&amp;lt;br&amp;gt;&lt;br /&gt;
gem yank&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;/per&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Some important Gems that are useful in RAILS environment ==&lt;br /&gt;
&lt;br /&gt;
There are many gems which provide easy of functionality that can be included in the rails development environment. [http://bundler.io/ Bundler]is a useful gem that enables a developer to quickly add and manage gems in a few lines of code.&lt;br /&gt;
&lt;br /&gt;
We can classify the Gems based on the usage in different layers Model, View and Controller.&lt;br /&gt;
&lt;br /&gt;
 '''MODEL layer'''&lt;br /&gt;
&lt;br /&gt;
'''Active Record Plugins''' &lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/activerecord-oracle_enhanced-adapter '''oracle-enhanced'''] Oracle &amp;quot;enhanced&amp;quot; ActiveRecord adapter contains useful additional methods for working with new and legacy Oracle databases. This adapter is superset of original ActiveRecord Oracle adapter.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/activerecord-jdbc-adapter '''activerecord-jdbc-adapter'''] This adapter is build on JDBC API used for connecting to the database. AR-JDBC is a database adapter for Rails' ActiveRecord component. It allows to connect to virtually any JDBC-compliant database with your JRuby on Rails application.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/activerecord-nulldb-adapter '''nulldb'''] .This helps in Database simulation and testing. A database backend that translates database interactions into no-ops. We can test our model business logic with wanting to experiment with real database.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/oracle-enhanced-enhanced '''oracle-enhanced-enhanced'''] It includes several enhancements and customization to the standard ActiveRecord Oracle Enhapnced adapter, which is still required. Any customization to this adapter's behavior or additional Oracle-specific utilities should be added here.&lt;br /&gt;
&lt;br /&gt;
* Other useful Ruby Gems here. [https://www.ruby-toolbox.com/projects/activerecord-sqlserver-adapter '''activerecord-sqlserver-adapter'''], [https://www.ruby-toolbox.com/projects/activerecord-jdbcmysql-adapter '''activerecord-jdbcmysql-adapter'''], [https://www.ruby-toolbox.com/projects/activerecord-jdbcpostgresql-adapter '''activerecord-jdbcpostgresql-adapter'''], [https://www.ruby-toolbox.com/projects/activerecord-jdbcderby-adapter '''activerecord-jdbcderby-adapter'''],.&lt;br /&gt;
&lt;br /&gt;
'''Active Record Index Assistants'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/foreigner '''foreigner'''] Adds helpers to migrations and dumps foreign keys to schema.rb.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/rails_indexes '''rails_indexes'''] A rake task to track down missing database indexes. does not assume that all foreign keys end with the convention of _id.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/schema_plus '''schema_plus'''] SchemaPlus is an ActiveRecord extension that provides enhanced capabilities for schema definition and querying, including: enhanced and more DRY index capabilities, support and automation for foreign key constraints, and support for views.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/automatic_foreign_key '''automatic_foreign_key'''] Automatic Foreign Key automatically generates foreign-key constraints when creating tables or adding columns. It uses SQL-92 syntax and as such should be compatible with most databases that support foreign-key constraints.&lt;br /&gt;
&lt;br /&gt;
* Other useful Ruby Gems here. [https://www.ruby-toolbox.com/projects/ambitious_query_indexer '''ambitious_query_indexer'''], [https://www.ruby-toolbox.com/projects/lol_dba '''lol_dba'''], [https://www.ruby-toolbox.com/projects/immigrant '''immigrant'''], [https://www.ruby-toolbox.com/projects/redhillonrails_core '''redhillonrails_core'''].&lt;br /&gt;
&lt;br /&gt;
'''Rails DB Bootstrapping'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/seed-fu '''seed-fu'''] Seed Fu is an attempt to once and for all solve the problem of inserting and maintaining seed data in a database. It uses a variety of techniques gathered from various places around the web and combines them to create what is hopefully the most robust seed data system around.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/populator '''populator'''] Mass populate an Active Record database.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/seedbank '''seedbank'''] Extends Rails seeds to split out complex seeds into multiple files and lets each environment have it's own seeds.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/has_alter_ego '''Has alter ego'''] has_alter_ego makes it possible to keep seed and live data transparently in parallel. In contrast to other seed data approaches has_alter_ego synchronizes the seed definitions with your database objects automagically unless you've overridden it in the database.&lt;br /&gt;
&lt;br /&gt;
* Other useful Ruby Gems here. [https://www.ruby-toolbox.com/projects/bootstrapper '''Bootstrapper'''], [https://www.ruby-toolbox.com/projects/db-populate '''Db-populate'''], [https://www.ruby-toolbox.com/projects/seed_dumper '''seed_dumper'''], [https://www.ruby-toolbox.com/projects/dibber '''dibber'''].&lt;br /&gt;
&lt;br /&gt;
'''Rails Search'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/Sunspot '''Sunspot'''] Sunspot is a library providing a powerful, all-ruby API for the Solr search engine. Sunspot manages the configuration of persistent Ruby classes for search and indexing and exposes Solr's most powerful features through a collection of DSLs. Complex search operations can be performed without hand-writing any boolean queries or building Solr parameters by hand.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/sunspot_rails '''sunspot_rails'''] Sunspot::Rails is an extension to the Sunspot library for Solr search. Sunspot::Rails adds integration between Sunspot and ActiveRecord, including defining search and indexing related methods on ActiveRecord models themselves, running a Sunspot-compatible Solr instance for development and test environments, and automatically commit Solr index changes at the end of each Rails request.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/tire '''Tire'''] Tire is a Ruby client for the Elasticsearch search engine/database. It provides Ruby-like API for fluent communication with the Elasticsearch server and blends with ActiveModel class for convenient usage in Rails applications. It allows to delete and create indices, define mapping for them, supports the bulk API, and presents an easy-to-use DSL for constructing your queries. It has full ActiveRecord/ActiveModel compatibility, allowing you to index your models (incrementally upon saving, or in bulk), searching and paginating the results.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/thinking-sphinx '''thinking-sphinx'''] An intelligent layer for ActiveRecord (via Rails and Sinatra) for the Sphinx full-text search tool.&lt;br /&gt;
&lt;br /&gt;
* Other useful Ruby Gems here. [https://www.ruby-toolbox.com/projects/pg_search '''pg_search'''], [https://www.ruby-toolbox.com/projects/redis-search '''redis-search'''], [https://www.ruby-toolbox.com/projects/ferret '''Ferret'''], [https://www.ruby-toolbox.com/projects/searchlight '''searchlight'''].&lt;br /&gt;
&lt;br /&gt;
'''Data Persistence'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/mongoid '''Mongoid'''] Mongoid is an ODM (Object Document Mapper) Framework for MongoDB, written in Ruby.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/mongomatic '''Mongomatic'''] Mongomatic is a modular Ruby object mapper for Mongo.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/dynamoid '''dynamoid'''] Dynamoid is an ORM for Amazon's DynamoDB that supports offline development, associations, querying, and everything else you'd expect from an ActiveRecord-style replacement.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/squeel '''squeel'''] Squeel unlocks the power of Arel in your Rails 3 application with a handy block-based syntax. You can write subqueries, access named functions provided by your RDBMS, and more, all without writing SQL strings.&lt;br /&gt;
&lt;br /&gt;
 '''VIEW layer'''&lt;br /&gt;
&lt;br /&gt;
'''CSS'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/sass '''Sass'''] Sass makes CSS fun again. Sass is an extension of CSS3, adding nested rules, variables, mixins, selector inheritance, and more. It's translated to well-formatted, standard CSS using the command line tool or a web-framework plugin.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/bourbon '''bourbon'''] The purpose of Bourbon Vanilla Sass Mixins is to provide a comprehensive framework of sass mixins that are designed to be as vanilla as possible. Meaning they should not deter from the original CSS syntax. The mixins contain vendor specific prefixes for all CSS3 properties for support amongst modern browsers. The prefixes also ensure graceful degradation for older browsers that support only CSS3 prefixed properties.&lt;br /&gt;
&lt;br /&gt;
* Other useful Ruby Gems here. [https://www.ruby-toolbox.com/projects/less '''Less'''], [https://www.ruby-toolbox.com/projects/sass-rails '''sass-rails'''], [https://www.ruby-toolbox.com/projects/stylus '''stylus'''], [https://www.ruby-toolbox.com/projects/patterns '''patterns''']&lt;br /&gt;
&lt;br /&gt;
'''Graphing'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/google_visualr '''google_visualr'''] This Ruby gem, GoogleVisualr, is a wrapper around the Google Chart Tools that allows anyone to create the same beautiful charts with just Ruby; you don't have to write any JavaScript at all.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/highcharts-rails '''highcharts-rails'''] Gem that includes Highcharts (Interactive JavaScript charts for your web projects), in the Rails Asset Pipeline introduced in Rails 3.1.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/seer '''Seer'''] Gem that includes Highcharts (Interactive JavaScript charts for your web projects), in the Rails Asset Pipeline introduced in Rails 3.1.Seer is a lightweight, semantically rich wrapper for the Google Visualization API. It allows you to easily create a visualization of data in a variety of formats, including area charts, bar charts, column charts, gauges, line charts, and pie charts.&lt;br /&gt;
&lt;br /&gt;
'''HTML &amp;amp; Markup'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/formula '''formula'''] Formula is a Rails form generator that generates simple clean markup. The project aims to let users create semantically beautiful forms without introducing too much syntax. The goal is to make integrating advanced layout systems as simple as possible.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/formtastic '''Formtastic'''] A Rails form builder plugin/gem with semantically rich and accessible markup.&lt;br /&gt;
&lt;br /&gt;
'''JavaScript'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/jasmine '''Jasmine'''] Test your JavaScript without any framework dependencies, in any environment, and with a nice descriptive syntax.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/konacha '''konacha'''] Konacha is a Rails engine that allows you to test your JavaScript with the mocha test framework and chai assertion library. It is similar to Jasmine and Evergreen, but does not attempt to be framework agnostic. By sticking with Rails, Konacha can take full advantage of features such as the asset pipeline and engines&lt;br /&gt;
&lt;br /&gt;
'''Rails In-Place Editing'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/best_in_place '''BestInPlace'''] BestInPlace is a jQuery script and a Rails 3 helper that provide the method best_in_place to display any object field easily editable for the user by just clicking on it. It supports input data, text data, boolean data and custom dropdown data. It works with RESTful controllers.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/best_in_place_mongoid '''best_in_place_mongoid'''] BestInPlaceMongoid is a fork of BestInPlace jQuery script and a Rails 3 helper that provide the method best_in_place to display any object field easily editable for the user by just clicking on it. It supports input data, text data, boolean data and custom dropdown data. It works with RESTful controllers.&lt;br /&gt;
&lt;br /&gt;
 '''CONTROLLER layer'''&lt;br /&gt;
&lt;br /&gt;
'''Background Jobs'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/resque '''Resque'''] Resque is a Redis-backed Ruby library for creating background jobs, placing those jobs on multiple queues, and processing them later. Background jobs can be any Ruby class or module that responds to perform. Your existing classes can easily be converted to background jobs or you can create new classes specifically to do work. Or, you can do both. Resque is heavily inspired by DelayedJob (which rocks) and is comprised of three parts: * A Ruby library for creating, querying, and processing jobs * A Rake task for starting a worker which processes jobs * A Sinatra app for monitoring queues, jobs, and workers.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/starling '''Starling'''] Starling is a light-weight, persistent queue server that speaks the memcached protocol. It was originally developed for Twitter's backend.&lt;br /&gt;
&lt;br /&gt;
'''Scheduling'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/resque-scheduler '''resque-scheduler'''] Light weight job scheduling on top of Resque. Adds methods enqueue_at/enqueue_in to schedule jobs in the future. Also supports queueing jobs on a fixed, cron-like schedule.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/clockwork '''Clockwork'''] A scheduler process to replace cron, using a more flexible Ruby syntax running as a single long-running process. Inspired by rufus-scheduler and resque-scheduler.&lt;br /&gt;
&lt;br /&gt;
'''Code Metrics'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/simpleCov '''SimpleCov'''] Code coverage for Ruby 1.9 with a powerful configuration library and automatic merging of coverage across test suites.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/flay '''Flay'''] Flay analyzes code for structural similarities. Differences in literal values, variable, class, method names, whitespace, programming style, braces vs do/end, etc are all ignored. Making this totally rad.&lt;br /&gt;
&lt;br /&gt;
'''E-Mail Sending'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/actionmailer '''Action Mailer'''] Email on Rails. Compose, deliver, receive, and test emails using the familiar controller/view pattern. First-class support for multipart email and attachments.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/capistrano_mailer '''capistrano_mailer'''] Capistrano Deployment Email Notification. Keep the whole team informed of each release!&lt;br /&gt;
&lt;br /&gt;
 '''TESTING'''&lt;br /&gt;
&lt;br /&gt;
'''Browser testing'''&lt;br /&gt;
&lt;br /&gt;
* [http://rubygems.org/gems/capybara '''Capybara'''] Capybara is an integration testing tool for rack based web applications. It simulates how a user would interact with a website.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/webrat '''Webrat'''] Webrat lets you quickly write expressive and robust acceptance tests for a Ruby web application. It supports simulating a browser inside a Ruby process to avoid the performance hit and browser dependency of Selenium or Watir, but the same API can also be used to drive real Selenium tests when necessary (eg. for testing AJAX interactions). Most Ruby web frameworks and testing frameworks are supported.&lt;br /&gt;
&lt;br /&gt;
'''Random Data Generation'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/faker '''Faker'''] Faker, a port of Data::Faker from Perl, is used to easily generate fake data: names, addresses, phone numbers, etc.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/forgery '''Forgery'''] Easy and customizable generation of forged data. Can be used as a gem or a rails plugin. Includes rails generators for creating your own forgeries.&lt;br /&gt;
&lt;br /&gt;
'''Unit Test Frameworks'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/test-unit '''test-unit'''] Ruby 1.9.x bundles minitest not Test::Unit. Test::Unit bundled in Ruby 1.8.x had not been improved but unbundled Test::Unit (test-unit) is improved actively.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/wrong '''Wrong'''] Wrong provides a general assert method that takes a predicate block. Assertion failure messages are rich in detail. The Wrong idea is to replace all those countless assert_this, assert_that library methods which only exist to give a more useful failure message than &amp;quot;assertion failed&amp;quot;. Wrong replaces all of them in one fell swoop, since if you can write it in Ruby, Wrong can make a sensible failure message out of it. Also provided are several helper methods, like rescuing, capturing, and d.&lt;br /&gt;
&lt;br /&gt;
* Other useful Ruby Gems here. [https://www.ruby-toolbox.com/projects/testrocket '''testrocket'''], [https://www.ruby-toolbox.com/projects/kintama '''kintama'''], [https://www.ruby-toolbox.com/projects/lemon '''Lemon'''], [https://www.ruby-toolbox.com/projects/shindo '''Shindo'''].&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
[http://guides.rubygems.org/make-your-own-gem/ Gudie to create your own Ruby Gem]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://rubygems.rubyforge.org/rubygems-update/UPGRADING_rdoc.html How to Upgrade/Downgrade Ruby Gems]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://rubylearning.com/blog/ Collection of Ruby Study Notes]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://net.tutsplus.com/articles/web-roundups/24-extremely-useful-ruby-gems-for-web-development/ 24 extremely useful Ruby Gems for web development]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://railscasts.com/episodes/245-new-gem-with-bundler Screencasts to create a Ruby Gem]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://guides.rubygems.org/publishing/ How to publish your Ruby Gem?]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== References==&lt;br /&gt;
1. [http://guides.rubygems.org/rubygems-basics/#installing_gems Ruby Gems guide]&amp;lt;br&amp;gt;&lt;br /&gt;
2. [http://timelessrepo.com/making-ruby-gems Making Ruby Gems]&amp;lt;br&amp;gt;&lt;br /&gt;
3. [https://www.ruby-toolbox.com Ruby Tool Box]&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Npari</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch1_1w24_nv&amp;diff=79130</id>
		<title>CSC/ECE 517 Fall 2013/ch1 1w24 nv</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch1_1w24_nv&amp;diff=79130"/>
		<updated>2013-09-25T02:51:08Z</updated>

		<summary type="html">&lt;p&gt;Npari: /* Ruby Gem Commands */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Ruby Gem is a package manager for Ruby programming language. It allows users to easily download, install and use software packages on their system. The functionality of a Ruby application can be modified or extended with the help of Gems. In the version 1.9 of Ruby, Ruby Gems has been made a part of the standard library.&lt;br /&gt;
&lt;br /&gt;
== '''A Tour of Ruby Gems''' ==&lt;br /&gt;
== Definition of a Ruby Gem ==&lt;br /&gt;
In simple terms, a Ruby Gem is a package containing files that can be installed in a system and can help expand the functionality of a Ruby application. Ruby gems are very powerful. Ruby programmers create and publish Ruby Gems as open source in [https://github.com/ github]. It is very east to install, upgrade and delete Gems in a system.&lt;br /&gt;
&lt;br /&gt;
== Structure of Ruby Gem ==&lt;br /&gt;
Every Gem has a set of files and the following standard structure &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ tree -d newgem&lt;br /&gt;
|-- lib/&lt;br /&gt;
|   |-- newgem.rb&lt;br /&gt;
|   `-- newgem/&lt;br /&gt;
|       |-- base.rb&lt;br /&gt;
|       `-- version.rb&lt;br /&gt;
|-- test/&lt;br /&gt;
|-- bin/&lt;br /&gt;
|-- Rakefile&lt;br /&gt;
`-- newgem.gemspec&amp;lt;/pre&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
The ''lib'' folder has the code of the ruby gem. It has ''newgem.rb'' file and a folder named ''newgem''. This folder has two files which are ''base.rb'' and ''version.rb''. The version number is recorded in ''version.rb'' and can be changed when the gem is updated. The ''bin'' directory has any binaries that is a part of the gem file and should be distributed with the gem. A gem usually has a [http://rake.rubyforge.org/doc/rakefile_rdoc.html Rakefile]. The rake program uses this to generate code and automate tests in addition to performing other tasks. The Gem specification file ''newgem.gemspec'' contains details specific to the gem. The file has details such as the gem name,the files that are in it, the gems it depends on for  performing testing, the gems it depends on for actually running and other details.&lt;br /&gt;
&lt;br /&gt;
== Listing existing Gems ==&lt;br /&gt;
To list the existing gems in a system ''list'' keyword can be used in the command line.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem list&lt;br /&gt;
&lt;br /&gt;
*** LOCAL GEMS ***&lt;br /&gt;
&lt;br /&gt;
actionmailer (3.2.3)&lt;br /&gt;
actionpack (3.2.3)&lt;br /&gt;
activemodel (3.2.3)&lt;br /&gt;
activerecord (3.2.3)&lt;br /&gt;
activeresource (3.2.3)&lt;br /&gt;
activesupport (3.2.3)&lt;br /&gt;
arel (3.0.2)&lt;br /&gt;
bigdecimal (1.1.0)&lt;br /&gt;
builder (3.0.4)&lt;br /&gt;
bundler (1.3.5)&lt;br /&gt;
capybara (2.1.0)&lt;br /&gt;
coffee-rails (3.2.2)&lt;br /&gt;
coffee-script (2.2.0)&lt;br /&gt;
coffee-script-source (1.6.3)&lt;br /&gt;
erubis (2.7.0)&lt;br /&gt;
execjs (2.0.1)&lt;br /&gt;
hike (1.2.3)&lt;br /&gt;
i18n (0.6.5)&lt;br /&gt;
io-console (0.3)&lt;br /&gt;
journey (1.0.4)&lt;br /&gt;
jquery-rails (3.0.4)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installing a new Gem ==&lt;br /&gt;
The ''install'' keyword can be used in command line to install gems. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem install capybara&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Uninstalling a Gem ==&lt;br /&gt;
The ''uninstall'' keyword can be used in command line to uninstall any existing gem in the system.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem uninstall capybara&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you uninstall a dependency of a gem RubyGems will ask you for confirmation.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem uninstall rbtree&lt;br /&gt;
&lt;br /&gt;
You have requested to uninstall the gem:&lt;br /&gt;
	rbtree-0.4.1&lt;br /&gt;
&lt;br /&gt;
drip-0.0.2 depends on rbtree (&amp;gt;= 0)&lt;br /&gt;
If you remove this gem, these dependencies will not be met.&lt;br /&gt;
Continue with Uninstall? [yN]  n&lt;br /&gt;
ERROR:  While executing gem ... (Gem::DependencyRemovalException)&lt;br /&gt;
    Uninstallation aborted due to dependent gem(s)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Update all existing Gems == &lt;br /&gt;
The ''update'' keyword can be used in command line to update all existing gems in the system.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem update &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Creating a new Gem == &lt;br /&gt;
It is also possible to [http://guides.rubygems.org/make-your-own-gem/ create our own ruby gem] to be used later to extend our Ruby applications. Bundler is a tool that can be used to [https://github.com/radar/guides/blob/master/gem-development.md to create a ruby gem].&lt;br /&gt;
&lt;br /&gt;
== Ruby Gem Commands ==&lt;br /&gt;
&lt;br /&gt;
There is a list of commands that can be used with Ruby Gems. More details of each of these commands can be found [http://guides.rubygems.org/command-reference/ here]&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&amp;lt;per&amp;gt;&lt;br /&gt;
gem build&amp;lt;br&amp;gt;&lt;br /&gt;
gem cert&amp;lt;br&amp;gt;&lt;br /&gt;
gem check&amp;lt;br&amp;gt;&lt;br /&gt;
gem cleanup&lt;br /&gt;
gem contents&lt;br /&gt;
gem dependency&lt;br /&gt;
gem environment&lt;br /&gt;
gem fetch&lt;br /&gt;
gem generate_index&lt;br /&gt;
gem help&lt;br /&gt;
gem install&lt;br /&gt;
gem list&lt;br /&gt;
gem lock&lt;br /&gt;
gem mirror&lt;br /&gt;
gem outdated&lt;br /&gt;
gem owner&lt;br /&gt;
gem pristine&lt;br /&gt;
gem push&lt;br /&gt;
gem query&lt;br /&gt;
gem rdoc&lt;br /&gt;
gem search&lt;br /&gt;
gem server&lt;br /&gt;
gem sources&lt;br /&gt;
gem specification&lt;br /&gt;
gem stale&lt;br /&gt;
gem uninstall&lt;br /&gt;
gem unpack&lt;br /&gt;
gem update&lt;br /&gt;
gem which&lt;br /&gt;
gem yank&lt;br /&gt;
&amp;lt;/per&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Some important Gems that are useful in RAILS environment ==&lt;br /&gt;
&lt;br /&gt;
There are many gems which provide easy of functionality that can be included in the rails development environment. [http://bundler.io/ Bundler]is a useful gem that enables a developer to quickly add and manage gems in a few lines of code.&lt;br /&gt;
&lt;br /&gt;
We can classify the Gems based on the usage in different layers Model, View and Controller.&lt;br /&gt;
&lt;br /&gt;
 '''MODEL layer'''&lt;br /&gt;
&lt;br /&gt;
'''Active Record Plugins''' &lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/activerecord-oracle_enhanced-adapter '''oracle-enhanced'''] Oracle &amp;quot;enhanced&amp;quot; ActiveRecord adapter contains useful additional methods for working with new and legacy Oracle databases. This adapter is superset of original ActiveRecord Oracle adapter.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/activerecord-jdbc-adapter '''activerecord-jdbc-adapter'''] This adapter is build on JDBC API used for connecting to the database. AR-JDBC is a database adapter for Rails' ActiveRecord component. It allows to connect to virtually any JDBC-compliant database with your JRuby on Rails application.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/activerecord-nulldb-adapter '''nulldb'''] .This helps in Database simulation and testing. A database backend that translates database interactions into no-ops. We can test our model business logic with wanting to experiment with real database.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/oracle-enhanced-enhanced '''oracle-enhanced-enhanced'''] It includes several enhancements and customization to the standard ActiveRecord Oracle Enhapnced adapter, which is still required. Any customization to this adapter's behavior or additional Oracle-specific utilities should be added here.&lt;br /&gt;
&lt;br /&gt;
* Other useful Ruby Gems here. [https://www.ruby-toolbox.com/projects/activerecord-sqlserver-adapter '''activerecord-sqlserver-adapter'''], [https://www.ruby-toolbox.com/projects/activerecord-jdbcmysql-adapter '''activerecord-jdbcmysql-adapter'''], [https://www.ruby-toolbox.com/projects/activerecord-jdbcpostgresql-adapter '''activerecord-jdbcpostgresql-adapter'''], [https://www.ruby-toolbox.com/projects/activerecord-jdbcderby-adapter '''activerecord-jdbcderby-adapter'''],.&lt;br /&gt;
&lt;br /&gt;
'''Active Record Index Assistants'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/foreigner '''foreigner'''] Adds helpers to migrations and dumps foreign keys to schema.rb.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/rails_indexes '''rails_indexes'''] A rake task to track down missing database indexes. does not assume that all foreign keys end with the convention of _id.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/schema_plus '''schema_plus'''] SchemaPlus is an ActiveRecord extension that provides enhanced capabilities for schema definition and querying, including: enhanced and more DRY index capabilities, support and automation for foreign key constraints, and support for views.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/automatic_foreign_key '''automatic_foreign_key'''] Automatic Foreign Key automatically generates foreign-key constraints when creating tables or adding columns. It uses SQL-92 syntax and as such should be compatible with most databases that support foreign-key constraints.&lt;br /&gt;
&lt;br /&gt;
* Other useful Ruby Gems here. [https://www.ruby-toolbox.com/projects/ambitious_query_indexer '''ambitious_query_indexer'''], [https://www.ruby-toolbox.com/projects/lol_dba '''lol_dba'''], [https://www.ruby-toolbox.com/projects/immigrant '''immigrant'''], [https://www.ruby-toolbox.com/projects/redhillonrails_core '''redhillonrails_core'''].&lt;br /&gt;
&lt;br /&gt;
'''Rails DB Bootstrapping'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/seed-fu '''seed-fu'''] Seed Fu is an attempt to once and for all solve the problem of inserting and maintaining seed data in a database. It uses a variety of techniques gathered from various places around the web and combines them to create what is hopefully the most robust seed data system around.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/populator '''populator'''] Mass populate an Active Record database.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/seedbank '''seedbank'''] Extends Rails seeds to split out complex seeds into multiple files and lets each environment have it's own seeds.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/has_alter_ego '''Has alter ego'''] has_alter_ego makes it possible to keep seed and live data transparently in parallel. In contrast to other seed data approaches has_alter_ego synchronizes the seed definitions with your database objects automagically unless you've overridden it in the database.&lt;br /&gt;
&lt;br /&gt;
* Other useful Ruby Gems here. [https://www.ruby-toolbox.com/projects/bootstrapper '''Bootstrapper'''], [https://www.ruby-toolbox.com/projects/db-populate '''Db-populate'''], [https://www.ruby-toolbox.com/projects/seed_dumper '''seed_dumper'''], [https://www.ruby-toolbox.com/projects/dibber '''dibber'''].&lt;br /&gt;
&lt;br /&gt;
'''Rails Search'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/Sunspot '''Sunspot'''] Sunspot is a library providing a powerful, all-ruby API for the Solr search engine. Sunspot manages the configuration of persistent Ruby classes for search and indexing and exposes Solr's most powerful features through a collection of DSLs. Complex search operations can be performed without hand-writing any boolean queries or building Solr parameters by hand.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/sunspot_rails '''sunspot_rails'''] Sunspot::Rails is an extension to the Sunspot library for Solr search. Sunspot::Rails adds integration between Sunspot and ActiveRecord, including defining search and indexing related methods on ActiveRecord models themselves, running a Sunspot-compatible Solr instance for development and test environments, and automatically commit Solr index changes at the end of each Rails request.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/tire '''Tire'''] Tire is a Ruby client for the Elasticsearch search engine/database. It provides Ruby-like API for fluent communication with the Elasticsearch server and blends with ActiveModel class for convenient usage in Rails applications. It allows to delete and create indices, define mapping for them, supports the bulk API, and presents an easy-to-use DSL for constructing your queries. It has full ActiveRecord/ActiveModel compatibility, allowing you to index your models (incrementally upon saving, or in bulk), searching and paginating the results.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/thinking-sphinx '''thinking-sphinx'''] An intelligent layer for ActiveRecord (via Rails and Sinatra) for the Sphinx full-text search tool.&lt;br /&gt;
&lt;br /&gt;
* Other useful Ruby Gems here. [https://www.ruby-toolbox.com/projects/pg_search '''pg_search'''], [https://www.ruby-toolbox.com/projects/redis-search '''redis-search'''], [https://www.ruby-toolbox.com/projects/ferret '''Ferret'''], [https://www.ruby-toolbox.com/projects/searchlight '''searchlight'''].&lt;br /&gt;
&lt;br /&gt;
'''Data Persistence'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/mongoid '''Mongoid'''] Mongoid is an ODM (Object Document Mapper) Framework for MongoDB, written in Ruby.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/mongomatic '''Mongomatic'''] Mongomatic is a modular Ruby object mapper for Mongo.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/dynamoid '''dynamoid'''] Dynamoid is an ORM for Amazon's DynamoDB that supports offline development, associations, querying, and everything else you'd expect from an ActiveRecord-style replacement.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/squeel '''squeel'''] Squeel unlocks the power of Arel in your Rails 3 application with a handy block-based syntax. You can write subqueries, access named functions provided by your RDBMS, and more, all without writing SQL strings.&lt;br /&gt;
&lt;br /&gt;
 '''VIEW layer'''&lt;br /&gt;
&lt;br /&gt;
'''CSS'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/sass '''Sass'''] Sass makes CSS fun again. Sass is an extension of CSS3, adding nested rules, variables, mixins, selector inheritance, and more. It's translated to well-formatted, standard CSS using the command line tool or a web-framework plugin.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/bourbon '''bourbon'''] The purpose of Bourbon Vanilla Sass Mixins is to provide a comprehensive framework of sass mixins that are designed to be as vanilla as possible. Meaning they should not deter from the original CSS syntax. The mixins contain vendor specific prefixes for all CSS3 properties for support amongst modern browsers. The prefixes also ensure graceful degradation for older browsers that support only CSS3 prefixed properties.&lt;br /&gt;
&lt;br /&gt;
* Other useful Ruby Gems here. [https://www.ruby-toolbox.com/projects/less '''Less'''], [https://www.ruby-toolbox.com/projects/sass-rails '''sass-rails'''], [https://www.ruby-toolbox.com/projects/stylus '''stylus'''], [https://www.ruby-toolbox.com/projects/patterns '''patterns''']&lt;br /&gt;
&lt;br /&gt;
'''Graphing'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/google_visualr '''google_visualr'''] This Ruby gem, GoogleVisualr, is a wrapper around the Google Chart Tools that allows anyone to create the same beautiful charts with just Ruby; you don't have to write any JavaScript at all.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/highcharts-rails '''highcharts-rails'''] Gem that includes Highcharts (Interactive JavaScript charts for your web projects), in the Rails Asset Pipeline introduced in Rails 3.1.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/seer '''Seer'''] Gem that includes Highcharts (Interactive JavaScript charts for your web projects), in the Rails Asset Pipeline introduced in Rails 3.1.Seer is a lightweight, semantically rich wrapper for the Google Visualization API. It allows you to easily create a visualization of data in a variety of formats, including area charts, bar charts, column charts, gauges, line charts, and pie charts.&lt;br /&gt;
&lt;br /&gt;
'''HTML &amp;amp; Markup'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/formula '''formula'''] Formula is a Rails form generator that generates simple clean markup. The project aims to let users create semantically beautiful forms without introducing too much syntax. The goal is to make integrating advanced layout systems as simple as possible.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/formtastic '''Formtastic'''] A Rails form builder plugin/gem with semantically rich and accessible markup.&lt;br /&gt;
&lt;br /&gt;
'''JavaScript'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/jasmine '''Jasmine'''] Test your JavaScript without any framework dependencies, in any environment, and with a nice descriptive syntax.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/konacha '''konacha'''] Konacha is a Rails engine that allows you to test your JavaScript with the mocha test framework and chai assertion library. It is similar to Jasmine and Evergreen, but does not attempt to be framework agnostic. By sticking with Rails, Konacha can take full advantage of features such as the asset pipeline and engines&lt;br /&gt;
&lt;br /&gt;
'''Rails In-Place Editing'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/best_in_place '''BestInPlace'''] BestInPlace is a jQuery script and a Rails 3 helper that provide the method best_in_place to display any object field easily editable for the user by just clicking on it. It supports input data, text data, boolean data and custom dropdown data. It works with RESTful controllers.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/best_in_place_mongoid '''best_in_place_mongoid'''] BestInPlaceMongoid is a fork of BestInPlace jQuery script and a Rails 3 helper that provide the method best_in_place to display any object field easily editable for the user by just clicking on it. It supports input data, text data, boolean data and custom dropdown data. It works with RESTful controllers.&lt;br /&gt;
&lt;br /&gt;
 '''CONTROLLER layer'''&lt;br /&gt;
&lt;br /&gt;
'''Background Jobs'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/resque '''Resque'''] Resque is a Redis-backed Ruby library for creating background jobs, placing those jobs on multiple queues, and processing them later. Background jobs can be any Ruby class or module that responds to perform. Your existing classes can easily be converted to background jobs or you can create new classes specifically to do work. Or, you can do both. Resque is heavily inspired by DelayedJob (which rocks) and is comprised of three parts: * A Ruby library for creating, querying, and processing jobs * A Rake task for starting a worker which processes jobs * A Sinatra app for monitoring queues, jobs, and workers.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/starling '''Starling'''] Starling is a light-weight, persistent queue server that speaks the memcached protocol. It was originally developed for Twitter's backend.&lt;br /&gt;
&lt;br /&gt;
'''Scheduling'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/resque-scheduler '''resque-scheduler'''] Light weight job scheduling on top of Resque. Adds methods enqueue_at/enqueue_in to schedule jobs in the future. Also supports queueing jobs on a fixed, cron-like schedule.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/clockwork '''Clockwork'''] A scheduler process to replace cron, using a more flexible Ruby syntax running as a single long-running process. Inspired by rufus-scheduler and resque-scheduler.&lt;br /&gt;
&lt;br /&gt;
'''Code Metrics'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/simpleCov '''SimpleCov'''] Code coverage for Ruby 1.9 with a powerful configuration library and automatic merging of coverage across test suites.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/flay '''Flay'''] Flay analyzes code for structural similarities. Differences in literal values, variable, class, method names, whitespace, programming style, braces vs do/end, etc are all ignored. Making this totally rad.&lt;br /&gt;
&lt;br /&gt;
'''E-Mail Sending'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/actionmailer '''Action Mailer'''] Email on Rails. Compose, deliver, receive, and test emails using the familiar controller/view pattern. First-class support for multipart email and attachments.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/capistrano_mailer '''capistrano_mailer'''] Capistrano Deployment Email Notification. Keep the whole team informed of each release!&lt;br /&gt;
&lt;br /&gt;
 '''TESTING'''&lt;br /&gt;
&lt;br /&gt;
'''Browser testing'''&lt;br /&gt;
&lt;br /&gt;
* [http://rubygems.org/gems/capybara '''Capybara'''] Capybara is an integration testing tool for rack based web applications. It simulates how a user would interact with a website.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/webrat '''Webrat'''] Webrat lets you quickly write expressive and robust acceptance tests for a Ruby web application. It supports simulating a browser inside a Ruby process to avoid the performance hit and browser dependency of Selenium or Watir, but the same API can also be used to drive real Selenium tests when necessary (eg. for testing AJAX interactions). Most Ruby web frameworks and testing frameworks are supported.&lt;br /&gt;
&lt;br /&gt;
'''Random Data Generation'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/faker '''Faker'''] Faker, a port of Data::Faker from Perl, is used to easily generate fake data: names, addresses, phone numbers, etc.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/forgery '''Forgery'''] Easy and customizable generation of forged data. Can be used as a gem or a rails plugin. Includes rails generators for creating your own forgeries.&lt;br /&gt;
&lt;br /&gt;
'''Unit Test Frameworks'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/test-unit '''test-unit'''] Ruby 1.9.x bundles minitest not Test::Unit. Test::Unit bundled in Ruby 1.8.x had not been improved but unbundled Test::Unit (test-unit) is improved actively.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/wrong '''Wrong'''] Wrong provides a general assert method that takes a predicate block. Assertion failure messages are rich in detail. The Wrong idea is to replace all those countless assert_this, assert_that library methods which only exist to give a more useful failure message than &amp;quot;assertion failed&amp;quot;. Wrong replaces all of them in one fell swoop, since if you can write it in Ruby, Wrong can make a sensible failure message out of it. Also provided are several helper methods, like rescuing, capturing, and d.&lt;br /&gt;
&lt;br /&gt;
* Other useful Ruby Gems here. [https://www.ruby-toolbox.com/projects/testrocket '''testrocket'''], [https://www.ruby-toolbox.com/projects/kintama '''kintama'''], [https://www.ruby-toolbox.com/projects/lemon '''Lemon'''], [https://www.ruby-toolbox.com/projects/shindo '''Shindo'''].&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
[http://guides.rubygems.org/make-your-own-gem/ Gudie to create your own Ruby Gem]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://rubygems.rubyforge.org/rubygems-update/UPGRADING_rdoc.html How to Upgrade/Downgrade Ruby Gems]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://rubylearning.com/blog/ Collection of Ruby Study Notes]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://net.tutsplus.com/articles/web-roundups/24-extremely-useful-ruby-gems-for-web-development/ 24 extremely useful Ruby Gems for web development]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://railscasts.com/episodes/245-new-gem-with-bundler Screencasts to create a Ruby Gem]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://guides.rubygems.org/publishing/ How to publish your Ruby Gem?]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== References==&lt;br /&gt;
1. [http://guides.rubygems.org/rubygems-basics/#installing_gems Ruby Gems guide]&amp;lt;br&amp;gt;&lt;br /&gt;
2. [http://timelessrepo.com/making-ruby-gems Making Ruby Gems]&amp;lt;br&amp;gt;&lt;br /&gt;
3. [https://www.ruby-toolbox.com Ruby Tool Box]&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Npari</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch1_1w24_nv&amp;diff=79129</id>
		<title>CSC/ECE 517 Fall 2013/ch1 1w24 nv</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch1_1w24_nv&amp;diff=79129"/>
		<updated>2013-09-25T02:50:29Z</updated>

		<summary type="html">&lt;p&gt;Npari: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Ruby Gem is a package manager for Ruby programming language. It allows users to easily download, install and use software packages on their system. The functionality of a Ruby application can be modified or extended with the help of Gems. In the version 1.9 of Ruby, Ruby Gems has been made a part of the standard library.&lt;br /&gt;
&lt;br /&gt;
== '''A Tour of Ruby Gems''' ==&lt;br /&gt;
== Definition of a Ruby Gem ==&lt;br /&gt;
In simple terms, a Ruby Gem is a package containing files that can be installed in a system and can help expand the functionality of a Ruby application. Ruby gems are very powerful. Ruby programmers create and publish Ruby Gems as open source in [https://github.com/ github]. It is very east to install, upgrade and delete Gems in a system.&lt;br /&gt;
&lt;br /&gt;
== Structure of Ruby Gem ==&lt;br /&gt;
Every Gem has a set of files and the following standard structure &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ tree -d newgem&lt;br /&gt;
|-- lib/&lt;br /&gt;
|   |-- newgem.rb&lt;br /&gt;
|   `-- newgem/&lt;br /&gt;
|       |-- base.rb&lt;br /&gt;
|       `-- version.rb&lt;br /&gt;
|-- test/&lt;br /&gt;
|-- bin/&lt;br /&gt;
|-- Rakefile&lt;br /&gt;
`-- newgem.gemspec&amp;lt;/pre&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
The ''lib'' folder has the code of the ruby gem. It has ''newgem.rb'' file and a folder named ''newgem''. This folder has two files which are ''base.rb'' and ''version.rb''. The version number is recorded in ''version.rb'' and can be changed when the gem is updated. The ''bin'' directory has any binaries that is a part of the gem file and should be distributed with the gem. A gem usually has a [http://rake.rubyforge.org/doc/rakefile_rdoc.html Rakefile]. The rake program uses this to generate code and automate tests in addition to performing other tasks. The Gem specification file ''newgem.gemspec'' contains details specific to the gem. The file has details such as the gem name,the files that are in it, the gems it depends on for  performing testing, the gems it depends on for actually running and other details.&lt;br /&gt;
&lt;br /&gt;
== Listing existing Gems ==&lt;br /&gt;
To list the existing gems in a system ''list'' keyword can be used in the command line.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem list&lt;br /&gt;
&lt;br /&gt;
*** LOCAL GEMS ***&lt;br /&gt;
&lt;br /&gt;
actionmailer (3.2.3)&lt;br /&gt;
actionpack (3.2.3)&lt;br /&gt;
activemodel (3.2.3)&lt;br /&gt;
activerecord (3.2.3)&lt;br /&gt;
activeresource (3.2.3)&lt;br /&gt;
activesupport (3.2.3)&lt;br /&gt;
arel (3.0.2)&lt;br /&gt;
bigdecimal (1.1.0)&lt;br /&gt;
builder (3.0.4)&lt;br /&gt;
bundler (1.3.5)&lt;br /&gt;
capybara (2.1.0)&lt;br /&gt;
coffee-rails (3.2.2)&lt;br /&gt;
coffee-script (2.2.0)&lt;br /&gt;
coffee-script-source (1.6.3)&lt;br /&gt;
erubis (2.7.0)&lt;br /&gt;
execjs (2.0.1)&lt;br /&gt;
hike (1.2.3)&lt;br /&gt;
i18n (0.6.5)&lt;br /&gt;
io-console (0.3)&lt;br /&gt;
journey (1.0.4)&lt;br /&gt;
jquery-rails (3.0.4)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installing a new Gem ==&lt;br /&gt;
The ''install'' keyword can be used in command line to install gems. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem install capybara&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Uninstalling a Gem ==&lt;br /&gt;
The ''uninstall'' keyword can be used in command line to uninstall any existing gem in the system.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem uninstall capybara&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you uninstall a dependency of a gem RubyGems will ask you for confirmation.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem uninstall rbtree&lt;br /&gt;
&lt;br /&gt;
You have requested to uninstall the gem:&lt;br /&gt;
	rbtree-0.4.1&lt;br /&gt;
&lt;br /&gt;
drip-0.0.2 depends on rbtree (&amp;gt;= 0)&lt;br /&gt;
If you remove this gem, these dependencies will not be met.&lt;br /&gt;
Continue with Uninstall? [yN]  n&lt;br /&gt;
ERROR:  While executing gem ... (Gem::DependencyRemovalException)&lt;br /&gt;
    Uninstallation aborted due to dependent gem(s)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Update all existing Gems == &lt;br /&gt;
The ''update'' keyword can be used in command line to update all existing gems in the system.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem update &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Creating a new Gem == &lt;br /&gt;
It is also possible to [http://guides.rubygems.org/make-your-own-gem/ create our own ruby gem] to be used later to extend our Ruby applications. Bundler is a tool that can be used to [https://github.com/radar/guides/blob/master/gem-development.md to create a ruby gem].&lt;br /&gt;
&lt;br /&gt;
== Ruby Gem Commands ==&lt;br /&gt;
&lt;br /&gt;
There is a list of commands that can be used with Ruby Gems. More details of each of these commands can be found [http://guides.rubygems.org/command-reference/ here]&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;per&amp;gt;&lt;br /&gt;
gem build&lt;br /&gt;
gem cert&lt;br /&gt;
gem check&lt;br /&gt;
gem cleanup&lt;br /&gt;
gem contents&lt;br /&gt;
gem dependency&lt;br /&gt;
gem environment&lt;br /&gt;
gem fetch&lt;br /&gt;
gem generate_index&lt;br /&gt;
gem help&lt;br /&gt;
gem install&lt;br /&gt;
gem list&lt;br /&gt;
gem lock&lt;br /&gt;
gem mirror&lt;br /&gt;
gem outdated&lt;br /&gt;
gem owner&lt;br /&gt;
gem pristine&lt;br /&gt;
gem push&lt;br /&gt;
gem query&lt;br /&gt;
gem rdoc&lt;br /&gt;
gem search&lt;br /&gt;
gem server&lt;br /&gt;
gem sources&lt;br /&gt;
gem specification&lt;br /&gt;
gem stale&lt;br /&gt;
gem uninstall&lt;br /&gt;
gem unpack&lt;br /&gt;
gem update&lt;br /&gt;
gem which&lt;br /&gt;
gem yank&lt;br /&gt;
&amp;lt;/per&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Some important Gems that are useful in RAILS environment ==&lt;br /&gt;
&lt;br /&gt;
There are many gems which provide easy of functionality that can be included in the rails development environment. [http://bundler.io/ Bundler]is a useful gem that enables a developer to quickly add and manage gems in a few lines of code.&lt;br /&gt;
&lt;br /&gt;
We can classify the Gems based on the usage in different layers Model, View and Controller.&lt;br /&gt;
&lt;br /&gt;
 '''MODEL layer'''&lt;br /&gt;
&lt;br /&gt;
'''Active Record Plugins''' &lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/activerecord-oracle_enhanced-adapter '''oracle-enhanced'''] Oracle &amp;quot;enhanced&amp;quot; ActiveRecord adapter contains useful additional methods for working with new and legacy Oracle databases. This adapter is superset of original ActiveRecord Oracle adapter.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/activerecord-jdbc-adapter '''activerecord-jdbc-adapter'''] This adapter is build on JDBC API used for connecting to the database. AR-JDBC is a database adapter for Rails' ActiveRecord component. It allows to connect to virtually any JDBC-compliant database with your JRuby on Rails application.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/activerecord-nulldb-adapter '''nulldb'''] .This helps in Database simulation and testing. A database backend that translates database interactions into no-ops. We can test our model business logic with wanting to experiment with real database.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/oracle-enhanced-enhanced '''oracle-enhanced-enhanced'''] It includes several enhancements and customization to the standard ActiveRecord Oracle Enhapnced adapter, which is still required. Any customization to this adapter's behavior or additional Oracle-specific utilities should be added here.&lt;br /&gt;
&lt;br /&gt;
* Other useful Ruby Gems here. [https://www.ruby-toolbox.com/projects/activerecord-sqlserver-adapter '''activerecord-sqlserver-adapter'''], [https://www.ruby-toolbox.com/projects/activerecord-jdbcmysql-adapter '''activerecord-jdbcmysql-adapter'''], [https://www.ruby-toolbox.com/projects/activerecord-jdbcpostgresql-adapter '''activerecord-jdbcpostgresql-adapter'''], [https://www.ruby-toolbox.com/projects/activerecord-jdbcderby-adapter '''activerecord-jdbcderby-adapter'''],.&lt;br /&gt;
&lt;br /&gt;
'''Active Record Index Assistants'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/foreigner '''foreigner'''] Adds helpers to migrations and dumps foreign keys to schema.rb.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/rails_indexes '''rails_indexes'''] A rake task to track down missing database indexes. does not assume that all foreign keys end with the convention of _id.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/schema_plus '''schema_plus'''] SchemaPlus is an ActiveRecord extension that provides enhanced capabilities for schema definition and querying, including: enhanced and more DRY index capabilities, support and automation for foreign key constraints, and support for views.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/automatic_foreign_key '''automatic_foreign_key'''] Automatic Foreign Key automatically generates foreign-key constraints when creating tables or adding columns. It uses SQL-92 syntax and as such should be compatible with most databases that support foreign-key constraints.&lt;br /&gt;
&lt;br /&gt;
* Other useful Ruby Gems here. [https://www.ruby-toolbox.com/projects/ambitious_query_indexer '''ambitious_query_indexer'''], [https://www.ruby-toolbox.com/projects/lol_dba '''lol_dba'''], [https://www.ruby-toolbox.com/projects/immigrant '''immigrant'''], [https://www.ruby-toolbox.com/projects/redhillonrails_core '''redhillonrails_core'''].&lt;br /&gt;
&lt;br /&gt;
'''Rails DB Bootstrapping'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/seed-fu '''seed-fu'''] Seed Fu is an attempt to once and for all solve the problem of inserting and maintaining seed data in a database. It uses a variety of techniques gathered from various places around the web and combines them to create what is hopefully the most robust seed data system around.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/populator '''populator'''] Mass populate an Active Record database.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/seedbank '''seedbank'''] Extends Rails seeds to split out complex seeds into multiple files and lets each environment have it's own seeds.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/has_alter_ego '''Has alter ego'''] has_alter_ego makes it possible to keep seed and live data transparently in parallel. In contrast to other seed data approaches has_alter_ego synchronizes the seed definitions with your database objects automagically unless you've overridden it in the database.&lt;br /&gt;
&lt;br /&gt;
* Other useful Ruby Gems here. [https://www.ruby-toolbox.com/projects/bootstrapper '''Bootstrapper'''], [https://www.ruby-toolbox.com/projects/db-populate '''Db-populate'''], [https://www.ruby-toolbox.com/projects/seed_dumper '''seed_dumper'''], [https://www.ruby-toolbox.com/projects/dibber '''dibber'''].&lt;br /&gt;
&lt;br /&gt;
'''Rails Search'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/Sunspot '''Sunspot'''] Sunspot is a library providing a powerful, all-ruby API for the Solr search engine. Sunspot manages the configuration of persistent Ruby classes for search and indexing and exposes Solr's most powerful features through a collection of DSLs. Complex search operations can be performed without hand-writing any boolean queries or building Solr parameters by hand.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/sunspot_rails '''sunspot_rails'''] Sunspot::Rails is an extension to the Sunspot library for Solr search. Sunspot::Rails adds integration between Sunspot and ActiveRecord, including defining search and indexing related methods on ActiveRecord models themselves, running a Sunspot-compatible Solr instance for development and test environments, and automatically commit Solr index changes at the end of each Rails request.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/tire '''Tire'''] Tire is a Ruby client for the Elasticsearch search engine/database. It provides Ruby-like API for fluent communication with the Elasticsearch server and blends with ActiveModel class for convenient usage in Rails applications. It allows to delete and create indices, define mapping for them, supports the bulk API, and presents an easy-to-use DSL for constructing your queries. It has full ActiveRecord/ActiveModel compatibility, allowing you to index your models (incrementally upon saving, or in bulk), searching and paginating the results.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/thinking-sphinx '''thinking-sphinx'''] An intelligent layer for ActiveRecord (via Rails and Sinatra) for the Sphinx full-text search tool.&lt;br /&gt;
&lt;br /&gt;
* Other useful Ruby Gems here. [https://www.ruby-toolbox.com/projects/pg_search '''pg_search'''], [https://www.ruby-toolbox.com/projects/redis-search '''redis-search'''], [https://www.ruby-toolbox.com/projects/ferret '''Ferret'''], [https://www.ruby-toolbox.com/projects/searchlight '''searchlight'''].&lt;br /&gt;
&lt;br /&gt;
'''Data Persistence'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/mongoid '''Mongoid'''] Mongoid is an ODM (Object Document Mapper) Framework for MongoDB, written in Ruby.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/mongomatic '''Mongomatic'''] Mongomatic is a modular Ruby object mapper for Mongo.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/dynamoid '''dynamoid'''] Dynamoid is an ORM for Amazon's DynamoDB that supports offline development, associations, querying, and everything else you'd expect from an ActiveRecord-style replacement.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/squeel '''squeel'''] Squeel unlocks the power of Arel in your Rails 3 application with a handy block-based syntax. You can write subqueries, access named functions provided by your RDBMS, and more, all without writing SQL strings.&lt;br /&gt;
&lt;br /&gt;
 '''VIEW layer'''&lt;br /&gt;
&lt;br /&gt;
'''CSS'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/sass '''Sass'''] Sass makes CSS fun again. Sass is an extension of CSS3, adding nested rules, variables, mixins, selector inheritance, and more. It's translated to well-formatted, standard CSS using the command line tool or a web-framework plugin.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/bourbon '''bourbon'''] The purpose of Bourbon Vanilla Sass Mixins is to provide a comprehensive framework of sass mixins that are designed to be as vanilla as possible. Meaning they should not deter from the original CSS syntax. The mixins contain vendor specific prefixes for all CSS3 properties for support amongst modern browsers. The prefixes also ensure graceful degradation for older browsers that support only CSS3 prefixed properties.&lt;br /&gt;
&lt;br /&gt;
* Other useful Ruby Gems here. [https://www.ruby-toolbox.com/projects/less '''Less'''], [https://www.ruby-toolbox.com/projects/sass-rails '''sass-rails'''], [https://www.ruby-toolbox.com/projects/stylus '''stylus'''], [https://www.ruby-toolbox.com/projects/patterns '''patterns''']&lt;br /&gt;
&lt;br /&gt;
'''Graphing'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/google_visualr '''google_visualr'''] This Ruby gem, GoogleVisualr, is a wrapper around the Google Chart Tools that allows anyone to create the same beautiful charts with just Ruby; you don't have to write any JavaScript at all.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/highcharts-rails '''highcharts-rails'''] Gem that includes Highcharts (Interactive JavaScript charts for your web projects), in the Rails Asset Pipeline introduced in Rails 3.1.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/seer '''Seer'''] Gem that includes Highcharts (Interactive JavaScript charts for your web projects), in the Rails Asset Pipeline introduced in Rails 3.1.Seer is a lightweight, semantically rich wrapper for the Google Visualization API. It allows you to easily create a visualization of data in a variety of formats, including area charts, bar charts, column charts, gauges, line charts, and pie charts.&lt;br /&gt;
&lt;br /&gt;
'''HTML &amp;amp; Markup'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/formula '''formula'''] Formula is a Rails form generator that generates simple clean markup. The project aims to let users create semantically beautiful forms without introducing too much syntax. The goal is to make integrating advanced layout systems as simple as possible.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/formtastic '''Formtastic'''] A Rails form builder plugin/gem with semantically rich and accessible markup.&lt;br /&gt;
&lt;br /&gt;
'''JavaScript'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/jasmine '''Jasmine'''] Test your JavaScript without any framework dependencies, in any environment, and with a nice descriptive syntax.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/konacha '''konacha'''] Konacha is a Rails engine that allows you to test your JavaScript with the mocha test framework and chai assertion library. It is similar to Jasmine and Evergreen, but does not attempt to be framework agnostic. By sticking with Rails, Konacha can take full advantage of features such as the asset pipeline and engines&lt;br /&gt;
&lt;br /&gt;
'''Rails In-Place Editing'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/best_in_place '''BestInPlace'''] BestInPlace is a jQuery script and a Rails 3 helper that provide the method best_in_place to display any object field easily editable for the user by just clicking on it. It supports input data, text data, boolean data and custom dropdown data. It works with RESTful controllers.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/best_in_place_mongoid '''best_in_place_mongoid'''] BestInPlaceMongoid is a fork of BestInPlace jQuery script and a Rails 3 helper that provide the method best_in_place to display any object field easily editable for the user by just clicking on it. It supports input data, text data, boolean data and custom dropdown data. It works with RESTful controllers.&lt;br /&gt;
&lt;br /&gt;
 '''CONTROLLER layer'''&lt;br /&gt;
&lt;br /&gt;
'''Background Jobs'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/resque '''Resque'''] Resque is a Redis-backed Ruby library for creating background jobs, placing those jobs on multiple queues, and processing them later. Background jobs can be any Ruby class or module that responds to perform. Your existing classes can easily be converted to background jobs or you can create new classes specifically to do work. Or, you can do both. Resque is heavily inspired by DelayedJob (which rocks) and is comprised of three parts: * A Ruby library for creating, querying, and processing jobs * A Rake task for starting a worker which processes jobs * A Sinatra app for monitoring queues, jobs, and workers.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/starling '''Starling'''] Starling is a light-weight, persistent queue server that speaks the memcached protocol. It was originally developed for Twitter's backend.&lt;br /&gt;
&lt;br /&gt;
'''Scheduling'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/resque-scheduler '''resque-scheduler'''] Light weight job scheduling on top of Resque. Adds methods enqueue_at/enqueue_in to schedule jobs in the future. Also supports queueing jobs on a fixed, cron-like schedule.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/clockwork '''Clockwork'''] A scheduler process to replace cron, using a more flexible Ruby syntax running as a single long-running process. Inspired by rufus-scheduler and resque-scheduler.&lt;br /&gt;
&lt;br /&gt;
'''Code Metrics'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/simpleCov '''SimpleCov'''] Code coverage for Ruby 1.9 with a powerful configuration library and automatic merging of coverage across test suites.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/flay '''Flay'''] Flay analyzes code for structural similarities. Differences in literal values, variable, class, method names, whitespace, programming style, braces vs do/end, etc are all ignored. Making this totally rad.&lt;br /&gt;
&lt;br /&gt;
'''E-Mail Sending'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/actionmailer '''Action Mailer'''] Email on Rails. Compose, deliver, receive, and test emails using the familiar controller/view pattern. First-class support for multipart email and attachments.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/capistrano_mailer '''capistrano_mailer'''] Capistrano Deployment Email Notification. Keep the whole team informed of each release!&lt;br /&gt;
&lt;br /&gt;
 '''TESTING'''&lt;br /&gt;
&lt;br /&gt;
'''Browser testing'''&lt;br /&gt;
&lt;br /&gt;
* [http://rubygems.org/gems/capybara '''Capybara'''] Capybara is an integration testing tool for rack based web applications. It simulates how a user would interact with a website.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/webrat '''Webrat'''] Webrat lets you quickly write expressive and robust acceptance tests for a Ruby web application. It supports simulating a browser inside a Ruby process to avoid the performance hit and browser dependency of Selenium or Watir, but the same API can also be used to drive real Selenium tests when necessary (eg. for testing AJAX interactions). Most Ruby web frameworks and testing frameworks are supported.&lt;br /&gt;
&lt;br /&gt;
'''Random Data Generation'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/faker '''Faker'''] Faker, a port of Data::Faker from Perl, is used to easily generate fake data: names, addresses, phone numbers, etc.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/forgery '''Forgery'''] Easy and customizable generation of forged data. Can be used as a gem or a rails plugin. Includes rails generators for creating your own forgeries.&lt;br /&gt;
&lt;br /&gt;
'''Unit Test Frameworks'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/test-unit '''test-unit'''] Ruby 1.9.x bundles minitest not Test::Unit. Test::Unit bundled in Ruby 1.8.x had not been improved but unbundled Test::Unit (test-unit) is improved actively.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/wrong '''Wrong'''] Wrong provides a general assert method that takes a predicate block. Assertion failure messages are rich in detail. The Wrong idea is to replace all those countless assert_this, assert_that library methods which only exist to give a more useful failure message than &amp;quot;assertion failed&amp;quot;. Wrong replaces all of them in one fell swoop, since if you can write it in Ruby, Wrong can make a sensible failure message out of it. Also provided are several helper methods, like rescuing, capturing, and d.&lt;br /&gt;
&lt;br /&gt;
* Other useful Ruby Gems here. [https://www.ruby-toolbox.com/projects/testrocket '''testrocket'''], [https://www.ruby-toolbox.com/projects/kintama '''kintama'''], [https://www.ruby-toolbox.com/projects/lemon '''Lemon'''], [https://www.ruby-toolbox.com/projects/shindo '''Shindo'''].&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
[http://guides.rubygems.org/make-your-own-gem/ Gudie to create your own Ruby Gem]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://rubygems.rubyforge.org/rubygems-update/UPGRADING_rdoc.html How to Upgrade/Downgrade Ruby Gems]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://rubylearning.com/blog/ Collection of Ruby Study Notes]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://net.tutsplus.com/articles/web-roundups/24-extremely-useful-ruby-gems-for-web-development/ 24 extremely useful Ruby Gems for web development]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://railscasts.com/episodes/245-new-gem-with-bundler Screencasts to create a Ruby Gem]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://guides.rubygems.org/publishing/ How to publish your Ruby Gem?]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== References==&lt;br /&gt;
1. [http://guides.rubygems.org/rubygems-basics/#installing_gems Ruby Gems guide]&amp;lt;br&amp;gt;&lt;br /&gt;
2. [http://timelessrepo.com/making-ruby-gems Making Ruby Gems]&amp;lt;br&amp;gt;&lt;br /&gt;
3. [https://www.ruby-toolbox.com Ruby Tool Box]&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Npari</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch1_1w24_nv&amp;diff=79126</id>
		<title>CSC/ECE 517 Fall 2013/ch1 1w24 nv</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch1_1w24_nv&amp;diff=79126"/>
		<updated>2013-09-25T02:45:14Z</updated>

		<summary type="html">&lt;p&gt;Npari: /* See Also */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Ruby Gem is a package manager for Ruby programming language. It allows users to easily download, install and use software packages on their system. The functionality of a Ruby application can be modified or extended with the help of Gems. In the version 1.9 of Ruby, Ruby Gems has been made a part of the standard library.&lt;br /&gt;
&lt;br /&gt;
== '''A Tour of Ruby Gems''' ==&lt;br /&gt;
== Definition of a Ruby Gem ==&lt;br /&gt;
In simple terms, a Ruby Gem is a package containing files that can be installed in a system and can help expand the functionality of a Ruby application. Ruby gems are very powerful. Ruby programmers create and publish Ruby Gems as open source in [https://github.com/ github]. It is very east to install, upgrade and delete Gems in a system.&lt;br /&gt;
&lt;br /&gt;
== Structure of Ruby Gem ==&lt;br /&gt;
Every Gem has a set of files and the following standard structure &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ tree -d newgem&lt;br /&gt;
|-- lib/&lt;br /&gt;
|   |-- newgem.rb&lt;br /&gt;
|   `-- newgem/&lt;br /&gt;
|       |-- base.rb&lt;br /&gt;
|       `-- version.rb&lt;br /&gt;
|-- test/&lt;br /&gt;
|-- bin/&lt;br /&gt;
|-- Rakefile&lt;br /&gt;
`-- newgem.gemspec&amp;lt;/pre&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
The ''lib'' folder has the code of the ruby gem. It has ''newgem.rb'' file and a folder named ''newgem''. This folder has two files which are ''base.rb'' and ''version.rb''. The version number is recorded in ''version.rb'' and can be changed when the gem is updated. The ''bin'' directory has any binaries that is a part of the gem file and should be distributed with the gem. A gem usually has a [http://rake.rubyforge.org/doc/rakefile_rdoc.html Rakefile]. The rake program uses this to generate code and automate tests in addition to performing other tasks. The Gem specification file ''newgem.gemspec'' contains details specific to the gem. The file has details such as the gem name,the files that are in it, the gems it depends on for  performing testing, the gems it depends on for actually running and other details.&lt;br /&gt;
&lt;br /&gt;
== Listing existing Gems ==&lt;br /&gt;
To list the existing gems in a system ''list'' keyword can be used in the command line.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem list&lt;br /&gt;
&lt;br /&gt;
*** LOCAL GEMS ***&lt;br /&gt;
&lt;br /&gt;
actionmailer (3.2.3)&lt;br /&gt;
actionpack (3.2.3)&lt;br /&gt;
activemodel (3.2.3)&lt;br /&gt;
activerecord (3.2.3)&lt;br /&gt;
activeresource (3.2.3)&lt;br /&gt;
activesupport (3.2.3)&lt;br /&gt;
arel (3.0.2)&lt;br /&gt;
bigdecimal (1.1.0)&lt;br /&gt;
builder (3.0.4)&lt;br /&gt;
bundler (1.3.5)&lt;br /&gt;
capybara (2.1.0)&lt;br /&gt;
coffee-rails (3.2.2)&lt;br /&gt;
coffee-script (2.2.0)&lt;br /&gt;
coffee-script-source (1.6.3)&lt;br /&gt;
erubis (2.7.0)&lt;br /&gt;
execjs (2.0.1)&lt;br /&gt;
hike (1.2.3)&lt;br /&gt;
i18n (0.6.5)&lt;br /&gt;
io-console (0.3)&lt;br /&gt;
journey (1.0.4)&lt;br /&gt;
jquery-rails (3.0.4)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installing a new Gem ==&lt;br /&gt;
The ''install'' keyword can be used in command line to install gems. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem install capybara&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Uninstalling a Gem ==&lt;br /&gt;
The ''uninstall'' keyword can be used in command line to uninstall any existing gem in the system.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem uninstall capybara&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you uninstall a dependency of a gem RubyGems will ask you for confirmation.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem uninstall rbtree&lt;br /&gt;
&lt;br /&gt;
You have requested to uninstall the gem:&lt;br /&gt;
	rbtree-0.4.1&lt;br /&gt;
&lt;br /&gt;
drip-0.0.2 depends on rbtree (&amp;gt;= 0)&lt;br /&gt;
If you remove this gem, these dependencies will not be met.&lt;br /&gt;
Continue with Uninstall? [yN]  n&lt;br /&gt;
ERROR:  While executing gem ... (Gem::DependencyRemovalException)&lt;br /&gt;
    Uninstallation aborted due to dependent gem(s)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Update all existing Gems == &lt;br /&gt;
The ''update'' keyword can be used in command line to update all existing gems in the system.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem update &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Creating a new Gem == &lt;br /&gt;
It is also possible to [http://guides.rubygems.org/make-your-own-gem/ create our own ruby gem] to be used later to extend our Ruby applications. Bundler is a tool that can be used to [https://github.com/radar/guides/blob/master/gem-development.md to create a ruby gem].&lt;br /&gt;
&lt;br /&gt;
== Some important Gems that are useful in RAILS environment ==&lt;br /&gt;
&lt;br /&gt;
There are many gems which provide easy of functionality that can be included in the rails development environment. [http://bundler.io/ Bundler]is a useful gem that enables a developer to quickly add and manage gems in a few lines of code.&lt;br /&gt;
&lt;br /&gt;
We can classify the Gems based on the usage in different layers Model, View and Controller.&lt;br /&gt;
&lt;br /&gt;
 '''MODEL layer'''&lt;br /&gt;
&lt;br /&gt;
'''Active Record Plugins''' &lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/activerecord-oracle_enhanced-adapter '''oracle-enhanced'''] Oracle &amp;quot;enhanced&amp;quot; ActiveRecord adapter contains useful additional methods for working with new and legacy Oracle databases. This adapter is superset of original ActiveRecord Oracle adapter.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/activerecord-jdbc-adapter '''activerecord-jdbc-adapter'''] This adapter is build on JDBC API used for connecting to the database. AR-JDBC is a database adapter for Rails' ActiveRecord component. It allows to connect to virtually any JDBC-compliant database with your JRuby on Rails application.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/activerecord-nulldb-adapter '''nulldb'''] .This helps in Database simulation and testing. A database backend that translates database interactions into no-ops. We can test our model business logic with wanting to experiment with real database.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/oracle-enhanced-enhanced '''oracle-enhanced-enhanced'''] It includes several enhancements and customization to the standard ActiveRecord Oracle Enhapnced adapter, which is still required. Any customization to this adapter's behavior or additional Oracle-specific utilities should be added here.&lt;br /&gt;
&lt;br /&gt;
* Other useful Ruby Gems here. [https://www.ruby-toolbox.com/projects/activerecord-sqlserver-adapter '''activerecord-sqlserver-adapter'''], [https://www.ruby-toolbox.com/projects/activerecord-jdbcmysql-adapter '''activerecord-jdbcmysql-adapter'''], [https://www.ruby-toolbox.com/projects/activerecord-jdbcpostgresql-adapter '''activerecord-jdbcpostgresql-adapter'''], [https://www.ruby-toolbox.com/projects/activerecord-jdbcderby-adapter '''activerecord-jdbcderby-adapter'''],.&lt;br /&gt;
&lt;br /&gt;
'''Active Record Index Assistants'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/foreigner '''foreigner'''] Adds helpers to migrations and dumps foreign keys to schema.rb.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/rails_indexes '''rails_indexes'''] A rake task to track down missing database indexes. does not assume that all foreign keys end with the convention of _id.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/schema_plus '''schema_plus'''] SchemaPlus is an ActiveRecord extension that provides enhanced capabilities for schema definition and querying, including: enhanced and more DRY index capabilities, support and automation for foreign key constraints, and support for views.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/automatic_foreign_key '''automatic_foreign_key'''] Automatic Foreign Key automatically generates foreign-key constraints when creating tables or adding columns. It uses SQL-92 syntax and as such should be compatible with most databases that support foreign-key constraints.&lt;br /&gt;
&lt;br /&gt;
* Other useful Ruby Gems here. [https://www.ruby-toolbox.com/projects/ambitious_query_indexer '''ambitious_query_indexer'''], [https://www.ruby-toolbox.com/projects/lol_dba '''lol_dba'''], [https://www.ruby-toolbox.com/projects/immigrant '''immigrant'''], [https://www.ruby-toolbox.com/projects/redhillonrails_core '''redhillonrails_core'''].&lt;br /&gt;
&lt;br /&gt;
'''Rails DB Bootstrapping'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/seed-fu '''seed-fu'''] Seed Fu is an attempt to once and for all solve the problem of inserting and maintaining seed data in a database. It uses a variety of techniques gathered from various places around the web and combines them to create what is hopefully the most robust seed data system around.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/populator '''populator'''] Mass populate an Active Record database.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/seedbank '''seedbank'''] Extends Rails seeds to split out complex seeds into multiple files and lets each environment have it's own seeds.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/has_alter_ego '''Has alter ego'''] has_alter_ego makes it possible to keep seed and live data transparently in parallel. In contrast to other seed data approaches has_alter_ego synchronizes the seed definitions with your database objects automagically unless you've overridden it in the database.&lt;br /&gt;
&lt;br /&gt;
* Other useful Ruby Gems here. [https://www.ruby-toolbox.com/projects/bootstrapper '''Bootstrapper'''], [https://www.ruby-toolbox.com/projects/db-populate '''Db-populate'''], [https://www.ruby-toolbox.com/projects/seed_dumper '''seed_dumper'''], [https://www.ruby-toolbox.com/projects/dibber '''dibber'''].&lt;br /&gt;
&lt;br /&gt;
'''Rails Search'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/Sunspot '''Sunspot'''] Sunspot is a library providing a powerful, all-ruby API for the Solr search engine. Sunspot manages the configuration of persistent Ruby classes for search and indexing and exposes Solr's most powerful features through a collection of DSLs. Complex search operations can be performed without hand-writing any boolean queries or building Solr parameters by hand.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/sunspot_rails '''sunspot_rails'''] Sunspot::Rails is an extension to the Sunspot library for Solr search. Sunspot::Rails adds integration between Sunspot and ActiveRecord, including defining search and indexing related methods on ActiveRecord models themselves, running a Sunspot-compatible Solr instance for development and test environments, and automatically commit Solr index changes at the end of each Rails request.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/tire '''Tire'''] Tire is a Ruby client for the Elasticsearch search engine/database. It provides Ruby-like API for fluent communication with the Elasticsearch server and blends with ActiveModel class for convenient usage in Rails applications. It allows to delete and create indices, define mapping for them, supports the bulk API, and presents an easy-to-use DSL for constructing your queries. It has full ActiveRecord/ActiveModel compatibility, allowing you to index your models (incrementally upon saving, or in bulk), searching and paginating the results.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/thinking-sphinx '''thinking-sphinx'''] An intelligent layer for ActiveRecord (via Rails and Sinatra) for the Sphinx full-text search tool.&lt;br /&gt;
&lt;br /&gt;
* Other useful Ruby Gems here. [https://www.ruby-toolbox.com/projects/pg_search '''pg_search'''], [https://www.ruby-toolbox.com/projects/redis-search '''redis-search'''], [https://www.ruby-toolbox.com/projects/ferret '''Ferret'''], [https://www.ruby-toolbox.com/projects/searchlight '''searchlight'''].&lt;br /&gt;
&lt;br /&gt;
'''Data Persistence'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/mongoid '''Mongoid'''] Mongoid is an ODM (Object Document Mapper) Framework for MongoDB, written in Ruby.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/mongomatic '''Mongomatic'''] Mongomatic is a modular Ruby object mapper for Mongo.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/dynamoid '''dynamoid'''] Dynamoid is an ORM for Amazon's DynamoDB that supports offline development, associations, querying, and everything else you'd expect from an ActiveRecord-style replacement.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/squeel '''squeel'''] Squeel unlocks the power of Arel in your Rails 3 application with a handy block-based syntax. You can write subqueries, access named functions provided by your RDBMS, and more, all without writing SQL strings.&lt;br /&gt;
&lt;br /&gt;
 '''VIEW layer'''&lt;br /&gt;
&lt;br /&gt;
'''CSS'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/sass '''Sass'''] Sass makes CSS fun again. Sass is an extension of CSS3, adding nested rules, variables, mixins, selector inheritance, and more. It's translated to well-formatted, standard CSS using the command line tool or a web-framework plugin.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/bourbon '''bourbon'''] The purpose of Bourbon Vanilla Sass Mixins is to provide a comprehensive framework of sass mixins that are designed to be as vanilla as possible. Meaning they should not deter from the original CSS syntax. The mixins contain vendor specific prefixes for all CSS3 properties for support amongst modern browsers. The prefixes also ensure graceful degradation for older browsers that support only CSS3 prefixed properties.&lt;br /&gt;
&lt;br /&gt;
* Other useful Ruby Gems here. [https://www.ruby-toolbox.com/projects/less '''Less'''], [https://www.ruby-toolbox.com/projects/sass-rails '''sass-rails'''], [https://www.ruby-toolbox.com/projects/stylus '''stylus'''], [https://www.ruby-toolbox.com/projects/patterns '''patterns''']&lt;br /&gt;
&lt;br /&gt;
'''Graphing'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/google_visualr '''google_visualr'''] This Ruby gem, GoogleVisualr, is a wrapper around the Google Chart Tools that allows anyone to create the same beautiful charts with just Ruby; you don't have to write any JavaScript at all.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/highcharts-rails '''highcharts-rails'''] Gem that includes Highcharts (Interactive JavaScript charts for your web projects), in the Rails Asset Pipeline introduced in Rails 3.1.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/seer '''Seer'''] Gem that includes Highcharts (Interactive JavaScript charts for your web projects), in the Rails Asset Pipeline introduced in Rails 3.1.Seer is a lightweight, semantically rich wrapper for the Google Visualization API. It allows you to easily create a visualization of data in a variety of formats, including area charts, bar charts, column charts, gauges, line charts, and pie charts.&lt;br /&gt;
&lt;br /&gt;
'''HTML &amp;amp; Markup'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/formula '''formula'''] Formula is a Rails form generator that generates simple clean markup. The project aims to let users create semantically beautiful forms without introducing too much syntax. The goal is to make integrating advanced layout systems as simple as possible.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/formtastic '''Formtastic'''] A Rails form builder plugin/gem with semantically rich and accessible markup.&lt;br /&gt;
&lt;br /&gt;
'''JavaScript'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/jasmine '''Jasmine'''] Test your JavaScript without any framework dependencies, in any environment, and with a nice descriptive syntax.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/konacha '''konacha'''] Konacha is a Rails engine that allows you to test your JavaScript with the mocha test framework and chai assertion library. It is similar to Jasmine and Evergreen, but does not attempt to be framework agnostic. By sticking with Rails, Konacha can take full advantage of features such as the asset pipeline and engines&lt;br /&gt;
&lt;br /&gt;
'''Rails In-Place Editing'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/best_in_place '''BestInPlace'''] BestInPlace is a jQuery script and a Rails 3 helper that provide the method best_in_place to display any object field easily editable for the user by just clicking on it. It supports input data, text data, boolean data and custom dropdown data. It works with RESTful controllers.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/best_in_place_mongoid '''best_in_place_mongoid'''] BestInPlaceMongoid is a fork of BestInPlace jQuery script and a Rails 3 helper that provide the method best_in_place to display any object field easily editable for the user by just clicking on it. It supports input data, text data, boolean data and custom dropdown data. It works with RESTful controllers.&lt;br /&gt;
&lt;br /&gt;
 '''CONTROLLER layer'''&lt;br /&gt;
&lt;br /&gt;
'''Background Jobs'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/resque '''Resque'''] Resque is a Redis-backed Ruby library for creating background jobs, placing those jobs on multiple queues, and processing them later. Background jobs can be any Ruby class or module that responds to perform. Your existing classes can easily be converted to background jobs or you can create new classes specifically to do work. Or, you can do both. Resque is heavily inspired by DelayedJob (which rocks) and is comprised of three parts: * A Ruby library for creating, querying, and processing jobs * A Rake task for starting a worker which processes jobs * A Sinatra app for monitoring queues, jobs, and workers.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/starling '''Starling'''] Starling is a light-weight, persistent queue server that speaks the memcached protocol. It was originally developed for Twitter's backend.&lt;br /&gt;
&lt;br /&gt;
'''Scheduling'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/resque-scheduler '''resque-scheduler'''] Light weight job scheduling on top of Resque. Adds methods enqueue_at/enqueue_in to schedule jobs in the future. Also supports queueing jobs on a fixed, cron-like schedule.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/clockwork '''Clockwork'''] A scheduler process to replace cron, using a more flexible Ruby syntax running as a single long-running process. Inspired by rufus-scheduler and resque-scheduler.&lt;br /&gt;
&lt;br /&gt;
'''Code Metrics'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/simpleCov '''SimpleCov'''] Code coverage for Ruby 1.9 with a powerful configuration library and automatic merging of coverage across test suites.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/flay '''Flay'''] Flay analyzes code for structural similarities. Differences in literal values, variable, class, method names, whitespace, programming style, braces vs do/end, etc are all ignored. Making this totally rad.&lt;br /&gt;
&lt;br /&gt;
'''E-Mail Sending'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/actionmailer '''Action Mailer'''] Email on Rails. Compose, deliver, receive, and test emails using the familiar controller/view pattern. First-class support for multipart email and attachments.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/capistrano_mailer '''capistrano_mailer'''] Capistrano Deployment Email Notification. Keep the whole team informed of each release!&lt;br /&gt;
&lt;br /&gt;
 '''TESTING'''&lt;br /&gt;
&lt;br /&gt;
'''Browser testing'''&lt;br /&gt;
&lt;br /&gt;
* [http://rubygems.org/gems/capybara '''Capybara'''] Capybara is an integration testing tool for rack based web applications. It simulates how a user would interact with a website.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/webrat '''Webrat'''] Webrat lets you quickly write expressive and robust acceptance tests for a Ruby web application. It supports simulating a browser inside a Ruby process to avoid the performance hit and browser dependency of Selenium or Watir, but the same API can also be used to drive real Selenium tests when necessary (eg. for testing AJAX interactions). Most Ruby web frameworks and testing frameworks are supported.&lt;br /&gt;
&lt;br /&gt;
'''Random Data Generation'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/faker '''Faker'''] Faker, a port of Data::Faker from Perl, is used to easily generate fake data: names, addresses, phone numbers, etc.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/forgery '''Forgery'''] Easy and customizable generation of forged data. Can be used as a gem or a rails plugin. Includes rails generators for creating your own forgeries.&lt;br /&gt;
&lt;br /&gt;
'''Unit Test Frameworks'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/test-unit '''test-unit'''] Ruby 1.9.x bundles minitest not Test::Unit. Test::Unit bundled in Ruby 1.8.x had not been improved but unbundled Test::Unit (test-unit) is improved actively.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/wrong '''Wrong'''] Wrong provides a general assert method that takes a predicate block. Assertion failure messages are rich in detail. The Wrong idea is to replace all those countless assert_this, assert_that library methods which only exist to give a more useful failure message than &amp;quot;assertion failed&amp;quot;. Wrong replaces all of them in one fell swoop, since if you can write it in Ruby, Wrong can make a sensible failure message out of it. Also provided are several helper methods, like rescuing, capturing, and d.&lt;br /&gt;
&lt;br /&gt;
* Other useful Ruby Gems here. [https://www.ruby-toolbox.com/projects/testrocket '''testrocket'''], [https://www.ruby-toolbox.com/projects/kintama '''kintama'''], [https://www.ruby-toolbox.com/projects/lemon '''Lemon'''], [https://www.ruby-toolbox.com/projects/shindo '''Shindo'''].&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
[http://guides.rubygems.org/make-your-own-gem/ Gudie to create your own Ruby Gem]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://rubygems.rubyforge.org/rubygems-update/UPGRADING_rdoc.html How to Upgrade/Downgrade Ruby Gems]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://rubylearning.com/blog/ Collection of Ruby Study Notes]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://net.tutsplus.com/articles/web-roundups/24-extremely-useful-ruby-gems-for-web-development/ 24 extremely useful Ruby Gems for web development]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://railscasts.com/episodes/245-new-gem-with-bundler Screencasts to create a Ruby Gem]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://guides.rubygems.org/publishing/ How to publish your Ruby Gem?]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== References==&lt;br /&gt;
1. [http://guides.rubygems.org/rubygems-basics/#installing_gems Ruby Gems guide]&amp;lt;br&amp;gt;&lt;br /&gt;
2. [http://timelessrepo.com/making-ruby-gems Making Ruby Gems]&amp;lt;br&amp;gt;&lt;br /&gt;
3. [https://www.ruby-toolbox.com Ruby Tool Box]&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Npari</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch1_1w24_nv&amp;diff=79125</id>
		<title>CSC/ECE 517 Fall 2013/ch1 1w24 nv</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch1_1w24_nv&amp;diff=79125"/>
		<updated>2013-09-25T02:42:18Z</updated>

		<summary type="html">&lt;p&gt;Npari: /* See Also */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Ruby Gem is a package manager for Ruby programming language. It allows users to easily download, install and use software packages on their system. The functionality of a Ruby application can be modified or extended with the help of Gems. In the version 1.9 of Ruby, Ruby Gems has been made a part of the standard library.&lt;br /&gt;
&lt;br /&gt;
== '''A Tour of Ruby Gems''' ==&lt;br /&gt;
== Definition of a Ruby Gem ==&lt;br /&gt;
In simple terms, a Ruby Gem is a package containing files that can be installed in a system and can help expand the functionality of a Ruby application. Ruby gems are very powerful. Ruby programmers create and publish Ruby Gems as open source in [https://github.com/ github]. It is very east to install, upgrade and delete Gems in a system.&lt;br /&gt;
&lt;br /&gt;
== Structure of Ruby Gem ==&lt;br /&gt;
Every Gem has a set of files and the following standard structure &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ tree -d newgem&lt;br /&gt;
|-- lib/&lt;br /&gt;
|   |-- newgem.rb&lt;br /&gt;
|   `-- newgem/&lt;br /&gt;
|       |-- base.rb&lt;br /&gt;
|       `-- version.rb&lt;br /&gt;
|-- test/&lt;br /&gt;
|-- bin/&lt;br /&gt;
|-- Rakefile&lt;br /&gt;
`-- newgem.gemspec&amp;lt;/pre&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
The ''lib'' folder has the code of the ruby gem. It has ''newgem.rb'' file and a folder named ''newgem''. This folder has two files which are ''base.rb'' and ''version.rb''. The version number is recorded in ''version.rb'' and can be changed when the gem is updated. The ''bin'' directory has any binaries that is a part of the gem file and should be distributed with the gem. A gem usually has a [http://rake.rubyforge.org/doc/rakefile_rdoc.html Rakefile]. The rake program uses this to generate code and automate tests in addition to performing other tasks. The Gem specification file ''newgem.gemspec'' contains details specific to the gem. The file has details such as the gem name,the files that are in it, the gems it depends on for  performing testing, the gems it depends on for actually running and other details.&lt;br /&gt;
&lt;br /&gt;
== Listing existing Gems ==&lt;br /&gt;
To list the existing gems in a system ''list'' keyword can be used in the command line.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem list&lt;br /&gt;
&lt;br /&gt;
*** LOCAL GEMS ***&lt;br /&gt;
&lt;br /&gt;
actionmailer (3.2.3)&lt;br /&gt;
actionpack (3.2.3)&lt;br /&gt;
activemodel (3.2.3)&lt;br /&gt;
activerecord (3.2.3)&lt;br /&gt;
activeresource (3.2.3)&lt;br /&gt;
activesupport (3.2.3)&lt;br /&gt;
arel (3.0.2)&lt;br /&gt;
bigdecimal (1.1.0)&lt;br /&gt;
builder (3.0.4)&lt;br /&gt;
bundler (1.3.5)&lt;br /&gt;
capybara (2.1.0)&lt;br /&gt;
coffee-rails (3.2.2)&lt;br /&gt;
coffee-script (2.2.0)&lt;br /&gt;
coffee-script-source (1.6.3)&lt;br /&gt;
erubis (2.7.0)&lt;br /&gt;
execjs (2.0.1)&lt;br /&gt;
hike (1.2.3)&lt;br /&gt;
i18n (0.6.5)&lt;br /&gt;
io-console (0.3)&lt;br /&gt;
journey (1.0.4)&lt;br /&gt;
jquery-rails (3.0.4)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installing a new Gem ==&lt;br /&gt;
The ''install'' keyword can be used in command line to install gems. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem install capybara&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Uninstalling a Gem ==&lt;br /&gt;
The ''uninstall'' keyword can be used in command line to uninstall any existing gem in the system.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem uninstall capybara&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you uninstall a dependency of a gem RubyGems will ask you for confirmation.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem uninstall rbtree&lt;br /&gt;
&lt;br /&gt;
You have requested to uninstall the gem:&lt;br /&gt;
	rbtree-0.4.1&lt;br /&gt;
&lt;br /&gt;
drip-0.0.2 depends on rbtree (&amp;gt;= 0)&lt;br /&gt;
If you remove this gem, these dependencies will not be met.&lt;br /&gt;
Continue with Uninstall? [yN]  n&lt;br /&gt;
ERROR:  While executing gem ... (Gem::DependencyRemovalException)&lt;br /&gt;
    Uninstallation aborted due to dependent gem(s)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Update all existing Gems == &lt;br /&gt;
The ''update'' keyword can be used in command line to update all existing gems in the system.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem update &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Creating a new Gem == &lt;br /&gt;
It is also possible to [http://guides.rubygems.org/make-your-own-gem/ create our own ruby gem] to be used later to extend our Ruby applications. Bundler is a tool that can be used to [https://github.com/radar/guides/blob/master/gem-development.md to create a ruby gem].&lt;br /&gt;
&lt;br /&gt;
== Some important Gems that are useful in RAILS environment ==&lt;br /&gt;
&lt;br /&gt;
There are many gems which provide easy of functionality that can be included in the rails development environment. [http://bundler.io/ Bundler]is a useful gem that enables a developer to quickly add and manage gems in a few lines of code.&lt;br /&gt;
&lt;br /&gt;
We can classify the Gems based on the usage in different layers Model, View and Controller.&lt;br /&gt;
&lt;br /&gt;
 '''MODEL layer'''&lt;br /&gt;
&lt;br /&gt;
'''Active Record Plugins''' &lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/activerecord-oracle_enhanced-adapter '''oracle-enhanced'''] Oracle &amp;quot;enhanced&amp;quot; ActiveRecord adapter contains useful additional methods for working with new and legacy Oracle databases. This adapter is superset of original ActiveRecord Oracle adapter.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/activerecord-jdbc-adapter '''activerecord-jdbc-adapter'''] This adapter is build on JDBC API used for connecting to the database. AR-JDBC is a database adapter for Rails' ActiveRecord component. It allows to connect to virtually any JDBC-compliant database with your JRuby on Rails application.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/activerecord-nulldb-adapter '''nulldb'''] .This helps in Database simulation and testing. A database backend that translates database interactions into no-ops. We can test our model business logic with wanting to experiment with real database.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/oracle-enhanced-enhanced '''oracle-enhanced-enhanced'''] It includes several enhancements and customization to the standard ActiveRecord Oracle Enhapnced adapter, which is still required. Any customization to this adapter's behavior or additional Oracle-specific utilities should be added here.&lt;br /&gt;
&lt;br /&gt;
* Other useful Ruby Gems here. [https://www.ruby-toolbox.com/projects/activerecord-sqlserver-adapter '''activerecord-sqlserver-adapter'''], [https://www.ruby-toolbox.com/projects/activerecord-jdbcmysql-adapter '''activerecord-jdbcmysql-adapter'''], [https://www.ruby-toolbox.com/projects/activerecord-jdbcpostgresql-adapter '''activerecord-jdbcpostgresql-adapter'''], [https://www.ruby-toolbox.com/projects/activerecord-jdbcderby-adapter '''activerecord-jdbcderby-adapter'''],.&lt;br /&gt;
&lt;br /&gt;
'''Active Record Index Assistants'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/foreigner '''foreigner'''] Adds helpers to migrations and dumps foreign keys to schema.rb.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/rails_indexes '''rails_indexes'''] A rake task to track down missing database indexes. does not assume that all foreign keys end with the convention of _id.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/schema_plus '''schema_plus'''] SchemaPlus is an ActiveRecord extension that provides enhanced capabilities for schema definition and querying, including: enhanced and more DRY index capabilities, support and automation for foreign key constraints, and support for views.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/automatic_foreign_key '''automatic_foreign_key'''] Automatic Foreign Key automatically generates foreign-key constraints when creating tables or adding columns. It uses SQL-92 syntax and as such should be compatible with most databases that support foreign-key constraints.&lt;br /&gt;
&lt;br /&gt;
* Other useful Ruby Gems here. [https://www.ruby-toolbox.com/projects/ambitious_query_indexer '''ambitious_query_indexer'''], [https://www.ruby-toolbox.com/projects/lol_dba '''lol_dba'''], [https://www.ruby-toolbox.com/projects/immigrant '''immigrant'''], [https://www.ruby-toolbox.com/projects/redhillonrails_core '''redhillonrails_core'''].&lt;br /&gt;
&lt;br /&gt;
'''Rails DB Bootstrapping'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/seed-fu '''seed-fu'''] Seed Fu is an attempt to once and for all solve the problem of inserting and maintaining seed data in a database. It uses a variety of techniques gathered from various places around the web and combines them to create what is hopefully the most robust seed data system around.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/populator '''populator'''] Mass populate an Active Record database.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/seedbank '''seedbank'''] Extends Rails seeds to split out complex seeds into multiple files and lets each environment have it's own seeds.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/has_alter_ego '''Has alter ego'''] has_alter_ego makes it possible to keep seed and live data transparently in parallel. In contrast to other seed data approaches has_alter_ego synchronizes the seed definitions with your database objects automagically unless you've overridden it in the database.&lt;br /&gt;
&lt;br /&gt;
* Other useful Ruby Gems here. [https://www.ruby-toolbox.com/projects/bootstrapper '''Bootstrapper'''], [https://www.ruby-toolbox.com/projects/db-populate '''Db-populate'''], [https://www.ruby-toolbox.com/projects/seed_dumper '''seed_dumper'''], [https://www.ruby-toolbox.com/projects/dibber '''dibber'''].&lt;br /&gt;
&lt;br /&gt;
'''Rails Search'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/Sunspot '''Sunspot'''] Sunspot is a library providing a powerful, all-ruby API for the Solr search engine. Sunspot manages the configuration of persistent Ruby classes for search and indexing and exposes Solr's most powerful features through a collection of DSLs. Complex search operations can be performed without hand-writing any boolean queries or building Solr parameters by hand.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/sunspot_rails '''sunspot_rails'''] Sunspot::Rails is an extension to the Sunspot library for Solr search. Sunspot::Rails adds integration between Sunspot and ActiveRecord, including defining search and indexing related methods on ActiveRecord models themselves, running a Sunspot-compatible Solr instance for development and test environments, and automatically commit Solr index changes at the end of each Rails request.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/tire '''Tire'''] Tire is a Ruby client for the Elasticsearch search engine/database. It provides Ruby-like API for fluent communication with the Elasticsearch server and blends with ActiveModel class for convenient usage in Rails applications. It allows to delete and create indices, define mapping for them, supports the bulk API, and presents an easy-to-use DSL for constructing your queries. It has full ActiveRecord/ActiveModel compatibility, allowing you to index your models (incrementally upon saving, or in bulk), searching and paginating the results.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/thinking-sphinx '''thinking-sphinx'''] An intelligent layer for ActiveRecord (via Rails and Sinatra) for the Sphinx full-text search tool.&lt;br /&gt;
&lt;br /&gt;
* Other useful Ruby Gems here. [https://www.ruby-toolbox.com/projects/pg_search '''pg_search'''], [https://www.ruby-toolbox.com/projects/redis-search '''redis-search'''], [https://www.ruby-toolbox.com/projects/ferret '''Ferret'''], [https://www.ruby-toolbox.com/projects/searchlight '''searchlight'''].&lt;br /&gt;
&lt;br /&gt;
'''Data Persistence'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/mongoid '''Mongoid'''] Mongoid is an ODM (Object Document Mapper) Framework for MongoDB, written in Ruby.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/mongomatic '''Mongomatic'''] Mongomatic is a modular Ruby object mapper for Mongo.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/dynamoid '''dynamoid'''] Dynamoid is an ORM for Amazon's DynamoDB that supports offline development, associations, querying, and everything else you'd expect from an ActiveRecord-style replacement.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/squeel '''squeel'''] Squeel unlocks the power of Arel in your Rails 3 application with a handy block-based syntax. You can write subqueries, access named functions provided by your RDBMS, and more, all without writing SQL strings.&lt;br /&gt;
&lt;br /&gt;
 '''VIEW layer'''&lt;br /&gt;
&lt;br /&gt;
'''CSS'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/sass '''Sass'''] Sass makes CSS fun again. Sass is an extension of CSS3, adding nested rules, variables, mixins, selector inheritance, and more. It's translated to well-formatted, standard CSS using the command line tool or a web-framework plugin.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/bourbon '''bourbon'''] The purpose of Bourbon Vanilla Sass Mixins is to provide a comprehensive framework of sass mixins that are designed to be as vanilla as possible. Meaning they should not deter from the original CSS syntax. The mixins contain vendor specific prefixes for all CSS3 properties for support amongst modern browsers. The prefixes also ensure graceful degradation for older browsers that support only CSS3 prefixed properties.&lt;br /&gt;
&lt;br /&gt;
* Other useful Ruby Gems here. [https://www.ruby-toolbox.com/projects/less '''Less'''], [https://www.ruby-toolbox.com/projects/sass-rails '''sass-rails'''], [https://www.ruby-toolbox.com/projects/stylus '''stylus'''], [https://www.ruby-toolbox.com/projects/patterns '''patterns''']&lt;br /&gt;
&lt;br /&gt;
'''Graphing'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/google_visualr '''google_visualr'''] This Ruby gem, GoogleVisualr, is a wrapper around the Google Chart Tools that allows anyone to create the same beautiful charts with just Ruby; you don't have to write any JavaScript at all.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/highcharts-rails '''highcharts-rails'''] Gem that includes Highcharts (Interactive JavaScript charts for your web projects), in the Rails Asset Pipeline introduced in Rails 3.1.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/seer '''Seer'''] Gem that includes Highcharts (Interactive JavaScript charts for your web projects), in the Rails Asset Pipeline introduced in Rails 3.1.Seer is a lightweight, semantically rich wrapper for the Google Visualization API. It allows you to easily create a visualization of data in a variety of formats, including area charts, bar charts, column charts, gauges, line charts, and pie charts.&lt;br /&gt;
&lt;br /&gt;
'''HTML &amp;amp; Markup'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/formula '''formula'''] Formula is a Rails form generator that generates simple clean markup. The project aims to let users create semantically beautiful forms without introducing too much syntax. The goal is to make integrating advanced layout systems as simple as possible.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/formtastic '''Formtastic'''] A Rails form builder plugin/gem with semantically rich and accessible markup.&lt;br /&gt;
&lt;br /&gt;
'''JavaScript'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/jasmine '''Jasmine'''] Test your JavaScript without any framework dependencies, in any environment, and with a nice descriptive syntax.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/konacha '''konacha'''] Konacha is a Rails engine that allows you to test your JavaScript with the mocha test framework and chai assertion library. It is similar to Jasmine and Evergreen, but does not attempt to be framework agnostic. By sticking with Rails, Konacha can take full advantage of features such as the asset pipeline and engines&lt;br /&gt;
&lt;br /&gt;
'''Rails In-Place Editing'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/best_in_place '''BestInPlace'''] BestInPlace is a jQuery script and a Rails 3 helper that provide the method best_in_place to display any object field easily editable for the user by just clicking on it. It supports input data, text data, boolean data and custom dropdown data. It works with RESTful controllers.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/best_in_place_mongoid '''best_in_place_mongoid'''] BestInPlaceMongoid is a fork of BestInPlace jQuery script and a Rails 3 helper that provide the method best_in_place to display any object field easily editable for the user by just clicking on it. It supports input data, text data, boolean data and custom dropdown data. It works with RESTful controllers.&lt;br /&gt;
&lt;br /&gt;
 '''CONTROLLER layer'''&lt;br /&gt;
&lt;br /&gt;
'''Background Jobs'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/resque '''Resque'''] Resque is a Redis-backed Ruby library for creating background jobs, placing those jobs on multiple queues, and processing them later. Background jobs can be any Ruby class or module that responds to perform. Your existing classes can easily be converted to background jobs or you can create new classes specifically to do work. Or, you can do both. Resque is heavily inspired by DelayedJob (which rocks) and is comprised of three parts: * A Ruby library for creating, querying, and processing jobs * A Rake task for starting a worker which processes jobs * A Sinatra app for monitoring queues, jobs, and workers.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/starling '''Starling'''] Starling is a light-weight, persistent queue server that speaks the memcached protocol. It was originally developed for Twitter's backend.&lt;br /&gt;
&lt;br /&gt;
'''Scheduling'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/resque-scheduler '''resque-scheduler'''] Light weight job scheduling on top of Resque. Adds methods enqueue_at/enqueue_in to schedule jobs in the future. Also supports queueing jobs on a fixed, cron-like schedule.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/clockwork '''Clockwork'''] A scheduler process to replace cron, using a more flexible Ruby syntax running as a single long-running process. Inspired by rufus-scheduler and resque-scheduler.&lt;br /&gt;
&lt;br /&gt;
'''Code Metrics'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/simpleCov '''SimpleCov'''] Code coverage for Ruby 1.9 with a powerful configuration library and automatic merging of coverage across test suites.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/flay '''Flay'''] Flay analyzes code for structural similarities. Differences in literal values, variable, class, method names, whitespace, programming style, braces vs do/end, etc are all ignored. Making this totally rad.&lt;br /&gt;
&lt;br /&gt;
'''E-Mail Sending'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/actionmailer '''Action Mailer'''] Email on Rails. Compose, deliver, receive, and test emails using the familiar controller/view pattern. First-class support for multipart email and attachments.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/capistrano_mailer '''capistrano_mailer'''] Capistrano Deployment Email Notification. Keep the whole team informed of each release!&lt;br /&gt;
&lt;br /&gt;
 '''TESTING'''&lt;br /&gt;
&lt;br /&gt;
'''Browser testing'''&lt;br /&gt;
&lt;br /&gt;
* [http://rubygems.org/gems/capybara '''Capybara'''] Capybara is an integration testing tool for rack based web applications. It simulates how a user would interact with a website.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/webrat '''Webrat'''] Webrat lets you quickly write expressive and robust acceptance tests for a Ruby web application. It supports simulating a browser inside a Ruby process to avoid the performance hit and browser dependency of Selenium or Watir, but the same API can also be used to drive real Selenium tests when necessary (eg. for testing AJAX interactions). Most Ruby web frameworks and testing frameworks are supported.&lt;br /&gt;
&lt;br /&gt;
'''Random Data Generation'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/faker '''Faker'''] Faker, a port of Data::Faker from Perl, is used to easily generate fake data: names, addresses, phone numbers, etc.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/forgery '''Forgery'''] Easy and customizable generation of forged data. Can be used as a gem or a rails plugin. Includes rails generators for creating your own forgeries.&lt;br /&gt;
&lt;br /&gt;
'''Unit Test Frameworks'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/test-unit '''test-unit'''] Ruby 1.9.x bundles minitest not Test::Unit. Test::Unit bundled in Ruby 1.8.x had not been improved but unbundled Test::Unit (test-unit) is improved actively.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/wrong '''Wrong'''] Wrong provides a general assert method that takes a predicate block. Assertion failure messages are rich in detail. The Wrong idea is to replace all those countless assert_this, assert_that library methods which only exist to give a more useful failure message than &amp;quot;assertion failed&amp;quot;. Wrong replaces all of them in one fell swoop, since if you can write it in Ruby, Wrong can make a sensible failure message out of it. Also provided are several helper methods, like rescuing, capturing, and d.&lt;br /&gt;
&lt;br /&gt;
* Other useful Ruby Gems here. [https://www.ruby-toolbox.com/projects/testrocket '''testrocket'''], [https://www.ruby-toolbox.com/projects/kintama '''kintama'''], [https://www.ruby-toolbox.com/projects/lemon '''Lemon'''], [https://www.ruby-toolbox.com/projects/shindo '''Shindo'''].&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
[http://guides.rubygems.org/make-your-own-gem/ Gudie to create your own Ruby Gem]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://rubygems.rubyforge.org/rubygems-update/UPGRADING_rdoc.html How to Upgrade/Downgrade Ruby Gems]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://rubylearning.com/blog/ Collection of Ruby Study Notes]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://net.tutsplus.com/articles/web-roundups/24-extremely-useful-ruby-gems-for-web-development/ 24 extremely useful Ruby Gems for web development]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://railscasts.com/episodes/245-new-gem-with-bundler Screencasts to create a Ruby Gem]&lt;br /&gt;
&lt;br /&gt;
== References==&lt;br /&gt;
1. [http://guides.rubygems.org/rubygems-basics/#installing_gems Ruby Gems guide]&amp;lt;br&amp;gt;&lt;br /&gt;
2. [http://timelessrepo.com/making-ruby-gems Making Ruby Gems]&amp;lt;br&amp;gt;&lt;br /&gt;
3. [https://www.ruby-toolbox.com Ruby Tool Box]&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Npari</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch1_1w24_nv&amp;diff=79124</id>
		<title>CSC/ECE 517 Fall 2013/ch1 1w24 nv</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch1_1w24_nv&amp;diff=79124"/>
		<updated>2013-09-25T02:41:45Z</updated>

		<summary type="html">&lt;p&gt;Npari: /* See Also */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Ruby Gem is a package manager for Ruby programming language. It allows users to easily download, install and use software packages on their system. The functionality of a Ruby application can be modified or extended with the help of Gems. In the version 1.9 of Ruby, Ruby Gems has been made a part of the standard library.&lt;br /&gt;
&lt;br /&gt;
== '''A Tour of Ruby Gems''' ==&lt;br /&gt;
== Definition of a Ruby Gem ==&lt;br /&gt;
In simple terms, a Ruby Gem is a package containing files that can be installed in a system and can help expand the functionality of a Ruby application. Ruby gems are very powerful. Ruby programmers create and publish Ruby Gems as open source in [https://github.com/ github]. It is very east to install, upgrade and delete Gems in a system.&lt;br /&gt;
&lt;br /&gt;
== Structure of Ruby Gem ==&lt;br /&gt;
Every Gem has a set of files and the following standard structure &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ tree -d newgem&lt;br /&gt;
|-- lib/&lt;br /&gt;
|   |-- newgem.rb&lt;br /&gt;
|   `-- newgem/&lt;br /&gt;
|       |-- base.rb&lt;br /&gt;
|       `-- version.rb&lt;br /&gt;
|-- test/&lt;br /&gt;
|-- bin/&lt;br /&gt;
|-- Rakefile&lt;br /&gt;
`-- newgem.gemspec&amp;lt;/pre&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
The ''lib'' folder has the code of the ruby gem. It has ''newgem.rb'' file and a folder named ''newgem''. This folder has two files which are ''base.rb'' and ''version.rb''. The version number is recorded in ''version.rb'' and can be changed when the gem is updated. The ''bin'' directory has any binaries that is a part of the gem file and should be distributed with the gem. A gem usually has a [http://rake.rubyforge.org/doc/rakefile_rdoc.html Rakefile]. The rake program uses this to generate code and automate tests in addition to performing other tasks. The Gem specification file ''newgem.gemspec'' contains details specific to the gem. The file has details such as the gem name,the files that are in it, the gems it depends on for  performing testing, the gems it depends on for actually running and other details.&lt;br /&gt;
&lt;br /&gt;
== Listing existing Gems ==&lt;br /&gt;
To list the existing gems in a system ''list'' keyword can be used in the command line.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem list&lt;br /&gt;
&lt;br /&gt;
*** LOCAL GEMS ***&lt;br /&gt;
&lt;br /&gt;
actionmailer (3.2.3)&lt;br /&gt;
actionpack (3.2.3)&lt;br /&gt;
activemodel (3.2.3)&lt;br /&gt;
activerecord (3.2.3)&lt;br /&gt;
activeresource (3.2.3)&lt;br /&gt;
activesupport (3.2.3)&lt;br /&gt;
arel (3.0.2)&lt;br /&gt;
bigdecimal (1.1.0)&lt;br /&gt;
builder (3.0.4)&lt;br /&gt;
bundler (1.3.5)&lt;br /&gt;
capybara (2.1.0)&lt;br /&gt;
coffee-rails (3.2.2)&lt;br /&gt;
coffee-script (2.2.0)&lt;br /&gt;
coffee-script-source (1.6.3)&lt;br /&gt;
erubis (2.7.0)&lt;br /&gt;
execjs (2.0.1)&lt;br /&gt;
hike (1.2.3)&lt;br /&gt;
i18n (0.6.5)&lt;br /&gt;
io-console (0.3)&lt;br /&gt;
journey (1.0.4)&lt;br /&gt;
jquery-rails (3.0.4)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installing a new Gem ==&lt;br /&gt;
The ''install'' keyword can be used in command line to install gems. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem install capybara&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Uninstalling a Gem ==&lt;br /&gt;
The ''uninstall'' keyword can be used in command line to uninstall any existing gem in the system.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem uninstall capybara&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you uninstall a dependency of a gem RubyGems will ask you for confirmation.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem uninstall rbtree&lt;br /&gt;
&lt;br /&gt;
You have requested to uninstall the gem:&lt;br /&gt;
	rbtree-0.4.1&lt;br /&gt;
&lt;br /&gt;
drip-0.0.2 depends on rbtree (&amp;gt;= 0)&lt;br /&gt;
If you remove this gem, these dependencies will not be met.&lt;br /&gt;
Continue with Uninstall? [yN]  n&lt;br /&gt;
ERROR:  While executing gem ... (Gem::DependencyRemovalException)&lt;br /&gt;
    Uninstallation aborted due to dependent gem(s)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Update all existing Gems == &lt;br /&gt;
The ''update'' keyword can be used in command line to update all existing gems in the system.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem update &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Creating a new Gem == &lt;br /&gt;
It is also possible to [http://guides.rubygems.org/make-your-own-gem/ create our own ruby gem] to be used later to extend our Ruby applications. Bundler is a tool that can be used to [https://github.com/radar/guides/blob/master/gem-development.md to create a ruby gem].&lt;br /&gt;
&lt;br /&gt;
== Some important Gems that are useful in RAILS environment ==&lt;br /&gt;
&lt;br /&gt;
There are many gems which provide easy of functionality that can be included in the rails development environment. [http://bundler.io/ Bundler]is a useful gem that enables a developer to quickly add and manage gems in a few lines of code.&lt;br /&gt;
&lt;br /&gt;
We can classify the Gems based on the usage in different layers Model, View and Controller.&lt;br /&gt;
&lt;br /&gt;
 '''MODEL layer'''&lt;br /&gt;
&lt;br /&gt;
'''Active Record Plugins''' &lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/activerecord-oracle_enhanced-adapter '''oracle-enhanced'''] Oracle &amp;quot;enhanced&amp;quot; ActiveRecord adapter contains useful additional methods for working with new and legacy Oracle databases. This adapter is superset of original ActiveRecord Oracle adapter.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/activerecord-jdbc-adapter '''activerecord-jdbc-adapter'''] This adapter is build on JDBC API used for connecting to the database. AR-JDBC is a database adapter for Rails' ActiveRecord component. It allows to connect to virtually any JDBC-compliant database with your JRuby on Rails application.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/activerecord-nulldb-adapter '''nulldb'''] .This helps in Database simulation and testing. A database backend that translates database interactions into no-ops. We can test our model business logic with wanting to experiment with real database.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/oracle-enhanced-enhanced '''oracle-enhanced-enhanced'''] It includes several enhancements and customization to the standard ActiveRecord Oracle Enhapnced adapter, which is still required. Any customization to this adapter's behavior or additional Oracle-specific utilities should be added here.&lt;br /&gt;
&lt;br /&gt;
* Other useful Ruby Gems here. [https://www.ruby-toolbox.com/projects/activerecord-sqlserver-adapter '''activerecord-sqlserver-adapter'''], [https://www.ruby-toolbox.com/projects/activerecord-jdbcmysql-adapter '''activerecord-jdbcmysql-adapter'''], [https://www.ruby-toolbox.com/projects/activerecord-jdbcpostgresql-adapter '''activerecord-jdbcpostgresql-adapter'''], [https://www.ruby-toolbox.com/projects/activerecord-jdbcderby-adapter '''activerecord-jdbcderby-adapter'''],.&lt;br /&gt;
&lt;br /&gt;
'''Active Record Index Assistants'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/foreigner '''foreigner'''] Adds helpers to migrations and dumps foreign keys to schema.rb.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/rails_indexes '''rails_indexes'''] A rake task to track down missing database indexes. does not assume that all foreign keys end with the convention of _id.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/schema_plus '''schema_plus'''] SchemaPlus is an ActiveRecord extension that provides enhanced capabilities for schema definition and querying, including: enhanced and more DRY index capabilities, support and automation for foreign key constraints, and support for views.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/automatic_foreign_key '''automatic_foreign_key'''] Automatic Foreign Key automatically generates foreign-key constraints when creating tables or adding columns. It uses SQL-92 syntax and as such should be compatible with most databases that support foreign-key constraints.&lt;br /&gt;
&lt;br /&gt;
* Other useful Ruby Gems here. [https://www.ruby-toolbox.com/projects/ambitious_query_indexer '''ambitious_query_indexer'''], [https://www.ruby-toolbox.com/projects/lol_dba '''lol_dba'''], [https://www.ruby-toolbox.com/projects/immigrant '''immigrant'''], [https://www.ruby-toolbox.com/projects/redhillonrails_core '''redhillonrails_core'''].&lt;br /&gt;
&lt;br /&gt;
'''Rails DB Bootstrapping'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/seed-fu '''seed-fu'''] Seed Fu is an attempt to once and for all solve the problem of inserting and maintaining seed data in a database. It uses a variety of techniques gathered from various places around the web and combines them to create what is hopefully the most robust seed data system around.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/populator '''populator'''] Mass populate an Active Record database.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/seedbank '''seedbank'''] Extends Rails seeds to split out complex seeds into multiple files and lets each environment have it's own seeds.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/has_alter_ego '''Has alter ego'''] has_alter_ego makes it possible to keep seed and live data transparently in parallel. In contrast to other seed data approaches has_alter_ego synchronizes the seed definitions with your database objects automagically unless you've overridden it in the database.&lt;br /&gt;
&lt;br /&gt;
* Other useful Ruby Gems here. [https://www.ruby-toolbox.com/projects/bootstrapper '''Bootstrapper'''], [https://www.ruby-toolbox.com/projects/db-populate '''Db-populate'''], [https://www.ruby-toolbox.com/projects/seed_dumper '''seed_dumper'''], [https://www.ruby-toolbox.com/projects/dibber '''dibber'''].&lt;br /&gt;
&lt;br /&gt;
'''Rails Search'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/Sunspot '''Sunspot'''] Sunspot is a library providing a powerful, all-ruby API for the Solr search engine. Sunspot manages the configuration of persistent Ruby classes for search and indexing and exposes Solr's most powerful features through a collection of DSLs. Complex search operations can be performed without hand-writing any boolean queries or building Solr parameters by hand.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/sunspot_rails '''sunspot_rails'''] Sunspot::Rails is an extension to the Sunspot library for Solr search. Sunspot::Rails adds integration between Sunspot and ActiveRecord, including defining search and indexing related methods on ActiveRecord models themselves, running a Sunspot-compatible Solr instance for development and test environments, and automatically commit Solr index changes at the end of each Rails request.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/tire '''Tire'''] Tire is a Ruby client for the Elasticsearch search engine/database. It provides Ruby-like API for fluent communication with the Elasticsearch server and blends with ActiveModel class for convenient usage in Rails applications. It allows to delete and create indices, define mapping for them, supports the bulk API, and presents an easy-to-use DSL for constructing your queries. It has full ActiveRecord/ActiveModel compatibility, allowing you to index your models (incrementally upon saving, or in bulk), searching and paginating the results.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/thinking-sphinx '''thinking-sphinx'''] An intelligent layer for ActiveRecord (via Rails and Sinatra) for the Sphinx full-text search tool.&lt;br /&gt;
&lt;br /&gt;
* Other useful Ruby Gems here. [https://www.ruby-toolbox.com/projects/pg_search '''pg_search'''], [https://www.ruby-toolbox.com/projects/redis-search '''redis-search'''], [https://www.ruby-toolbox.com/projects/ferret '''Ferret'''], [https://www.ruby-toolbox.com/projects/searchlight '''searchlight'''].&lt;br /&gt;
&lt;br /&gt;
'''Data Persistence'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/mongoid '''Mongoid'''] Mongoid is an ODM (Object Document Mapper) Framework for MongoDB, written in Ruby.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/mongomatic '''Mongomatic'''] Mongomatic is a modular Ruby object mapper for Mongo.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/dynamoid '''dynamoid'''] Dynamoid is an ORM for Amazon's DynamoDB that supports offline development, associations, querying, and everything else you'd expect from an ActiveRecord-style replacement.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/squeel '''squeel'''] Squeel unlocks the power of Arel in your Rails 3 application with a handy block-based syntax. You can write subqueries, access named functions provided by your RDBMS, and more, all without writing SQL strings.&lt;br /&gt;
&lt;br /&gt;
 '''VIEW layer'''&lt;br /&gt;
&lt;br /&gt;
'''CSS'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/sass '''Sass'''] Sass makes CSS fun again. Sass is an extension of CSS3, adding nested rules, variables, mixins, selector inheritance, and more. It's translated to well-formatted, standard CSS using the command line tool or a web-framework plugin.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/bourbon '''bourbon'''] The purpose of Bourbon Vanilla Sass Mixins is to provide a comprehensive framework of sass mixins that are designed to be as vanilla as possible. Meaning they should not deter from the original CSS syntax. The mixins contain vendor specific prefixes for all CSS3 properties for support amongst modern browsers. The prefixes also ensure graceful degradation for older browsers that support only CSS3 prefixed properties.&lt;br /&gt;
&lt;br /&gt;
* Other useful Ruby Gems here. [https://www.ruby-toolbox.com/projects/less '''Less'''], [https://www.ruby-toolbox.com/projects/sass-rails '''sass-rails'''], [https://www.ruby-toolbox.com/projects/stylus '''stylus'''], [https://www.ruby-toolbox.com/projects/patterns '''patterns''']&lt;br /&gt;
&lt;br /&gt;
'''Graphing'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/google_visualr '''google_visualr'''] This Ruby gem, GoogleVisualr, is a wrapper around the Google Chart Tools that allows anyone to create the same beautiful charts with just Ruby; you don't have to write any JavaScript at all.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/highcharts-rails '''highcharts-rails'''] Gem that includes Highcharts (Interactive JavaScript charts for your web projects), in the Rails Asset Pipeline introduced in Rails 3.1.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/seer '''Seer'''] Gem that includes Highcharts (Interactive JavaScript charts for your web projects), in the Rails Asset Pipeline introduced in Rails 3.1.Seer is a lightweight, semantically rich wrapper for the Google Visualization API. It allows you to easily create a visualization of data in a variety of formats, including area charts, bar charts, column charts, gauges, line charts, and pie charts.&lt;br /&gt;
&lt;br /&gt;
'''HTML &amp;amp; Markup'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/formula '''formula'''] Formula is a Rails form generator that generates simple clean markup. The project aims to let users create semantically beautiful forms without introducing too much syntax. The goal is to make integrating advanced layout systems as simple as possible.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/formtastic '''Formtastic'''] A Rails form builder plugin/gem with semantically rich and accessible markup.&lt;br /&gt;
&lt;br /&gt;
'''JavaScript'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/jasmine '''Jasmine'''] Test your JavaScript without any framework dependencies, in any environment, and with a nice descriptive syntax.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/konacha '''konacha'''] Konacha is a Rails engine that allows you to test your JavaScript with the mocha test framework and chai assertion library. It is similar to Jasmine and Evergreen, but does not attempt to be framework agnostic. By sticking with Rails, Konacha can take full advantage of features such as the asset pipeline and engines&lt;br /&gt;
&lt;br /&gt;
'''Rails In-Place Editing'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/best_in_place '''BestInPlace'''] BestInPlace is a jQuery script and a Rails 3 helper that provide the method best_in_place to display any object field easily editable for the user by just clicking on it. It supports input data, text data, boolean data and custom dropdown data. It works with RESTful controllers.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/best_in_place_mongoid '''best_in_place_mongoid'''] BestInPlaceMongoid is a fork of BestInPlace jQuery script and a Rails 3 helper that provide the method best_in_place to display any object field easily editable for the user by just clicking on it. It supports input data, text data, boolean data and custom dropdown data. It works with RESTful controllers.&lt;br /&gt;
&lt;br /&gt;
 '''CONTROLLER layer'''&lt;br /&gt;
&lt;br /&gt;
'''Background Jobs'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/resque '''Resque'''] Resque is a Redis-backed Ruby library for creating background jobs, placing those jobs on multiple queues, and processing them later. Background jobs can be any Ruby class or module that responds to perform. Your existing classes can easily be converted to background jobs or you can create new classes specifically to do work. Or, you can do both. Resque is heavily inspired by DelayedJob (which rocks) and is comprised of three parts: * A Ruby library for creating, querying, and processing jobs * A Rake task for starting a worker which processes jobs * A Sinatra app for monitoring queues, jobs, and workers.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/starling '''Starling'''] Starling is a light-weight, persistent queue server that speaks the memcached protocol. It was originally developed for Twitter's backend.&lt;br /&gt;
&lt;br /&gt;
'''Scheduling'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/resque-scheduler '''resque-scheduler'''] Light weight job scheduling on top of Resque. Adds methods enqueue_at/enqueue_in to schedule jobs in the future. Also supports queueing jobs on a fixed, cron-like schedule.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/clockwork '''Clockwork'''] A scheduler process to replace cron, using a more flexible Ruby syntax running as a single long-running process. Inspired by rufus-scheduler and resque-scheduler.&lt;br /&gt;
&lt;br /&gt;
'''Code Metrics'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/simpleCov '''SimpleCov'''] Code coverage for Ruby 1.9 with a powerful configuration library and automatic merging of coverage across test suites.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/flay '''Flay'''] Flay analyzes code for structural similarities. Differences in literal values, variable, class, method names, whitespace, programming style, braces vs do/end, etc are all ignored. Making this totally rad.&lt;br /&gt;
&lt;br /&gt;
'''E-Mail Sending'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/actionmailer '''Action Mailer'''] Email on Rails. Compose, deliver, receive, and test emails using the familiar controller/view pattern. First-class support for multipart email and attachments.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/capistrano_mailer '''capistrano_mailer'''] Capistrano Deployment Email Notification. Keep the whole team informed of each release!&lt;br /&gt;
&lt;br /&gt;
 '''TESTING'''&lt;br /&gt;
&lt;br /&gt;
'''Browser testing'''&lt;br /&gt;
&lt;br /&gt;
* [http://rubygems.org/gems/capybara '''Capybara'''] Capybara is an integration testing tool for rack based web applications. It simulates how a user would interact with a website.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/webrat '''Webrat'''] Webrat lets you quickly write expressive and robust acceptance tests for a Ruby web application. It supports simulating a browser inside a Ruby process to avoid the performance hit and browser dependency of Selenium or Watir, but the same API can also be used to drive real Selenium tests when necessary (eg. for testing AJAX interactions). Most Ruby web frameworks and testing frameworks are supported.&lt;br /&gt;
&lt;br /&gt;
'''Random Data Generation'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/faker '''Faker'''] Faker, a port of Data::Faker from Perl, is used to easily generate fake data: names, addresses, phone numbers, etc.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/forgery '''Forgery'''] Easy and customizable generation of forged data. Can be used as a gem or a rails plugin. Includes rails generators for creating your own forgeries.&lt;br /&gt;
&lt;br /&gt;
'''Unit Test Frameworks'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/test-unit '''test-unit'''] Ruby 1.9.x bundles minitest not Test::Unit. Test::Unit bundled in Ruby 1.8.x had not been improved but unbundled Test::Unit (test-unit) is improved actively.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/wrong '''Wrong'''] Wrong provides a general assert method that takes a predicate block. Assertion failure messages are rich in detail. The Wrong idea is to replace all those countless assert_this, assert_that library methods which only exist to give a more useful failure message than &amp;quot;assertion failed&amp;quot;. Wrong replaces all of them in one fell swoop, since if you can write it in Ruby, Wrong can make a sensible failure message out of it. Also provided are several helper methods, like rescuing, capturing, and d.&lt;br /&gt;
&lt;br /&gt;
* Other useful Ruby Gems here. [https://www.ruby-toolbox.com/projects/testrocket '''testrocket'''], [https://www.ruby-toolbox.com/projects/kintama '''kintama'''], [https://www.ruby-toolbox.com/projects/lemon '''Lemon'''], [https://www.ruby-toolbox.com/projects/shindo '''Shindo'''].&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
[http://guides.rubygems.org/make-your-own-gem/ Creating your own Ruby Gem]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://rubygems.rubyforge.org/rubygems-update/UPGRADING_rdoc.html How to Upgrade/Downgrade Ruby Gems]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://rubylearning.com/blog/ Collection of Ruby Study Notes]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://net.tutsplus.com/articles/web-roundups/24-extremely-useful-ruby-gems-for-web-development/ 24 extremely useful Ruby Gems for web development]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://railscasts.com/episodes/245-new-gem-with-bundler Screencasts to create a Ruby Gem]&lt;br /&gt;
&lt;br /&gt;
== References==&lt;br /&gt;
1. [http://guides.rubygems.org/rubygems-basics/#installing_gems Ruby Gems guide]&amp;lt;br&amp;gt;&lt;br /&gt;
2. [http://timelessrepo.com/making-ruby-gems Making Ruby Gems]&amp;lt;br&amp;gt;&lt;br /&gt;
3. [https://www.ruby-toolbox.com Ruby Tool Box]&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Npari</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch1_1w24_nv&amp;diff=79123</id>
		<title>CSC/ECE 517 Fall 2013/ch1 1w24 nv</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch1_1w24_nv&amp;diff=79123"/>
		<updated>2013-09-25T02:40:42Z</updated>

		<summary type="html">&lt;p&gt;Npari: /* Creating a new Gem */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Ruby Gem is a package manager for Ruby programming language. It allows users to easily download, install and use software packages on their system. The functionality of a Ruby application can be modified or extended with the help of Gems. In the version 1.9 of Ruby, Ruby Gems has been made a part of the standard library.&lt;br /&gt;
&lt;br /&gt;
== '''A Tour of Ruby Gems''' ==&lt;br /&gt;
== Definition of a Ruby Gem ==&lt;br /&gt;
In simple terms, a Ruby Gem is a package containing files that can be installed in a system and can help expand the functionality of a Ruby application. Ruby gems are very powerful. Ruby programmers create and publish Ruby Gems as open source in [https://github.com/ github]. It is very east to install, upgrade and delete Gems in a system.&lt;br /&gt;
&lt;br /&gt;
== Structure of Ruby Gem ==&lt;br /&gt;
Every Gem has a set of files and the following standard structure &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ tree -d newgem&lt;br /&gt;
|-- lib/&lt;br /&gt;
|   |-- newgem.rb&lt;br /&gt;
|   `-- newgem/&lt;br /&gt;
|       |-- base.rb&lt;br /&gt;
|       `-- version.rb&lt;br /&gt;
|-- test/&lt;br /&gt;
|-- bin/&lt;br /&gt;
|-- Rakefile&lt;br /&gt;
`-- newgem.gemspec&amp;lt;/pre&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
The ''lib'' folder has the code of the ruby gem. It has ''newgem.rb'' file and a folder named ''newgem''. This folder has two files which are ''base.rb'' and ''version.rb''. The version number is recorded in ''version.rb'' and can be changed when the gem is updated. The ''bin'' directory has any binaries that is a part of the gem file and should be distributed with the gem. A gem usually has a [http://rake.rubyforge.org/doc/rakefile_rdoc.html Rakefile]. The rake program uses this to generate code and automate tests in addition to performing other tasks. The Gem specification file ''newgem.gemspec'' contains details specific to the gem. The file has details such as the gem name,the files that are in it, the gems it depends on for  performing testing, the gems it depends on for actually running and other details.&lt;br /&gt;
&lt;br /&gt;
== Listing existing Gems ==&lt;br /&gt;
To list the existing gems in a system ''list'' keyword can be used in the command line.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem list&lt;br /&gt;
&lt;br /&gt;
*** LOCAL GEMS ***&lt;br /&gt;
&lt;br /&gt;
actionmailer (3.2.3)&lt;br /&gt;
actionpack (3.2.3)&lt;br /&gt;
activemodel (3.2.3)&lt;br /&gt;
activerecord (3.2.3)&lt;br /&gt;
activeresource (3.2.3)&lt;br /&gt;
activesupport (3.2.3)&lt;br /&gt;
arel (3.0.2)&lt;br /&gt;
bigdecimal (1.1.0)&lt;br /&gt;
builder (3.0.4)&lt;br /&gt;
bundler (1.3.5)&lt;br /&gt;
capybara (2.1.0)&lt;br /&gt;
coffee-rails (3.2.2)&lt;br /&gt;
coffee-script (2.2.0)&lt;br /&gt;
coffee-script-source (1.6.3)&lt;br /&gt;
erubis (2.7.0)&lt;br /&gt;
execjs (2.0.1)&lt;br /&gt;
hike (1.2.3)&lt;br /&gt;
i18n (0.6.5)&lt;br /&gt;
io-console (0.3)&lt;br /&gt;
journey (1.0.4)&lt;br /&gt;
jquery-rails (3.0.4)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installing a new Gem ==&lt;br /&gt;
The ''install'' keyword can be used in command line to install gems. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem install capybara&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Uninstalling a Gem ==&lt;br /&gt;
The ''uninstall'' keyword can be used in command line to uninstall any existing gem in the system.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem uninstall capybara&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you uninstall a dependency of a gem RubyGems will ask you for confirmation.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem uninstall rbtree&lt;br /&gt;
&lt;br /&gt;
You have requested to uninstall the gem:&lt;br /&gt;
	rbtree-0.4.1&lt;br /&gt;
&lt;br /&gt;
drip-0.0.2 depends on rbtree (&amp;gt;= 0)&lt;br /&gt;
If you remove this gem, these dependencies will not be met.&lt;br /&gt;
Continue with Uninstall? [yN]  n&lt;br /&gt;
ERROR:  While executing gem ... (Gem::DependencyRemovalException)&lt;br /&gt;
    Uninstallation aborted due to dependent gem(s)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Update all existing Gems == &lt;br /&gt;
The ''update'' keyword can be used in command line to update all existing gems in the system.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem update &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Creating a new Gem == &lt;br /&gt;
It is also possible to [http://guides.rubygems.org/make-your-own-gem/ create our own ruby gem] to be used later to extend our Ruby applications. Bundler is a tool that can be used to [https://github.com/radar/guides/blob/master/gem-development.md to create a ruby gem].&lt;br /&gt;
&lt;br /&gt;
== Some important Gems that are useful in RAILS environment ==&lt;br /&gt;
&lt;br /&gt;
There are many gems which provide easy of functionality that can be included in the rails development environment. [http://bundler.io/ Bundler]is a useful gem that enables a developer to quickly add and manage gems in a few lines of code.&lt;br /&gt;
&lt;br /&gt;
We can classify the Gems based on the usage in different layers Model, View and Controller.&lt;br /&gt;
&lt;br /&gt;
 '''MODEL layer'''&lt;br /&gt;
&lt;br /&gt;
'''Active Record Plugins''' &lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/activerecord-oracle_enhanced-adapter '''oracle-enhanced'''] Oracle &amp;quot;enhanced&amp;quot; ActiveRecord adapter contains useful additional methods for working with new and legacy Oracle databases. This adapter is superset of original ActiveRecord Oracle adapter.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/activerecord-jdbc-adapter '''activerecord-jdbc-adapter'''] This adapter is build on JDBC API used for connecting to the database. AR-JDBC is a database adapter for Rails' ActiveRecord component. It allows to connect to virtually any JDBC-compliant database with your JRuby on Rails application.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/activerecord-nulldb-adapter '''nulldb'''] .This helps in Database simulation and testing. A database backend that translates database interactions into no-ops. We can test our model business logic with wanting to experiment with real database.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/oracle-enhanced-enhanced '''oracle-enhanced-enhanced'''] It includes several enhancements and customization to the standard ActiveRecord Oracle Enhapnced adapter, which is still required. Any customization to this adapter's behavior or additional Oracle-specific utilities should be added here.&lt;br /&gt;
&lt;br /&gt;
* Other useful Ruby Gems here. [https://www.ruby-toolbox.com/projects/activerecord-sqlserver-adapter '''activerecord-sqlserver-adapter'''], [https://www.ruby-toolbox.com/projects/activerecord-jdbcmysql-adapter '''activerecord-jdbcmysql-adapter'''], [https://www.ruby-toolbox.com/projects/activerecord-jdbcpostgresql-adapter '''activerecord-jdbcpostgresql-adapter'''], [https://www.ruby-toolbox.com/projects/activerecord-jdbcderby-adapter '''activerecord-jdbcderby-adapter'''],.&lt;br /&gt;
&lt;br /&gt;
'''Active Record Index Assistants'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/foreigner '''foreigner'''] Adds helpers to migrations and dumps foreign keys to schema.rb.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/rails_indexes '''rails_indexes'''] A rake task to track down missing database indexes. does not assume that all foreign keys end with the convention of _id.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/schema_plus '''schema_plus'''] SchemaPlus is an ActiveRecord extension that provides enhanced capabilities for schema definition and querying, including: enhanced and more DRY index capabilities, support and automation for foreign key constraints, and support for views.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/automatic_foreign_key '''automatic_foreign_key'''] Automatic Foreign Key automatically generates foreign-key constraints when creating tables or adding columns. It uses SQL-92 syntax and as such should be compatible with most databases that support foreign-key constraints.&lt;br /&gt;
&lt;br /&gt;
* Other useful Ruby Gems here. [https://www.ruby-toolbox.com/projects/ambitious_query_indexer '''ambitious_query_indexer'''], [https://www.ruby-toolbox.com/projects/lol_dba '''lol_dba'''], [https://www.ruby-toolbox.com/projects/immigrant '''immigrant'''], [https://www.ruby-toolbox.com/projects/redhillonrails_core '''redhillonrails_core'''].&lt;br /&gt;
&lt;br /&gt;
'''Rails DB Bootstrapping'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/seed-fu '''seed-fu'''] Seed Fu is an attempt to once and for all solve the problem of inserting and maintaining seed data in a database. It uses a variety of techniques gathered from various places around the web and combines them to create what is hopefully the most robust seed data system around.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/populator '''populator'''] Mass populate an Active Record database.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/seedbank '''seedbank'''] Extends Rails seeds to split out complex seeds into multiple files and lets each environment have it's own seeds.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/has_alter_ego '''Has alter ego'''] has_alter_ego makes it possible to keep seed and live data transparently in parallel. In contrast to other seed data approaches has_alter_ego synchronizes the seed definitions with your database objects automagically unless you've overridden it in the database.&lt;br /&gt;
&lt;br /&gt;
* Other useful Ruby Gems here. [https://www.ruby-toolbox.com/projects/bootstrapper '''Bootstrapper'''], [https://www.ruby-toolbox.com/projects/db-populate '''Db-populate'''], [https://www.ruby-toolbox.com/projects/seed_dumper '''seed_dumper'''], [https://www.ruby-toolbox.com/projects/dibber '''dibber'''].&lt;br /&gt;
&lt;br /&gt;
'''Rails Search'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/Sunspot '''Sunspot'''] Sunspot is a library providing a powerful, all-ruby API for the Solr search engine. Sunspot manages the configuration of persistent Ruby classes for search and indexing and exposes Solr's most powerful features through a collection of DSLs. Complex search operations can be performed without hand-writing any boolean queries or building Solr parameters by hand.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/sunspot_rails '''sunspot_rails'''] Sunspot::Rails is an extension to the Sunspot library for Solr search. Sunspot::Rails adds integration between Sunspot and ActiveRecord, including defining search and indexing related methods on ActiveRecord models themselves, running a Sunspot-compatible Solr instance for development and test environments, and automatically commit Solr index changes at the end of each Rails request.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/tire '''Tire'''] Tire is a Ruby client for the Elasticsearch search engine/database. It provides Ruby-like API for fluent communication with the Elasticsearch server and blends with ActiveModel class for convenient usage in Rails applications. It allows to delete and create indices, define mapping for them, supports the bulk API, and presents an easy-to-use DSL for constructing your queries. It has full ActiveRecord/ActiveModel compatibility, allowing you to index your models (incrementally upon saving, or in bulk), searching and paginating the results.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/thinking-sphinx '''thinking-sphinx'''] An intelligent layer for ActiveRecord (via Rails and Sinatra) for the Sphinx full-text search tool.&lt;br /&gt;
&lt;br /&gt;
* Other useful Ruby Gems here. [https://www.ruby-toolbox.com/projects/pg_search '''pg_search'''], [https://www.ruby-toolbox.com/projects/redis-search '''redis-search'''], [https://www.ruby-toolbox.com/projects/ferret '''Ferret'''], [https://www.ruby-toolbox.com/projects/searchlight '''searchlight'''].&lt;br /&gt;
&lt;br /&gt;
'''Data Persistence'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/mongoid '''Mongoid'''] Mongoid is an ODM (Object Document Mapper) Framework for MongoDB, written in Ruby.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/mongomatic '''Mongomatic'''] Mongomatic is a modular Ruby object mapper for Mongo.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/dynamoid '''dynamoid'''] Dynamoid is an ORM for Amazon's DynamoDB that supports offline development, associations, querying, and everything else you'd expect from an ActiveRecord-style replacement.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/squeel '''squeel'''] Squeel unlocks the power of Arel in your Rails 3 application with a handy block-based syntax. You can write subqueries, access named functions provided by your RDBMS, and more, all without writing SQL strings.&lt;br /&gt;
&lt;br /&gt;
 '''VIEW layer'''&lt;br /&gt;
&lt;br /&gt;
'''CSS'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/sass '''Sass'''] Sass makes CSS fun again. Sass is an extension of CSS3, adding nested rules, variables, mixins, selector inheritance, and more. It's translated to well-formatted, standard CSS using the command line tool or a web-framework plugin.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/bourbon '''bourbon'''] The purpose of Bourbon Vanilla Sass Mixins is to provide a comprehensive framework of sass mixins that are designed to be as vanilla as possible. Meaning they should not deter from the original CSS syntax. The mixins contain vendor specific prefixes for all CSS3 properties for support amongst modern browsers. The prefixes also ensure graceful degradation for older browsers that support only CSS3 prefixed properties.&lt;br /&gt;
&lt;br /&gt;
* Other useful Ruby Gems here. [https://www.ruby-toolbox.com/projects/less '''Less'''], [https://www.ruby-toolbox.com/projects/sass-rails '''sass-rails'''], [https://www.ruby-toolbox.com/projects/stylus '''stylus'''], [https://www.ruby-toolbox.com/projects/patterns '''patterns''']&lt;br /&gt;
&lt;br /&gt;
'''Graphing'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/google_visualr '''google_visualr'''] This Ruby gem, GoogleVisualr, is a wrapper around the Google Chart Tools that allows anyone to create the same beautiful charts with just Ruby; you don't have to write any JavaScript at all.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/highcharts-rails '''highcharts-rails'''] Gem that includes Highcharts (Interactive JavaScript charts for your web projects), in the Rails Asset Pipeline introduced in Rails 3.1.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/seer '''Seer'''] Gem that includes Highcharts (Interactive JavaScript charts for your web projects), in the Rails Asset Pipeline introduced in Rails 3.1.Seer is a lightweight, semantically rich wrapper for the Google Visualization API. It allows you to easily create a visualization of data in a variety of formats, including area charts, bar charts, column charts, gauges, line charts, and pie charts.&lt;br /&gt;
&lt;br /&gt;
'''HTML &amp;amp; Markup'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/formula '''formula'''] Formula is a Rails form generator that generates simple clean markup. The project aims to let users create semantically beautiful forms without introducing too much syntax. The goal is to make integrating advanced layout systems as simple as possible.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/formtastic '''Formtastic'''] A Rails form builder plugin/gem with semantically rich and accessible markup.&lt;br /&gt;
&lt;br /&gt;
'''JavaScript'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/jasmine '''Jasmine'''] Test your JavaScript without any framework dependencies, in any environment, and with a nice descriptive syntax.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/konacha '''konacha'''] Konacha is a Rails engine that allows you to test your JavaScript with the mocha test framework and chai assertion library. It is similar to Jasmine and Evergreen, but does not attempt to be framework agnostic. By sticking with Rails, Konacha can take full advantage of features such as the asset pipeline and engines&lt;br /&gt;
&lt;br /&gt;
'''Rails In-Place Editing'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/best_in_place '''BestInPlace'''] BestInPlace is a jQuery script and a Rails 3 helper that provide the method best_in_place to display any object field easily editable for the user by just clicking on it. It supports input data, text data, boolean data and custom dropdown data. It works with RESTful controllers.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/best_in_place_mongoid '''best_in_place_mongoid'''] BestInPlaceMongoid is a fork of BestInPlace jQuery script and a Rails 3 helper that provide the method best_in_place to display any object field easily editable for the user by just clicking on it. It supports input data, text data, boolean data and custom dropdown data. It works with RESTful controllers.&lt;br /&gt;
&lt;br /&gt;
 '''CONTROLLER layer'''&lt;br /&gt;
&lt;br /&gt;
'''Background Jobs'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/resque '''Resque'''] Resque is a Redis-backed Ruby library for creating background jobs, placing those jobs on multiple queues, and processing them later. Background jobs can be any Ruby class or module that responds to perform. Your existing classes can easily be converted to background jobs or you can create new classes specifically to do work. Or, you can do both. Resque is heavily inspired by DelayedJob (which rocks) and is comprised of three parts: * A Ruby library for creating, querying, and processing jobs * A Rake task for starting a worker which processes jobs * A Sinatra app for monitoring queues, jobs, and workers.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/starling '''Starling'''] Starling is a light-weight, persistent queue server that speaks the memcached protocol. It was originally developed for Twitter's backend.&lt;br /&gt;
&lt;br /&gt;
'''Scheduling'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/resque-scheduler '''resque-scheduler'''] Light weight job scheduling on top of Resque. Adds methods enqueue_at/enqueue_in to schedule jobs in the future. Also supports queueing jobs on a fixed, cron-like schedule.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/clockwork '''Clockwork'''] A scheduler process to replace cron, using a more flexible Ruby syntax running as a single long-running process. Inspired by rufus-scheduler and resque-scheduler.&lt;br /&gt;
&lt;br /&gt;
'''Code Metrics'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/simpleCov '''SimpleCov'''] Code coverage for Ruby 1.9 with a powerful configuration library and automatic merging of coverage across test suites.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/flay '''Flay'''] Flay analyzes code for structural similarities. Differences in literal values, variable, class, method names, whitespace, programming style, braces vs do/end, etc are all ignored. Making this totally rad.&lt;br /&gt;
&lt;br /&gt;
'''E-Mail Sending'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/actionmailer '''Action Mailer'''] Email on Rails. Compose, deliver, receive, and test emails using the familiar controller/view pattern. First-class support for multipart email and attachments.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/capistrano_mailer '''capistrano_mailer'''] Capistrano Deployment Email Notification. Keep the whole team informed of each release!&lt;br /&gt;
&lt;br /&gt;
 '''TESTING'''&lt;br /&gt;
&lt;br /&gt;
'''Browser testing'''&lt;br /&gt;
&lt;br /&gt;
* [http://rubygems.org/gems/capybara '''Capybara'''] Capybara is an integration testing tool for rack based web applications. It simulates how a user would interact with a website.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/webrat '''Webrat'''] Webrat lets you quickly write expressive and robust acceptance tests for a Ruby web application. It supports simulating a browser inside a Ruby process to avoid the performance hit and browser dependency of Selenium or Watir, but the same API can also be used to drive real Selenium tests when necessary (eg. for testing AJAX interactions). Most Ruby web frameworks and testing frameworks are supported.&lt;br /&gt;
&lt;br /&gt;
'''Random Data Generation'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/faker '''Faker'''] Faker, a port of Data::Faker from Perl, is used to easily generate fake data: names, addresses, phone numbers, etc.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/forgery '''Forgery'''] Easy and customizable generation of forged data. Can be used as a gem or a rails plugin. Includes rails generators for creating your own forgeries.&lt;br /&gt;
&lt;br /&gt;
'''Unit Test Frameworks'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/test-unit '''test-unit'''] Ruby 1.9.x bundles minitest not Test::Unit. Test::Unit bundled in Ruby 1.8.x had not been improved but unbundled Test::Unit (test-unit) is improved actively.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/wrong '''Wrong'''] Wrong provides a general assert method that takes a predicate block. Assertion failure messages are rich in detail. The Wrong idea is to replace all those countless assert_this, assert_that library methods which only exist to give a more useful failure message than &amp;quot;assertion failed&amp;quot;. Wrong replaces all of them in one fell swoop, since if you can write it in Ruby, Wrong can make a sensible failure message out of it. Also provided are several helper methods, like rescuing, capturing, and d.&lt;br /&gt;
&lt;br /&gt;
* Other useful Ruby Gems here. [https://www.ruby-toolbox.com/projects/testrocket '''testrocket'''], [https://www.ruby-toolbox.com/projects/kintama '''kintama'''], [https://www.ruby-toolbox.com/projects/lemon '''Lemon'''], [https://www.ruby-toolbox.com/projects/shindo '''Shindo'''].&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
[http://guides.rubygems.org/make-your-own-gem/ Creating your own Ruby Gem]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://rubygems.rubyforge.org/rubygems-update/UPGRADING_rdoc.html How to Upgrade/Downgrade Ruby Gems]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://rubylearning.com/blog/ Collection of Ruby Study Notes]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://net.tutsplus.com/articles/web-roundups/24-extremely-useful-ruby-gems-for-web-development/ 24 extremely useful Ruby Gems for web development]&lt;br /&gt;
&lt;br /&gt;
== References==&lt;br /&gt;
1. [http://guides.rubygems.org/rubygems-basics/#installing_gems Ruby Gems guide]&amp;lt;br&amp;gt;&lt;br /&gt;
2. [http://timelessrepo.com/making-ruby-gems Making Ruby Gems]&amp;lt;br&amp;gt;&lt;br /&gt;
3. [https://www.ruby-toolbox.com Ruby Tool Box]&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Npari</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch1_1w24_nv&amp;diff=79122</id>
		<title>CSC/ECE 517 Fall 2013/ch1 1w24 nv</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch1_1w24_nv&amp;diff=79122"/>
		<updated>2013-09-25T02:36:50Z</updated>

		<summary type="html">&lt;p&gt;Npari: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Ruby Gem is a package manager for Ruby programming language. It allows users to easily download, install and use software packages on their system. The functionality of a Ruby application can be modified or extended with the help of Gems. In the version 1.9 of Ruby, Ruby Gems has been made a part of the standard library.&lt;br /&gt;
&lt;br /&gt;
== '''A Tour of Ruby Gems''' ==&lt;br /&gt;
== Definition of a Ruby Gem ==&lt;br /&gt;
In simple terms, a Ruby Gem is a package containing files that can be installed in a system and can help expand the functionality of a Ruby application. Ruby gems are very powerful. Ruby programmers create and publish Ruby Gems as open source in [https://github.com/ github]. It is very east to install, upgrade and delete Gems in a system.&lt;br /&gt;
&lt;br /&gt;
== Structure of Ruby Gem ==&lt;br /&gt;
Every Gem has a set of files and the following standard structure &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ tree -d newgem&lt;br /&gt;
|-- lib/&lt;br /&gt;
|   |-- newgem.rb&lt;br /&gt;
|   `-- newgem/&lt;br /&gt;
|       |-- base.rb&lt;br /&gt;
|       `-- version.rb&lt;br /&gt;
|-- test/&lt;br /&gt;
|-- bin/&lt;br /&gt;
|-- Rakefile&lt;br /&gt;
`-- newgem.gemspec&amp;lt;/pre&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
The ''lib'' folder has the code of the ruby gem. It has ''newgem.rb'' file and a folder named ''newgem''. This folder has two files which are ''base.rb'' and ''version.rb''. The version number is recorded in ''version.rb'' and can be changed when the gem is updated. The ''bin'' directory has any binaries that is a part of the gem file and should be distributed with the gem. A gem usually has a [http://rake.rubyforge.org/doc/rakefile_rdoc.html Rakefile]. The rake program uses this to generate code and automate tests in addition to performing other tasks. The Gem specification file ''newgem.gemspec'' contains details specific to the gem. The file has details such as the gem name,the files that are in it, the gems it depends on for  performing testing, the gems it depends on for actually running and other details.&lt;br /&gt;
&lt;br /&gt;
== Listing existing Gems ==&lt;br /&gt;
To list the existing gems in a system ''list'' keyword can be used in the command line.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem list&lt;br /&gt;
&lt;br /&gt;
*** LOCAL GEMS ***&lt;br /&gt;
&lt;br /&gt;
actionmailer (3.2.3)&lt;br /&gt;
actionpack (3.2.3)&lt;br /&gt;
activemodel (3.2.3)&lt;br /&gt;
activerecord (3.2.3)&lt;br /&gt;
activeresource (3.2.3)&lt;br /&gt;
activesupport (3.2.3)&lt;br /&gt;
arel (3.0.2)&lt;br /&gt;
bigdecimal (1.1.0)&lt;br /&gt;
builder (3.0.4)&lt;br /&gt;
bundler (1.3.5)&lt;br /&gt;
capybara (2.1.0)&lt;br /&gt;
coffee-rails (3.2.2)&lt;br /&gt;
coffee-script (2.2.0)&lt;br /&gt;
coffee-script-source (1.6.3)&lt;br /&gt;
erubis (2.7.0)&lt;br /&gt;
execjs (2.0.1)&lt;br /&gt;
hike (1.2.3)&lt;br /&gt;
i18n (0.6.5)&lt;br /&gt;
io-console (0.3)&lt;br /&gt;
journey (1.0.4)&lt;br /&gt;
jquery-rails (3.0.4)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installing a new Gem ==&lt;br /&gt;
The ''install'' keyword can be used in command line to install gems. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem install capybara&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Uninstalling a Gem ==&lt;br /&gt;
The ''uninstall'' keyword can be used in command line to uninstall any existing gem in the system.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem uninstall capybara&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you uninstall a dependency of a gem RubyGems will ask you for confirmation.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem uninstall rbtree&lt;br /&gt;
&lt;br /&gt;
You have requested to uninstall the gem:&lt;br /&gt;
	rbtree-0.4.1&lt;br /&gt;
&lt;br /&gt;
drip-0.0.2 depends on rbtree (&amp;gt;= 0)&lt;br /&gt;
If you remove this gem, these dependencies will not be met.&lt;br /&gt;
Continue with Uninstall? [yN]  n&lt;br /&gt;
ERROR:  While executing gem ... (Gem::DependencyRemovalException)&lt;br /&gt;
    Uninstallation aborted due to dependent gem(s)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Update all existing Gems == &lt;br /&gt;
The ''update'' keyword can be used in command line to update all existing gems in the system.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem update &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Creating a new Gem == &lt;br /&gt;
It is also possible to [http://guides.rubygems.org/make-your-own-gem/ create our own ruby gem] to be used later to extend our Ruby applications. &lt;br /&gt;
&lt;br /&gt;
== Some important Gems that are useful in RAILS environment ==&lt;br /&gt;
&lt;br /&gt;
There are many gems which provide easy of functionality that can be included in the rails development environment. [http://bundler.io/ Bundler]is a useful gem that enables a developer to quickly add and manage gems in a few lines of code.&lt;br /&gt;
&lt;br /&gt;
We can classify the Gems based on the usage in different layers Model, View and Controller.&lt;br /&gt;
&lt;br /&gt;
 '''MODEL layer'''&lt;br /&gt;
&lt;br /&gt;
'''Active Record Plugins''' &lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/activerecord-oracle_enhanced-adapter '''oracle-enhanced'''] Oracle &amp;quot;enhanced&amp;quot; ActiveRecord adapter contains useful additional methods for working with new and legacy Oracle databases. This adapter is superset of original ActiveRecord Oracle adapter.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/activerecord-jdbc-adapter '''activerecord-jdbc-adapter'''] This adapter is build on JDBC API used for connecting to the database. AR-JDBC is a database adapter for Rails' ActiveRecord component. It allows to connect to virtually any JDBC-compliant database with your JRuby on Rails application.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/activerecord-nulldb-adapter '''nulldb'''] .This helps in Database simulation and testing. A database backend that translates database interactions into no-ops. We can test our model business logic with wanting to experiment with real database.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/oracle-enhanced-enhanced '''oracle-enhanced-enhanced'''] It includes several enhancements and customization to the standard ActiveRecord Oracle Enhapnced adapter, which is still required. Any customization to this adapter's behavior or additional Oracle-specific utilities should be added here.&lt;br /&gt;
&lt;br /&gt;
* Other useful Ruby Gems here. [https://www.ruby-toolbox.com/projects/activerecord-sqlserver-adapter '''activerecord-sqlserver-adapter'''], [https://www.ruby-toolbox.com/projects/activerecord-jdbcmysql-adapter '''activerecord-jdbcmysql-adapter'''], [https://www.ruby-toolbox.com/projects/activerecord-jdbcpostgresql-adapter '''activerecord-jdbcpostgresql-adapter'''], [https://www.ruby-toolbox.com/projects/activerecord-jdbcderby-adapter '''activerecord-jdbcderby-adapter'''],.&lt;br /&gt;
&lt;br /&gt;
'''Active Record Index Assistants'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/foreigner '''foreigner'''] Adds helpers to migrations and dumps foreign keys to schema.rb.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/rails_indexes '''rails_indexes'''] A rake task to track down missing database indexes. does not assume that all foreign keys end with the convention of _id.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/schema_plus '''schema_plus'''] SchemaPlus is an ActiveRecord extension that provides enhanced capabilities for schema definition and querying, including: enhanced and more DRY index capabilities, support and automation for foreign key constraints, and support for views.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/automatic_foreign_key '''automatic_foreign_key'''] Automatic Foreign Key automatically generates foreign-key constraints when creating tables or adding columns. It uses SQL-92 syntax and as such should be compatible with most databases that support foreign-key constraints.&lt;br /&gt;
&lt;br /&gt;
* Other useful Ruby Gems here. [https://www.ruby-toolbox.com/projects/ambitious_query_indexer '''ambitious_query_indexer'''], [https://www.ruby-toolbox.com/projects/lol_dba '''lol_dba'''], [https://www.ruby-toolbox.com/projects/immigrant '''immigrant'''], [https://www.ruby-toolbox.com/projects/redhillonrails_core '''redhillonrails_core'''].&lt;br /&gt;
&lt;br /&gt;
'''Rails DB Bootstrapping'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/seed-fu '''seed-fu'''] Seed Fu is an attempt to once and for all solve the problem of inserting and maintaining seed data in a database. It uses a variety of techniques gathered from various places around the web and combines them to create what is hopefully the most robust seed data system around.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/populator '''populator'''] Mass populate an Active Record database.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/seedbank '''seedbank'''] Extends Rails seeds to split out complex seeds into multiple files and lets each environment have it's own seeds.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/has_alter_ego '''Has alter ego'''] has_alter_ego makes it possible to keep seed and live data transparently in parallel. In contrast to other seed data approaches has_alter_ego synchronizes the seed definitions with your database objects automagically unless you've overridden it in the database.&lt;br /&gt;
&lt;br /&gt;
* Other useful Ruby Gems here. [https://www.ruby-toolbox.com/projects/bootstrapper '''Bootstrapper'''], [https://www.ruby-toolbox.com/projects/db-populate '''Db-populate'''], [https://www.ruby-toolbox.com/projects/seed_dumper '''seed_dumper'''], [https://www.ruby-toolbox.com/projects/dibber '''dibber'''].&lt;br /&gt;
&lt;br /&gt;
'''Rails Search'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/Sunspot '''Sunspot'''] Sunspot is a library providing a powerful, all-ruby API for the Solr search engine. Sunspot manages the configuration of persistent Ruby classes for search and indexing and exposes Solr's most powerful features through a collection of DSLs. Complex search operations can be performed without hand-writing any boolean queries or building Solr parameters by hand.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/sunspot_rails '''sunspot_rails'''] Sunspot::Rails is an extension to the Sunspot library for Solr search. Sunspot::Rails adds integration between Sunspot and ActiveRecord, including defining search and indexing related methods on ActiveRecord models themselves, running a Sunspot-compatible Solr instance for development and test environments, and automatically commit Solr index changes at the end of each Rails request.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/tire '''Tire'''] Tire is a Ruby client for the Elasticsearch search engine/database. It provides Ruby-like API for fluent communication with the Elasticsearch server and blends with ActiveModel class for convenient usage in Rails applications. It allows to delete and create indices, define mapping for them, supports the bulk API, and presents an easy-to-use DSL for constructing your queries. It has full ActiveRecord/ActiveModel compatibility, allowing you to index your models (incrementally upon saving, or in bulk), searching and paginating the results.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/thinking-sphinx '''thinking-sphinx'''] An intelligent layer for ActiveRecord (via Rails and Sinatra) for the Sphinx full-text search tool.&lt;br /&gt;
&lt;br /&gt;
* Other useful Ruby Gems here. [https://www.ruby-toolbox.com/projects/pg_search '''pg_search'''], [https://www.ruby-toolbox.com/projects/redis-search '''redis-search'''], [https://www.ruby-toolbox.com/projects/ferret '''Ferret'''], [https://www.ruby-toolbox.com/projects/searchlight '''searchlight'''].&lt;br /&gt;
&lt;br /&gt;
'''Data Persistence'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/mongoid '''Mongoid'''] Mongoid is an ODM (Object Document Mapper) Framework for MongoDB, written in Ruby.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/mongomatic '''Mongomatic'''] Mongomatic is a modular Ruby object mapper for Mongo.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/dynamoid '''dynamoid'''] Dynamoid is an ORM for Amazon's DynamoDB that supports offline development, associations, querying, and everything else you'd expect from an ActiveRecord-style replacement.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/squeel '''squeel'''] Squeel unlocks the power of Arel in your Rails 3 application with a handy block-based syntax. You can write subqueries, access named functions provided by your RDBMS, and more, all without writing SQL strings.&lt;br /&gt;
&lt;br /&gt;
 '''VIEW layer'''&lt;br /&gt;
&lt;br /&gt;
'''CSS'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/sass '''Sass'''] Sass makes CSS fun again. Sass is an extension of CSS3, adding nested rules, variables, mixins, selector inheritance, and more. It's translated to well-formatted, standard CSS using the command line tool or a web-framework plugin.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/bourbon '''bourbon'''] The purpose of Bourbon Vanilla Sass Mixins is to provide a comprehensive framework of sass mixins that are designed to be as vanilla as possible. Meaning they should not deter from the original CSS syntax. The mixins contain vendor specific prefixes for all CSS3 properties for support amongst modern browsers. The prefixes also ensure graceful degradation for older browsers that support only CSS3 prefixed properties.&lt;br /&gt;
&lt;br /&gt;
* Other useful Ruby Gems here. [https://www.ruby-toolbox.com/projects/less '''Less'''], [https://www.ruby-toolbox.com/projects/sass-rails '''sass-rails'''], [https://www.ruby-toolbox.com/projects/stylus '''stylus'''], [https://www.ruby-toolbox.com/projects/patterns '''patterns''']&lt;br /&gt;
&lt;br /&gt;
'''Graphing'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/google_visualr '''google_visualr'''] This Ruby gem, GoogleVisualr, is a wrapper around the Google Chart Tools that allows anyone to create the same beautiful charts with just Ruby; you don't have to write any JavaScript at all.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/highcharts-rails '''highcharts-rails'''] Gem that includes Highcharts (Interactive JavaScript charts for your web projects), in the Rails Asset Pipeline introduced in Rails 3.1.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/seer '''Seer'''] Gem that includes Highcharts (Interactive JavaScript charts for your web projects), in the Rails Asset Pipeline introduced in Rails 3.1.Seer is a lightweight, semantically rich wrapper for the Google Visualization API. It allows you to easily create a visualization of data in a variety of formats, including area charts, bar charts, column charts, gauges, line charts, and pie charts.&lt;br /&gt;
&lt;br /&gt;
'''HTML &amp;amp; Markup'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/formula '''formula'''] Formula is a Rails form generator that generates simple clean markup. The project aims to let users create semantically beautiful forms without introducing too much syntax. The goal is to make integrating advanced layout systems as simple as possible.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/formtastic '''Formtastic'''] A Rails form builder plugin/gem with semantically rich and accessible markup.&lt;br /&gt;
&lt;br /&gt;
'''JavaScript'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/jasmine '''Jasmine'''] Test your JavaScript without any framework dependencies, in any environment, and with a nice descriptive syntax.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/konacha '''konacha'''] Konacha is a Rails engine that allows you to test your JavaScript with the mocha test framework and chai assertion library. It is similar to Jasmine and Evergreen, but does not attempt to be framework agnostic. By sticking with Rails, Konacha can take full advantage of features such as the asset pipeline and engines&lt;br /&gt;
&lt;br /&gt;
'''Rails In-Place Editing'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/best_in_place '''BestInPlace'''] BestInPlace is a jQuery script and a Rails 3 helper that provide the method best_in_place to display any object field easily editable for the user by just clicking on it. It supports input data, text data, boolean data and custom dropdown data. It works with RESTful controllers.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/best_in_place_mongoid '''best_in_place_mongoid'''] BestInPlaceMongoid is a fork of BestInPlace jQuery script and a Rails 3 helper that provide the method best_in_place to display any object field easily editable for the user by just clicking on it. It supports input data, text data, boolean data and custom dropdown data. It works with RESTful controllers.&lt;br /&gt;
&lt;br /&gt;
 '''CONTROLLER layer'''&lt;br /&gt;
&lt;br /&gt;
'''Background Jobs'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/resque '''Resque'''] Resque is a Redis-backed Ruby library for creating background jobs, placing those jobs on multiple queues, and processing them later. Background jobs can be any Ruby class or module that responds to perform. Your existing classes can easily be converted to background jobs or you can create new classes specifically to do work. Or, you can do both. Resque is heavily inspired by DelayedJob (which rocks) and is comprised of three parts: * A Ruby library for creating, querying, and processing jobs * A Rake task for starting a worker which processes jobs * A Sinatra app for monitoring queues, jobs, and workers.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/starling '''Starling'''] Starling is a light-weight, persistent queue server that speaks the memcached protocol. It was originally developed for Twitter's backend.&lt;br /&gt;
&lt;br /&gt;
'''Scheduling'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/resque-scheduler '''resque-scheduler'''] Light weight job scheduling on top of Resque. Adds methods enqueue_at/enqueue_in to schedule jobs in the future. Also supports queueing jobs on a fixed, cron-like schedule.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/clockwork '''Clockwork'''] A scheduler process to replace cron, using a more flexible Ruby syntax running as a single long-running process. Inspired by rufus-scheduler and resque-scheduler.&lt;br /&gt;
&lt;br /&gt;
'''Code Metrics'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/simpleCov '''SimpleCov'''] Code coverage for Ruby 1.9 with a powerful configuration library and automatic merging of coverage across test suites.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/flay '''Flay'''] Flay analyzes code for structural similarities. Differences in literal values, variable, class, method names, whitespace, programming style, braces vs do/end, etc are all ignored. Making this totally rad.&lt;br /&gt;
&lt;br /&gt;
'''E-Mail Sending'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/actionmailer '''Action Mailer'''] Email on Rails. Compose, deliver, receive, and test emails using the familiar controller/view pattern. First-class support for multipart email and attachments.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/capistrano_mailer '''capistrano_mailer'''] Capistrano Deployment Email Notification. Keep the whole team informed of each release!&lt;br /&gt;
&lt;br /&gt;
 '''TESTING'''&lt;br /&gt;
&lt;br /&gt;
'''Browser testing'''&lt;br /&gt;
&lt;br /&gt;
* [http://rubygems.org/gems/capybara '''Capybara'''] Capybara is an integration testing tool for rack based web applications. It simulates how a user would interact with a website.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/webrat '''Webrat'''] Webrat lets you quickly write expressive and robust acceptance tests for a Ruby web application. It supports simulating a browser inside a Ruby process to avoid the performance hit and browser dependency of Selenium or Watir, but the same API can also be used to drive real Selenium tests when necessary (eg. for testing AJAX interactions). Most Ruby web frameworks and testing frameworks are supported.&lt;br /&gt;
&lt;br /&gt;
'''Random Data Generation'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/faker '''Faker'''] Faker, a port of Data::Faker from Perl, is used to easily generate fake data: names, addresses, phone numbers, etc.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/forgery '''Forgery'''] Easy and customizable generation of forged data. Can be used as a gem or a rails plugin. Includes rails generators for creating your own forgeries.&lt;br /&gt;
&lt;br /&gt;
'''Unit Test Frameworks'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/test-unit '''test-unit'''] Ruby 1.9.x bundles minitest not Test::Unit. Test::Unit bundled in Ruby 1.8.x had not been improved but unbundled Test::Unit (test-unit) is improved actively.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/wrong '''Wrong'''] Wrong provides a general assert method that takes a predicate block. Assertion failure messages are rich in detail. The Wrong idea is to replace all those countless assert_this, assert_that library methods which only exist to give a more useful failure message than &amp;quot;assertion failed&amp;quot;. Wrong replaces all of them in one fell swoop, since if you can write it in Ruby, Wrong can make a sensible failure message out of it. Also provided are several helper methods, like rescuing, capturing, and d.&lt;br /&gt;
&lt;br /&gt;
* Other useful Ruby Gems here. [https://www.ruby-toolbox.com/projects/testrocket '''testrocket'''], [https://www.ruby-toolbox.com/projects/kintama '''kintama'''], [https://www.ruby-toolbox.com/projects/lemon '''Lemon'''], [https://www.ruby-toolbox.com/projects/shindo '''Shindo'''].&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
[http://guides.rubygems.org/make-your-own-gem/ Creating your own Ruby Gem]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://rubygems.rubyforge.org/rubygems-update/UPGRADING_rdoc.html How to Upgrade/Downgrade Ruby Gems]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://rubylearning.com/blog/ Collection of Ruby Study Notes]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://net.tutsplus.com/articles/web-roundups/24-extremely-useful-ruby-gems-for-web-development/ 24 extremely useful Ruby Gems for web development]&lt;br /&gt;
&lt;br /&gt;
== References==&lt;br /&gt;
1. [http://guides.rubygems.org/rubygems-basics/#installing_gems Ruby Gems guide]&amp;lt;br&amp;gt;&lt;br /&gt;
2. [http://timelessrepo.com/making-ruby-gems Making Ruby Gems]&amp;lt;br&amp;gt;&lt;br /&gt;
3. [https://www.ruby-toolbox.com Ruby Tool Box]&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Npari</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch1_1w24_nv&amp;diff=79117</id>
		<title>CSC/ECE 517 Fall 2013/ch1 1w24 nv</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch1_1w24_nv&amp;diff=79117"/>
		<updated>2013-09-25T02:33:31Z</updated>

		<summary type="html">&lt;p&gt;Npari: /* Structure of Ruby Gem */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Ruby Gem is a package manager for Ruby programming language. It allows users to easily download, install and use software packages on their system. The functionality of a Ruby application can be modified or extended with the help of Gems. In the version 1.9 of Ruby, Ruby Gems has been made a part of the standard library.&lt;br /&gt;
&lt;br /&gt;
== '''A Tour of Ruby Gems''' ==&lt;br /&gt;
== Definition of a Ruby Gem ==&lt;br /&gt;
In simple terms, a Ruby Gem is a package containing files that can be installed in a system and can help expand the functionality of a Ruby application. Ruby gems are very powerful. Ruby programmers create and publish Ruby Gems as open source in [https://github.com/ github]. It is very east to install, upgrade and delete Gems in a system.&lt;br /&gt;
&lt;br /&gt;
== Structure of Ruby Gem ==&lt;br /&gt;
Every Gem has a set of files and the following standard structure &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ tree -d newgem&lt;br /&gt;
|-- lib/&lt;br /&gt;
|   |-- newgem.rb&lt;br /&gt;
|   `-- newgem/&lt;br /&gt;
|       |-- base.rb&lt;br /&gt;
|       `-- version.rb&lt;br /&gt;
|-- test/&lt;br /&gt;
|-- bin/&lt;br /&gt;
|-- Rakefile&lt;br /&gt;
`-- newgem.gemspec&amp;lt;/pre&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
The ''lib'' folder has the code of the ruby gem. It has ''newgem.rb'' file and a folder named ''newgem''. This folder has two files which are ''base.rb'' and ''version.rb''. The version number is recorded in ''version.rb'' and can be changed when the gem is updated. The ''bin'' directory has any binaries that is a part of the gem file and should be distributed with the gem. A gem usually has a [http://rake.rubyforge.org/doc/rakefile_rdoc.html Rakefile]. The rake program uses this to generate code and automate tests in addition to performing other tasks. The Gem specification file ''newgem.gemspec'' contains details specific to the gem. The file has details such as the gem name,the files that are in it, the gems it depends on for  performing testing, the gems it depends on for actually running and other details.&lt;br /&gt;
&lt;br /&gt;
== Listing existing Gems ==&lt;br /&gt;
To list the existing gems in a system ''list'' keyword can be used in the command line.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem list&lt;br /&gt;
&lt;br /&gt;
*** LOCAL GEMS ***&lt;br /&gt;
&lt;br /&gt;
actionmailer (3.2.3)&lt;br /&gt;
actionpack (3.2.3)&lt;br /&gt;
activemodel (3.2.3)&lt;br /&gt;
activerecord (3.2.3)&lt;br /&gt;
activeresource (3.2.3)&lt;br /&gt;
activesupport (3.2.3)&lt;br /&gt;
arel (3.0.2)&lt;br /&gt;
bigdecimal (1.1.0)&lt;br /&gt;
builder (3.0.4)&lt;br /&gt;
bundler (1.3.5)&lt;br /&gt;
capybara (2.1.0)&lt;br /&gt;
coffee-rails (3.2.2)&lt;br /&gt;
coffee-script (2.2.0)&lt;br /&gt;
coffee-script-source (1.6.3)&lt;br /&gt;
erubis (2.7.0)&lt;br /&gt;
execjs (2.0.1)&lt;br /&gt;
hike (1.2.3)&lt;br /&gt;
i18n (0.6.5)&lt;br /&gt;
io-console (0.3)&lt;br /&gt;
journey (1.0.4)&lt;br /&gt;
jquery-rails (3.0.4)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installing a new Gem ==&lt;br /&gt;
The ''install'' keyword can be used in command line to install gems. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem install capybara&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Uninstalling a Gem ==&lt;br /&gt;
The ''uninstall'' keyword can be used in command line to uninstall any existing gem in the system.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem uninstall capybara&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you uninstall a dependency of a gem RubyGems will ask you for confirmation.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem uninstall rbtree&lt;br /&gt;
&lt;br /&gt;
You have requested to uninstall the gem:&lt;br /&gt;
	rbtree-0.4.1&lt;br /&gt;
&lt;br /&gt;
drip-0.0.2 depends on rbtree (&amp;gt;= 0)&lt;br /&gt;
If you remove this gem, these dependencies will not be met.&lt;br /&gt;
Continue with Uninstall? [yN]  n&lt;br /&gt;
ERROR:  While executing gem ... (Gem::DependencyRemovalException)&lt;br /&gt;
    Uninstallation aborted due to dependent gem(s)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Update all existing Gems == &lt;br /&gt;
The ''update'' keyword can be used in command line to update all existing gems in the system.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem update &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Some important Gems that are useful in RAILS environment ==&lt;br /&gt;
&lt;br /&gt;
There are many gems which provide easy of functionality that can be included in the rails development environment. [http://bundler.io/ Bundler]is a useful gem that enables a developer to quickly add and manage gems in a few lines of code.&lt;br /&gt;
&lt;br /&gt;
We can classify the Gems based on the usage in different layers Model, View and Controller.&lt;br /&gt;
&lt;br /&gt;
 '''MODEL layer'''&lt;br /&gt;
&lt;br /&gt;
'''Active Record Plugins''' &lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/activerecord-oracle_enhanced-adapter '''oracle-enhanced'''] Oracle &amp;quot;enhanced&amp;quot; ActiveRecord adapter contains useful additional methods for working with new and legacy Oracle databases. This adapter is superset of original ActiveRecord Oracle adapter.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/activerecord-jdbc-adapter '''activerecord-jdbc-adapter'''] This adapter is build on JDBC API used for connecting to the database. AR-JDBC is a database adapter for Rails' ActiveRecord component. It allows to connect to virtually any JDBC-compliant database with your JRuby on Rails application.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/activerecord-nulldb-adapter '''nulldb'''] .This helps in Database simulation and testing. A database backend that translates database interactions into no-ops. We can test our model business logic with wanting to experiment with real database.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/oracle-enhanced-enhanced '''oracle-enhanced-enhanced'''] It includes several enhancements and customization to the standard ActiveRecord Oracle Enhapnced adapter, which is still required. Any customization to this adapter's behavior or additional Oracle-specific utilities should be added here.&lt;br /&gt;
&lt;br /&gt;
* Other useful Ruby Gems here. [https://www.ruby-toolbox.com/projects/activerecord-sqlserver-adapter '''activerecord-sqlserver-adapter'''], [https://www.ruby-toolbox.com/projects/activerecord-jdbcmysql-adapter '''activerecord-jdbcmysql-adapter'''], [https://www.ruby-toolbox.com/projects/activerecord-jdbcpostgresql-adapter '''activerecord-jdbcpostgresql-adapter'''], [https://www.ruby-toolbox.com/projects/activerecord-jdbcderby-adapter '''activerecord-jdbcderby-adapter'''],.&lt;br /&gt;
&lt;br /&gt;
'''Active Record Index Assistants'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/foreigner '''foreigner'''] Adds helpers to migrations and dumps foreign keys to schema.rb.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/rails_indexes '''rails_indexes'''] A rake task to track down missing database indexes. does not assume that all foreign keys end with the convention of _id.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/schema_plus '''schema_plus'''] SchemaPlus is an ActiveRecord extension that provides enhanced capabilities for schema definition and querying, including: enhanced and more DRY index capabilities, support and automation for foreign key constraints, and support for views.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/automatic_foreign_key '''automatic_foreign_key'''] Automatic Foreign Key automatically generates foreign-key constraints when creating tables or adding columns. It uses SQL-92 syntax and as such should be compatible with most databases that support foreign-key constraints.&lt;br /&gt;
&lt;br /&gt;
* Other useful Ruby Gems here. [https://www.ruby-toolbox.com/projects/ambitious_query_indexer '''ambitious_query_indexer'''], [https://www.ruby-toolbox.com/projects/lol_dba '''lol_dba'''], [https://www.ruby-toolbox.com/projects/immigrant '''immigrant'''], [https://www.ruby-toolbox.com/projects/redhillonrails_core '''redhillonrails_core'''].&lt;br /&gt;
&lt;br /&gt;
'''Rails DB Bootstrapping'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/seed-fu '''seed-fu'''] Seed Fu is an attempt to once and for all solve the problem of inserting and maintaining seed data in a database. It uses a variety of techniques gathered from various places around the web and combines them to create what is hopefully the most robust seed data system around.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/populator '''populator'''] Mass populate an Active Record database.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/seedbank '''seedbank'''] Extends Rails seeds to split out complex seeds into multiple files and lets each environment have it's own seeds.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/has_alter_ego '''Has alter ego'''] has_alter_ego makes it possible to keep seed and live data transparently in parallel. In contrast to other seed data approaches has_alter_ego synchronizes the seed definitions with your database objects automagically unless you've overridden it in the database.&lt;br /&gt;
&lt;br /&gt;
* Other useful Ruby Gems here. [https://www.ruby-toolbox.com/projects/bootstrapper '''Bootstrapper'''], [https://www.ruby-toolbox.com/projects/db-populate '''Db-populate'''], [https://www.ruby-toolbox.com/projects/seed_dumper '''seed_dumper'''], [https://www.ruby-toolbox.com/projects/dibber '''dibber'''].&lt;br /&gt;
&lt;br /&gt;
'''Rails Search'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/Sunspot '''Sunspot'''] Sunspot is a library providing a powerful, all-ruby API for the Solr search engine. Sunspot manages the configuration of persistent Ruby classes for search and indexing and exposes Solr's most powerful features through a collection of DSLs. Complex search operations can be performed without hand-writing any boolean queries or building Solr parameters by hand.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/sunspot_rails '''sunspot_rails'''] Sunspot::Rails is an extension to the Sunspot library for Solr search. Sunspot::Rails adds integration between Sunspot and ActiveRecord, including defining search and indexing related methods on ActiveRecord models themselves, running a Sunspot-compatible Solr instance for development and test environments, and automatically commit Solr index changes at the end of each Rails request.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/tire '''Tire'''] Tire is a Ruby client for the Elasticsearch search engine/database. It provides Ruby-like API for fluent communication with the Elasticsearch server and blends with ActiveModel class for convenient usage in Rails applications. It allows to delete and create indices, define mapping for them, supports the bulk API, and presents an easy-to-use DSL for constructing your queries. It has full ActiveRecord/ActiveModel compatibility, allowing you to index your models (incrementally upon saving, or in bulk), searching and paginating the results.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/thinking-sphinx '''thinking-sphinx'''] An intelligent layer for ActiveRecord (via Rails and Sinatra) for the Sphinx full-text search tool.&lt;br /&gt;
&lt;br /&gt;
* Other useful Ruby Gems here. [https://www.ruby-toolbox.com/projects/pg_search '''pg_search'''], [https://www.ruby-toolbox.com/projects/redis-search '''redis-search'''], [https://www.ruby-toolbox.com/projects/ferret '''Ferret'''], [https://www.ruby-toolbox.com/projects/searchlight '''searchlight'''].&lt;br /&gt;
&lt;br /&gt;
'''Data Persistence'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/mongoid '''Mongoid'''] Mongoid is an ODM (Object Document Mapper) Framework for MongoDB, written in Ruby.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/mongomatic '''Mongomatic'''] Mongomatic is a modular Ruby object mapper for Mongo.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/dynamoid '''dynamoid'''] Dynamoid is an ORM for Amazon's DynamoDB that supports offline development, associations, querying, and everything else you'd expect from an ActiveRecord-style replacement.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/squeel '''squeel'''] Squeel unlocks the power of Arel in your Rails 3 application with a handy block-based syntax. You can write subqueries, access named functions provided by your RDBMS, and more, all without writing SQL strings.&lt;br /&gt;
&lt;br /&gt;
 '''VIEW layer'''&lt;br /&gt;
&lt;br /&gt;
'''CSS'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/sass '''Sass'''] Sass makes CSS fun again. Sass is an extension of CSS3, adding nested rules, variables, mixins, selector inheritance, and more. It's translated to well-formatted, standard CSS using the command line tool or a web-framework plugin.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/bourbon '''bourbon'''] The purpose of Bourbon Vanilla Sass Mixins is to provide a comprehensive framework of sass mixins that are designed to be as vanilla as possible. Meaning they should not deter from the original CSS syntax. The mixins contain vendor specific prefixes for all CSS3 properties for support amongst modern browsers. The prefixes also ensure graceful degradation for older browsers that support only CSS3 prefixed properties.&lt;br /&gt;
&lt;br /&gt;
* Other useful Ruby Gems here. [https://www.ruby-toolbox.com/projects/less '''Less'''], [https://www.ruby-toolbox.com/projects/sass-rails '''sass-rails'''], [https://www.ruby-toolbox.com/projects/stylus '''stylus'''], [https://www.ruby-toolbox.com/projects/patterns '''patterns''']&lt;br /&gt;
&lt;br /&gt;
'''Graphing'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/google_visualr '''google_visualr'''] This Ruby gem, GoogleVisualr, is a wrapper around the Google Chart Tools that allows anyone to create the same beautiful charts with just Ruby; you don't have to write any JavaScript at all.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/highcharts-rails '''highcharts-rails'''] Gem that includes Highcharts (Interactive JavaScript charts for your web projects), in the Rails Asset Pipeline introduced in Rails 3.1.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/seer '''Seer'''] Gem that includes Highcharts (Interactive JavaScript charts for your web projects), in the Rails Asset Pipeline introduced in Rails 3.1.Seer is a lightweight, semantically rich wrapper for the Google Visualization API. It allows you to easily create a visualization of data in a variety of formats, including area charts, bar charts, column charts, gauges, line charts, and pie charts.&lt;br /&gt;
&lt;br /&gt;
'''HTML &amp;amp; Markup'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/formula '''formula'''] Formula is a Rails form generator that generates simple clean markup. The project aims to let users create semantically beautiful forms without introducing too much syntax. The goal is to make integrating advanced layout systems as simple as possible.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/formtastic '''Formtastic'''] A Rails form builder plugin/gem with semantically rich and accessible markup.&lt;br /&gt;
&lt;br /&gt;
'''JavaScript'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/jasmine '''Jasmine'''] Test your JavaScript without any framework dependencies, in any environment, and with a nice descriptive syntax.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/konacha '''konacha'''] Konacha is a Rails engine that allows you to test your JavaScript with the mocha test framework and chai assertion library. It is similar to Jasmine and Evergreen, but does not attempt to be framework agnostic. By sticking with Rails, Konacha can take full advantage of features such as the asset pipeline and engines&lt;br /&gt;
&lt;br /&gt;
'''Rails In-Place Editing'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/best_in_place '''BestInPlace'''] BestInPlace is a jQuery script and a Rails 3 helper that provide the method best_in_place to display any object field easily editable for the user by just clicking on it. It supports input data, text data, boolean data and custom dropdown data. It works with RESTful controllers.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/best_in_place_mongoid '''best_in_place_mongoid'''] BestInPlaceMongoid is a fork of BestInPlace jQuery script and a Rails 3 helper that provide the method best_in_place to display any object field easily editable for the user by just clicking on it. It supports input data, text data, boolean data and custom dropdown data. It works with RESTful controllers.&lt;br /&gt;
&lt;br /&gt;
 '''CONTROLLER layer'''&lt;br /&gt;
&lt;br /&gt;
'''Background Jobs'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/resque '''Resque'''] Resque is a Redis-backed Ruby library for creating background jobs, placing those jobs on multiple queues, and processing them later. Background jobs can be any Ruby class or module that responds to perform. Your existing classes can easily be converted to background jobs or you can create new classes specifically to do work. Or, you can do both. Resque is heavily inspired by DelayedJob (which rocks) and is comprised of three parts: * A Ruby library for creating, querying, and processing jobs * A Rake task for starting a worker which processes jobs * A Sinatra app for monitoring queues, jobs, and workers.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/starling '''Starling'''] Starling is a light-weight, persistent queue server that speaks the memcached protocol. It was originally developed for Twitter's backend.&lt;br /&gt;
&lt;br /&gt;
'''Scheduling'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/resque-scheduler '''resque-scheduler'''] Light weight job scheduling on top of Resque. Adds methods enqueue_at/enqueue_in to schedule jobs in the future. Also supports queueing jobs on a fixed, cron-like schedule.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/clockwork '''Clockwork'''] A scheduler process to replace cron, using a more flexible Ruby syntax running as a single long-running process. Inspired by rufus-scheduler and resque-scheduler.&lt;br /&gt;
&lt;br /&gt;
'''Code Metrics'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/simpleCov '''SimpleCov'''] Code coverage for Ruby 1.9 with a powerful configuration library and automatic merging of coverage across test suites.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/flay '''Flay'''] Flay analyzes code for structural similarities. Differences in literal values, variable, class, method names, whitespace, programming style, braces vs do/end, etc are all ignored. Making this totally rad.&lt;br /&gt;
&lt;br /&gt;
'''E-Mail Sending'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/actionmailer '''Action Mailer'''] Email on Rails. Compose, deliver, receive, and test emails using the familiar controller/view pattern. First-class support for multipart email and attachments.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/capistrano_mailer '''capistrano_mailer'''] Capistrano Deployment Email Notification. Keep the whole team informed of each release!&lt;br /&gt;
&lt;br /&gt;
 '''TESTING'''&lt;br /&gt;
&lt;br /&gt;
'''Browser testing'''&lt;br /&gt;
&lt;br /&gt;
* [http://rubygems.org/gems/capybara '''Capybara'''] Capybara is an integration testing tool for rack based web applications. It simulates how a user would interact with a website.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/webrat '''Webrat'''] Webrat lets you quickly write expressive and robust acceptance tests for a Ruby web application. It supports simulating a browser inside a Ruby process to avoid the performance hit and browser dependency of Selenium or Watir, but the same API can also be used to drive real Selenium tests when necessary (eg. for testing AJAX interactions). Most Ruby web frameworks and testing frameworks are supported.&lt;br /&gt;
&lt;br /&gt;
'''Random Data Generation'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/faker '''Faker'''] Faker, a port of Data::Faker from Perl, is used to easily generate fake data: names, addresses, phone numbers, etc.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/forgery '''Forgery'''] Easy and customizable generation of forged data. Can be used as a gem or a rails plugin. Includes rails generators for creating your own forgeries.&lt;br /&gt;
&lt;br /&gt;
'''Unit Test Frameworks'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/test-unit '''test-unit'''] Ruby 1.9.x bundles minitest not Test::Unit. Test::Unit bundled in Ruby 1.8.x had not been improved but unbundled Test::Unit (test-unit) is improved actively.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/wrong '''Wrong'''] Wrong provides a general assert method that takes a predicate block. Assertion failure messages are rich in detail. The Wrong idea is to replace all those countless assert_this, assert_that library methods which only exist to give a more useful failure message than &amp;quot;assertion failed&amp;quot;. Wrong replaces all of them in one fell swoop, since if you can write it in Ruby, Wrong can make a sensible failure message out of it. Also provided are several helper methods, like rescuing, capturing, and d.&lt;br /&gt;
&lt;br /&gt;
* Other useful Ruby Gems here. [https://www.ruby-toolbox.com/projects/testrocket '''testrocket'''], [https://www.ruby-toolbox.com/projects/kintama '''kintama'''], [https://www.ruby-toolbox.com/projects/lemon '''Lemon'''], [https://www.ruby-toolbox.com/projects/shindo '''Shindo'''].&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
[http://guides.rubygems.org/make-your-own-gem/ Creating your own Ruby Gem]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://rubygems.rubyforge.org/rubygems-update/UPGRADING_rdoc.html How to Upgrade/Downgrade Ruby Gems]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://rubylearning.com/blog/ Collection of Ruby Study Notes]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://net.tutsplus.com/articles/web-roundups/24-extremely-useful-ruby-gems-for-web-development/ 24 extremely useful Ruby Gems for web development]&lt;br /&gt;
&lt;br /&gt;
== References==&lt;br /&gt;
1. [http://guides.rubygems.org/rubygems-basics/#installing_gems Ruby Gems guide]&amp;lt;br&amp;gt;&lt;br /&gt;
2. [http://timelessrepo.com/making-ruby-gems Making Ruby Gems]&amp;lt;br&amp;gt;&lt;br /&gt;
3. [https://www.ruby-toolbox.com Ruby Tool Box]&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Npari</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch1_1w24_nv&amp;diff=79113</id>
		<title>CSC/ECE 517 Fall 2013/ch1 1w24 nv</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch1_1w24_nv&amp;diff=79113"/>
		<updated>2013-09-25T02:30:49Z</updated>

		<summary type="html">&lt;p&gt;Npari: /* References */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Ruby Gem is a package manager for Ruby programming language. It allows users to easily download, install and use software packages on their system. The functionality of a Ruby application can be modified or extended with the help of Gems. In the version 1.9 of Ruby, Ruby Gems has been made a part of the standard library.&lt;br /&gt;
&lt;br /&gt;
== '''A Tour of Ruby Gems''' ==&lt;br /&gt;
== Definition of a Ruby Gem ==&lt;br /&gt;
In simple terms, a Ruby Gem is a package containing files that can be installed in a system and can help expand the functionality of a Ruby application. Ruby gems are very powerful. Ruby programmers create and publish Ruby Gems as open source in [https://github.com/ github]. It is very east to install, upgrade and delete Gems in a system.&lt;br /&gt;
&lt;br /&gt;
== Structure of Ruby Gem ==&lt;br /&gt;
Every Gem has a set of files and the following standard structure &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ tree -d newgem&lt;br /&gt;
|-- lib/&lt;br /&gt;
|   |-- newgem.rb&lt;br /&gt;
|   `-- newgem/&lt;br /&gt;
|       |-- base.rb&lt;br /&gt;
|       `-- version.rb&lt;br /&gt;
|-- test/&lt;br /&gt;
|-- bin/&lt;br /&gt;
|-- Rakefile&lt;br /&gt;
`-- newgem.gemspec&amp;lt;/pre&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
The ''lib'' folder has the code of the ruby gem. It has ''newgem.rb'' file and a folder named ''newgem''. This folder has two files which are ''base.rb'' and ''version.rb''. The version number is recorded in ''version.rb'' and can be changed when the gem is updated. The ''bin'' directory has any binaries that is a part of the gem file and should be distributed with the gem. A gem usually has a ''Rakefile''. The rake program uses this to generate code and automate tests in addition to performing other tasks. The Gem specification file ''newgem.gemspec'' contains details specific to the gem. The file has details such as the gem name,the files that are in it, the gems it depends on for  performing testing, the gems it depends on for actually running and other details.&lt;br /&gt;
&lt;br /&gt;
== Listing existing Gems ==&lt;br /&gt;
To list the existing gems in a system ''list'' keyword can be used in the command line.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem list&lt;br /&gt;
&lt;br /&gt;
*** LOCAL GEMS ***&lt;br /&gt;
&lt;br /&gt;
actionmailer (3.2.3)&lt;br /&gt;
actionpack (3.2.3)&lt;br /&gt;
activemodel (3.2.3)&lt;br /&gt;
activerecord (3.2.3)&lt;br /&gt;
activeresource (3.2.3)&lt;br /&gt;
activesupport (3.2.3)&lt;br /&gt;
arel (3.0.2)&lt;br /&gt;
bigdecimal (1.1.0)&lt;br /&gt;
builder (3.0.4)&lt;br /&gt;
bundler (1.3.5)&lt;br /&gt;
capybara (2.1.0)&lt;br /&gt;
coffee-rails (3.2.2)&lt;br /&gt;
coffee-script (2.2.0)&lt;br /&gt;
coffee-script-source (1.6.3)&lt;br /&gt;
erubis (2.7.0)&lt;br /&gt;
execjs (2.0.1)&lt;br /&gt;
hike (1.2.3)&lt;br /&gt;
i18n (0.6.5)&lt;br /&gt;
io-console (0.3)&lt;br /&gt;
journey (1.0.4)&lt;br /&gt;
jquery-rails (3.0.4)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installing a new Gem ==&lt;br /&gt;
The ''install'' keyword can be used in command line to install gems. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem install capybara&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Uninstalling a Gem ==&lt;br /&gt;
The ''uninstall'' keyword can be used in command line to uninstall any existing gem in the system.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem uninstall capybara&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you uninstall a dependency of a gem RubyGems will ask you for confirmation.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem uninstall rbtree&lt;br /&gt;
&lt;br /&gt;
You have requested to uninstall the gem:&lt;br /&gt;
	rbtree-0.4.1&lt;br /&gt;
&lt;br /&gt;
drip-0.0.2 depends on rbtree (&amp;gt;= 0)&lt;br /&gt;
If you remove this gem, these dependencies will not be met.&lt;br /&gt;
Continue with Uninstall? [yN]  n&lt;br /&gt;
ERROR:  While executing gem ... (Gem::DependencyRemovalException)&lt;br /&gt;
    Uninstallation aborted due to dependent gem(s)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Update all existing Gems == &lt;br /&gt;
The ''update'' keyword can be used in command line to update all existing gems in the system.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem update &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Some important Gems that are useful in RAILS environment ==&lt;br /&gt;
&lt;br /&gt;
There are many gems which provide easy of functionality that can be included in the rails development environment. [http://bundler.io/ Bundler]is a useful gem that enables a developer to quickly add and manage gems in a few lines of code.&lt;br /&gt;
&lt;br /&gt;
We can classify the Gems based on the usage in different layers Model, View and Controller.&lt;br /&gt;
&lt;br /&gt;
 '''MODEL layer'''&lt;br /&gt;
&lt;br /&gt;
'''Active Record Plugins''' &lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/activerecord-oracle_enhanced-adapter '''oracle-enhanced'''] Oracle &amp;quot;enhanced&amp;quot; ActiveRecord adapter contains useful additional methods for working with new and legacy Oracle databases. This adapter is superset of original ActiveRecord Oracle adapter.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/activerecord-jdbc-adapter '''activerecord-jdbc-adapter'''] This adapter is build on JDBC API used for connecting to the database. AR-JDBC is a database adapter for Rails' ActiveRecord component. It allows to connect to virtually any JDBC-compliant database with your JRuby on Rails application.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/activerecord-nulldb-adapter '''nulldb'''] .This helps in Database simulation and testing. A database backend that translates database interactions into no-ops. We can test our model business logic with wanting to experiment with real database.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/oracle-enhanced-enhanced '''oracle-enhanced-enhanced'''] It includes several enhancements and customization to the standard ActiveRecord Oracle Enhapnced adapter, which is still required. Any customization to this adapter's behavior or additional Oracle-specific utilities should be added here.&lt;br /&gt;
&lt;br /&gt;
* Other useful Ruby Gems here. [https://www.ruby-toolbox.com/projects/activerecord-sqlserver-adapter '''activerecord-sqlserver-adapter'''], [https://www.ruby-toolbox.com/projects/activerecord-jdbcmysql-adapter '''activerecord-jdbcmysql-adapter'''], [https://www.ruby-toolbox.com/projects/activerecord-jdbcpostgresql-adapter '''activerecord-jdbcpostgresql-adapter'''], [https://www.ruby-toolbox.com/projects/activerecord-jdbcderby-adapter '''activerecord-jdbcderby-adapter'''],.&lt;br /&gt;
&lt;br /&gt;
'''Active Record Index Assistants'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/foreigner '''foreigner'''] Adds helpers to migrations and dumps foreign keys to schema.rb.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/rails_indexes '''rails_indexes'''] A rake task to track down missing database indexes. does not assume that all foreign keys end with the convention of _id.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/schema_plus '''schema_plus'''] SchemaPlus is an ActiveRecord extension that provides enhanced capabilities for schema definition and querying, including: enhanced and more DRY index capabilities, support and automation for foreign key constraints, and support for views.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/automatic_foreign_key '''automatic_foreign_key'''] Automatic Foreign Key automatically generates foreign-key constraints when creating tables or adding columns. It uses SQL-92 syntax and as such should be compatible with most databases that support foreign-key constraints.&lt;br /&gt;
&lt;br /&gt;
* Other useful Ruby Gems here. [https://www.ruby-toolbox.com/projects/ambitious_query_indexer '''ambitious_query_indexer'''], [https://www.ruby-toolbox.com/projects/lol_dba '''lol_dba'''], [https://www.ruby-toolbox.com/projects/immigrant '''immigrant'''], [https://www.ruby-toolbox.com/projects/redhillonrails_core '''redhillonrails_core'''].&lt;br /&gt;
&lt;br /&gt;
'''Rails DB Bootstrapping'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/seed-fu '''seed-fu'''] Seed Fu is an attempt to once and for all solve the problem of inserting and maintaining seed data in a database. It uses a variety of techniques gathered from various places around the web and combines them to create what is hopefully the most robust seed data system around.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/populator '''populator'''] Mass populate an Active Record database.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/seedbank '''seedbank'''] Extends Rails seeds to split out complex seeds into multiple files and lets each environment have it's own seeds.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/has_alter_ego '''Has alter ego'''] has_alter_ego makes it possible to keep seed and live data transparently in parallel. In contrast to other seed data approaches has_alter_ego synchronizes the seed definitions with your database objects automagically unless you've overridden it in the database.&lt;br /&gt;
&lt;br /&gt;
* Other useful Ruby Gems here. [https://www.ruby-toolbox.com/projects/bootstrapper '''Bootstrapper'''], [https://www.ruby-toolbox.com/projects/db-populate '''Db-populate'''], [https://www.ruby-toolbox.com/projects/seed_dumper '''seed_dumper'''], [https://www.ruby-toolbox.com/projects/dibber '''dibber'''].&lt;br /&gt;
&lt;br /&gt;
'''Rails Search'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/Sunspot '''Sunspot'''] Sunspot is a library providing a powerful, all-ruby API for the Solr search engine. Sunspot manages the configuration of persistent Ruby classes for search and indexing and exposes Solr's most powerful features through a collection of DSLs. Complex search operations can be performed without hand-writing any boolean queries or building Solr parameters by hand.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/sunspot_rails '''sunspot_rails'''] Sunspot::Rails is an extension to the Sunspot library for Solr search. Sunspot::Rails adds integration between Sunspot and ActiveRecord, including defining search and indexing related methods on ActiveRecord models themselves, running a Sunspot-compatible Solr instance for development and test environments, and automatically commit Solr index changes at the end of each Rails request.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/tire '''Tire'''] Tire is a Ruby client for the Elasticsearch search engine/database. It provides Ruby-like API for fluent communication with the Elasticsearch server and blends with ActiveModel class for convenient usage in Rails applications. It allows to delete and create indices, define mapping for them, supports the bulk API, and presents an easy-to-use DSL for constructing your queries. It has full ActiveRecord/ActiveModel compatibility, allowing you to index your models (incrementally upon saving, or in bulk), searching and paginating the results.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/thinking-sphinx '''thinking-sphinx'''] An intelligent layer for ActiveRecord (via Rails and Sinatra) for the Sphinx full-text search tool.&lt;br /&gt;
&lt;br /&gt;
* Other useful Ruby Gems here. [https://www.ruby-toolbox.com/projects/pg_search '''pg_search'''], [https://www.ruby-toolbox.com/projects/redis-search '''redis-search'''], [https://www.ruby-toolbox.com/projects/ferret '''Ferret'''], [https://www.ruby-toolbox.com/projects/searchlight '''searchlight'''].&lt;br /&gt;
&lt;br /&gt;
'''Data Persistence'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/mongoid '''Mongoid'''] Mongoid is an ODM (Object Document Mapper) Framework for MongoDB, written in Ruby.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/mongomatic '''Mongomatic'''] Mongomatic is a modular Ruby object mapper for Mongo.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/dynamoid '''dynamoid'''] Dynamoid is an ORM for Amazon's DynamoDB that supports offline development, associations, querying, and everything else you'd expect from an ActiveRecord-style replacement.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/squeel '''squeel'''] Squeel unlocks the power of Arel in your Rails 3 application with a handy block-based syntax. You can write subqueries, access named functions provided by your RDBMS, and more, all without writing SQL strings.&lt;br /&gt;
&lt;br /&gt;
 '''VIEW layer'''&lt;br /&gt;
&lt;br /&gt;
'''CSS'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/sass '''Sass'''] Sass makes CSS fun again. Sass is an extension of CSS3, adding nested rules, variables, mixins, selector inheritance, and more. It's translated to well-formatted, standard CSS using the command line tool or a web-framework plugin.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/bourbon '''bourbon'''] The purpose of Bourbon Vanilla Sass Mixins is to provide a comprehensive framework of sass mixins that are designed to be as vanilla as possible. Meaning they should not deter from the original CSS syntax. The mixins contain vendor specific prefixes for all CSS3 properties for support amongst modern browsers. The prefixes also ensure graceful degradation for older browsers that support only CSS3 prefixed properties.&lt;br /&gt;
&lt;br /&gt;
* Other useful Ruby Gems here. [https://www.ruby-toolbox.com/projects/less '''Less'''], [https://www.ruby-toolbox.com/projects/sass-rails '''sass-rails'''], [https://www.ruby-toolbox.com/projects/stylus '''stylus'''], [https://www.ruby-toolbox.com/projects/patterns '''patterns''']&lt;br /&gt;
&lt;br /&gt;
'''Graphing'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/google_visualr '''google_visualr'''] This Ruby gem, GoogleVisualr, is a wrapper around the Google Chart Tools that allows anyone to create the same beautiful charts with just Ruby; you don't have to write any JavaScript at all.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/highcharts-rails '''highcharts-rails'''] Gem that includes Highcharts (Interactive JavaScript charts for your web projects), in the Rails Asset Pipeline introduced in Rails 3.1.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/seer '''Seer'''] Gem that includes Highcharts (Interactive JavaScript charts for your web projects), in the Rails Asset Pipeline introduced in Rails 3.1.Seer is a lightweight, semantically rich wrapper for the Google Visualization API. It allows you to easily create a visualization of data in a variety of formats, including area charts, bar charts, column charts, gauges, line charts, and pie charts.&lt;br /&gt;
&lt;br /&gt;
'''HTML &amp;amp; Markup'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/formula '''formula'''] Formula is a Rails form generator that generates simple clean markup. The project aims to let users create semantically beautiful forms without introducing too much syntax. The goal is to make integrating advanced layout systems as simple as possible.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/formtastic '''Formtastic'''] A Rails form builder plugin/gem with semantically rich and accessible markup.&lt;br /&gt;
&lt;br /&gt;
'''JavaScript'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/jasmine '''Jasmine'''] Test your JavaScript without any framework dependencies, in any environment, and with a nice descriptive syntax.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/konacha '''konacha'''] Konacha is a Rails engine that allows you to test your JavaScript with the mocha test framework and chai assertion library. It is similar to Jasmine and Evergreen, but does not attempt to be framework agnostic. By sticking with Rails, Konacha can take full advantage of features such as the asset pipeline and engines&lt;br /&gt;
&lt;br /&gt;
'''Rails In-Place Editing'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/best_in_place '''BestInPlace'''] BestInPlace is a jQuery script and a Rails 3 helper that provide the method best_in_place to display any object field easily editable for the user by just clicking on it. It supports input data, text data, boolean data and custom dropdown data. It works with RESTful controllers.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/best_in_place_mongoid '''best_in_place_mongoid'''] BestInPlaceMongoid is a fork of BestInPlace jQuery script and a Rails 3 helper that provide the method best_in_place to display any object field easily editable for the user by just clicking on it. It supports input data, text data, boolean data and custom dropdown data. It works with RESTful controllers.&lt;br /&gt;
&lt;br /&gt;
 '''CONTROLLER layer'''&lt;br /&gt;
&lt;br /&gt;
'''Background Jobs'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/resque '''Resque'''] Resque is a Redis-backed Ruby library for creating background jobs, placing those jobs on multiple queues, and processing them later. Background jobs can be any Ruby class or module that responds to perform. Your existing classes can easily be converted to background jobs or you can create new classes specifically to do work. Or, you can do both. Resque is heavily inspired by DelayedJob (which rocks) and is comprised of three parts: * A Ruby library for creating, querying, and processing jobs * A Rake task for starting a worker which processes jobs * A Sinatra app for monitoring queues, jobs, and workers.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/starling '''Starling'''] Starling is a light-weight, persistent queue server that speaks the memcached protocol. It was originally developed for Twitter's backend.&lt;br /&gt;
&lt;br /&gt;
'''Scheduling'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/resque-scheduler '''resque-scheduler'''] Light weight job scheduling on top of Resque. Adds methods enqueue_at/enqueue_in to schedule jobs in the future. Also supports queueing jobs on a fixed, cron-like schedule.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/clockwork '''Clockwork'''] A scheduler process to replace cron, using a more flexible Ruby syntax running as a single long-running process. Inspired by rufus-scheduler and resque-scheduler.&lt;br /&gt;
&lt;br /&gt;
'''Code Metrics'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/simpleCov '''SimpleCov'''] Code coverage for Ruby 1.9 with a powerful configuration library and automatic merging of coverage across test suites.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/flay '''Flay'''] Flay analyzes code for structural similarities. Differences in literal values, variable, class, method names, whitespace, programming style, braces vs do/end, etc are all ignored. Making this totally rad.&lt;br /&gt;
&lt;br /&gt;
'''E-Mail Sending'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/actionmailer '''Action Mailer'''] Email on Rails. Compose, deliver, receive, and test emails using the familiar controller/view pattern. First-class support for multipart email and attachments.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/capistrano_mailer '''capistrano_mailer'''] Capistrano Deployment Email Notification. Keep the whole team informed of each release!&lt;br /&gt;
&lt;br /&gt;
 '''TESTING'''&lt;br /&gt;
&lt;br /&gt;
'''Browser testing'''&lt;br /&gt;
&lt;br /&gt;
* [http://rubygems.org/gems/capybara '''Capybara'''] Capybara is an integration testing tool for rack based web applications. It simulates how a user would interact with a website.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/webrat '''Webrat'''] Webrat lets you quickly write expressive and robust acceptance tests for a Ruby web application. It supports simulating a browser inside a Ruby process to avoid the performance hit and browser dependency of Selenium or Watir, but the same API can also be used to drive real Selenium tests when necessary (eg. for testing AJAX interactions). Most Ruby web frameworks and testing frameworks are supported.&lt;br /&gt;
&lt;br /&gt;
'''Random Data Generation'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/faker '''Faker'''] Faker, a port of Data::Faker from Perl, is used to easily generate fake data: names, addresses, phone numbers, etc.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/forgery '''Forgery'''] Easy and customizable generation of forged data. Can be used as a gem or a rails plugin. Includes rails generators for creating your own forgeries.&lt;br /&gt;
&lt;br /&gt;
'''Unit Test Frameworks'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/test-unit '''test-unit'''] Ruby 1.9.x bundles minitest not Test::Unit. Test::Unit bundled in Ruby 1.8.x had not been improved but unbundled Test::Unit (test-unit) is improved actively.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/wrong '''Wrong'''] Wrong provides a general assert method that takes a predicate block. Assertion failure messages are rich in detail. The Wrong idea is to replace all those countless assert_this, assert_that library methods which only exist to give a more useful failure message than &amp;quot;assertion failed&amp;quot;. Wrong replaces all of them in one fell swoop, since if you can write it in Ruby, Wrong can make a sensible failure message out of it. Also provided are several helper methods, like rescuing, capturing, and d.&lt;br /&gt;
&lt;br /&gt;
* Other useful Ruby Gems here. [https://www.ruby-toolbox.com/projects/testrocket '''testrocket'''], [https://www.ruby-toolbox.com/projects/kintama '''kintama'''], [https://www.ruby-toolbox.com/projects/lemon '''Lemon'''], [https://www.ruby-toolbox.com/projects/shindo '''Shindo'''].&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
[http://guides.rubygems.org/make-your-own-gem/ Creating your own Ruby Gem]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://rubygems.rubyforge.org/rubygems-update/UPGRADING_rdoc.html How to Upgrade/Downgrade Ruby Gems]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://rubylearning.com/blog/ Collection of Ruby Study Notes]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://net.tutsplus.com/articles/web-roundups/24-extremely-useful-ruby-gems-for-web-development/ 24 extremely useful Ruby Gems for web development]&lt;br /&gt;
&lt;br /&gt;
== References==&lt;br /&gt;
1. [http://guides.rubygems.org/rubygems-basics/#installing_gems Ruby Gems guide]&amp;lt;br&amp;gt;&lt;br /&gt;
2. [http://timelessrepo.com/making-ruby-gems Making Ruby Gems]&amp;lt;br&amp;gt;&lt;br /&gt;
3. [https://www.ruby-toolbox.com Ruby Tool Box]&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Npari</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch1_1w24_nv&amp;diff=79109</id>
		<title>CSC/ECE 517 Fall 2013/ch1 1w24 nv</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch1_1w24_nv&amp;diff=79109"/>
		<updated>2013-09-25T02:26:39Z</updated>

		<summary type="html">&lt;p&gt;Npari: /* Uninstalling a Gem */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Ruby Gem is a package manager for Ruby programming language. It allows users to easily download, install and use software packages on their system. The functionality of a Ruby application can be modified or extended with the help of Gems. In the version 1.9 of Ruby, Ruby Gems has been made a part of the standard library.&lt;br /&gt;
&lt;br /&gt;
== '''A Tour of Ruby Gems''' ==&lt;br /&gt;
== Definition of a Ruby Gem ==&lt;br /&gt;
In simple terms, a Ruby Gem is a package containing files that can be installed in a system and can help expand the functionality of a Ruby application. Ruby gems are very powerful. Ruby programmers create and publish Ruby Gems as open source in [https://github.com/ github]. It is very east to install, upgrade and delete Gems in a system.&lt;br /&gt;
&lt;br /&gt;
== Structure of Ruby Gem ==&lt;br /&gt;
Every Gem has a set of files and the following standard structure &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ tree -d newgem&lt;br /&gt;
|-- lib/&lt;br /&gt;
|   |-- newgem.rb&lt;br /&gt;
|   `-- newgem/&lt;br /&gt;
|       |-- base.rb&lt;br /&gt;
|       `-- version.rb&lt;br /&gt;
|-- test/&lt;br /&gt;
|-- bin/&lt;br /&gt;
|-- Rakefile&lt;br /&gt;
`-- newgem.gemspec&amp;lt;/pre&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
The ''lib'' folder has the code of the ruby gem. It has ''newgem.rb'' file and a folder named ''newgem''. This folder has two files which are ''base.rb'' and ''version.rb''. The version number is recorded in ''version.rb'' and can be changed when the gem is updated. The ''bin'' directory has any binaries that is a part of the gem file and should be distributed with the gem. A gem usually has a ''Rakefile''. The rake program uses this to generate code and automate tests in addition to performing other tasks. The Gem specification file ''newgem.gemspec'' contains details specific to the gem. The file has details such as the gem name,the files that are in it, the gems it depends on for  performing testing, the gems it depends on for actually running and other details.&lt;br /&gt;
&lt;br /&gt;
== Listing existing Gems ==&lt;br /&gt;
To list the existing gems in a system ''list'' keyword can be used in the command line.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem list&lt;br /&gt;
&lt;br /&gt;
*** LOCAL GEMS ***&lt;br /&gt;
&lt;br /&gt;
actionmailer (3.2.3)&lt;br /&gt;
actionpack (3.2.3)&lt;br /&gt;
activemodel (3.2.3)&lt;br /&gt;
activerecord (3.2.3)&lt;br /&gt;
activeresource (3.2.3)&lt;br /&gt;
activesupport (3.2.3)&lt;br /&gt;
arel (3.0.2)&lt;br /&gt;
bigdecimal (1.1.0)&lt;br /&gt;
builder (3.0.4)&lt;br /&gt;
bundler (1.3.5)&lt;br /&gt;
capybara (2.1.0)&lt;br /&gt;
coffee-rails (3.2.2)&lt;br /&gt;
coffee-script (2.2.0)&lt;br /&gt;
coffee-script-source (1.6.3)&lt;br /&gt;
erubis (2.7.0)&lt;br /&gt;
execjs (2.0.1)&lt;br /&gt;
hike (1.2.3)&lt;br /&gt;
i18n (0.6.5)&lt;br /&gt;
io-console (0.3)&lt;br /&gt;
journey (1.0.4)&lt;br /&gt;
jquery-rails (3.0.4)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installing a new Gem ==&lt;br /&gt;
The ''install'' keyword can be used in command line to install gems. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem install capybara&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Uninstalling a Gem ==&lt;br /&gt;
The ''uninstall'' keyword can be used in command line to uninstall any existing gem in the system.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem uninstall capybara&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you uninstall a dependency of a gem RubyGems will ask you for confirmation.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem uninstall rbtree&lt;br /&gt;
&lt;br /&gt;
You have requested to uninstall the gem:&lt;br /&gt;
	rbtree-0.4.1&lt;br /&gt;
&lt;br /&gt;
drip-0.0.2 depends on rbtree (&amp;gt;= 0)&lt;br /&gt;
If you remove this gem, these dependencies will not be met.&lt;br /&gt;
Continue with Uninstall? [yN]  n&lt;br /&gt;
ERROR:  While executing gem ... (Gem::DependencyRemovalException)&lt;br /&gt;
    Uninstallation aborted due to dependent gem(s)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Update all existing Gems == &lt;br /&gt;
The ''update'' keyword can be used in command line to update all existing gems in the system.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem update &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Some important Gems that are useful in RAILS environment ==&lt;br /&gt;
&lt;br /&gt;
There are many gems which provide easy of functionality that can be included in the rails development environment. [http://bundler.io/ Bundler]is a useful gem that enables a developer to quickly add and manage gems in a few lines of code.&lt;br /&gt;
&lt;br /&gt;
We can classify the Gems based on the usage in different layers Model, View and Controller.&lt;br /&gt;
&lt;br /&gt;
 '''MODEL layer'''&lt;br /&gt;
&lt;br /&gt;
'''Active Record Plugins''' &lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/activerecord-oracle_enhanced-adapter '''oracle-enhanced'''] Oracle &amp;quot;enhanced&amp;quot; ActiveRecord adapter contains useful additional methods for working with new and legacy Oracle databases. This adapter is superset of original ActiveRecord Oracle adapter.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/activerecord-jdbc-adapter '''activerecord-jdbc-adapter'''] This adapter is build on JDBC API used for connecting to the database. AR-JDBC is a database adapter for Rails' ActiveRecord component. It allows to connect to virtually any JDBC-compliant database with your JRuby on Rails application.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/activerecord-nulldb-adapter '''nulldb'''] .This helps in Database simulation and testing. A database backend that translates database interactions into no-ops. We can test our model business logic with wanting to experiment with real database.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/oracle-enhanced-enhanced '''oracle-enhanced-enhanced'''] It includes several enhancements and customization to the standard ActiveRecord Oracle Enhapnced adapter, which is still required. Any customization to this adapter's behavior or additional Oracle-specific utilities should be added here.&lt;br /&gt;
&lt;br /&gt;
* Other useful Ruby Gems here. [https://www.ruby-toolbox.com/projects/activerecord-sqlserver-adapter '''activerecord-sqlserver-adapter'''], [https://www.ruby-toolbox.com/projects/activerecord-jdbcmysql-adapter '''activerecord-jdbcmysql-adapter'''], [https://www.ruby-toolbox.com/projects/activerecord-jdbcpostgresql-adapter '''activerecord-jdbcpostgresql-adapter'''], [https://www.ruby-toolbox.com/projects/activerecord-jdbcderby-adapter '''activerecord-jdbcderby-adapter'''],.&lt;br /&gt;
&lt;br /&gt;
'''Active Record Index Assistants'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/foreigner '''foreigner'''] Adds helpers to migrations and dumps foreign keys to schema.rb.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/rails_indexes '''rails_indexes'''] A rake task to track down missing database indexes. does not assume that all foreign keys end with the convention of _id.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/schema_plus '''schema_plus'''] SchemaPlus is an ActiveRecord extension that provides enhanced capabilities for schema definition and querying, including: enhanced and more DRY index capabilities, support and automation for foreign key constraints, and support for views.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/automatic_foreign_key '''automatic_foreign_key'''] Automatic Foreign Key automatically generates foreign-key constraints when creating tables or adding columns. It uses SQL-92 syntax and as such should be compatible with most databases that support foreign-key constraints.&lt;br /&gt;
&lt;br /&gt;
* Other useful Ruby Gems here. [https://www.ruby-toolbox.com/projects/ambitious_query_indexer '''ambitious_query_indexer'''], [https://www.ruby-toolbox.com/projects/lol_dba '''lol_dba'''], [https://www.ruby-toolbox.com/projects/immigrant '''immigrant'''], [https://www.ruby-toolbox.com/projects/redhillonrails_core '''redhillonrails_core'''].&lt;br /&gt;
&lt;br /&gt;
'''Rails DB Bootstrapping'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/seed-fu '''seed-fu'''] Seed Fu is an attempt to once and for all solve the problem of inserting and maintaining seed data in a database. It uses a variety of techniques gathered from various places around the web and combines them to create what is hopefully the most robust seed data system around.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/populator '''populator'''] Mass populate an Active Record database.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/seedbank '''seedbank'''] Extends Rails seeds to split out complex seeds into multiple files and lets each environment have it's own seeds.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/has_alter_ego '''Has alter ego'''] has_alter_ego makes it possible to keep seed and live data transparently in parallel. In contrast to other seed data approaches has_alter_ego synchronizes the seed definitions with your database objects automagically unless you've overridden it in the database.&lt;br /&gt;
&lt;br /&gt;
* Other useful Ruby Gems here. [https://www.ruby-toolbox.com/projects/bootstrapper '''Bootstrapper'''], [https://www.ruby-toolbox.com/projects/db-populate '''Db-populate'''], [https://www.ruby-toolbox.com/projects/seed_dumper '''seed_dumper'''], [https://www.ruby-toolbox.com/projects/dibber '''dibber'''].&lt;br /&gt;
&lt;br /&gt;
'''Rails Search'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/Sunspot '''Sunspot'''] Sunspot is a library providing a powerful, all-ruby API for the Solr search engine. Sunspot manages the configuration of persistent Ruby classes for search and indexing and exposes Solr's most powerful features through a collection of DSLs. Complex search operations can be performed without hand-writing any boolean queries or building Solr parameters by hand.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/sunspot_rails '''sunspot_rails'''] Sunspot::Rails is an extension to the Sunspot library for Solr search. Sunspot::Rails adds integration between Sunspot and ActiveRecord, including defining search and indexing related methods on ActiveRecord models themselves, running a Sunspot-compatible Solr instance for development and test environments, and automatically commit Solr index changes at the end of each Rails request.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/tire '''Tire'''] Tire is a Ruby client for the Elasticsearch search engine/database. It provides Ruby-like API for fluent communication with the Elasticsearch server and blends with ActiveModel class for convenient usage in Rails applications. It allows to delete and create indices, define mapping for them, supports the bulk API, and presents an easy-to-use DSL for constructing your queries. It has full ActiveRecord/ActiveModel compatibility, allowing you to index your models (incrementally upon saving, or in bulk), searching and paginating the results.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/thinking-sphinx '''thinking-sphinx'''] An intelligent layer for ActiveRecord (via Rails and Sinatra) for the Sphinx full-text search tool.&lt;br /&gt;
&lt;br /&gt;
* Other useful Ruby Gems here. [https://www.ruby-toolbox.com/projects/pg_search '''pg_search'''], [https://www.ruby-toolbox.com/projects/redis-search '''redis-search'''], [https://www.ruby-toolbox.com/projects/ferret '''Ferret'''], [https://www.ruby-toolbox.com/projects/searchlight '''searchlight'''].&lt;br /&gt;
&lt;br /&gt;
'''Data Persistence'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/mongoid '''Mongoid'''] Mongoid is an ODM (Object Document Mapper) Framework for MongoDB, written in Ruby.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/mongomatic '''Mongomatic'''] Mongomatic is a modular Ruby object mapper for Mongo.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/dynamoid '''dynamoid'''] Dynamoid is an ORM for Amazon's DynamoDB that supports offline development, associations, querying, and everything else you'd expect from an ActiveRecord-style replacement.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/squeel '''squeel'''] Squeel unlocks the power of Arel in your Rails 3 application with a handy block-based syntax. You can write subqueries, access named functions provided by your RDBMS, and more, all without writing SQL strings.&lt;br /&gt;
&lt;br /&gt;
 '''VIEW layer'''&lt;br /&gt;
&lt;br /&gt;
'''CSS'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/sass '''Sass'''] Sass makes CSS fun again. Sass is an extension of CSS3, adding nested rules, variables, mixins, selector inheritance, and more. It's translated to well-formatted, standard CSS using the command line tool or a web-framework plugin.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/bourbon '''bourbon'''] The purpose of Bourbon Vanilla Sass Mixins is to provide a comprehensive framework of sass mixins that are designed to be as vanilla as possible. Meaning they should not deter from the original CSS syntax. The mixins contain vendor specific prefixes for all CSS3 properties for support amongst modern browsers. The prefixes also ensure graceful degradation for older browsers that support only CSS3 prefixed properties.&lt;br /&gt;
&lt;br /&gt;
* Other useful Ruby Gems here. [https://www.ruby-toolbox.com/projects/less '''Less'''], [https://www.ruby-toolbox.com/projects/sass-rails '''sass-rails'''], [https://www.ruby-toolbox.com/projects/stylus '''stylus'''], [https://www.ruby-toolbox.com/projects/patterns '''patterns''']&lt;br /&gt;
&lt;br /&gt;
'''Graphing'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/google_visualr '''google_visualr'''] This Ruby gem, GoogleVisualr, is a wrapper around the Google Chart Tools that allows anyone to create the same beautiful charts with just Ruby; you don't have to write any JavaScript at all.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/highcharts-rails '''highcharts-rails'''] Gem that includes Highcharts (Interactive JavaScript charts for your web projects), in the Rails Asset Pipeline introduced in Rails 3.1.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/seer '''Seer'''] Gem that includes Highcharts (Interactive JavaScript charts for your web projects), in the Rails Asset Pipeline introduced in Rails 3.1.Seer is a lightweight, semantically rich wrapper for the Google Visualization API. It allows you to easily create a visualization of data in a variety of formats, including area charts, bar charts, column charts, gauges, line charts, and pie charts.&lt;br /&gt;
&lt;br /&gt;
'''HTML &amp;amp; Markup'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/formula '''formula'''] Formula is a Rails form generator that generates simple clean markup. The project aims to let users create semantically beautiful forms without introducing too much syntax. The goal is to make integrating advanced layout systems as simple as possible.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/formtastic '''Formtastic'''] A Rails form builder plugin/gem with semantically rich and accessible markup.&lt;br /&gt;
&lt;br /&gt;
'''JavaScript'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/jasmine '''Jasmine'''] Test your JavaScript without any framework dependencies, in any environment, and with a nice descriptive syntax.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/konacha '''konacha'''] Konacha is a Rails engine that allows you to test your JavaScript with the mocha test framework and chai assertion library. It is similar to Jasmine and Evergreen, but does not attempt to be framework agnostic. By sticking with Rails, Konacha can take full advantage of features such as the asset pipeline and engines&lt;br /&gt;
&lt;br /&gt;
'''Rails In-Place Editing'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/best_in_place '''BestInPlace'''] BestInPlace is a jQuery script and a Rails 3 helper that provide the method best_in_place to display any object field easily editable for the user by just clicking on it. It supports input data, text data, boolean data and custom dropdown data. It works with RESTful controllers.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/best_in_place_mongoid '''best_in_place_mongoid'''] BestInPlaceMongoid is a fork of BestInPlace jQuery script and a Rails 3 helper that provide the method best_in_place to display any object field easily editable for the user by just clicking on it. It supports input data, text data, boolean data and custom dropdown data. It works with RESTful controllers.&lt;br /&gt;
&lt;br /&gt;
 '''CONTROLLER layer'''&lt;br /&gt;
&lt;br /&gt;
'''Background Jobs'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/resque '''Resque'''] Resque is a Redis-backed Ruby library for creating background jobs, placing those jobs on multiple queues, and processing them later. Background jobs can be any Ruby class or module that responds to perform. Your existing classes can easily be converted to background jobs or you can create new classes specifically to do work. Or, you can do both. Resque is heavily inspired by DelayedJob (which rocks) and is comprised of three parts: * A Ruby library for creating, querying, and processing jobs * A Rake task for starting a worker which processes jobs * A Sinatra app for monitoring queues, jobs, and workers.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/starling '''Starling'''] Starling is a light-weight, persistent queue server that speaks the memcached protocol. It was originally developed for Twitter's backend.&lt;br /&gt;
&lt;br /&gt;
'''Scheduling'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/resque-scheduler '''resque-scheduler'''] Light weight job scheduling on top of Resque. Adds methods enqueue_at/enqueue_in to schedule jobs in the future. Also supports queueing jobs on a fixed, cron-like schedule.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/clockwork '''Clockwork'''] A scheduler process to replace cron, using a more flexible Ruby syntax running as a single long-running process. Inspired by rufus-scheduler and resque-scheduler.&lt;br /&gt;
&lt;br /&gt;
'''Code Metrics'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/simpleCov '''SimpleCov'''] Code coverage for Ruby 1.9 with a powerful configuration library and automatic merging of coverage across test suites.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/flay '''Flay'''] Flay analyzes code for structural similarities. Differences in literal values, variable, class, method names, whitespace, programming style, braces vs do/end, etc are all ignored. Making this totally rad.&lt;br /&gt;
&lt;br /&gt;
'''E-Mail Sending'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/actionmailer '''Action Mailer'''] Email on Rails. Compose, deliver, receive, and test emails using the familiar controller/view pattern. First-class support for multipart email and attachments.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/capistrano_mailer '''capistrano_mailer'''] Capistrano Deployment Email Notification. Keep the whole team informed of each release!&lt;br /&gt;
&lt;br /&gt;
 '''TESTING'''&lt;br /&gt;
&lt;br /&gt;
'''Browser testing'''&lt;br /&gt;
&lt;br /&gt;
* [http://rubygems.org/gems/capybara '''Capybara'''] Capybara is an integration testing tool for rack based web applications. It simulates how a user would interact with a website.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/webrat '''Webrat'''] Webrat lets you quickly write expressive and robust acceptance tests for a Ruby web application. It supports simulating a browser inside a Ruby process to avoid the performance hit and browser dependency of Selenium or Watir, but the same API can also be used to drive real Selenium tests when necessary (eg. for testing AJAX interactions). Most Ruby web frameworks and testing frameworks are supported.&lt;br /&gt;
&lt;br /&gt;
'''Random Data Generation'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/faker '''Faker'''] Faker, a port of Data::Faker from Perl, is used to easily generate fake data: names, addresses, phone numbers, etc.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/forgery '''Forgery'''] Easy and customizable generation of forged data. Can be used as a gem or a rails plugin. Includes rails generators for creating your own forgeries.&lt;br /&gt;
&lt;br /&gt;
'''Unit Test Frameworks'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/test-unit '''test-unit'''] Ruby 1.9.x bundles minitest not Test::Unit. Test::Unit bundled in Ruby 1.8.x had not been improved but unbundled Test::Unit (test-unit) is improved actively.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/wrong '''Wrong'''] Wrong provides a general assert method that takes a predicate block. Assertion failure messages are rich in detail. The Wrong idea is to replace all those countless assert_this, assert_that library methods which only exist to give a more useful failure message than &amp;quot;assertion failed&amp;quot;. Wrong replaces all of them in one fell swoop, since if you can write it in Ruby, Wrong can make a sensible failure message out of it. Also provided are several helper methods, like rescuing, capturing, and d.&lt;br /&gt;
&lt;br /&gt;
* Other useful Ruby Gems here. [https://www.ruby-toolbox.com/projects/testrocket '''testrocket'''], [https://www.ruby-toolbox.com/projects/kintama '''kintama'''], [https://www.ruby-toolbox.com/projects/lemon '''Lemon'''], [https://www.ruby-toolbox.com/projects/shindo '''Shindo'''].&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
[http://guides.rubygems.org/make-your-own-gem/ Creating your own Ruby Gem]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://rubygems.rubyforge.org/rubygems-update/UPGRADING_rdoc.html How to Upgrade/Downgrade Ruby Gems]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://rubylearning.com/blog/ Collection of Ruby Study Notes]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://net.tutsplus.com/articles/web-roundups/24-extremely-useful-ruby-gems-for-web-development/ 24 extremely useful Ruby Gems for web development]&lt;br /&gt;
&lt;br /&gt;
== References==&lt;br /&gt;
1. [http://guides.rubygems.org/rubygems-basics/#installing_gems www.rubygems.org]&amp;lt;br&amp;gt;&lt;br /&gt;
2. [http://timelessrepo.com/making-ruby-gems www.timelessrepo.com]&amp;lt;br&amp;gt;&lt;br /&gt;
3. [https://www.ruby-toolbox.com www.ruby-toolbox.com]&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Npari</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch1_1w24_nv&amp;diff=79107</id>
		<title>CSC/ECE 517 Fall 2013/ch1 1w24 nv</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch1_1w24_nv&amp;diff=79107"/>
		<updated>2013-09-25T02:24:56Z</updated>

		<summary type="html">&lt;p&gt;Npari: /* See Also */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Ruby Gem is a package manager for Ruby programming language. It allows users to easily download, install and use software packages on their system. The functionality of a Ruby application can be modified or extended with the help of Gems. In the version 1.9 of Ruby, Ruby Gems has been made a part of the standard library.&lt;br /&gt;
&lt;br /&gt;
== '''A Tour of Ruby Gems''' ==&lt;br /&gt;
== Definition of a Ruby Gem ==&lt;br /&gt;
In simple terms, a Ruby Gem is a package containing files that can be installed in a system and can help expand the functionality of a Ruby application. Ruby gems are very powerful. Ruby programmers create and publish Ruby Gems as open source in [https://github.com/ github]. It is very east to install, upgrade and delete Gems in a system.&lt;br /&gt;
&lt;br /&gt;
== Structure of Ruby Gem ==&lt;br /&gt;
Every Gem has a set of files and the following standard structure &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ tree -d newgem&lt;br /&gt;
|-- lib/&lt;br /&gt;
|   |-- newgem.rb&lt;br /&gt;
|   `-- newgem/&lt;br /&gt;
|       |-- base.rb&lt;br /&gt;
|       `-- version.rb&lt;br /&gt;
|-- test/&lt;br /&gt;
|-- bin/&lt;br /&gt;
|-- Rakefile&lt;br /&gt;
`-- newgem.gemspec&amp;lt;/pre&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
The ''lib'' folder has the code of the ruby gem. It has ''newgem.rb'' file and a folder named ''newgem''. This folder has two files which are ''base.rb'' and ''version.rb''. The version number is recorded in ''version.rb'' and can be changed when the gem is updated. The ''bin'' directory has any binaries that is a part of the gem file and should be distributed with the gem. A gem usually has a ''Rakefile''. The rake program uses this to generate code and automate tests in addition to performing other tasks. The Gem specification file ''newgem.gemspec'' contains details specific to the gem. The file has details such as the gem name,the files that are in it, the gems it depends on for  performing testing, the gems it depends on for actually running and other details.&lt;br /&gt;
&lt;br /&gt;
== Listing existing Gems ==&lt;br /&gt;
To list the existing gems in a system ''list'' keyword can be used in the command line.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem list&lt;br /&gt;
&lt;br /&gt;
*** LOCAL GEMS ***&lt;br /&gt;
&lt;br /&gt;
actionmailer (3.2.3)&lt;br /&gt;
actionpack (3.2.3)&lt;br /&gt;
activemodel (3.2.3)&lt;br /&gt;
activerecord (3.2.3)&lt;br /&gt;
activeresource (3.2.3)&lt;br /&gt;
activesupport (3.2.3)&lt;br /&gt;
arel (3.0.2)&lt;br /&gt;
bigdecimal (1.1.0)&lt;br /&gt;
builder (3.0.4)&lt;br /&gt;
bundler (1.3.5)&lt;br /&gt;
capybara (2.1.0)&lt;br /&gt;
coffee-rails (3.2.2)&lt;br /&gt;
coffee-script (2.2.0)&lt;br /&gt;
coffee-script-source (1.6.3)&lt;br /&gt;
erubis (2.7.0)&lt;br /&gt;
execjs (2.0.1)&lt;br /&gt;
hike (1.2.3)&lt;br /&gt;
i18n (0.6.5)&lt;br /&gt;
io-console (0.3)&lt;br /&gt;
journey (1.0.4)&lt;br /&gt;
jquery-rails (3.0.4)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installing a new Gem ==&lt;br /&gt;
The ''install'' keyword can be used in command line to install gems. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem install capybara&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Uninstalling a Gem ==&lt;br /&gt;
The ''uninstall'' keyword can be used in command line to uninstall any existing gem in the system.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem uninstall capybara&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you uninstall a dependency of a gem [[http://wiki.expertiza.ncsu.edu/index.php/CSC/ECE_517_Fall_2013/ch1_1w24_nv RubyGems]] will ask you for confirmation.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem uninstall rbtree&lt;br /&gt;
&lt;br /&gt;
You have requested to uninstall the gem:&lt;br /&gt;
	rbtree-0.4.1&lt;br /&gt;
&lt;br /&gt;
drip-0.0.2 depends on rbtree (&amp;gt;= 0)&lt;br /&gt;
If you remove this gem, these dependencies will not be met.&lt;br /&gt;
Continue with Uninstall? [yN]  n&lt;br /&gt;
ERROR:  While executing gem ... (Gem::DependencyRemovalException)&lt;br /&gt;
    Uninstallation aborted due to dependent gem(s)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Update all existing Gems == &lt;br /&gt;
The ''update'' keyword can be used in command line to update all existing gems in the system.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ gem update &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Some important Gems that are useful in RAILS environment ==&lt;br /&gt;
&lt;br /&gt;
There are many gems which provide easy of functionality that can be included in the rails development environment. [http://bundler.io/ Bundler]is a useful gem that enables a developer to quickly add and manage gems in a few lines of code.&lt;br /&gt;
&lt;br /&gt;
We can classify the Gems based on the usage in different layers Model, View and Controller.&lt;br /&gt;
&lt;br /&gt;
 '''MODEL layer'''&lt;br /&gt;
&lt;br /&gt;
'''Active Record Plugins''' &lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/activerecord-oracle_enhanced-adapter '''oracle-enhanced'''] Oracle &amp;quot;enhanced&amp;quot; ActiveRecord adapter contains useful additional methods for working with new and legacy Oracle databases. This adapter is superset of original ActiveRecord Oracle adapter.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/activerecord-jdbc-adapter '''activerecord-jdbc-adapter'''] This adapter is build on JDBC API used for connecting to the database. AR-JDBC is a database adapter for Rails' ActiveRecord component. It allows to connect to virtually any JDBC-compliant database with your JRuby on Rails application.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/activerecord-nulldb-adapter '''nulldb'''] .This helps in Database simulation and testing. A database backend that translates database interactions into no-ops. We can test our model business logic with wanting to experiment with real database.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/oracle-enhanced-enhanced '''oracle-enhanced-enhanced'''] It includes several enhancements and customization to the standard ActiveRecord Oracle Enhapnced adapter, which is still required. Any customization to this adapter's behavior or additional Oracle-specific utilities should be added here.&lt;br /&gt;
&lt;br /&gt;
* Other useful Ruby Gems here. [https://www.ruby-toolbox.com/projects/activerecord-sqlserver-adapter '''activerecord-sqlserver-adapter'''], [https://www.ruby-toolbox.com/projects/activerecord-jdbcmysql-adapter '''activerecord-jdbcmysql-adapter'''], [https://www.ruby-toolbox.com/projects/activerecord-jdbcpostgresql-adapter '''activerecord-jdbcpostgresql-adapter'''], [https://www.ruby-toolbox.com/projects/activerecord-jdbcderby-adapter '''activerecord-jdbcderby-adapter'''],.&lt;br /&gt;
&lt;br /&gt;
'''Active Record Index Assistants'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/foreigner '''foreigner'''] Adds helpers to migrations and dumps foreign keys to schema.rb.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/rails_indexes '''rails_indexes'''] A rake task to track down missing database indexes. does not assume that all foreign keys end with the convention of _id.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/schema_plus '''schema_plus'''] SchemaPlus is an ActiveRecord extension that provides enhanced capabilities for schema definition and querying, including: enhanced and more DRY index capabilities, support and automation for foreign key constraints, and support for views.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/automatic_foreign_key '''automatic_foreign_key'''] Automatic Foreign Key automatically generates foreign-key constraints when creating tables or adding columns. It uses SQL-92 syntax and as such should be compatible with most databases that support foreign-key constraints.&lt;br /&gt;
&lt;br /&gt;
* Other useful Ruby Gems here. [https://www.ruby-toolbox.com/projects/ambitious_query_indexer '''ambitious_query_indexer'''], [https://www.ruby-toolbox.com/projects/lol_dba '''lol_dba'''], [https://www.ruby-toolbox.com/projects/immigrant '''immigrant'''], [https://www.ruby-toolbox.com/projects/redhillonrails_core '''redhillonrails_core'''].&lt;br /&gt;
&lt;br /&gt;
'''Rails DB Bootstrapping'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/seed-fu '''seed-fu'''] Seed Fu is an attempt to once and for all solve the problem of inserting and maintaining seed data in a database. It uses a variety of techniques gathered from various places around the web and combines them to create what is hopefully the most robust seed data system around.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/populator '''populator'''] Mass populate an Active Record database.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/seedbank '''seedbank'''] Extends Rails seeds to split out complex seeds into multiple files and lets each environment have it's own seeds.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/has_alter_ego '''Has alter ego'''] has_alter_ego makes it possible to keep seed and live data transparently in parallel. In contrast to other seed data approaches has_alter_ego synchronizes the seed definitions with your database objects automagically unless you've overridden it in the database.&lt;br /&gt;
&lt;br /&gt;
* Other useful Ruby Gems here. [https://www.ruby-toolbox.com/projects/bootstrapper '''Bootstrapper'''], [https://www.ruby-toolbox.com/projects/db-populate '''Db-populate'''], [https://www.ruby-toolbox.com/projects/seed_dumper '''seed_dumper'''], [https://www.ruby-toolbox.com/projects/dibber '''dibber'''].&lt;br /&gt;
&lt;br /&gt;
'''Rails Search'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/Sunspot '''Sunspot'''] Sunspot is a library providing a powerful, all-ruby API for the Solr search engine. Sunspot manages the configuration of persistent Ruby classes for search and indexing and exposes Solr's most powerful features through a collection of DSLs. Complex search operations can be performed without hand-writing any boolean queries or building Solr parameters by hand.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/sunspot_rails '''sunspot_rails'''] Sunspot::Rails is an extension to the Sunspot library for Solr search. Sunspot::Rails adds integration between Sunspot and ActiveRecord, including defining search and indexing related methods on ActiveRecord models themselves, running a Sunspot-compatible Solr instance for development and test environments, and automatically commit Solr index changes at the end of each Rails request.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/tire '''Tire'''] Tire is a Ruby client for the Elasticsearch search engine/database. It provides Ruby-like API for fluent communication with the Elasticsearch server and blends with ActiveModel class for convenient usage in Rails applications. It allows to delete and create indices, define mapping for them, supports the bulk API, and presents an easy-to-use DSL for constructing your queries. It has full ActiveRecord/ActiveModel compatibility, allowing you to index your models (incrementally upon saving, or in bulk), searching and paginating the results.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/thinking-sphinx '''thinking-sphinx'''] An intelligent layer for ActiveRecord (via Rails and Sinatra) for the Sphinx full-text search tool.&lt;br /&gt;
&lt;br /&gt;
* Other useful Ruby Gems here. [https://www.ruby-toolbox.com/projects/pg_search '''pg_search'''], [https://www.ruby-toolbox.com/projects/redis-search '''redis-search'''], [https://www.ruby-toolbox.com/projects/ferret '''Ferret'''], [https://www.ruby-toolbox.com/projects/searchlight '''searchlight'''].&lt;br /&gt;
&lt;br /&gt;
'''Data Persistence'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/mongoid '''Mongoid'''] Mongoid is an ODM (Object Document Mapper) Framework for MongoDB, written in Ruby.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/mongomatic '''Mongomatic'''] Mongomatic is a modular Ruby object mapper for Mongo.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/dynamoid '''dynamoid'''] Dynamoid is an ORM for Amazon's DynamoDB that supports offline development, associations, querying, and everything else you'd expect from an ActiveRecord-style replacement.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/squeel '''squeel'''] Squeel unlocks the power of Arel in your Rails 3 application with a handy block-based syntax. You can write subqueries, access named functions provided by your RDBMS, and more, all without writing SQL strings.&lt;br /&gt;
&lt;br /&gt;
 '''VIEW layer'''&lt;br /&gt;
&lt;br /&gt;
'''CSS'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/sass '''Sass'''] Sass makes CSS fun again. Sass is an extension of CSS3, adding nested rules, variables, mixins, selector inheritance, and more. It's translated to well-formatted, standard CSS using the command line tool or a web-framework plugin.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/bourbon '''bourbon'''] The purpose of Bourbon Vanilla Sass Mixins is to provide a comprehensive framework of sass mixins that are designed to be as vanilla as possible. Meaning they should not deter from the original CSS syntax. The mixins contain vendor specific prefixes for all CSS3 properties for support amongst modern browsers. The prefixes also ensure graceful degradation for older browsers that support only CSS3 prefixed properties.&lt;br /&gt;
&lt;br /&gt;
* Other useful Ruby Gems here. [https://www.ruby-toolbox.com/projects/less '''Less'''], [https://www.ruby-toolbox.com/projects/sass-rails '''sass-rails'''], [https://www.ruby-toolbox.com/projects/stylus '''stylus'''], [https://www.ruby-toolbox.com/projects/patterns '''patterns''']&lt;br /&gt;
&lt;br /&gt;
'''Graphing'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/google_visualr '''google_visualr'''] This Ruby gem, GoogleVisualr, is a wrapper around the Google Chart Tools that allows anyone to create the same beautiful charts with just Ruby; you don't have to write any JavaScript at all.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/highcharts-rails '''highcharts-rails'''] Gem that includes Highcharts (Interactive JavaScript charts for your web projects), in the Rails Asset Pipeline introduced in Rails 3.1.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/seer '''Seer'''] Gem that includes Highcharts (Interactive JavaScript charts for your web projects), in the Rails Asset Pipeline introduced in Rails 3.1.Seer is a lightweight, semantically rich wrapper for the Google Visualization API. It allows you to easily create a visualization of data in a variety of formats, including area charts, bar charts, column charts, gauges, line charts, and pie charts.&lt;br /&gt;
&lt;br /&gt;
'''HTML &amp;amp; Markup'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/formula '''formula'''] Formula is a Rails form generator that generates simple clean markup. The project aims to let users create semantically beautiful forms without introducing too much syntax. The goal is to make integrating advanced layout systems as simple as possible.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/formtastic '''Formtastic'''] A Rails form builder plugin/gem with semantically rich and accessible markup.&lt;br /&gt;
&lt;br /&gt;
'''JavaScript'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/jasmine '''Jasmine'''] Test your JavaScript without any framework dependencies, in any environment, and with a nice descriptive syntax.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/konacha '''konacha'''] Konacha is a Rails engine that allows you to test your JavaScript with the mocha test framework and chai assertion library. It is similar to Jasmine and Evergreen, but does not attempt to be framework agnostic. By sticking with Rails, Konacha can take full advantage of features such as the asset pipeline and engines&lt;br /&gt;
&lt;br /&gt;
'''Rails In-Place Editing'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/best_in_place '''BestInPlace'''] BestInPlace is a jQuery script and a Rails 3 helper that provide the method best_in_place to display any object field easily editable for the user by just clicking on it. It supports input data, text data, boolean data and custom dropdown data. It works with RESTful controllers.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/best_in_place_mongoid '''best_in_place_mongoid'''] BestInPlaceMongoid is a fork of BestInPlace jQuery script and a Rails 3 helper that provide the method best_in_place to display any object field easily editable for the user by just clicking on it. It supports input data, text data, boolean data and custom dropdown data. It works with RESTful controllers.&lt;br /&gt;
&lt;br /&gt;
 '''CONTROLLER layer'''&lt;br /&gt;
&lt;br /&gt;
'''Background Jobs'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/resque '''Resque'''] Resque is a Redis-backed Ruby library for creating background jobs, placing those jobs on multiple queues, and processing them later. Background jobs can be any Ruby class or module that responds to perform. Your existing classes can easily be converted to background jobs or you can create new classes specifically to do work. Or, you can do both. Resque is heavily inspired by DelayedJob (which rocks) and is comprised of three parts: * A Ruby library for creating, querying, and processing jobs * A Rake task for starting a worker which processes jobs * A Sinatra app for monitoring queues, jobs, and workers.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/starling '''Starling'''] Starling is a light-weight, persistent queue server that speaks the memcached protocol. It was originally developed for Twitter's backend.&lt;br /&gt;
&lt;br /&gt;
'''Scheduling'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/resque-scheduler '''resque-scheduler'''] Light weight job scheduling on top of Resque. Adds methods enqueue_at/enqueue_in to schedule jobs in the future. Also supports queueing jobs on a fixed, cron-like schedule.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/clockwork '''Clockwork'''] A scheduler process to replace cron, using a more flexible Ruby syntax running as a single long-running process. Inspired by rufus-scheduler and resque-scheduler.&lt;br /&gt;
&lt;br /&gt;
'''Code Metrics'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/simpleCov '''SimpleCov'''] Code coverage for Ruby 1.9 with a powerful configuration library and automatic merging of coverage across test suites.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/flay '''Flay'''] Flay analyzes code for structural similarities. Differences in literal values, variable, class, method names, whitespace, programming style, braces vs do/end, etc are all ignored. Making this totally rad.&lt;br /&gt;
&lt;br /&gt;
'''E-Mail Sending'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/actionmailer '''Action Mailer'''] Email on Rails. Compose, deliver, receive, and test emails using the familiar controller/view pattern. First-class support for multipart email and attachments.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/capistrano_mailer '''capistrano_mailer'''] Capistrano Deployment Email Notification. Keep the whole team informed of each release!&lt;br /&gt;
&lt;br /&gt;
 '''TESTING'''&lt;br /&gt;
&lt;br /&gt;
'''Browser testing'''&lt;br /&gt;
&lt;br /&gt;
* [http://rubygems.org/gems/capybara '''Capybara'''] Capybara is an integration testing tool for rack based web applications. It simulates how a user would interact with a website.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/webrat '''Webrat'''] Webrat lets you quickly write expressive and robust acceptance tests for a Ruby web application. It supports simulating a browser inside a Ruby process to avoid the performance hit and browser dependency of Selenium or Watir, but the same API can also be used to drive real Selenium tests when necessary (eg. for testing AJAX interactions). Most Ruby web frameworks and testing frameworks are supported.&lt;br /&gt;
&lt;br /&gt;
'''Random Data Generation'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/faker '''Faker'''] Faker, a port of Data::Faker from Perl, is used to easily generate fake data: names, addresses, phone numbers, etc.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/forgery '''Forgery'''] Easy and customizable generation of forged data. Can be used as a gem or a rails plugin. Includes rails generators for creating your own forgeries.&lt;br /&gt;
&lt;br /&gt;
'''Unit Test Frameworks'''&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/test-unit '''test-unit'''] Ruby 1.9.x bundles minitest not Test::Unit. Test::Unit bundled in Ruby 1.8.x had not been improved but unbundled Test::Unit (test-unit) is improved actively.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ruby-toolbox.com/projects/wrong '''Wrong'''] Wrong provides a general assert method that takes a predicate block. Assertion failure messages are rich in detail. The Wrong idea is to replace all those countless assert_this, assert_that library methods which only exist to give a more useful failure message than &amp;quot;assertion failed&amp;quot;. Wrong replaces all of them in one fell swoop, since if you can write it in Ruby, Wrong can make a sensible failure message out of it. Also provided are several helper methods, like rescuing, capturing, and d.&lt;br /&gt;
&lt;br /&gt;
* Other useful Ruby Gems here. [https://www.ruby-toolbox.com/projects/testrocket '''testrocket'''], [https://www.ruby-toolbox.com/projects/kintama '''kintama'''], [https://www.ruby-toolbox.com/projects/lemon '''Lemon'''], [https://www.ruby-toolbox.com/projects/shindo '''Shindo'''].&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
[http://guides.rubygems.org/make-your-own-gem/ Creating your own Ruby Gem]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://rubygems.rubyforge.org/rubygems-update/UPGRADING_rdoc.html How to Upgrade/Downgrade Ruby Gems]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://rubylearning.com/blog/ Collection of Ruby Study Notes]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://net.tutsplus.com/articles/web-roundups/24-extremely-useful-ruby-gems-for-web-development/ 24 extremely useful Ruby Gems for web development]&lt;br /&gt;
&lt;br /&gt;
== References==&lt;br /&gt;
1. [http://guides.rubygems.org/rubygems-basics/#installing_gems www.rubygems.org]&amp;lt;br&amp;gt;&lt;br /&gt;
2. [http://timelessrepo.com/making-ruby-gems www.timelessrepo.com]&amp;lt;br&amp;gt;&lt;br /&gt;
3. [https://www.ruby-toolbox.com www.ruby-toolbox.com]&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Npari</name></author>
	</entry>
</feed>