This week's book giveaway is in the Design forum.
We're giving away four copies of Design for the Mind and have Victor S. Yocco on-line!
See this thread for details.
Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problems referencing code in bundled gems

 
Eric Hermann
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
I'm working on my first gem and I'm having a problem referencing dependencies. In my gem, I need to reference code from some other custom gems we've developed.
We'll call my Gem "test_company_models". In my test_company_models gem, I need to include PricingExtensions from our test_company_libs Gem.

I'm dynamically requiring my models in my test_company_models.rb this way:



This works fine until I am pulling in a model which references PricingExtensions from the test_company_libs Gem:



Which gives me this error:



I've tried adding the test_company_libs Gem to my Gem in these two ways:


Gemfile:


and in the test_company_models.gemspec:


In either case, I get the "uninitialized constant CartItem::PricingExtensions" error.


Any idea as to what I am doing wrong?

Thanks,
Eric
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic