[Rails] Using gems within Engines - need to 'require'?
I'm building an engine and as part of that I want to use acts_as_list.
So I've added 's.add_dependency "acts_as_list"' to my gemspec file. When
I bundle acts_as_list gets installed as I would expect, and is listed by
'gem list'
However, when I go to use acts_as_list in my model I get method not
found errors ("`method_missing': undefined method `acts_as_list'").
To get it to work I had to add "require 'acts_as_list'" to the start of
my model file. The model is in app/models and not in
test/dummy/app/models.
This isn't too much of a fag to do, but I worry that it means I haven't
configured something correctly. Is this normal when working with
Engines?
Rails 3.2.8, Ruby 1.9.3, Ubuntu 12.04.1 LTS
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home