Skip to content

Segmentation fault : Ruby 1.9.3-p125 and RVM

March 25, 2012

This problem is not something that is specific to the version of ruby that you are using. It just comes with RVM, at least that is what I have observed since I started using RVM to manage different ruby version on my MacBook.

Now, the reason behind this problem is the SSL or OPENSSL that the ruby library is pointing to and the one that is installed on your system are not same. There are certain libraries that require using ssl, e.g if you try to send mail, or try do image processing in rails using any gem like carrierwave or paperclip etc, this problem may arise.


1. Install openssl package (if not already)
$ rvm pkg install openssl

2. Remove the already installed ruby version from RVM that is creating problem, in my case, it was 1.9.3-p125
$ rvm remove 1.9.3-p125

3. Re-install ruby version, 1.9.3-p125, specifying the openssl dir as well, so that ruby this time points to the correct openssl.

This should pretty muh resolve your problem of segmentation fault.
$ rvm install 1.9.3-p125 –with-openssl-dir=$rvm_path/usr

3 Comments leave one →
  1. Dale permalink
    March 28, 2012 8:15 pm

    One quick comment the last command is actually

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


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

    as it’s listed (notice the — on the with-openssl-dir flag)

  2. Dale permalink
    March 28, 2012 8:16 pm

    Whoops, looks like word press is replacing the double dash with a single one – it’s a double dash before the flag.

  3. Andy permalink
    April 3, 2012 11:30 am

    Thanks for that! Much appreciated!

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: