Hi,
I’m trying to start Mongrel, but the system cannot do it and show me
this
message:
$ ruby script/server
=> Booting Mongrel (use ‘script/server webrick’ to force WEBrick)
=> Rails 2.1.1 application starting on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
** Starting Mongrel listening at 0.0.0.0:3000
** Starting Rails with development environment…
Exiting
/usr/local/lib/ruby/gems/1.8/gems/rails-2.1.1/lib/initializer.rb:229:in
require_frameworks': no such file to load -- openssl (RuntimeError) from /usr/local/lib/ruby/gems/1.8/gems/rails-2.1.1/lib/initializer.rb:118:in
process’
from
/usr/local/lib/ruby/gems/1.8/gems/rails-2.1.1/lib/initializer.rb:97:in
send' from /usr/local/lib/ruby/gems/1.8/gems/rails-2.1.1/lib/initializer.rb:97:in
run’
from /home/pcassiano/Rails/app/config/environment.rb:13
from
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
gem_original_require' from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
require’
from
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.1.1/lib/active_support/dependencies.rb:510:in
require' from /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.1.1/lib/active_support/dependencies.rb:355:in
new_constants_in’
from
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.1.1/lib/active_support/dependencies.rb:510:in
require' from /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/rails.rb:147:in
rails’
from
/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/mongrel_rails:113:in
cloaker_' from /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel/configurator.rb:149:in
call’
from
/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel/configurator.rb:149:in
listener' from /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/mongrel_rails:99:in
cloaker_’
from
/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel/configurator.rb:50:in
call' from /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel/configurator.rb:50:in
initialize’
from
/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/mongrel_rails:84:in
new' from /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/mongrel_rails:84:in
run’
from
/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel/command.rb:212:in
run' from /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/mongrel_rails:281 from /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.1.1/lib/active_support/dependencies.rb:503:in
load’
from
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.1.1/lib/active_support/dependencies.rb:503:in
load' from /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.1.1/lib/active_support/dependencies.rb:355:in
new_constants_in’
from
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.1.1/lib/active_support/dependencies.rb:503:in
load' from /usr/local/lib/ruby/gems/1.8/gems/rails-2.1.1/lib/commands/servers/mongrel.rb:64 from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
gem_original_require’
from
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
require' from /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.1.1/lib/active_support/dependencies.rb:510:in
require’
from
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.1.1/lib/active_support/dependencies.rb:355:in
new_constants_in' from /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.1.1/lib/active_support/dependencies.rb:510:in
require’
from
/usr/local/lib/ruby/gems/1.8/gems/rails-2.1.1/lib/commands/server.rb:39
from
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
gem_original_require' from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
require’
from script/server:3
I’m using Mint Linux 5 (Debian-based), Ruby 1.8.7 (2008-06-20
patchlevel
22) [i686-linux], Gem 1.2.0 and Rails 2.1.1
What should I do in order to solve this problem?
Paulo C. wrote:
Hi,
I’m trying to start Mongrel, but the system cannot do it and show me
this
message:
…
I’m using Mint Linux 5 (Debian-based), Ruby 1.8.7 (2008-06-20
patchlevel
22) [i686-linux], Gem 1.2.0 and Rails 2.1.1
What should I do in order to solve this problem?
Hi Paulo,
I can’t help directly with the output you provided but I would change
the version of ruby for starters. 1.8.6 is the stable branch to be
using (unless there’s been some change announced with this version of
rails). I think 1.8.7 is more experimental and may never become the new
1.8.6. Also, the patch level 22 for 1.8.7 is out of date and might be a
security issue - certainly 1.8.6 p230 which was released at the same
time was not working well with rails even though it was meant to fix a
security issue of the previous release.
It may be that your distro patched this version or the one prior to it
that had the security issue, but I’d still move on if I could.
Worst case, just compile it. It’s not hard. But you do lose the
benefits of the distro as a result.
See
http://www.ruby-lang.org/en/news/2008/08/11/ruby-1-8-7-p72-and-1-8-6-p287-released/
.
Regards,
Daniel
On 24 Sep 2008, at 03:15, “Paulo C.” [email protected] wrote:
Hi,
I’m trying to start Mongrel, but the system cannot do it and show me
this message:
As Daniel said 1.8.7 p22 is best avoided. That aside the issue here is
that distributions like debian split the standard ruby install into
multiple packages and you’re missing one of them. Look for a package
called ruby-openssl or something like that
Fred
ruby is not recognizing the openssl path.
while compiling ruby 1.8.7
./configure --with-openssl-dir=$OPEN_SSL_HOME
below link might help
-a
Hi!
Look at first line in stack trace output and you will find answer:
/usr/local/lib/ruby/gems/1.8/gems/rails-2.1.1/lib/initializer.rb:
229:in
`require_frameworks’: no such file to load – openssl (RuntimeError)
from
You need to install openssl library. May be like this (I never use
Mint Linux, but if you said it based on Debian this should be help
you):
sudo apt-get install libopenssl-ruby libopenssl-ruby1.8
Daniel B. wrote:
…
Just make sure you have the source packages first:
% aptitude install libreadline-dev
% aptitude install zlib1g-dev
% aptitude install libssl-dev
% aptitude install libsqlite3-dev
Sorry, I meant to say “developer packages” (which are not source
packages).
These give you the header files to compile your own stuff. They’ll also
install the library binaries if you didn’t have them installed already.
Daniel
Hi,
First of all, thanks for all tips shared here!
I think the problem is solved: after install openssl, I change to /usr/
src/ruby-1.8.7-p22/ext/openssl and ran 1) sudo ruby extconf.rb 2) make
3) make install. Now Mogrel is up and running.
Let me explore the latest version of the tools. I’m just a newbie and
I need to “learn by hack”… When I go to deploy my app “for sure”,
I’ll consider all tips that you shared here 
Again, Thanks!
On Sep 24, 5:08 am, Daniel B. [email protected]
[email protected] wrote:
ruby is not recognizing the openssl path.
while compiling ruby 1.8.7
./configure --with-openssl-dir=$OPEN_SSL_HOME
below link might help
compiling ruby 1.8.5 w/ openssl on Debian (Etch/testing) and FreeBSD in $HOME | Plasticx Blog
-a
Maybe 1.8.7 is more problematic.
But as a debian user who uses ruby 1.8.6, I compile/install ruby by
default to /usr/local and avoid any distro ruby
Just make sure you have the source packages first:
% aptitude install libreadline-dev
% aptitude install zlib1g-dev
% aptitude install libssl-dev
% aptitude install libsqlite3-dev
(aptitude replaces apt-get).
Similar thing for redhat/centos; the package names are a little
different.
Then unpack ruby in /usr/local/src and do
% ./configure && make
% sudo make install (run ‘make install’ as root)
And test:
irb> require ‘openssl’
Warning: you may have trouble with rmagick. So either do your own
wrapper or maybe try the ‘mini_magick’ gem.
If you want to play with 1.9 or something, just change the prefix to
install somewhere else:
% ./configure --prefix=/home/user_name/ruby-1.9/
or some such.
Daniel