elliottg
2010-Sep-20 18:56 UTC
Should a Gem''s dependencies be listed in the parent app''s Gemfile?
I am working on a Gem that has several Gem dependencies of its own. The Gem''s .gemspec looks good (I think) and when "bundle install" is called from the parent app, it lists that it is indeed "Using" the Gem''s required Gems. I''ll refrain from an Inception analogy here ;) When I fire up the app and make a request, I get "uninitialized constant Authlogic" (this is one of the Gem''s dependencies). If I add "gem ''authlogic''" to the app''s Gemfile all is good. I was under the impression that a Gem''s dependencies did not need to be added to the parent app''s Gemfile. Am I wrong here? Do I need to configure something differently in my Gem so that the explicit Gemfile calls are not needed? Thanks, Elliott G -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
elliottg
2010-Sep-21 03:39 UTC
Re: Should a Gem''s dependencies be listed in the parent app''s Gemfile?
I had failed to require the Gem''s dependencies in the Gem''s init (my_gem_name.rb) lib file. A simple require ''authlogic'' did it. Elliott G On Sep 20, 2:56 pm, elliottg <x...-+PdThUrr9bOXUBVsB0ZYTw@public.gmane.org> wrote:> I am working on a Gem that has several Gem dependencies of its own. > The Gem''s .gemspec looks good (I think) and when "bundle install" is > called from the parent app, it lists that it is indeed "Using" the > Gem''s required Gems. I''ll refrain from an Inception analogy here ;) > > When I fire up the app and make a request, I get "uninitialized > constant Authlogic" (this is one of the Gem''s dependencies). If I add > "gem ''authlogic''" to the app''s Gemfile all is good. > > I was under the impression that a Gem''s dependencies did not need to > be added to the parent app''s Gemfile. Am I wrong here? Do I need to > configure something differently in my Gem so that the explicit Gemfile > calls are not needed? > > Thanks, Elliott G-- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.