Reputation: 10077
Let's say I have created a mountable engine into ~/my_engine
folder:
rails plugin new my_engine --mountable
How do I mount this engine into a Rails 3.1 app, that is at the same directory level (e.g. ~/my_app
)?
Upvotes: 4
Views: 367
Reputation: 27637
There is a good writeup of the process here:
http://www.builtfromsource.com/2010/12/13/mountable-engines-in-rails-3-1-beta-getting-started/
In short, add this to your main app's Gemfile
:
gem 'my_engine', :path => '../my_engine'
And run bundle install
/bundle update
. Add this to your main app
mount MyEngine::Engine => '/my-engine-url'
Upvotes: 5