Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to use "sinatra/reloader"?

Tags:

ruby

sinatra

I have my web.rb where I have

require 'rubygems' 
require 'sinatra'  
require "sinatra/reloader"

Then I start my web application by double click on the web.rb short cut. After any change in web.rb I have to exit the sinatra and run it again.

I thought that "sinatra/reloader" would help me not to manual reaload.

configuration (MS Windows)

  • ruby 1.8.7 (2010-08-16 patchlevel 302) [i386-mingw32]

  • sinatra (1.2.6, 1.0)

  • sinatra-advanced-routes (0.5.1)
  • sinatra-reloader (0.5.0)
  • sinatra-sugar (0.5.1, 0.5.0)
  • thin (1.2.7 x86-mswin32)
like image 425
Radek Avatar asked May 03 '11 05:05

Radek


1 Answers

register Sinatra::Reloader

I changed to rack-reloader months back, realized it didn't work well even with hacks switched back and forgot to use register

the drawback of sinatra sometimes is the slightly more wisdom-of-crowds documentation

like image 53
han Avatar answered Nov 15 '22 18:11

han