views:

425

answers:

2

I'm working my way through Agile Web Development with Rails and am running into this problem on a shared system (Dreamhost).

[******]$ ruby script/generate controller Say
Rails requires RubyGems >= 1.3.2 (you have 1.3.1). Please `gem update --system` and try again.
[******]$ gem update --system
Updating RubyGems
Updating rubygems-update
ERROR:  While executing gem ... (Gem::FilePermissionError)
    You don't have write permissions into the /usr/lib/ruby/gems/1.8 directory.

The problem is that I am not root (or lack permissions on /usr/lib/....). How do I solve this? There must be a configuration file I can set somewhere?/

Thanks in advance!

+1  A: 

http://baddabigboom.com/articles/2008/05/12/deploying-a-rails-app-to-dreamhost

If you scroll down halfway he explains setting up locally installed gems.

Andy Gaskell
Can you help me understand this step:rm -f /PATH/TO/GEM/PATH/FROM/ABOVE/source_cacheI'm not sure which is the source cache from the gem env dump?
NoahD
Link is broken =/
Fabiano PS
A: 

What version is your rails app? Dreamhost is running rails 2.2.2 and rubygems 1.3.1 I have my rails 2.3.2 app pretending to be 2.2.2 as described here [1]. It could be that rails > 2.3.2 may need a newer version of rubygems. Downgrading rails (or making it look like it is 2.2.2) may solve your problem. Just a thought.

Mike Williamson