Subject: Incompatible with Paperclip gem
If I load the thoughtbot-paperclip gem before the fiveruns-dash-rails gem, script/server (using Mongrel) fails with
[gem
home]/gems/fiveruns-dash-rails-0.8.6/lib/fiveruns/dash/recipes/rails.rb:100:in
class': wrong number of arguments (0 for 2)
(ArgumentError)
When Dash starts it tries to find the Mongrel object by looking through ObjectSpace and checking .class'es but Paperclip has one or more objects with a different signature for the class method. I reported it as a bug against Paperclip with more detail at http://github.com/thoughtbot/paperclip/issues/#issue/73 but wanted to also report it here in case anyone else is losing hours to this. There's also the possibility that they'll say "That's what you get for poking through ObjectSpace" and not fix it.
There is a workaround; move the config.gem line loading fiveruns-dash-rails before the one loading thoughtbot-paperclip.
2 Posted by system on 10 Aug, 2009 10:02 PM
A Lighthouse ticket was created for this discussion
3 Posted by steve sanderson on 10 Aug, 2009 10:02 PM
Thanks for the tip. Added this to Lighthouse.
4 Posted by Peter Harkins on 25 Aug, 2009 06:00 PM
http://github.com/thoughtbot/paperclip/issues/closed/#issue/73
http://github.com/thoughtbot/paperclip/commit/7ccefc249ec4b611beaa3...
The Paperclip devs have cut a bugfix release that includes a fix for this bug, so this incompatability no longer exists.
I think it would probably be wise for rails.rb to catch and ignore exceptions inside the ObjectSpace.each_object loop given that it's trying to find the Mongrel object and has no interest in other objects. But this is a decision for someone who knows that code well, perhaps there are other errors there worth raising to the user.