Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Reloader Defaults All Routes to 404 #786
When I make a change that requires a full app reload, all of my routes stop working and return 404's.
Here's a log of the reload operation: https://gist.github.com/1797102
Here's what my route looks like (app/controllers/reservation.rb): https://gist.github.com/1797100
Does anyone know what's happening. The log looks like it's done everything correctly?
This issue comes after I just worked around another reload issue. It seems padrino doesn't like it when you use #require_relative in files that are auto-reloaded, especially when the #require_relative references a file that's also automatically reloaded. Anyway, this issue is less blocking than the one I face now.
I'm using re-run for the time being. The pattern I use for tracking file changes is "*/.rb". That way it only reload if I change an .rb file anywhere in my application directory structure. ERB files are exempt as they don't need reloading. It would be nice if Padrino could launch faster, that way I could continue using shotgun as I do with Sinatra. My application in Sinatra took only about a 0.25 seconds to reload using shotgun. Padrino takes more like 2+ seconds.
I did what @nesquena recommended and turned off reloading. And am using Shotgun to completely respawn the entire process on every request.
The app I have is extremely tiny and running ruby 1.9.3 on my local machine which is very fast so I can't even notice the delay.
added a commit
Mar 12, 2012
Guys, in next version I will add a re-spawn builtin which is (almost on unix and mri) machines rock solid.
Btw, I worked a bit on this issue and I made few changes, I still need to check why