Support / KnowledgeBase

 
Search the KnowledgeBase Search

Using Ruby on Rails 2.0

  • Applies to: (gs)

  • Difficulty: Medium

  • Time needed: 5 minutes

  • Tools needed: ssh, vi knowledge

 

WARNING:

(mt) Media Temple only supports the basic operation and up-time of our (gs) Application Container Technology.  Please consult our Scope of Support for further details.

NOTE:

This article only applies if you are using RubyGems 0.9.2 inside your container.  If you installed your container after 06/10/2008, or followed this article, you are already using RubyGems 1.1.1 or higher.  Rails 2.0 should already be compatible with these versions of RubyGems.  To determine your current version run the following command:

gem --version
If the output is 0.9.2, then this article pertains to your service.

Due to the architecture of Ruby and RubyGems on the (gs) Grid-Service and recent changes in the RubyGems implementation in version 0.9.5, enabling Ruby on Rails 2.0 to run as a RubyGem is not possible at this time. We are investigating how to make this possible while still maintaining compatibility with existing customers.

There are currently two ways to work around this limitation as outlined below.

Using Ruby on Rails version 1.2.6

Unless your application requires Ruby on Rails 2.0 you can use the previous stable version (1.2.6).

To install a specific version of Rails use a command similar to this:

gem install rails --version 1.2.6 

This will install Rails 1.2.6 and the appropriate dependent libraries for that release.

Using a frozen copy of Rails 2.0

Freezing copies of a certain version of Rails into your application's vendor directory removes Rails' dependency on RubyGems and allows Rails 2.0 to be used on the (gs) Grid-Service.

Just run the following command while inside the application's main directory:

rake rails:freeze:edge TAG=rel_2-0-1 

Alternately, if you use Subversion for source control, an svn:externals definition can be used. Run the following command inside the application's main directory:


svn propset svn:externals "rails http://svn.rubyonrails.org/rails/tags/rel_2-0-1" vendor

Commit the vendor directory and then update to pull down the Rails source.

The application will now use Rails 2.0.

Notes/Supplemental Resources:

Revisions:

06-10-2008: Article update to reflect RubyGems change

User Comments

No visitor comments posted. Post a comment

Fields marked with an asterisk(*) are required. Comment on this article

Fill out the form below if you would like to comment on this article.
 
 
 

(code is not case-sensitive)
 
Submit
 
 

Continue