This project is archived and is in readonly mode.

#2204 ✓resolved
John Dzak

Vendored Gems Not Being Activated With Rake Tasks

Reported by John Dzak | March 10th, 2009 @ 10:24 PM

Observed in rails >=2.3 when rails gems are vendored.

When Rakefile calls boot.rb, load_initializer (for class VendorBoot) will stub gem specs, but will not add_gem_load_paths.

If you have another gem that requires a vendored gem, you will receive an error message like..

rake -T

rake aborted!

can't activate activesupport (>= 2.0.0, runtime), already activated activesupport-2.3.1

Before Fix

def load_initializer

 require "#{RAILS_ROOT}/vendor/rails/railties/lib/initializer"

 Rails::Initializer.run(:install_gem_spec_stubs)

end

After Fix

def load_initializer

 require "#{RAILS_ROOT}/vendor/rails/railties/lib/initializer"

 Rails::Initializer.run(:install_gem_spec_stubs)

 Rails::Initializer.run(:add_gem_load_paths)

end

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

People watching this ticket

Referenced by

Pages