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

31 views
Skip to first unread message

Nik Winter

unread,
Oct 20, 2009, 3:01:37 AM10/20/09
to rubyonra...@googlegroups.com
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:in
`process'
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:in
`run'
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:in
`require'
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:in
`new_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:in
`gem_original_require'
from
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
`require'
from script/server:3
--
Posted via http://www.ruby-forum.com/.

Frederick Cheung

unread,
Oct 20, 2009, 3:06:19 AM10/20/09
to Ruby on Rails: Talk


On Oct 20, 8:01 am, Nik Winter <rails-mailing-l...@andreas-s.net>
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
>
> Any help would be appreciated.
>
> --------------------
> # ruby script/server
> => Booting WEBrick
> => Rails 2.3.4 application starting onhttp://0.0.0.0:3000/usr/local/lib/ruby/gems/1.8/gems/rails-2.3.4/lib/...
> `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:in
> `process'
>         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:in
> `run'
>         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:in
> `require'
>         from
> /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/de pendencies.rb:156:in
> `require'
>         from
> /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/de pendencies.rb:521:in
> `new_constants_in'
>         from
> /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/de pendencies.rb:156:in

Sijo k g

unread,
Oct 20, 2009, 3:06:48 AM10/20/09
to rubyonra...@googlegroups.com
Hi Nik Winter

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

Nik Winter

unread,
Oct 20, 2009, 5:09:52 PM10/20/09
to rubyonra...@googlegroups.com
> 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!

Greg Donald

unread,
Oct 20, 2009, 5:19:33 PM10/20/09
to rubyonra...@googlegroups.com
On Tue, Oct 20, 2009 at 4:09 PM, Nik Winter
<rails-mai...@andreas-s.net> 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 Donald
http://destiney.com/

Frederick Cheung

unread,
Oct 21, 2009, 3:40:23 AM10/21/09
to Ruby on Rails: Talk


On Oct 20, 10:09 pm, Nik Winter <rails-mailing-l...@andreas-s.net>
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.
>
> > ruby extconf --with-openssl-include=/path/to/openssl/headers --with-
> > openssl-lib=/path/to/openssl/libraries
>
> This didn't work.
>

What happened ?

Fred

Rick

unread,
Oct 21, 2009, 7:38:32 AM10/21/09
to Ruby on Rails: Talk
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 Cheung <frederick.che...@gmail.com>
wrote:
Reply all
Reply to author
Forward
0 new messages