Samuel Kadolph wrote: > From the code you posted, I don't see a problem. > > I would suggest following the structure of each framework and how they > use Railties. > > # lib/my_engine.rb > require 'active_support' > > module MyEngine > extend ActiveSupport::Autoload > > autoload :MyClass > autoload :Whatever > end > > # lib/my_engine/engine.rb > require 'my_engine' > > module MyEngine > class Engine < Rails::Engine > > end > end > > And now you have 3 different ways to initialize the engine. If you leave > your gem named 'my_engine', you need to put `require 'my_engine/engine'` > in lib/my_engine.rb. > If you rename your gem to 'myengine', you can require the engine inside > of the base app with `require 'my_engine/engine'` inside the bootup or > add another file called lib/myengine.rb that only has `require > 'my_engine/engine'` in it.
Thanks for your help, I've tried to implement what you've written, but somehow it still raises 'uninitialized constant MyEngine::Application (NameError)'. I can put my complete test code on github if you like. But at this moment I have found a working solution, using the 'app2engine' gem (http://github.com/eregon/app2engine). Benoit Daloze pointed me to that solution on the Ruby Forum (http://www.ruby-forum.com/topic/214374#930502) (which I accidentally used for posting this issue). HJ -- 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 [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

