Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

Rails initializer will conflict with Adhearsion if Rails gem used by app is not the newest on the system

#30

I had this issue when I used the Rails initializer to load in a Rails 2.0.2 app with a Rails 2.1.0 gem installed on the system.

Adhearsion simply does require "active_support" and takes in the latest version on the system. This conflicts with Rails because Rails requires its activesupport gem be the exact version as the Rails app,

The solution seems to be having the Rails initializer initialize before requiring in active_support. Argh.

Sample output:

  ~/Desktop/myahnapp % ahn -
  /Library/Ruby/Site/1.8/rubygems.rb:142:in `activate': can't activate activesupport (= 2.0.2, runtime), already activated activesupport-2.1.0 (Gem::Exception)
  	from /Library/Ruby/Site/1.8/rubygems.rb:158:in `activate'
  	from /Library/Ruby/Site/1.8/rubygems.rb:157:in `each'
  	from /Library/Ruby/Site/1.8/rubygems.rb:157:in `activate'
  	from /Library/Ruby/Site/1.8/rubygems.rb:49:in `gem'
  	from /Users/jicksta/Desktop/myahnapp/gui/config/boot.rb:59:in `load_rails_gem'
  	from /Users/jicksta/Desktop/myahnapp/gui/config/boot.rb:53:in `load_initializer'
  	from /Users/jicksta/Desktop/myahnapp/gui/config/boot.rb:39:in `run'
  	from /Users/jicksta/Desktop/myahnapp/gui/config/boot.rb:11:in `boot!'
  	 ... 17 levels...
  	from /Users/jicksta/Desktop/0.8.0/lib/adhearsion/cli.rb:70:in `start'
  	from /Users/jicksta/Desktop/0.8.0/lib/adhearsion/cli.rb:18:in `send'
  	from /Users/jicksta/Desktop/0.8.0/lib/adhearsion/cli.rb:18:in `execute!'
  	from /Users/jicksta/Desktop/0.8.0/bin/ahn:28

Reported by Jay Phillips · June 27th, 2008 @ 09:32 PM

State: resolved
Milestone: none
Assigned to: Jay Phillips Jay Phillips

Activity

  1. Jay Phillips
    Jay Phillips
    • State changed from new to resolved
    • Tag changed from rails to rails

    This is now fixed. In trunk you can specify gem versions in .ahnrc to override gem require() statements that may haphazardly pull in the latest version and conflict with another lib.

    In .ahnrc:

    gems:

    activerecord:
        version: >= 2.1.0
    
    

    September 18th, 2008 @ 09:51 PM

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.