1

I'm using bundler in a Rails 2.3.10 app to manage my gems. One of the gems that I'm using is asset_packager (~> 0.2.0).

However, I'm getting a bunch of undefined method 'stylesheet_link_merged' errors in my tests, which would suggest that the asset_packager gem is not being loaded.

Similarly, the asset_packager Rake tasks do not appear when I run rake -T.

This doesn't seem to be a problem with any of the other gems that I've listed in my Gemfile.

Any thoughts?

sflinter
  • 404
  • 3
  • 6

1 Answers1

1

Installing asset_packager as plugin inside the app solved for me.

ruby script/plugin install git://github.com/sbecker/asset_packager.git
YOU
  • 120,166
  • 34
  • 186
  • 219
  • 1
    Thanks for the advice. In the end I switched to smart_asset (https://github.com/winton/smart_asset) which worked without any difficulty. I came across this issue again with another gem, and finally figured out what the problem was - namely that the `init.rb` file was in the root of the gem, and rails 2.3 in combination with bundler does not load that file. Moving `init.rb` to `rails/init.rb` solved the problem. – sflinter Feb 21 '11 at 08:33