I have a machine running Ubuntu Hardy that provides its own RubyGems package. Unfortunately, this version of RubyGems (1.1.1) is too old to do anything useful, so I decided to manually upgrade RubyGems to the current version (1.3.6). This part went smoothly, and if I do gem -v, I get 1.3.6that which is expected. The problem is what I'm trying to do: sudo gem install rackit returns this error:
ERROR: While executing gem ... (Errno::EACCES)
Permission denied - /home/username/.gem
Usually, when I install gems as root, it knows how to install it in /usr/lib/ruby/gems, so why does it even check my home directory? Another quirk when I do gem install rack(not as root), it says:
ERROR: While executing gem ... (Gem::FilePermissionError)
You don't have write permissions into the /usr/lib/ruby/gems/1.8 directory.
where I want him to go. I already tried to clear source_caches, trying to use different versions of RubyGems (1.3.5), forcing installation in /usr/libwith to -ino avail. Any ideas on why RubyGems is so persistent in checking my directory /homewhen installing as root?
source
share