[Mongrel] mongrel startup fails now: already initialized constant

Sj Seo lists at ruby-forum.com
Sat Dec 8 06:31:11 EST 2007


Stephen Bannasch wrote:
> I updated to ruby 1.8.6p111 last night and updated some gems and now
> mongrel doesn't work:
> 
> MacOS 10.4.10
> 
> $ ruby --version
> ruby 1.8.6 (2007-09-24 patchlevel 111) [i686-darwin8.10.1]
> 
> $ gem list rails
> 
> *** LOCAL GEMS ***
> 
> rails (1.2.5, 1.2.4, 1.2.3, 1.2.2, 1.2.1, 1.2.0, 1.1.6)
> 
> Here's a simple test:
> 
> $ rails test5
>        create  ...
> 
> $ cd test5
> $ script/server
> => Booting Mongrel (use 'script/server webrick' to force WEBrick)
> => Rails 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...
> ** Rails loaded.
> ** Loading any Rails specific GemPlugins
> Exiting
> /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.5/lib/commands/servers/mongrel.rb:15:
> warning: already initialized constant OPTIONS
> /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.5/lib/commands/servers/mongrel.rb:18:
> undefined method `options' for []:Array (NoMethodError)
>          from
> /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:32:in
> `gem_original_require'
>          from
> /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:32:in
> `require'
>          from
> /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.4/lib/active_support/dependencies.rb:495:in
> `require'
>          from
> /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.4/lib/active_support/dependencies.rb:342:in
> `new_constants_in'
>          from
> /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.4/lib/active_support/dependencies.rb:495:in
> `require'
>          from
> /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.5/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'
> 
> Here were the gems I upgraded:
> 
>    $ gem outdated
>    Bulk updating Gem source index for: http://gems.rubyforge.org
>    fastercsv (1.2.0 < 1.2.1)
>    ruby-debug (0.8.1 < 0.9.3)
>    mofo (0.2.1 < 0.2.10)
>    mongrel (1.0.1 < 1.1.1)
>    rails (1.2.4 < 1.2.5)
>    actionwebservice (1.2.4 < 1.2.5)
>    ruby-debug-base (0.8.1 < 0.9.3)
>    activerecord (1.15.4 < 1.15.5)
>    tzinfo (0.3.3 < 0.3.5)
>    gem_plugin (0.2.2 < 0.2.3)
>    libxml-ruby (0.3.8.4.1 < 0.5.2.0)
>    ruport (0.8.12 < 1.2.2)
>    image_science (1.1.1 < 1.1.3)
>    erubis (2.2.0 < 2.4.1)
>    uuidtools (1.0.0 < 1.0.2)
>    cgi_multipart_eof_fix (2.1 < 2.5.0)
>    attributes (4.0.0 < 5.0.0)
>    net-ssh (1.0.10 < 1.1.2)
>    mongrel_cluster (1.0.2 < 1.0.4)
>    capistrano (1.4.1 < 2.1.0)
>    merb (0.2.0 < 0.4.1)
>    actionmailer (1.3.4 < 1.3.5)
>    actionpack (1.13.4 < 1.13.5)
>    json (1.0.1 < 1.1.1)
>    daemons (1.0.5 < 1.0.9)
>    RubyInline (3.6.2 < 3.6.5)
>    activesupport (1.4.3 < 1.4.4)
>    builder (2.1.1 < 2.1.2)
>    hpricot (0.5.110 < 0.6)
>    fastthread (1.0 < 1.0.1)
> 
>          from script/server:3


----------------

 I had a similar issue, but now I have resolved it.
After I've installed some rails plugins on window xp,
mongrel server didn't work.

As I ran the rake task, 'rake rails:update',
web server has worked.

## change to the root of rails project
$ cd test5

## check the rake tasks
$ test5> rake --tasks

## run the 'rails:update' task
$ test5> rake rails:update

If you have installed the ruby 1.8.6 from souce package,
maybe you must be re-install all the gem plugins(rails, rake, mysql, 
...).

ref.
- 
http://scoop.cheerfactory.co.uk/2007/11/02/upgrading-ruby-on-ubuntu-dapper/
- 
http://wiki.ajaxstart.com/usemodj/browse.screen?Ruby_1.8.6_Source_Install



-- 
Posted via http://www.ruby-forum.com/.


More information about the Mongrel-users mailing list