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

Automatic Code Reloading for Rack Applications #2

Open
stuartellis opened this issue May 1, 2012 · 4 comments
Open

Automatic Code Reloading for Rack Applications #2

stuartellis opened this issue May 1, 2012 · 4 comments

Comments

@stuartellis
Copy link
Member

If you are writing a Rack or Sinatra application then it's worth knowing about the code reloaders...

These reload your code on every request (like Rails does in development), so that you can just save and refresh your browser to run the latest version.

Sinatra has a reloader in sinatra-contrib:

https://github.com/sinatra/sinatra-contrib/blob/master/lib/sinatra/reloader.rb

Shotgun works for any Rack application (but isn't compatible with JRuby):

https://github.com/rtomayko/shotgun

@bernardoamc
Copy link

Nice to know about this, thanks for sharing!

@stuartellis
Copy link
Member Author

For completeness - Rack also includes a middleware for code reloading:

https://github.com/codereading/rack/blob/rack-1.4/lib/rack/reloader.rb

I quite like Shotgun because it doesn't require you to add anything to your own code.

@samnang
Copy link
Member

samnang commented May 4, 2012

Thank @stuartellis, good to know Shotgun doesn't work on JRuby.

An interesting article here: http://rkh.im/code-reloading

@ericgj
Copy link
Member

ericgj commented May 6, 2012

thanks @stuartellis, very practical info I just put to good use!

and thanks @samnang for the rkh article which is a great walkthrough of various reloading techniques and pitfalls.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants