Wednesday, March 21, 2012

QA : 2 : How to Unmount / Remove Engine?

Question from Pratik Jadhav.

In Rails 3 we have concept called as "Engine". As in Rails 4.0 vender/plugin are going to be removed, we have to use Engine's instead.
I have gone through many sites where they explain how we can create/mount new engine OR convert existing Rails App to engine.
But didn't found any link where they have explained about how to unmount Or remove engine.
can any one help me out with this??


  1. Try commenting the routes part where you have added 'mount' command for that specific engine you want to unmount, restart the server.
    It should unmount the engine.

  2. Hey,
    Thanx Supriya.. :)
    It works..but it just denies access to front end user from my engine.
    In back end i still have my engine code in my lib and dependencies in gem file.
    For now i have
    Remove reference for the Engine from Gemfile.
    Remove routes related to engine fro routes.rb
    Down all the migration related to engine.
    Remove the engine from lib/engines.
    It completely removes engine from our rails app.

    but..It there any better way to do so..??