Topic: 'require_frameworks': no such file to load -- openssl (RuntimeError)

When I run the "about" command or any other command in the script directory, I get the following error:
/usr/local/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/initializer.rb:259:in `require_frameworks': no such file to load -- openssl (RuntimeError)
        from /usr/local/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/initializer.rb:133:in `process'
        from /usr/local/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/initializer.rb:112:in `send'
        from /usr/local/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/initializer.rb:112:in `run'
        from /var/emporium/emporium/config/environment.rb:13
        from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
        from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
        from /usr/local/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/commands/about.rb:1
        from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
        from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
        from ./about:4

Here are my configuration details:
Operation system: Red Hat Enterprise Linux AS release 4 (Nahant Update 4)
ruby version: ruby 1.8.7 (2008-08-11 patchlevel 72) [i686-linux]
gem verions: 1.3.1
The "rpm -qa" commnad on the system shows that I have openssl-0.9.7a-43.14 package on the system.

Gem list command gives the following output:
actionmailer (2.2.2)
actionpack (2.2.2)
activerecord (2.2.2)
activeresource (2.2.2)
activesupport (2.2.2)
rails (2.2.2)
rake (0.8.3)

I also tried compiling the openssl package in the ruby/ext/openssl directory by using the command "ruby extconf.rb" and got the following errors:
=== OpenSSL for Ruby configurator ===
=== Checking for system dependent stuff... ===
checking for t_open() in -lnsl... no
checking for socket() in -lsocket... no
checking for assert.h... yes
=== Checking for required stuff... ===
checking for openssl/ssl.h... no
=== Checking for required stuff failed. ===
Makefile wasn't created. Fix the errors above.

So it seems it can't locate the openssl package.

I will not be able to download to this machine directly so I "apt-get" will not work for me as a solution.
Would appreciate any pointers on how to address this issue. Since I am very new to ruby, would appreicate detailed instructions.

Thanks

Last edited by rjain (2009-01-07 12:08:52)

Re: 'require_frameworks': no such file to load -- openssl (RuntimeError)

The root cause of this problem: You need openssl-devel library.
I installed the openssl-devel-0.9.71-43.16 library on the sytem.
Here are the next steps:
1. cd /ruby_install_dir/ext/openssl
2. ruby extconf.rb
3. make
4. make install

This fixed the problem.

Last edited by rjain (2009-01-08 11:32:57)

Re: 'require_frameworks': no such file to load -- openssl (RuntimeError)

Thanks, I had the same problem and doing that works too on openSuse 10.2

Re: 'require_frameworks': no such file to load -- openssl (RuntimeError)

For those of us who use Ubuntu/Debian and you find that you cannot find the "/ruby_install_dir/ext/openssl" with an extconf.rb file, here is my suggestion:

> sudo apt-get install libopenssl-ruby1.8

Hope this helps.

--Steve

Re: 'require_frameworks': no such file to load -- openssl (RuntimeError)

I had the same error on CentOS 5.1. '/ruby_install_dir/ext/openssl' may be better described as '/ruby_source_directory/ext/openssl' if you built ruby from source. The ext directory is stored within the source tree, not within a subdir of the final installed directory.

Re: 'require_frameworks': no such file to load -- openssl (RuntimeError)

engest wrote:

For those of us who use Ubuntu/Debian and you find that you cannot find the "/ruby_install_dir/ext/openssl" with an extconf.rb file, here is my suggestion:

> sudo apt-get install libopenssl-ruby1.8

Hope this helps.

--Steve

Yes it did help - ran into this problem after upgrading from Ubuntu 8.04 LTS to 8.10.

Thanks!

Jim

Re: 'require_frameworks': no such file to load -- openssl (RuntimeError)

fantastic. I had the same issue (with trying to use capistrano on a fresh install of ubuntu karmic on a slicehost vps) and it was resolved in mere minutes by simply:
  apt-get install libopenssl-ruby1.8

thanks!

Re: 'require_frameworks': no such file to load -- openssl (RuntimeError)

I'm running Linux Mint 8 Helena and have Ruby 1.9 with Rails 2.3.5 installed. I checked and libopenssl-ruby1.9 is installed and I still get the error when I run:
ruby script/generate scaffold Entry title:string content:text
I tried  sudo apt-get install libopenssl-ruby1.8 like suggested above but still get the same error. I did compile ruby from source and am wondering if that could be part of the problem. I'm a rails newbie and am trying to create my first rails app following the lesson in Peter Cooper's Beginning Ruby book. Any suggestions would be greatly appreciated.

Re: 'require_frameworks': no such file to load -- openssl (RuntimeError)

This worked for me as well.

1. cd /ruby_install_dir/ext/openssl
2. ruby extconf.rb
3. make
4. make install

Might also be useful to know how to get the current ruby_install_dir in RVM:-

> echo $rvm_ruby_src_path

Re: 'require_frameworks': no such file to load -- openssl (RuntimeError)

on Debian/Ubuntu the package it's called libssl-dev

  1. aptitude install libssl-dev libopenssl-ruby1.8
  2. cd /ruby_install_dir/ext/openssl
  3. make
  4. make install