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

Comments

Projects
None yet
5 participants
@Wardrop

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

This comment has been minimized.

Show comment
Hide comment
@DAddYE

DAddYE Feb 16, 2012

Member

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

Member

DAddYE commented Feb 16, 2012

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

@Wardrop

This comment has been minimized.

Show comment
Hide comment
@Wardrop

Wardrop Feb 17, 2012

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

Wardrop commented Feb 17, 2012

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

@robertjpayne

This comment has been minimized.

Show comment
Hide comment
@robertjpayne

robertjpayne Mar 9, 2012

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

robertjpayne commented Mar 9, 2012

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

@nesquena

This comment has been minimized.

Show comment
Hide comment
@nesquena

nesquena Mar 9, 2012

Member

@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

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

This comment has been minimized.

Show comment
Hide comment
@Wardrop

Wardrop 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.

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

This comment has been minimized.

Show comment
Hide comment
@robertjpayne

robertjpayne Mar 10, 2012

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.

robertjpayne commented Mar 10, 2012

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

This comment has been minimized.

Show comment
Hide comment
@DAddYE

DAddYE Mar 12, 2012

Member

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!

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

This comment has been minimized.

Show comment
Hide comment
@nesquena

nesquena Mar 12, 2012

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.

Member

nesquena commented Mar 12, 2012

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

This comment has been minimized.

Show comment
Hide comment
@DAddYE

DAddYE Mar 12, 2012

Member

Other than windows other rubies implementations can have some problems

Member

DAddYE commented Mar 12, 2012

Other than windows other rubies implementations can have some problems

@nesquena

This comment has been minimized.

Show comment
Hide comment
@nesquena

nesquena Apr 27, 2012

Member

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

Member

nesquena commented Apr 27, 2012

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

@ujifgc

This comment has been minimized.

Show comment
Hide comment
@ujifgc

ujifgc Oct 6, 2013

Member

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.

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 Oct 6, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment