How to get Sinatra to auto-reload the file after each change?

后端 未结 9 453
梦谈多话
梦谈多话 2020-12-07 09:39

I am using

# my_app.rb
load \'index.rb\'

and start the sever like this

ruby my_app.rb

but it never relo

9条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-07 10:05

    You can use the rerun gem.

    gem install rerun
    rerun 'ruby app.rb' 
    

    OR if you are using rackup

    rerun 'rackup'
    

提交回复
热议问题