Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Rubygems on OSX missing

I feel like a compelte idiot, but I've been wrking on this all day and getting no where.

I've restarted several times trying to get a full install of Ruby on my OSX environment, RVM, Brew, Ruby: and every time I get through to the Ruby install it bottoms out on the rubygems install.

The reason I'm having to start again is that the RVM wouldn't update in Jewelerybox after my first successfull install (used a packaged all-in-one RubyInstaller) so I couldn't manage my gems - a problem caused by the initial Ruby install on the system living in the /usr/local and not under my own directory. To fix this I uninstalled all my Ruby stuff and started again.

All ok until the ruby compiler started gacking on the rubygems install section when installing ruby 2.0.0. Checking out the OSX system files under usr/bin I see that rubygems isn't there either (it should be present by default on OSX). Any ideas? (note that XCode is up to date and has command line tools installed)

Last attempt was:

$ rvm get head --autolibs=3 # get the latest RVM and build required libs
$ rvm requirements # just in case, install all other required stuff
$ rvm remove 2.0.0
$ rvm install ruby-2.0.0

. . . which fires the following error:

[2013-03-19 23:21:50] /Users/matthew.evans/.rvm/rubies/ruby-2.0.0-p0/bin/ruby
Exception `LoadError' at /Users/matthew.evans/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/rubygems.rb:1073 - cannot load such file -- rubygems/defaults/operating_system
Exception `LoadError' at /Users/matthew.evans/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/rubygems.rb:1082 - cannot load such file -- rubygems/defaults/ruby
mkdir -p /Users/matthew.evans/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/site_ruby/2.0.0

...

install -c -m 0755 /var/folders/nq/wkj89k854tl0w97n68qdn820pzk_51/T/gem.84634 /Users/matthew.evans/.rvm/rubies/ruby-2.0.0-p0/bin/gem
rm /var/folders/nq/wkj89k854tl0w97n68qdn820pzk_51/T/gem.84634
ERROR:  While executing gem ... (NoMethodError)
    undefined method `fu_stream_blksize' for #<Gem::Commands::SetupCommand:0x007ffd0e054818>
Installing RubyGems
Installing gem executable
like image 838
matt Avatar asked Mar 19 '13 22:03

matt


People also ask

Where are RubyGems installed?

When you use the --user-install option, RubyGems will install the gems to a directory inside your home directory, something like ~/. gem/ruby/1.9. 1 . The commands provided by the gems you installed will end up in ~/.

How do I get RubyGems?

Open up the 'Software Center' app from your launcher and type in `RubyGems` without quotes into the application search box at the top right, and press [enter]. RubyGems then can be installed by just clicking on the button labeled 'Install', thats it.


1 Answers

I had the exact same error installing ruby v2 within rvm today. I was in a user account on Ubuntu who needed to use 'sudo' -- and enter my account password for sudo -- in order to install OS dependencies.

Your question mentions running rvm requirements to install dependencies. That seems to be new behavior in rvm, as of v1.19. It seemed to install a bunch of dependencies just fine. But then installing ruby bombed.

In earlier rvm versions, typing rvm requirements would just list the dependencies for rvm and for ruby, as in Archonic's answer.

I typed rvm implode and then started over with:

\curl -L https://get.rvm.io | bash -s 1.18.21
source /home/deploy/.rvm/scripts/rvm
rvm requirements

At that point I could install the libraries/tools that rvm said I needed for rvm and ruby, and then rvm install ruby-2.0.0-p0 succeeded.

like image 194
Chris Houhoulis Avatar answered Nov 15 '22 09:11

Chris Houhoulis