How to use Sinatra / recharger?

I have web.rb where I have

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

Then I start my web application by double-clicking on the website. After any change in web.rb, I need to exit the sinatra and start it again.

I thought that "sinatra / reloader" would help me not to do a manual download.

(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)
+6
source share
2 answers

if I run my web application from dos prompt via " ruby web.rb " everything works fine

if i run the web application

  • via double click web.rb or
  • from batch file

the application starts, but synatra-reload does not work

@nash thank you for your help

0
source

register Sinatra :: Reloader

I switched to half a year ago, I realized that it doesn’t work even with hacks, I switched back and forgot to use "register"

lack of sinatra sometimes it's a bit more documentation on the wisdom of the crowd

+4
source

Source: https://habr.com/ru/post/887164/


All Articles