Open dfaulken opened 7 years ago
Breaking this down a little more:
The gemspec pushes the lib
directory onto the load path:
$LOAD_PATH.push File.expand_path('../lib', __FILE__)
And then in lib/microservices_engine.rb
we declare module MicroservicesEngine
.
So why then can I not write include MicroservicesEngine
in a Rails model file?
@werebus deduced that this is a product of the fact that the gem is called umts-microservices-engine
, but the Ruby file that needs to be required is named microservices_engine.rb
.
You can write
gem 'umts-microservices-engine', require: 'microservices_engine'
but it'd be better if we didn't require people to do that.
I couldn't figure out how to be able to use
MicroservicesEngine.get
in a model file.