Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error running 'bundle install' using Ruby 1.9.3

Tags:

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?

like image 703
Sebastian Sogamoso Avatar asked Feb 19 '12 00:02

Sebastian Sogamoso


2 Answers

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

like image 158
pedrofurla Avatar answered Oct 28 '22 16:10

pedrofurla


In my Gemfile, replacing

source 'https://rubygems.org'

this line with

source 'http://rubygems.org'

solved the problem. Hope this helps!

like image 32
ArjunUrs Avatar answered Oct 28 '22 17:10

ArjunUrs