-
Notifications
You must be signed in to change notification settings - Fork 129
Reloader doesn't work when sinatra is mounted into Rails application. #29
Comments
Interesting. Rails comes with a reloader, by the way. |
Rails reloader doesn't reload changes in mounted sinatra app |
That depends on how you configure the reloader and/or where you place your Sinatra applications. |
I haven't performed any configuration in rails. The only thing I've done is mount inside routes.rb. Do you know how can I configure rails to reload sinatra code? |
@lexer I did a little research and it seems that reloading doesn't work when both Rails and Sinatra::Reloader try to reload the Sinatra application. I haven't found the reason yet, but for now you can tell Rails to stop reloading your application with: ActiveSupport::Dependencies.autoload_once_paths << '/path/to/your/sinatra/app' This works with Rails 3.2, Sinatra 1.3.2 and Sinatra Contrib 1.3.1. |
Thanks, I will try. |
@ohhgabriel may its better to let rails reload sinatra app, but i haven't found how to do it yet. |
Might have a workaround: https://gist.github.com/4490968 Tested with: rails 3.2.11 Regards, |
@ohhgabriel where to write? ActiveSupport::Dependencies.autoload_once_paths << '/path/to/your/sinatra/app' |
I would recommend using the host application's reloader, in this case Rails. There have been several solutions suggested here, so I am closing this ticket. |
Reloader doesn't work when sinatra is mounted into Rails application.
App is mounted this way: mount Api2.new, :at => "/api2"
Changes will cause "Routing Error"
The text was updated successfully, but these errors were encountered: