This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Ruby and the fly likes Problems referencing code in bundled gems Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Languages » Ruby
Bookmark "Problems referencing code in bundled gems" Watch "Problems referencing code in bundled gems" New topic
Author

Problems referencing code in bundled gems

Eric Hermann
Greenhorn

Joined: May 07, 2013
Posts: 6
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Problems referencing code in bundled gems
 
Similar Threads
designing for multiple layers
Can't start with Ruby on Windows
ruby script/server is not working
Pointers?
Error during running a ruby file using irb on Netbeans 6.9.1