I installed ruby gems from their website and installed rails using gem
install rails
I got a successful installed notification.
But when I tried to use rails command, it gave me command not found.
After I installed gems. I had to create a symbolic link otherwise gem
command wouldn't work.
Debian and Ubuntu, at least, don't include the paths for your gems,
nor create any symlink.
I think you don't have many choices here, either you modify your path
or create symlinks for each installed gem that has executable files.
I use this script for rails (and mysql) install on 9.04, derived from
http://www.hackido.com/2009/04/install-ruby-rails-on-ubuntu-904-jaunty.html.
It assumes there is a folder called /home/colinl/downloads, edit this
to wherever you want. It gets several versions of Rails, which you
may not require.
# install bits for building stuff
sudo apt-get install build-essential
Gems, usually, are installed under /var/lib/gems/1.8/gems/
1 direcotry per gem, and inside each one of these directories, you'll
have a bin directory where executable files are placed.
Just to be sure where it is, you can do:
$sudo udpatedb
$sudo locate rails | grep bin