There are no rubigems on OSX

I feel like a real idiot, but I have been wading this way all day and don’t get it.

I restarted several times trying to get a full Ruby installation in my OSX environment, RVM, Brew, Ruby: and every time I move on to installing Ruby, it ends up installing rubygems.

The reason I need to start again is because RVM did not update in Jewerybox after my first successful installation (I used the packaged all-in-one RubyInstaller), so I could not manage my gems - the problem caused the initial installation of Ruby on a system living in / usr / local, and not in my own directory. To fix this, I deleted all my Ruby stuff and started again.

Everything is ok until the ruby ​​compiler begins to understand the rubygems installation section when installing ruby ​​2.0.0. Checking OSX system files under usr / bin. I see that rubygems does not exist either (it should be present by default in OSX). Any ideas? (note that Xcode is updated and command line tools installed)

Last try:

$ 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 causes 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 
+6
source share
3 answers

I had the same error when installing ruby ​​v2 in rvm today. I was on an Ubuntu user account that needed to use "sudo" - and enter my account password for sudo - to install OS dependencies.

Your question mentions the rvm requirements substitution in install . This is similar to the new behavior in rvm since version 1.19. It seemed very easy to install a bunch of dependencies. But then the installation of the ruby ​​bombardment.

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

I typed rvm implode and then started with:

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

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

+3
source

I believe the problem is where the RVM places your dependencies - global and user. From a book called "Agile development with rails":

First, you need to make sure you have Xcode 3 or later installed ...

 $ xcodebuild -version 

If you have Xcode 3 installed, you need to install the Git version control system separately. Verify your installation by running the following command:

 $ git --version 

Then install the RVM yourself:

 $ curl -L https://get.rvm.io | bash -s stable 

Exit the command prompt window or terminal application and open a new one. This will reload your .bash_login. Run the following command, which provides additional installation instructions that are appropriate for your specific operating system:

 $ rvm requirements 

Find the line that describes how to install the necessary OS dependencies for Ruby (MRI). After following these instructions, you can proceed with installing the Ruby interpreter itself:

 $ rvm install 2.0.0 

The previous step will take some time when it downloads, configures and compiles the necessary executable files. Once it completes, use this environment and set up the rails:

 $ rvm use 2.0.0 $ gem install rails --version 4.0.0.beta1 --no-ri --no-rdoc 

With the exception of the rvm use statement, each of the above instructions should be executed only once. The rvm use statement needs to be repeated every time you open a shell window. The use keyword is optional, so you can shorten this to rvm 2.0.0. You can also make it the default Ruby interpreter for new terminal sessions with the following command:

 $ rvm --default 2.0.0 

You can verify the successful installation using the following command:

 $ rails -v 

If you are having problems, try the suggestions listed in the “Troubleshooting installation issues” section of the rvm website.

Hope it does for you!

+1
source

This worked for me:

 rvm get head rvm requirements rvm install ruby-2.0 
+1
source

All Articles