Reputation: 11950
I am using Rails 3.2.14
and Ruby ruby 1.9.3p194 (2012-04-20 revision 35410) [i686-linux]
with out having RVM.
I need to use Rails 2.3 besides my current Rails version on the same machine. I have searched for what allows me to use both of them on the same machine and I found its RVM.
I am using Oh-My-ZSH
and I have typed this command to install RVM
\curl -L https://get.rvm.io | bash -s stable
After installation I got this warning
* WARNING: You have '~/.profile' file, you might want to load it,
to do that add the following line to '/home/dexter/.bash_profile':
source ~/.profile
And i don't know what should i do with my current ruby and rails. What is the needed steps to use both of Rails 3 and Rails to and what about the previous warning also what about by the following
➜ ~ ruby -v
ruby 1.9.3p194 (2012-04-20 revision 35410) [i686-linux]
➜ ~ which ruby
ruby: aliased to bundled_ruby
when I type rvm list:
rvm list
rvm rubies
# No rvm rubies installed yet. Try 'rvm help install'.
also when i try to go to my project which is called Triton
➜ ~ cd ~/Desktop\ item/Triton
RVM used your Gemfile for selecting Ruby, it is all fine - Heroku does that too,
you can ignore these warnings with 'rvm rvmrc warning ignore /home/dexter/Desktop item/Triton/Gemfile'.
To ignore the warning for all files run 'rvm rvmrc warning ignore allGemfiles'.
ruby-1.9.3-p448 is not installed.
To install do: 'rvm install ruby-1.9.3-p448'
Upvotes: 1
Views: 2975
Reputation: 7869
You get no rvm rubies installed yet
because there are no rubies in rvm scope. Your 'main', system ruby has nothing common with ruby's installed with rvm, that's intentional. You should install ruby in rvm with:
rvm install ruby-1.9.3-p194
if you want specific pathlevel.
You can use it with
rvm use ruby-1.9.3-p194
if you want specific pathlevel. you should create then new gemset with
rvm gemset create PutNameHere
and then use it by (it should be done automatically if i remeber correctly)
rvm gemset use PutNameHere
since then you should install gems in regular way, they should go into specific gemset with specific ruby version.
Edit: If you want to install ruby 1.8.6
with rails 2
you should:
rvm install ruby-1.8.6 # this may take a while
rvm use ruby-1.8.6
rvm create gemset Triton # or any other name you like
rvm gemset use Triton
gem install rails -v '~> 2.3' # or an other version you want, but much better will be to do:
bundle install #of course in your app root directory - it will install all necessary gems altogeter with rails 2 or whatever you have specified
Upvotes: 1
Reputation: 1379
Install ruby any version you need with rvm. For example
$ rvm install 1.8.7
$ rvm use 1.8.7
$ gem install rails -v 2.3
To return to your system version of ruby with its gemset use
$ rvm use system
$ ruby -v
(Should be) ruby 1.9.3p194 (2012-04-20 revision 35410) [i686-linux]
To switch to 1.8.7 (for exxample) use
$ rvm use 1.8.7
Also you can use rvm for both version of rails with one ruby version - try gemsets
$ rvm install 1.9.3-p194
$ rvm use 1.9.3-p194
$ rvm gemset create rails2
$ rvm gemset use rails2
$ gem install rails 2.3
$ rvm gemset create rails3
$ rvm gemset use rails3
$ rvm install rails -v 3.2.14
for full info about gemsets look at http://rvm.io/gemsets
Upvotes: 3
Reputation: 593
I've had this warning and continued on with my installation without issue...can you type in 'rvm list', and does it recognize rvm as a command? Are you encountering a problem with your rails install further down the line?
Upvotes: 1