Reputation: 25872
I'm on Ubuntu. I type in sudo gem install rails
. This works fine, installs railes and 7 other gems fine. Yet $ rails blog
is saying this:
The program 'rails' is currently not installed. You can install it by typing:
sudo apt-get install rails
Upvotes: 3
Views: 1224
Reputation: 18833
I know this is an old thread but the same error had me stuck. Make sure you add
source ~/.rvm/scripts/rvm
to your .bashrc
file
Upvotes: 0
Reputation: 42198
how did you install rubygems, as an admin, or as a user? if you installed it as a user, it may not have the bin directory in your path.
If I were you, (assuming you installed rubygems into your home folder), I would trash that installation dir (not sure where it defaults to, maybe ~/rubygems? or ~/.rubygems?), then run setup.rb from the rubygems tarball as admin (through sudo) I've done this at least a dozen times on ubuntu, and haven't run into the issue you are hitting.
If that isn't the case, could you please link to the blog post you were following?
Upvotes: 2
Reputation: 1909
Type
gem env
It will give you the installable directory where the bins of the gems are being installed. Something like this:
EXECUTABLE DIRECTORY: /usr/bin
Make sure this directory is in your path.
Upvotes: 3
Reputation: 94153
Make sure your gem
executable path is added to your system path so that the system can find the rails executable.
Upvotes: 2