Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reloader Defaults All Routes to 404 #786

Closed
Wardrop opened this issue Feb 11, 2012 · 11 comments
Closed

Reloader Defaults All Routes to 404 #786

Wardrop opened this issue Feb 11, 2012 · 11 comments
Assignees
Labels
Milestone

Comments

@Wardrop
Copy link

Wardrop commented Feb 11, 2012

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.

@DAddYE
Copy link
Member

DAddYE commented Feb 16, 2012

Thanks man, I will try to reproduce the problem with ruby 1.9

@Wardrop
Copy link
Author

Wardrop commented Feb 17, 2012

Yep. I should have mentioned I'm running Padrino 0.10.5.

@robertjpayne
Copy link

Any update on this? It's making developing with Padrino a bit harder than I'd normally like.

@nesquena
Copy link
Member

nesquena commented Mar 9, 2012

@robertjpayne You may want to consider disable :reload and checking out https://github.com/joshbuddy/ak47 until we resolve this reload issue. ak47 bundle exec padrino start

@Wardrop
Copy link
Author

Wardrop commented Mar 10, 2012

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.

@robertjpayne
Copy link

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.

@DAddYE
Copy link
Member

DAddYE commented 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 require_relative make crazy our reloader, btw If any had a chance to try their code with latest padrino edge, be free to update this topic with yours logs. Remember to enable devel mode.

Thanks!

@nesquena
Copy link
Member

Thanks @DAddYE the spawn built in reloader sounds really useful, I would probably use that in most cases over the current one and we can leave in this one for windows.

@DAddYE
Copy link
Member

DAddYE commented Mar 12, 2012

Other than windows other rubies implementations can have some problems

@nesquena
Copy link
Member

@DAddYE Any update on this? or a reloader fix? I have experienced this as well.

@ujifgc
Copy link
Member

ujifgc commented Oct 6, 2013

Failed to reproduce this. Used a bunch of recursive require_relative calls of helpers, apps and system features. Please reopen and provide a minimal test case if the issue persists on padrino master.

@ujifgc ujifgc closed this as completed Oct 6, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants