Cannot start Mongrel

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?

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

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
http://blog.mondragon.cc/articles/2007/02/03/compiling-ruby-1-8-5-w-openssl-on-debian-etch-testing-and-freebsd-in-home

-a

Daniel Bush 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 :wink:

Again, Thanks!