سؤال

I use thin before for my sinatra app, and using rerun to automatically reload server when there are changes on .rb

rerun --pattern="**/*.{rb}" ruby ./main_service.rb

how to make puma do the same? since this command does not work:

rerun --pattern="**/*.{rb}" puma -b tcp://127.0.0.1:12345

that shows:

ERROR: No application configured, nothing to run

my config.ru:

require './main_service'
run Sinatra::Application

but when i use manual command puma -b tcp://127.0.0.1:12345 it works normally..

هل كانت مفيدة؟

المحلول

ah nevermind, i found the solution:

rerun --pattern="**/*.{rb}" "puma -b tcp://127.0.0.1:12345 ./config.ru"

the second rerun parameter must be quoted

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top