Skip to content


Subversion checkout URL

You can clone with
Download ZIP


Have you had this Ruby 1.9.3 segmentation fault bug? #4050

alexeymuranov opened this Issue · 17 comments

I am trying to work on rails master branch, and two days ago i started getting strange errors, sometimes they were about missing journey gem (Could not find gem 'journey (~> 1.0.0) ruby, which is required by gem 'rails (>= 0) ruby', in any of the sources.'), sometimes there were the message that You may have encountered a bug in the Ruby interpreter or extension libraries. I couldn't run tests anymore. I tried to checkout my branch where they were still running, but this didn't help. I was very confused, and finally i managed to reproduce a bug like this:

[alexey:rails(master)]$ rvm -v

rvm 1.10.0 by Wayne E. Seguin ( []

[alexey:rails(master)]$ rvm use 1.9.3@tmp
Using /Volumes/Data/Users/alexey/.rvm/gems/ruby-1.9.3-p0 with gemset tmp
[alexey:rails(master)]$ gem list

*** LOCAL GEMS ***

[alexey:rails(master)]$ gem install bundler
Successfully installed bundler-1.0.21
1 gem installed
Installing ri documentation for bundler-1.0.21...
Installing RDoc documentation for bundler-1.0.21...
[alexey:rails(master)]$ bundle update
Updating git://
Fetching source index for
/Volumes/Data/Users/alexey/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/net/http.rb:799: [BUG] Segmentation fault
ruby 1.9.3p0 (2011-10-30 revision 33570) [x86_64-darwin10.8.0]


You may have encountered a bug in the Ruby interpreter or extension libraries.
Bug reports are welcome.
For details:

Abort trap

Here is a gist of complete output:

If i use ruby 1.9.2-p290 instead, then bundle update works fine. I guess i'll have to stay with ruby 1.9.2.

I probably should report this for ruby, but i do not know how to reproduce this without cloning the whole rails repository.


The segmentation fault is rather ruby bug and the thing with Journey is lack of one of the master dependencies in Gemfile. Lately @tenderlove rewrote rails router and it's in rails/journey repo. To avoid this you can do:

gem 'journey',   :git => 'git://'
gem 'arel',      :git => 'git://'

As 3.2.0 is out, journey is released and in the gemspec, so probably it's no more needed (it may be better to keep using it from git if you use master though).

@drogus drogus closed this

Ok, thanks for the explanation, but i still do not know how to formulate the bug to submit a ruby bug report. I thought that if we leave it open, somebody with similar problems could contribute.


I think that you should post the Gemfile which causes such behavior to either bundler issues or ruby issues, I doubt that such issue here can help anyone. Segmentation fault during running bundler is not a rails issue.


Ok, i've created a bundler issue here: bundler/bundler#1596.


I've found out that the segmentation fault happens whenever i use

source ''

in the Gemfile, and does not happen with

source ''

Apparently this is a known issue with ruby compiling with Mac OS openssl which in my case is version 0.9.8r. I followed instructions at to reinstall ruby-1.9.3-p0 with MacPorts openssl, and now it works. There is a report about this at


Thank you @alexeymuranov. Using http:// worked for me as well.


A simple advice for rvm users:

rvm pkg install openssl


rvm install ruby-1.9.3-p0 --force -C --with-openssl-dir=~/.rvm/usr

It is the latest version of openssl that makes ruby crash.


Where do I find that gemfile on Mac OS X?


@neoneye what do you mean? It is the Gemfile in your ruby/rails application folder.


Here are instructions for using MacPorts binaries with RVM:


Thanks, @alexeymuranov. Your suggestion worked perfectly. I was afraid I wasn't going to be able to play around with 1.9.3!

EDIT: After getting bundler working by just changing HTTPS to HTTP, I ran into several other problems when running tests and certain other rake tasks. The final solution was to uninstall 1.3.9-p125, and re-install with a different OpenSSL:

rvm pkg install openssl
rvm remove 1.9.3-p125
rvm install 1.9.3-p125 --with-openssl-dir=$rvm_path/usr

Thanks again!


@alexeymuranov thanks a lot for your tip. it works for me :).


Many thanks @athlite! This also works for ruby 1.9.3-p125 (which was also crashing for me)


rvm install ruby-1.9.3 --with-openssl-dir=/opt/local --with-iconv-dir=/opt/local

This is what worked for me after installing openssh


Thank you, athlite, this really saved my day! Finally Ruby 1.9.3 on my Mac!


Had the same Issue, Just found out when I wanted to create a new rails project to test something. Didn't even knew I had this issue before ;) All fixed with @athlite suggestion. thx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.