0
votes

I have two versions of Ruby set up: 1.8.7 and 1.9.2. Under 1.8.7, there is rails 3.0.1 when I do 'Rails -v'. When I use RVM to switch over to 1.9.2, I run the same command and get the error below:

1.9.2 ~ rails -v /usr/local/lib/site_ruby/1.8/rubygems/dependency.rb:247:in to_specs': Could not find rails (>= 0) amongst [] (Gem::LoadError) from /usr/local/lib/site_ruby/1.8/rubygems/dependency.rb:256:into_spec' from /usr/local/lib/site_ruby/1.8/rubygems.rb:1182:in `gem' from /usr/bin/rails:18

***please advise what i should do in order to get rails working under both RVM installed Rubies. For more info: Rails 3.0.1 is installed in my usr/bin/rails directory which appears to be a ROOT install (prob when I ran as sudo).

2

2 Answers

1
votes

gem install rails -v=version for each rvm

If you have installed RVM you should not use sudo for installing gem. Maybe you installed RVM in the HOME directory of root user which is not what you want. You should be able to follow this guide wrote by Ryan Bigg, it contain very good explanation step by step about how to setup RVM and Rails on Ubuntu.

0
votes
gem uninstall -i /Users/user/.rvm/gems/ruby-1.9.2-head@global bundler  

Type this command and removed the extra bundle
Problem is fixed in mine