mango
mango

Reputation: 5636

Rails doesn't seem to have been added to Ubuntu path

I am a newbie with Ubuntu (12:04) and I'm trying to install rails on it. I did use rvm and I used the command gem install rails. Everything seemed to go well. But when i try to use the rails command (rails -v, rails console) anything, the output is that rails was not installed.

Essentially the same exact issue as here: http://craiccomputing.blogspot.com/2009/07/installing-rails-on-ubuntu-path-problem.html

however the fix was to use # export PATH=/var/lib/gems/1.8/bin:$PATH But I don't see this folder location on my system. Perhaps folder locations have changed with newer rails versions. I even tried to look in the rvm gem bin but didn't see any rails in there. Any help?

Upvotes: 1

Views: 2677

Answers (1)

lurker
lurker

Reputation: 58224

First, it must be determined if rvm appears to be properly installed:

rvm list

Should show available Rubies. In particular, ruby-1.9.3-p429 should be listed there based upon what your directory shows. Then, select the Ruby that's installed:

rvm use 1.9.3

This should execute successfully. Type:

ruby --version

Should give you the version of ruby and it should be 1.9.3-p429. If it's not or it gives you an error, you'll need to start over and reinstall rvm per instructions the RVM site.

If that is successful, then go to your Rails project folder and type in:

gem install rails

That should properly install rails for the selected Ruby under rvm. After that, check that it's installed by typing (from within the same folder):

rails --version

If this isn't working, echo $PATH and make sure your ~/.rvm/... directories are there. Check that the bin directories have these commands. If they don't, then there's something wrong with your rvm installation.

Upvotes: 3

Related Questions