Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

update reloading section

  • Loading branch information...
commit 761730514ca425355dc63375c89a14a9fcbd2d52 1 parent ae2c300
@rkh rkh authored
Showing with 24 additions and 9 deletions.
  1. +24 −9 faq.markdown
33 faq.markdown
@@ -9,18 +9,33 @@ Frequently Asked Questions
* this will become the toc
-What happened to reloading in Sinatra 0.9.2? {#reloading}
+How do I make my Sinatra app reload on changes? {#reloading}
-Source file reloading was removed in the 0.9.2 due to excess complexity.
+First off, in-process code reloading in Ruby [is hard](
+and having a solution that works for every scenario is technically impossible.
-For reloading Sinatra we recommend either using the
-[reloader](/contrib/reloader) or
+Which is why we recommend you to do out-of-process reloading.
-The reloader will reload single files that changed, whereas shotgun will
-restart the HTTP server on every request. See ["Reloading Ruby
-Code"]( to learn more about the differences.
+First you need to install [rerun]( if you haven't already:
+ $ gem install rerun
+Now if you start your Sinatra app like this:
+ $ ruby app.rb
+All you have to do for reloading is instead do this:
+ $ rerun 'ruby app.rb'
+If you are for instance using `rackup`, instead do the following:
+ $ rerun 'rackup'
+You get the idea.
+If you still want in-process reloading, check out [Sinatra::Reloader](/contrib/reloader).
What are my deployment options? {#deploy}

5 comments on commit 7617305


@rkh Shouldn't we offer reloader as the default, and rerun as an alternative? I hadn't even heard of rerun and was confused by the confusion in this Rogues episode. (about 20:00:00).

I'll rewrite if agreeable.


Hmmm... dunno. I actually think rerun is the better solution.


I've never had an issue with Sinatra::Reloader, but what does everyone think of deprecating it to the old sinatra-reloader gem and cleaning up contrib a little?


Um, wait, I don't think it's an issue with the sinatra-contrib reloader vs the old reloader, but more about in-process reloading not working very well in Ruby.


@rkh I mean to move it out of sinatra-contrib, those that want (and can) use it will need to install sinatra-reloader.

This will help us in the sense that we no longer deal with it in contrib. But the problem still exists in Ruby.

Please sign in to comment.
Something went wrong with that request. Please try again.