M. Lanza
M. Lanza

Reputation: 6790

CTRL+C won't stop a sinatra app

Normally when I run a rails app from the console during development I can just press Ctrl + C and it exits. Then I can run the app again, thus bouncing it and effecting changes.

I am running a sinatra app. I just run the ruby file.

$: ruby myapp.rb

When I press Ctrl+C, however, it won't stop the app. I've had to bring up the Ubuntu System Monitor and kill the Ruby process. Very annoying.

Anyone seen this/dealt with this before?

Upvotes: 5

Views: 1127

Answers (2)

M. Lanza
M. Lanza

Reputation: 6790

I installed the 'thin' gem and it works fine.

Apparently sinatra + Webrick is unstoppable.

(Also, running Ubuntu 11.04.)

Upvotes: 2

McStretch
McStretch

Reputation: 20645

Try the exit method, which should exit you out of the Sinatra Irb according to the following reference:

http://sinatra.rubyforge.org/doc/classes/Sinatra/Irb.html#M000029

Upvotes: 0

Related Questions