can't activate rails, already activated rails?

After a fresh install of Leopard (good stuff), I installed ruby, installed rails, and fired up script/server on one of my sites, fully expecting it to barf out some gem I was missing. Instead, I got this error:

$ script/server
...
/opt/local/lib/ruby/vendor_ruby/1.8/rubygems.rb:246:in `activate': can't activate rails (= 2.0.2), already activated rails-1.2.6] (Gem::Exception)

Turns out there's a bug in rails 2.0.x causing MissingSourceFile exceptions to not bubble up to script/server. Being the lazy (busy?) man that I am, I found a solution that gets around the issue, rather than digging in, finding the problem, and creating and submitting a patch: Simply run mongrel_rails start instead of script/server. That seems to handle MissingSourceFile errors just fine:

$ mongrel_rails start
...
/opt/local/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require': no such file to load -- ferret (MissingSourceFile)

Bingo! That's what I was looking for!

On a side note, rest assured the fact that I'm still torturing myself with ferret causes me great shame and embarrassment.

Tags: rails  Meta: permalink

Comments

Leave a response

  1. pklyjwmApril 19, 2008 @ 05:06 PM
    FcuUX6 kkzigkfngelf, [url=http://guefsmmcxfeo.com/]guefsmmcxfeo[/url], [link=http://rkyumiyqchpc.com/]rkyumiyqchpc[/link], http://adqgrmyqsoha.com/