Leo: problem with RVM installation of rubies - a problem related to openssl

I flatter myself, confused with the next problem for two (!!) days without a solution.

After updating Lion, I wanted to install additional rubies using the latest version of rvm.

Here's what happens when I call bundler afterwards:

/Users/felix/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require': dlopen(/Users/janroesner/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/x86_64-darwin11.1.0/digest/sha1.bundle, 9): Symbol not found: _SHA1_Init (LoadError) 

Ok, openssl problem. So, I checked that there is no openssl, but the system one in / usr with the libraries in / usr / lib and the headers in / usr / include / openssl. Check it out.

I decided to install a newer version with brew. After that, ruby ​​does not compile with an error that BN_rand_range and BN_peudo_rand_range are already defined.

This seems to be a more rigorous check of the type of the latest gcc, so without commenting on lines 411 and 412 in /usr/include/openssl/bn.h that caused the conflict, the ruby ​​is defined as its own. Now ruby ​​compiles, but I get the same error. Character not found: _SHA1_Init.

So, I deleted the comments from the openssl bn.h header file that I put there before and tried the other way around. I commented on these lines in ~ / .rvm / src / ruby-1.9.2-p290 / ext / openssl / openssl_missing.h

The same result.

After that, I completely deleted ~ / .rvm, reinstalled it and ... had the same problem.

Now I tried:

 rvm pkg install openssl rvm remove 1.9.2-p290 rvm install 1.9.2-p290 -C --with-openssl-dir=$rvm_path/usr 

The same result.

I'm desperate. Can anyone help? Regards Felix

+4
source share
2 answers

For anyone who has ever encountered this issue on Lion ... this is a problem with duplicate headers that come from openssl. You can simply install openssl locally and tell rvm to use this local version of openssl.

You can compile opnessl manually with the / usr / local prefix or just let rvm do the job:

 rvm pkg install openssl 

And then tell rvm to link this version during ruby ​​installation:

 rvm install 1.9.2 --with-openssl-dir=/path/to/your/home/.rvm/usr 

If you already have a local installation, replace with:

 rvm install 1.9.2 --with-openssl-dir=/usr/local 

Do not try to read often:

 rvm install 1.9.2 -C --with-openssl-dir=/path/to/your/home/.rvm/usr 

This does not work.

+14
source

I just looked through this tutorial and it worked without problems: getting Rails Up: http://www.frederico-araujo.com/2011/07/30/installing-rails-on-os-x-lion-with-homebrew- rvm-and-mysql /

0
source

All Articles