Reputation: 1447
I was working on a project with Rails3 and Ruby 1.9.3 when suddenly it said I don't have Rails installed.
Originally I used RVM and I tried to do it again to reinstall Rails, but when I run rails -v
, it says Rails is not currently installed on this system.
Does anybody have an idea what I should do next to solve this problem?
I know it is not recommended to do rvm uninstall
but what other option do I have?
I am using OSX 10.7.5.
Upvotes: 0
Views: 59
Reputation: 482
Before doing this be sure that you installed RVM correctly.
Then check which Ruby is selected with this command:
rvm list
If the proper Ruby is not selected then select your desired Ruby using:
rvm 1.9.3
Then use:
gem install rails
to install Rails.
Or You can try this also
Create a default gemset to store your gems
$rvm use 1.9.3@mygemset --create --default
Then install Rails
$ gem install rails
I think this solve your issue
Upvotes: 2
Reputation: 160551
Use rvm info
to see what RVM knows about your system and its settings.
Use rvm use 1.9.3 --default
to set RVM's default to your 1.9.3 version of Ruby.
If you have multiple Rubies installed, it's possible you installed Rails under a different Ruby, so you'll need to try switching between them to find where it's living.
Using rvm implode
or rvm uninstall <some version of ruby>
are last-case measures when a Ruby or RVM is totally acting up, so don't go there unless you need to.
You can use gem list rails
to see if a particular Ruby has Rails installed.
RVM is a very powerful tool, with a lot of features, which will let you shoot yourself in the foot if you don't pay attention or know what you're doing. 99% of the problems we see with RVM are directly tied to the user not having read the directions completely (or at all), thrashing around, or using the wrong instructions for RVM. READ the rvm.io pages to learn what it can do; Don't rely on non-RVM sites to give you instructions because they go stale quickly, and can give you bad advice. Trust the RVM folks for the information on how to use their own tool.
Upvotes: 1