can i have two rails versions

hey everyone i am using ubuntu 11.04 and i wanna install rails 3.0.0
now i have 2.3.8 rails and 1.8.7 ruby. how can i have both of them

Use rvm and enjoy :slight_smile:

ok but will my previous rails will be there.

You are basically installing a new ruby version with a whole new set of gems while using rvm and you can switch between the ruby versions using rvm. So, in the new ruby inside rvm, there will be no gems. You will have to install all the gems including rails. So, the previous version of rails will not be there in the new ruby version from rvm. It will be inside the ruby you have installed before without using rvm.

If you want to use the ruby installed already before installing rvm, you can use rvm use system.

Please see to the bottom.

hi i have installed rails3.2.1 and rvm but this had happen
*** LOCAL GEMS ***

actionmailer (3.2.1, 2.3.8)
actionpack (3.2.1, 2.3.8)
activemodel (3.2.1)
activerecord (3.2.1, 2.3.14, 2.3.8)
activeresource (3.2.1, 2.3.8)
activesupport (3.2.1, 2.3.14, 2.3.8)
addressable (2.2.6)
arel (3.0.0)
builder (3.0.0)
bundler (1.0.21)
choice (0.1.4)
cocaine (0.2.1)
columnize (0.3.6)
declarative_authorization (0.5.4)
erubis (2.7.0)
faraday (0.7.5)
google-spreadsheet-ruby (0.1.6)
hike (1.2.1)
i18n (0.6.0)
journey (1.0.1)
json (1.6.5)
linecache (0.46)
log4r (1.1.10)
mail (2.4.1)
memcache-client (1.8.5)
mime-types (1.17.2)
multi_json (1.0.4)
multipart-post (1.1.4)
nokogiri (1.5.0)
oauth (0.4.5)
oauth2 (0.5.2)
polyglot (0.3.3)
prawn (0.8.4)
prawn-core (0.8.4)
prawn-format (0.2.3)
prawn-layout (0.8.4)
prawn-security (0.8.4)
rack (1.4.1, 1.1.3)
rack-cache (1.1)
rack-ssl (1.3.2)
rack-test (0.6.1)
rails (2.3.8)
railties (3.2.1)
rake (
rbx-require-relative (0.0.5)
rdoc (3.12)
roo (1.10.1)
ruby-debug (0.10.4)
ruby-debug-ide (0.4.6)
ruby-ole (
rubyzip (0.9.5)
searchlogic (2.5.8)
spreadsheet (
sprockets (2.1.2)
text-format (1.0.0)
text-hyphen (1.0.2)
thor (0.14.6)
tilt (1.3.3)
todonotes (0.1.0)
treetop (1.4.10)
tzinfo (0.3.31)
latest and old both are there and how can i use my previous rails 2.3.8

You can create the rails 3 application by ‘rails new appname’
And for rails 2 application ‘rails_2.3.8_appname



Actually, you can use both Rails 2.3.8 and Rails 3.2.1 while using Ruby 1.8.7.

For example, if you want to create a new project, you can use:

  1. Rails 3.2.1 - ‘rails new appname’
  2. Rails 2.3.8 - ‘r
    ails 2.3.8 appname’

Already running projects will work as it should.

But, when I suggested ‘rvm’, I was thinking you would install rvm, then install Ruby 1.9.2 or Ruby 1.8.7 using RVM (Ruby 1.9.2 is more suitable for Rails 3). Then you would install gem Rails 3 and other asociated gems in the RVM installed Ruby so that it wont affect your system Ruby. You can easily switch between system installed Ruby and RVM installed Ruby using 'rvm use ’ and ‘rvm use system’ commands. Or maybe, discard the ruby in the system and use rvm to install both the ruby versions, and use RVM to switch between the Ruby versions.

The former was the way, we used before RVM, and we use the RVM method now.

You need to read the rvm documentation on gemsets.