# Cannot start Mongrel

**URL:** <https://www.ruby-forum.com/t/cannot-start-mongrel/149362>\
**Category:** Rails\
**Created:** [September 24, 2008, 4:17am UTC](https://www.ruby-forum.com/t/cannot-start-mongrel/149362 "2008-09-24T04:17:48Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![crazybass](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/eb9ed0/32.png) [@crazybass](https://www.ruby-forum.com/u/crazybass)\
**Post date:** [September 24, 2008, 4:17am UTC](https://www.ruby-forum.com/t/cannot-start-mongrel/149362/1 "2008-09-24T04:17:48Z")

</div>

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](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?_

---

<div class="post-metadata">

**Author:** ![crazybass](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/eb9ed0/32.png) [@crazybass](https://www.ruby-forum.com/u/crazybass)\
**Post date:** [September 24, 2008, 5:50am UTC](https://www.ruby-forum.com/t/cannot-start-mongrel/149362/2 "2008-09-24T05:50:35Z")

</div>

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/](http://www.ruby-lang.org/en/news/2008/08/11/ruby-1-8-7-p72-and-1-8-6-p287-released/)  
.

Regards,  
Daniel

---

<div class="post-metadata">

**Author:** ![crazybass](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/eb9ed0/32.png) [@crazybass](https://www.ruby-forum.com/u/crazybass)\
**Post date:** [September 24, 2008, 8:30am UTC](https://www.ruby-forum.com/t/cannot-start-mongrel/149362/3 "2008-09-24T08:30:29Z")

</div>

On 24 Sep 2008, at 03:15, “Paulo C.” [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) 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

---

<div class="post-metadata">

**Author:** ![crazybass](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/eb9ed0/32.png) [@crazybass](https://www.ruby-forum.com/u/crazybass)\
**Post date:** [September 24, 2008, 8:45am UTC](https://www.ruby-forum.com/t/cannot-start-mongrel/149362/4 "2008-09-24T08:45:06Z")

</div>

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...](http://plasti.cx/old/articles/2007/02/03/compiling-ruby-1-8-5-w-openssl-on-debian-etch-testing-and-freebsd-in-home)**
>
> If you want to have control over the version of ruby that is available in your user space here's how to build and install it in your $HOME directory. The Debian

-a

---

<div class="post-metadata">

**Author:** ![crazybass](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/eb9ed0/32.png) [@crazybass](https://www.ruby-forum.com/u/crazybass)\
**Post date:** [September 24, 2008, 9:30am UTC](https://www.ruby-forum.com/t/cannot-start-mongrel/149362/5 "2008-09-24T09:30:19Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![crazybass](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/eb9ed0/32.png) [@crazybass](https://www.ruby-forum.com/u/crazybass)\
**Post date:** [September 24, 2008, 10:08am UTC](https://www.ruby-forum.com/t/cannot-start-mongrel/149362/6 "2008-09-24T10:08:14Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![crazybass](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/eb9ed0/32.png) [@crazybass](https://www.ruby-forum.com/u/crazybass)\
**Post date:** [September 24, 2008, 4:05pm UTC](https://www.ruby-forum.com/t/cannot-start-mongrel/149362/7 "2008-09-24T16:05:53Z")

</div>

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. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![crazybass](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/eb9ed0/32.png) [@crazybass](https://www.ruby-forum.com/u/crazybass)\
**Post date:** [September 24, 2008, 9:09am UTC](https://www.ruby-forum.com/t/cannot-start-mongrel/149362/8 "2008-09-24T09:09:55Z")

</div>

removed\_email\_address@domain.invalid 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](http://blog.mondragon.cc/articles/2007/02/03/compiling-ruby-1-8-5-w-openssl-on-debian-etch-testing-and-freebsd-in-home)
> 
> -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
