This forum is no longer active. Please post your questions to our new community site

Need to update RubyStack to Rails 2.2.2

Subscribe to Need to update RubyStack to Rails 2.2.2 10 post(s), 6 voice(s)

Avatar euwero 9 post(s)

Hi, I’m running Rails 2.1.1 installed from bitnami-rubystack-1.2-1-linux-installer on a Linux pc 2.6.24-etchnhalf.1-486 #1 Mon Jul 21 10:36:16 UTC 2008 i686 GNU/Linux machine.
I tried to update as described in Railscasts #137 but had no success.

Can someone help please.
Kind regards

Avatar carlos Administrator 144 post(s)

Hi euwero,

to install new version of Rails you can do the following: start rubyconsole, update rubygems and, install new rails version with correct shebang (adding -E option). That is:

$ <rubystack_path>/rubyconsole
$ gem update --system
$ gem install rails -v2.2.2 -E

After that, you should have correct version available:

$ rails -v 
Rails 2.2.2

To make your Rails applications work with the new version you should modify “<application_path>/config/environment.rb” with:

RAILS_GEM_VERSION = '2.2.2' unless defined? RAILS_GEM_VERSION
or if you have a frozen Rails inside <application_path>/vendor/rails you will need to replace it with a new frozen version

I hope it helps you

Avatar euwero 9 post(s)

Hi carlos,
thanks for your help. These steps went OK, but Rails 2.2.2 needs gem 1.3 as described in #137.

$ <rubystack_path>/rubyconsole
$ gem update—system
$ gem install rubygems-update
$ update_rubygems

The last command doesn’t end.

Kind regards

Avatar carlos Administrator 144 post(s)


it’s true I thought update—system was doing the upgrade.

To use update_rubygems, you can try commenting out the lines:

#export RUBYOPT
inside “<rubystack_path>/scripts/” just before running it.

Once it has finished you should modify shebang in “<rubystack_path>/ruby/bin/gem” to be:

#!/usr/bin/env <rubystack_path>/ruby/bin/ruby
and remove the previously added comments in “” file.

After that, you should get correct gem version

$ gem -v

Avatar euwero 9 post(s)

Hi carlos,
thank you so much. This was a good help. I only had to modify the first line in
“<rubystack_path>/ruby/bin/update_rubygems” to
”#!/usr/bin/env <rubystack_path>/ruby/bin/ruby” before running it.
I think all is OK now.

Kind regards

Avatar MySchizoBuddy 22 post(s)

Will RubyStack 1.4 Final come with Rails 2.2 or not
By the time 1.4 final is released, Probably Rails 2.3 will also be released

Avatar antonio 621 post(s)

We don’t know when RubyStack 1.4 Final will come out yet

Avatar United20 2 post(s)


I have exact the same problem with RubyStack for Windows.
I tried to modify the “<rubystack_path>/scripts/setenv.bat” …
But it doesn’t work under Windows. ;)

Is there any way to update the Gems / Rails under Windows?

Regards from Germany

Avatar United20 2 post(s)

Okay I found a solution.
The Problem is that I’m using the Aptana-Studio in combination with RubyStack.

If somebody under Windows has the same problem:
Start Aptana Studio -> go to the console window -> type in: gem install rubygems-update

After that you have to open up a cmd prompt!!!
Run there the:



Test it unter Aptana – Console:
gem -v

Ok… Then:
gem update rails



Avatar Beltrán Rueda Administrator 3,714 post(s)


Thanks for posting the solution, this post could help other users who use RubyStack and Aptana.