Ruby gems under rvm on Ubuntu (failing to) install in the wrong location?

Following up the backtrace from running gem install -V --backtrace --debug haml (thanks zzzhc) and taking a closer look at the home/mark/. Gem directory I found that there were no gems installed there, just gemspec files and gem source files. In the spirit of experimentation I deleted home/mark/.

Gem and re ran the gem install command and suddenly it was working. And that it had recreated home/mark/. Gem containing gemspecs for the gems I'd just installed It's clear now that I'd misinterpreted the error message in the original question; rubygems didn't fail while trying to install gems to home/mark/.

Gem it was simply using that directory as a temporary store for the gemspecs of newly downloaded gems about to be installed. Before installing rvm I'd been installing gems onto the system using sudo gem install which would have created the home/mark/. Gem directory with root permissions.So rubygems run without sudo was unable to access the temp directory to store gemspecs in and was aborting before it could install the gems.

Doh!

Following up the backtrace from running gem install -V --backtrace --debug haml (thanks zzzhc) and taking a closer look at the /home/mark/. Gem directory I found that there were no gems installed there, just gemspec files and gem source files. In the spirit of experimentation I deleted /home/mark/.

Gem and re ran the gem install command and suddenly it was working. And that it had recreated /home/mark/. Gem containing gemspecs for the gems I'd just installed.It's clear now that I'd misinterpreted the error message in the original question; rubygems didn't fail while trying to install gems to /home/mark/.

Gem, it was simply using that directory as a temporary store for the gemspecs of newly downloaded gems about to be installed. Before installing rvm I'd been installing gems onto the system using sudo gem install... which would have created the /home/mark/. Gem directory with root permissions.

So rubygems run without sudo was unable to access the temp directory to store gemspecs in and was aborting before it could install the gems. Doh!

1 -- Thanks a ton for this answer. I was stumped until I bumped into it. Problem solved!

– Christian Nunciato Mar 15 at 0:03.

Edited into the OP, see above. – Mark Weston Sep 2 '10 at 15:04 looks every thing is correct except ~/. Rvm/bin should not include in PATH, but it's not the key point.

Suggest you run 'gem install -V --backtrace --debug haml' and 'ls -l ~/gems/ruby-1.9.2-p0', 'ls -l ~/. Gem' to get more information – zzzhc Sep 3 '10 at 2:34 Thanks for the pointer, that got me moving in the right direction. – Mark Weston Sep 3 '10 at 12:42.

Check the first line of /home/mark/. Rvm/rubies/ruby-1.9.2-p0/bin/gem and look at yehudakatz.com/2010/08/24/a-tale-of-abor....

My reading of that blog is that the bug described is an interaction between Bundler and rvm, and more generally a "system" version of a gem being called instead of the version of the gem installed under rvm. I'm not using Bundler, and what's more the version of rvm I'm using was installed and updated yesterday which - according to the blog - already contains a fix. – Mark Weston Sep 2 '10 at 18:56.

Another way is type which gem after getting into the ruby version. You will get something like this - /home/username/. Rvm/rubies/ruby-1.9.2-p180/bin/gem.

Now just type sudo /home/username/. Rvm/rubies/ruby-1.9.2-p180/bin/gem install gem_name. Specifying the complete path and adding sudo work fine.

I'm running Ubuntu 10.04 and originally installed ruby 1.9.1 (from source). I've just decided to try out ruby 1.9.2 and rails 3, and it seemed like a good time to use rvm to deal with the multiple ruby installs and gemsets. Rvm installed and seems to be working, I installed ruby 1.9.2 in rvm and made that my default ruby.

However, every time I try to install a gem under ruby 1.9.2 I see this error. But if the correct installation, ruby and gem paths are showing here why is ruby trying to install gems to /home/mark/. All the variables and paths shown by env look right, and I can't find a .

Gemrc file anywhere on my system that might contain conflicting path settings. So I guess my question is what might be causing rubygems to attempt to install to /home/mark/. Gems instead of the correct paths set by rvm?

Note that I've edited down the response from env slightly - simply to keep the size of this post under control - by removing all the entries relating to X, GNOME and SSH.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions