Check this out. When I SSH'd to my hosting site and did "vim .gemrc" I saw this in the editor:
---
gem: --remote --gen-rdoc --run-tests
gemhome: /home/lsiden/ruby/gems
gempath: []
rdoc: --inline-source --line-numbers
I think that part of the problem is that "gem install" puts them in ~/ruby/gems/gems instead of ~/ruby/gems. Don't know why.
Ahhh. I see the problem now:
#gem environment
...
- GEM PATHS:
- /usr/lib/ruby/gems/1.8
- /home/lsiden/
.gem/ruby/1.8
...
But then why would "gem install ..." put stuff in ~/
ruby/gems/gems? I'll try it with -i ~/ruby/gems/gems.
Nope. Had to edit .gemrc like so:
# cat .gemrc
---
gem: --remote --gen-rdoc --run-tests
--- gemhome: /home/lsiden/ruby/gems
gemhome: /home/lsiden/.gem/ruby/1.8/gems
gempath: []
rdoc: --inline-source --line-numbers
---------------
# gem install sinatra
WARNING: Installing to ~/.gem since /usr/lib/ruby/gems/1.8 and
/usr/bin aren't both writable.
WARNING: You don't have /home/lsiden/.gem/ruby/1.8/bin in your PATH,
gem executables will not run.
Successfully installed rack-1.0.1
Successfully installed sinatra-0.9.4
2 gems installed
...
# ruby hi.rb
== Sinatra/0.9.4 has taken the stage on 4567 for development with backup from Mongrel
Much better!
Larry Siden
http://umich.edu/~lsiden734-926-9614skype: lsiden