>On Nov 13, 2007 3:29 PM, Stephen Bannasch ><[EMAIL PROTECTED]> 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? _______________________________________________ Mongrel-users mailing list Mongrel-users@rubyforge.org http://rubyforge.org/mailman/listinfo/mongrel-users