What's happening to Rails engines?

Since I began to develop a big application as a Rails engine I have been noticing some annoying things, especially with gems.

First is Spring. Since it’s a core gem I would expect it to be well supported for engines, but it’s not. I opened two issues, one about not working fast enough and another about problems running the Rails server. Both were opened on July 2014.

The second gem is jquery-ui-rails, which does not seem to work with engines.

Why are these things happening? Aren’t engines good enough to be considered as first-class citizens?

Apart from adding them on gemspec dependency , you need to also require it explicitly inside the engine.rb or lib/your_engine_name.rb on top

Eg:

lib/your_engine_name.rb

require ‘jquery-ui’

module YourEngineName

end

OR

module YourEngineName

class Engine < ::Rails::Engine

isolate_namespace YourEngineName

require ‘jquery-ui’

end

end

Engines work fine . We’re using 9 engines in production for a while. Only a few bugs with named routes sometimes but that can be ignored .

Thanks Vivek, you are totally right. So much time since I added the last gem to my project :slight_smile:

Spring issues continue to be annoying. It forced my to use Zeus, but since Spring is in the core it should be fully supported, don’t you think?

Hi,

I dont mean to be rude but i have no idea what you’re talking about Spring ? Zues ? Core ?

:smiley: