Rails & OpenSSL: `require_frameworks': no such file to load

I have Ruby 1.8.7, Gems 1.3.5, Rails 2.3.4, OpenSSL 0.9.8k installed on
a Solaris machine.

I have tried using the extconf.rb in ruby/ext/opennsl, but I get this:
checking for openssl/ssl.h… no

Any help would be appreciated.


ruby script/server

=> Booting WEBrick
=> Rails 2.3.4 application starting on http://0.0.0.0:3000
/usr/local/lib/ruby/gems/1.8/gems/rails-2.3.4/lib/initializer.rb:271:in
require_frameworks': no such file to load -- openssl (RuntimeError) from /usr/local/lib/ruby/gems/1.8/gems/rails-2.3.4/lib/initializer.rb:134:inprocess’
from
/usr/local/lib/ruby/gems/1.8/gems/rails-2.3.4/lib/initializer.rb:113:in
send' from /usr/local/lib/ruby/gems/1.8/gems/rails-2.3.4/lib/initializer.rb:113:inrun’
from /scratch/usr/local/railstest/config/environment.rb:9
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:inrequire’
from
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:156:in
require' from /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:521:innew_constants_in’
from
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:156:in
require' from /usr/local/lib/ruby/gems/1.8/gems/rails-2.3.4/lib/commands/server.rb:84 from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:ingem_original_require’
from
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
`require’
from script/server:3

Hi Nik W.

A quick googling gave answer from another forum as

You need openssl-devel library.
So install it first

Here are the next steps:

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

Sijo

You need openssl-devel library.

I compiled OpenSSL from the source, so I should have all the headers and
stuff. It seems like Rails can’t find it, and I don’t know how to tell
it where to look.

ruby extconf --with-openssl-include=/path/to/openssl/headers --with-
openssl-lib=/path/to/openssl/libraries

This didn’t work.

Thanks for the responses!

On Oct 20, 8:01 am, Nik W. [email protected]
wrote:

I have Ruby 1.8.7, Gems 1.3.5, Rails 2.3.4, OpenSSL 0.9.8k installed on
a Solaris machine.

I have tried using the extconf.rb in ruby/ext/opennsl, but I get this:
checking for openssl/ssl.h… no

Maybe you need to tell extconf where you ssl stuff is. You should be
able to do something along the lines of

ruby extconf --with-openssl-include=/path/to/openssl/headers --with-
openssl-lib=/path/to/openssl/libraries

Fred

On Tue, Oct 20, 2009 at 4:09 PM, Nik W.
[email protected] wrote:

You need openssl-devel library.

I compiled OpenSSL from the source, so I should have all the headers and
stuff. It seems like Rails can’t find it, and I don’t know how to tell
it where to look.

When you compiled it, did you use --prefix to specify the install
location? If not it should be /usr/local/lib or something similar.

Once you know where it installed you can add an entry into
/etc/ld.so.conf and run ldconfig. After that your system will know
about the new headers.


Greg D.
http://destiney.com/

Is the location of openssl on your search path? What happens if you
type “which openssl”?

The easiest way to ensure that it’s found is, if you’re building from
source, use the configure command to install on your path. For
instance I use /opt/local as a repository and have /opt/local/bin on
my PATH. So I run:

$ cd ~/src/openssl-0.9.8j
$ ./configure --prefix=/opt/local --any-other-configuration-options
$ make
$ make install
$ which openssl
/opt/local/bin/ssl
$ openssl version
OpenSSL 0.9.8j 07 Jan 2009

On Oct 21, 3:40 am, Frederick C. [email protected]

On Oct 20, 10:09 pm, Nik W. [email protected]
wrote:

What happened ?

Fred

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs