Error running 'bundle install' using Ruby 1.9.3

Sebastian Sogamoso picture Sebastian Sogamoso · Feb 19, 2012 · Viewed 10.3k times · Source

I'm going through the second edition of Ruby on Rails Tutorial (http://ruby.railstutorial.org/). I'm following each step, so I'm using Ruby 1.9.3 and when I run 'bundle install' inside my Rails project I an error with a big trace of the error which starts with this:

/Users/sebasoga/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/net/http.rb:799: [BUG] Segmentation fault ruby 1.9.3p125 (2012-02-16 revision 34643) [x86_64-darwin10.8.0]

I'm now using Ruby 1.9.2 and it works fine, but shouldn't it also work with Ruby 1.9.3?

Answer

pedrofurla picture pedrofurla · Feb 21, 2012

This one worked for me:

rvm pkg install iconv
rvm pkg install openssl
rvm reinstall 1.9.3 --with-openssl-dir=~/.rvm/usr --with-iconv-dir=~/.rvm/usr

It's based in the solution on this blog. I also tried the one here, which is based on macports and it didn't work. But to be honest I didn't care updating my macports, so maybe that's why it didn't work.

Also I found these other two issues describing the problem and giving suggestions: 4050, 4766