Using Ruby on Rails 2.0
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:
If the output is 0.9.2, then this article pertains to your service.
gem --version
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:
- Setting up your Ruby On Rails (gc) Grid-Container
- http://www.rubyonrails.org
- http://svnbook.red-bean.com/en/1.4/svn.advanced.externals.html
- http://weblog.rubyonrails.org/2006/3/31/freeze-is-cool-so-freeze-for-goodness-sake
Revisions:
06-10-2008: Article update to reflect RubyGems change
Fields marked with an asterisk(*) are required. Comment on this article