Stephen Bannasch
2007-Nov-13 20:29 UTC
[Mongrel] mongrel startup fails now: already initialized constant OPTIONS
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
Evan Weaver
2007-Nov-13 21:40 UTC
[Mongrel] mongrel startup fails now: already initialized constant OPTIONS
Works for me. Do you have any strange gem_plugins installed? Maybe try uninstalling the old version of mongrel::cluster? Evan On Nov 13, 2007 3:29 PM, Stephen Bannasch <stephen.bannasch at deanbrook.org> 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 > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users >-- Evan Weaver Cloudburst, LLC
Nathan Vack
2007-Nov-13 21:52 UTC
[Mongrel] mongrel startup fails now: already initialized constant OPTIONS
On Nov 13, 2007 3:29 PM, Stephen Bannasch <stephen.bannasch at deanbrook.org> wrote:> I updated to ruby 1.8.6p111 last night and updated some gems and now > mongrel doesn''t workIIRC, if you update ruby, you''re supposed to reinstall your gems -- especially those with C components. (You''ll probably want to update mysql, too.) Something about libraries and linking...? Cheers, -Nate
Stephen Bannasch
2007-Nov-13 22:17 UTC
[Mongrel] mongrel startup fails now: already initialized constant OPTIONS
>Works for me. Do you have any strange gem_plugins installed? Maybe try >uninstalling the old version of mongrel::cluster? > >EvanI''ve got to drive home now. I''ll be back online in a couple of hours. I think it might be some kind of gem error. This is where I''ve gotten to: Some more clues from tracing with ruby-debug (I''m still learning how o use this tool): dev mode, rails 1.2.5, ruby 1.8.6 patchlevel 111, gem v0.9.4 this is on a newly created rails app with no changes to it I set a debugger statement at the end of environment.rb and run script/server. When it fires I set this breakpoint: b /usr/local/lib/ruby/gems/1.8/gems/gem_plugin-0.2.3/lib/gem_plugin.rb:114 This is in the middle of the GemPlugin::Manager.instance.load loop where gems are loaded which is called from load_plugins line 231 in in mongrels configurator.rb. (rdb:1) where --> #0 /usr/local/lib/ruby/gems/1.8/gems/gem_plugin-0.2.3/lib/gem_plugin.rb:114 in ''load'' #1 /usr/local/lib/ruby/site_ruby/1.8/rubygems/source_index.rb:166 in ''each'' #2 /usr/local/lib/ruby/gems/1.8/gems/gem_plugin-0.2.3/lib/gem_plugin.rb:112 in ''load'' #3 /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.1/lib/mongrel/configurator.rb:231 in ''load_plugins'' #4 /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.1/bin/mongrel_rails:117 in ''cloaker_'' (rdb:1) l 112 [107, 116] in /usr/local/lib/ruby/gems/1.8/gems/gem_plugin-0.2.3/lib/gem_plugin.rb 107 def load(needs = {}) 108 sdir = File.join(Gem.dir, "specifications") 109 gems = Gem::SourceIndex.from_installed_gems(sdir) 110 needs = needs.merge({"gem_plugin" => INCLUDE}) 111 112 gems.each do |path, gem| 113 # don''t load gems more than once => 114 next if @gems.has_key? gem.name 115 check = needs.dup I set an exception capture here for the NoMethodError cat NoMethodError then 34 times through this loop (many ''conts'') (rdb:1) cont Exiting /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.5/lib/commands/servers/mongrel.rb:15: warning: already initialized constant OPTIONS Catchpoint at /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: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 /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.5/lib/commands/servers/mongrel.rb:18 ARGV.clone.options do |opts| [13, 22] in /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.5/lib/commands/servers/mongrel.rb 13 :ip => "0.0.0.0", 14 :environment => (ENV[''RAILS_ENV''] || "development").dup, 15 :detach => false 16 } 17 => 18 ARGV.clone.options do |opts| 19 opts.on("-p", "--port=port", Integer, "Runs Rails on the specified port.", "Default: 3000") { |v| OPTIONS[:port] = v } 20 opts.on("-b", "--binding=ip", String, "Binds Rails to the specified ip.", "Default: 0.0.0.0") { |v| OPTIONS[:ip] = v } 21 opts.on("-d", "--daemon", "Make server run as a Daemon.") { OPTIONS[:detach] = true } 22 opts.on("-e", "--environment=name", String,
Stephen Bannasch
2007-Nov-13 22:26 UTC
[Mongrel] mongrel startup fails now: already initialized constant OPTIONS
>On Nov 13, 2007 3:29 PM, Stephen Bannasch ><stephen.bannasch at deanbrook.org> wrote: > >> I updated to ruby 1.8.6p111 last night and updated some gems and now >> mongrel doesn''t work > >IIRC, if you update ruby, you''re supposed to reinstall your gems -- >especially those with C components. (You''ll probably want to update >mysql, too.) Something about libraries and linking...?I didn''t do that -- and that sounds like a likely cause for strange errors. Hmmm ... is there an easy way to ask all the versions of all my gems to rebuild themselves -- I don''t actually need to download them -- they''re already on my system.
Rafael G.
2007-Nov-14 10:29 UTC
[Mongrel] mongrel startup fails now: already initialized constant OPTIONS
Evan Weaver escribi?:> Works for me. Do you have any strange gem_plugins installed? Maybe try > uninstalling the old version of mongrel::cluster? > > Evan > > On Nov 13, 2007 3:29 PM, Stephen Bannasch > <stephen.bannasch at deanbrook.org> 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 >> _______________________________________________ >> Mongrel-users mailing list >> Mongrel-users at rubyforge.org >> http://rubyforge.org/mailman/listinfo/mongrel-users >> >> > > > >Try to run your application with webrick, maybe is a require that you need in a gem (webrick show the error more friendly). Regards -- Rafael Garcia Ortega -------------- next part -------------- A non-text attachment was scrubbed... Name: rgo.vcf Type: text/x-vcard Size: 251 bytes Desc: not available Url : http://rubyforge.org/pipermail/mongrel-users/attachments/20071114/f0cc5d99/attachment.vcf
Stephen Bannasch
2007-Nov-15 06:59 UTC
[Mongrel] mongrel startup fails now: already initialized constant OPTIONS
>On Nov 13, 2007 3:29 PM, Stephen Bannasch ><stephen.bannasch at deanbrook.org> wrote: > >> I updated to ruby 1.8.6p111 last night and updated some gems and now >> mongrel doesn''t work > >IIRC, if you update ruby, you''re supposed to reinstall your gems -- >especially those with C components. (You''ll probably want to update >mysql, too.) Something about libraries and linking...? >Eric Hodel (who is coordinating rubgems) doesn''t think I should have to do that ... At 6:02 PM -0800 11/13/07, Eric Hodel wrote:>I''ve never heard of this before, and I''ve been using gems for a long >time. I''ve never reinstalled my gems when upgrading ruby. I''ve used >C components from ruby 1.8.2 with 1.8.6. > >If you do have to recompile, this is a bug in either Ruby or the >extension because something changed incompatibly. Probably the >extension though.But I think there is something wrong with my local gems. I fixed the problem by removing all the versions of one gem that should have NOTHING to do with mongrel or rails ??? The problem occurs with a rails 1.2.5 app as simple as this: $ rails test125 $ cd rails125 $ script/server In fact it also occurs when I create new apps using rails version 1.2.0, 1.2.1, 1.2.3, 1.2.4, and 1.2.5. Mongrel uses a gem that Zed wrote called gem_plugin. I put a break on the line that requires the dependant gems for mongrel: /usr/local/lib/ruby/gems/1.8/gems/gem_plugin-0.2.3/lib/gem_plugin.rb:134 Here''s the line of code: require File.join(gem_dir, "lib", gem.name, "init.rb") This is called from line 231 of mongrel''s configurator.rb: GemPlugin::Manager.instance.load(load_settings) In my simple 1.2.5 test app here were the sequential values for gem_dir: /usr/local/lib/ruby/gems/1.8/gems/mongrel_cluster-1.0.2 /usr/local/lib/ruby/gems/1.8/gems/seesaw-0.2.5 /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0 /usr/local/lib/ruby/gems/1.8/gems/mongrel_cluster-1.0.2 /usr/local/lib/ruby/gems/1.8/gems/seesaw-0.2.5 /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0 /usr/local/lib/ruby/gems/1.8/gems/ruport-0.8.10 These represent the root path to the gem that is being loaded. An actual full path looks like this: /usr/local/lib/ruby/gems/1.8/gems/mongrel_cluster-1.0.2/lib/mongrel_cluster/init.rb Of course there are some strange entries there! This is what I have installed: mongrel (1.1.1, 1.0.1, 1.0, 0.3.13.4) A small fast HTTP library and server that runs Rails, Camping, Nitro and Iowa apps. mongrel_cluster (1.0.5, 1.0.4, 1.0.3, 1.0.2, 0.2.1, 0.2.0) Mongrel plugin that provides commands and Capistrano tasks for managing multiple Mongrel processes. seesaw (0.2.5) Ripple-restart a mongrel cluster with no downtime So it''s pretty strange that mongrel-cluster-1.0.2 and mongrel 1.0 are being required. Also the duplication doesn''t seem right The crash happens when I let the debugger continue after that last require of ruport (??!!). OK -- so I delete all the ruport gems I have installed ... and it works ?!?! *** Here''s what the same tracing shows on my now working system (for just what reason I don''t yet know). $ rdebug script/server.rb [I made a copy of script/server and renamed it script/server.rb so rdebug would start it from the command line] set a breakpoint in gem_plugin on the line that require''s the dependant gems: (rdb:1) b /usr/local/lib/ruby/gems/1.8/gems/gem_plugin-0.2.3/lib/gem_plugin.rb:134 Then let the program run in the debugger: (rdb:1) cont I get this printed: => 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 then at the first break gem_plugin requires: /usr/local/lib/ruby/gems/1.8/gems/mongrel_cluster-1.0.2/lib/mongrel_cluster/init.rb and at the second break: /usr/local/lib/ruby/gems/1.8/gems/seesaw-0.2.5/lib/seesaw/init.rb this then gets printed: ** Starting Mongrel listening at 0.0.0.0:3000 ** Starting Rails with development environment... ** Rails loaded. ** Loading any Rails specific GemPlugins and then at the third break mongrel 1.0 is required: /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0/lib/mongrel/init.rb and this is printed: ** Signals ready. TERM => stop. USR2 => restart. INT => stop (no restart). ** Rails signals registered. HUP => reload (without restart). It might not work well. ** Mongrel 1.1.1 available at 0.0.0.0:3000 ** Use CTRL-C to stop. and the whole thing is working ???? How did ruport ever get on that list?
Stephen Bannasch
2007-Nov-15 20:41 UTC
[Mongrel] mongrel startup fails now: already initialized constant OPTIONS
fyi: Gregory Brown, the developer of Ruport reports: At 8:02 AM -0500 11/15/07, Gregory Brown wrote:>Okay, after digging through all of this it sounds like Rails / >GemPlugin are trying to autoload the ruport gem itself even though it >isn''t a plugin (has no init.rb). This to me sounds like Rails is >abusing gem_plugin, because Ruport does not depend on rails and thus >should not be loaded. > >That having been said, Ruport 1.0 on up don''t explicitly depend on >gem_plugin, so it won''t be detected by Rails, and thus won''t break. (I >think). > >If you have versions 0.8.10 -> 0.8.14 laying around and are >experiencing this problem, try deleting them. > >Also, thanks for pointing this problem out, I''ve seen it before but >only in weird cases, and was wondering what happened.Sounds like it could be a problem with gem_plugin, or interactions between gem_plugin and rails, or gem_plugin ,rails, mongrel, ruby 1.8.6, and ruport <1.0
Evan Weaver
2007-Nov-15 21:10 UTC
[Mongrel] mongrel startup fails now: already initialized constant OPTIONS
No aspersions cast on Zed but I hate gem_plugin, and the team is planning to remove it in a couple months. We just need a temporary hack for now so that Ruport isn''t busted. Evan On Nov 15, 2007 3:41 PM, Stephen Bannasch <stephen.bannasch at deanbrook.org> wrote:> fyi: > > Gregory Brown, the developer of Ruport reports: > > At 8:02 AM -0500 11/15/07, Gregory Brown wrote: > >Okay, after digging through all of this it sounds like Rails / > >GemPlugin are trying to autoload the ruport gem itself even though it > >isn''t a plugin (has no init.rb). This to me sounds like Rails is > >abusing gem_plugin, because Ruport does not depend on rails and thus > >should not be loaded. > > > >That having been said, Ruport 1.0 on up don''t explicitly depend on > >gem_plugin, so it won''t be detected by Rails, and thus won''t break. (I > >think). > > > >If you have versions 0.8.10 -> 0.8.14 laying around and are > >experiencing this problem, try deleting them. > > > >Also, thanks for pointing this problem out, I''ve seen it before but > >only in weird cases, and was wondering what happened. > > Sounds like it could be a problem with gem_plugin, or interactions between gem_plugin and rails, or gem_plugin ,rails, mongrel, ruby 1.8.6, and ruport <1.0 > > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users >-- Evan Weaver Cloudburst, LLC
Ian Pancham
2007-Nov-29 15:29 UTC
[Mongrel] mongrel startup fails now: already initialized constant OPTIONS
I had a similar problem today that was resolved by uninstalling and re-installing mongrel. I don''t have ruport installed. I tried uninstalling gem_plugin first and then reinstalling, but that seemed to make no difference, mongrel still died with the "options" method error for Array. In case it helps, here are the relevant lines: Ian$ 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 Exiting /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.6/lib/commands/servers/mongrel.rb:15: warning: already initialized constant OPTIONS /usr/local/lib/ruby/gems/1.8/gems/rails-1.2.6/lib/commands/servers/mongrel.rb:18: undefined method `options'' for #<Array:0x136ef38> (NoMethodError) .... Ian$ sudo gem uninstall mongrel Successfully uninstalled mongrel version 1.1 Remove executables and scripts for ''mongrel_rails'' in addition to the gem? [Yn] y Removing mongrel_rails ... Ian$ sudo gem install mongrel Select which gem to install for your platform (powerpc-darwin8.10.0) 1. mongrel 1.1.1 (ruby) 2. mongrel 1.1.1 (jruby) 3. mongrel 1.1.1 (mswin32) 4. mongrel 1.1 (mswin32) 5. mongrel 1.1 (ruby) 6. mongrel 1.1 (jruby) 7. Skip this gem 8. Cancel installation> 5Install required dependency daemons? [Yn] y Install required dependency fastthread? [Yn] y Select which gem to install for your platform (powerpc-darwin8.10.0) 1. fastthread 1.0.1 (mswin32) 2. fastthread 1.0.1 (ruby) 3. Skip this gem 4. Cancel installation> 2Building native extensions. This could take a while... Building native extensions. This could take a while... Successfully installed mongrel-1.1 Successfully installed daemons-1.0.9 Successfully installed fastthread-1.0.1 ... Ian$ 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 ** Signals ready. TERM => stop. USR2 => restart. INT => stop (no restart). ** Rails signals registered. HUP => reload (without restart). It might not work well. I then upgraded to mongrel 1.1.1 and this also worked. Stephen Bannasch wrote:> fyi: > > Gregory Brown, the developer of Ruport reports: > > At 8:02 AM -0500 11/15/07, Gregory Brown wrote: >>If you have versions 0.8.10 -> 0.8.14 laying around and are >>experiencing this problem, try deleting them. >> >>Also, thanks for pointing this problem out, I''ve seen it before but >>only in weird cases, and was wondering what happened. > > Sounds like it could be a problem with gem_plugin, or interactions > between gem_plugin and rails, or gem_plugin ,rails, mongrel, ruby 1.8.6, > and ruport <1.0-- Posted via http://www.ruby-forum.com/.
Roger Pack
2007-Dec-05 18:31 UTC
[Mongrel] mongrel startup fails now: already initialized constant
In my case this didn''t help--when I tried to boot script/server webrick it booted webrick THEN mongrel (odd). Temporary fix: gem uninstall mongrel> I had a similar problem today that was resolved by uninstalling and > re-installing mongrel. I don''t have ruport installed. I tried > uninstalling gem_plugin first and then reinstalling, but that seemed to > make no difference, mongrel still died with the "options" method error > for Array. In case it helps, here are the relevant lines: >-- Posted via http://www.ruby-forum.com/.
Luis Lavena
2007-Dec-05 18:55 UTC
[Mongrel] mongrel startup fails now: already initialized constant
On Dec 5, 2007 3:31 PM, Roger Pack <lists at ruby-forum.com> wrote:> In my case this didn''t help--when I tried to boot script/server webrick > it booted webrick THEN mongrel (odd). Temporary fix: gem uninstall > mongrel > > I had a similar problem today that was resolved by uninstalling and > > re-installing mongrel. I don''t have ruport installed. I tried > > uninstalling gem_plugin first and then reinstalling, but that seemed to > > make no difference, mongrel still died with the "options" method error > > for Array. In case it helps, here are the relevant lines: > >script/server is borked. Historically it do odd things with the way it loads and loads mongrel, if you search this list you will find a few cases that describe this situation. I suggest stick to mongrel_rails start or mongrel_service in case you''re running on Windows. -- Luis Lavena Multimedia systems - Leaders are made, they are not born. They are made by hard effort, which is the price which all of us must pay to achieve any goal that is worthwhile. Vince Lombardi
Sj Seo
2007-Dec-08 11:31 UTC
[Mongrel] mongrel startup fails now: already initialized constant
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/.
Evan Weaver
2007-Dec-08 16:52 UTC
[Mongrel] mongrel startup fails now: already initialized constant
Blanket gem updates is usually a bad idea. Evan On Dec 8, 2007 6:31 AM, Sj Seo <lists at ruby-forum.com> wrote:> 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/. > _______________________________________________ > > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users >-- Evan Weaver Cloudburst, LLC
Kirk Schafer
2008-Apr-29 07:12 UTC
[Mongrel] mongrel startup fails now: already initialized constant
Sj Seo wrote:> Stephen Bannasch wrote: >> I updated to ruby 1.8.6p111 last night and updated some gems and now >> mongrel doesn''t work: >> >> <snip> (group doesn''t allow long quotes) >> >> $ 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 >> >> <snip> > > ---------------- > > 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--------------------------- I realize this is an old post, so apologize for bumping it if that''s what occurs. I encountered the same issue on a new Gentoo box after a "darcs get", whereby script/server started WEBrick but then out popped Mongrel..and then the error "warning: already initialized constant OPTIONS." This made no sense to me, and I landed here. The suggestion to run the rake tasks had no effect, but a mongrel_rails start did report a different error: /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require'': no such file to load -- tzinfo (MissingSourceFile) Subsequently, only a single "gem install tzinfo" (your circumstances may vary) was required to allow both "script/server" and "mongrel_rails start" to function normally. So, an FYI for the community at large. -- Posted via http://www.ruby-forum.com/.
Valery Visnakov
2008-Jul-06 10:01 UTC
[Mongrel] mongrel startup fails now: already initialized constant
The problem is in missing gems. For me it was aws-s3, after ''gem install aws-s3'' installation with all dependencies everything worked fine. -- Posted via http://www.ruby-forum.com/.
Manfred Lange
2008-Aug-31 02:17 UTC
[Mongrel] mongrel startup fails now: already initialized constant
Kirk Schafer wrote:> [...] > --------------------------- > I realize this is an old post, so apologize for bumping it if that''s > what occurs. I encountered the same issue on a new Gentoo box after a > "darcs get", whereby script/server started WEBrick but then out popped > Mongrel..and then the error "warning: already initialized constant > OPTIONS." > > This made no sense to me, and I landed here. The suggestion to run the > rake tasks had no effect, but a mongrel_rails start did report a > different error: > /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in > `gem_original_require'': no such file to load -- tzinfo > (MissingSourceFile) > > Subsequently, only a single "gem install tzinfo" (your circumstances may > vary) was required to allow both "script/server" and "mongrel_rails > start" to function normally. So, an FYI for the community at large.In my case the cause for the problem was a spelling error in environment.rb. The error message of "mongrel_rails start" was much more helpful than what came out of "script/server". Thank you, Kirk for posting! -- Posted via http://www.ruby-forum.com/.
Possibly Parallel Threads
- error when installing on jruby (fastthread dependency)
- problems with ''localization simplified''
- mongrel on linux error - custom_require.rb:27:in `gem_original_require'': no such file to load -- (LoadErro
- uninitialized constant ActiveSupport::Cache (NameError)
- Win32 gems for mongrel (0.3.18) and mongrel_service (0.3.1)