I'm building a Rails 3.1 mountable engine (3.1.0.rc6) whose sole
purpose is to provides JavaScript assets (a client-side app built with
backbone.js). I generated the skeleton with "rails plugin new <name> --
full"
Piotr's posts have been very helpful, as has the Railscast on the
subject:
http://piotrsarnacki.com/2010/09/14/mountable-engines/
http://piotrsarnacki.com/2010/12/21/mountable-apps-tutorial/
http://railscasts.com/episodes/277-mountable-engines/
I'm specifying a number of dependencies in the .gemspec file:
s.add_dependency "rails", "~> 3.1.0.rc6"
s.add_dependency "jquery-rails", "~> 1.0.13"
s.add_dependency "backbone-rails", "~> 0.5.2"
s.add_dependency "coffee-rails", "~> 3.1.0.rc6"
s.add_dependency "sass-rails", "~> 3.1.0.rc6"
s.add_dependency "uglifier", "~> 1.0.1"
# Needed to run test suite(s) or development server (which will
serve the app in spec/dummy)
s.add_development_dependency "sqlite3", "~> 1.3.4"
s.add_development_dependency "jasmine", "~> 1.1.0.rc3" # not getting
picked up?
s.add_development_dependency "rspec-rails", "~> 2.6.1" # not
getting picked up?
s.add_development_dependency "haml", "~> 3.1.2" # not getting
picked up?
The Gemfile looks like this:
source "
http://rubygems.org"
gemspec
When I run the "rails s" or "rails c" to launch the dummy app, e.g.
the HAML gem is not available. If I explicitly add the HAML gem also
to the engine's Gemfile, then it is available. Same goes for the
Jasmine gem (which provides rake tasks).
When I check the load path $:, I do see that all the gem paths
from .gemspec are listed, however they don't seem to have been
require'd.
I'm wondering if this is a Rails bug. Somehow the gems listed
in .gemspec only aren't being initialized/loaded. I'm happy to dig
into this more, but I'm not sure if this is broken or intended
behavior.
Thanks,
Wolf