On all my gem installs I have to do sudo ? So
sudo gem install rails
will work, while only
gem install
When you install them without sudo, Ruby doesn't know where they get installed to. I can't remember where it installs them by default, probably somewhere like ~/.gems or something. Anyway, you can tell Ruby that's where they're installed by setting the GEM_HOME environment variable.
$ # assuming your gems are stored in ~/.gems
$ GEM_HOME="$HOME/.gems" ruby my_program.rb
If that works, then you might put it in your ~/.bashrc (there are a number of possible files this could go in, depending on your system)