{5} Assigned, Active Tickets by Owner (Full Description) (1 matches)

List tickets assigned, group by ticket owner. This report demonstrates the use of full-row display.

evanweaver

Ticket Summary Component Milestone Type Created
Description
#17 gem_plugin interacts with other gems in a weird way Mongrel 1.2 bug 02/13/08

Bugs: Browse | Submit New | Admin #16145 Not every gem is a plugin, is it? Date: 2007-12-06 11:47 Priority: 3 Submitted By: Jens Wille (jwille) Assigned To: Evan Weaver (evanweaver) Category: gem_plugin State: Open Summary: Not every gem is a plugin, is it?

Detailed description

After updating mongrel from 1.0.1 to 1.1.1, we experienced the following problem when starting script/server in one of our Rails applications. Coincidentally, gem_plugin has been updated, too, to 0.2.3 a few days ago. So I don't think this has anything to do with the mongrel update, but rather with gem_plugin.

Actually, my guess is that GemPlugin::Manager#load should really only consider those gems that actually have an init.rb file, thus avoiding such errors with non-gem_plugin capable gems. BTW: Should any GemPlugin?'s be loaded at all if +needs+ is just an empty hash?

----[ script/server error message ]----
/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require': no such file to load
-- /usr/lib/ruby/gems/1.8/gems/activerdf-1.6.8/lib/activerdf/init.rb (MissingSourceFile)
        from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'
        from XXX/vendor/rails/activesupport/lib/active_support/dependencies.rb:495:in `require'
        from XXX/vendor/rails/activesupport/lib/active_support/dependencies.rb:342:in `new_constants_in'
        from XXX/vendor/rails/activesupport/lib/active_support/dependencies.rb:495:in `require'
        from /usr/lib/ruby/gems/1.8/gems/gem_plugin-0.2.3/lib/gem_plugin.rb:134:in `load'
        from /usr/local/lib/site_ruby/1.8/rubygems/source_index.rb:166:in `each'
        from /usr/local/lib/site_ruby/1.8/rubygems/source_index.rb:166:in `each'
        from /usr/lib/ruby/gems/1.8/gems/gem_plugin-0.2.3/lib/gem_plugin.rb:112:in `load'
         ... 20 levels...
        from XXX/vendor/rails/activesupport/lib/active_support/dependencies.rb:495:in `require'
        from XXX/vendor/rails/railties/lib/commands/server.rb:39
        from script/server:3:in `require'
        from script/server:3
---- snip ----

Could this be a possible fix?

----[ diff -u /usr/lib/ruby/gems/1.8/gems/gem_plugin-0.2.3/lib/gem_plugin.rb{~,} ]----
--- /usr/lib/ruby/gems/1.8/gems/gem_plugin-0.2.3/lib/gem_plugin.rb~     2007-12-06 17:34:58.000000000 +0100
+++ /usr/lib/ruby/gems/1.8/gems/gem_plugin-0.2.3/lib/gem_plugin.rb      2007-12-06 17:35:09.000000000 +0100
@@ -130,8 +130,9 @@
           # Previously was set wrong, we already have the correct gem path!
           #gem_dir = File.join(Gem.dir, "gems", "#{gem.name}-#{gem.version}")
           gem_dir = File.join(Gem.dir, "gems", path)
-
-          require File.join(gem_dir, "lib", gem.name, "init.rb")
+          init_rb = File.join(gem_dir, "lib", gem.name, "init.rb")
+
+          require init_rb if File.readable?(init_rb)
           @gems[gem.name] = gem_dir
         end
       end

cheers jens


Note: See TracReports for help on using and creating reports.