I am running Ruby 1.9.2p180 on Ubuntu 11.04 64-bit.
I have the simplest CoffeeScript example using Sinatra , which works fine but does not stop when I click the shortcut Ctrl+C. Therefore, every time I have to kill -9, and it becomes quite tedious.
app.rb:
require 'sinatra'
require 'coffee-script'
get '/' do
'<script src="/app.js" type="text/javascript"></script>'
end
get '/app.js' do
coffee :app
end
views/app.coffee:
alert 'Foo'
It works on Ruby 1.8.7 with minor changes:
require 'rubygems'
require 'sinatra'
require 'coffee-script'
require 'json'
get '/' do
'<script src="/app.js" type="text/javascript"></script>'
end
get '/app.js' do
coffee :app
end
It also works on 1.9.2 when I delete a line require 'coffee-script', but gives me a warning:
WARN: tilt autoloading 'coffee_script' in a non thread-safe way; explicit require 'coffee_script' suggested.
, therubyracer, node. 0.1.97 Ubuntu 10.10. 0.2.6 Natty , (0.4.8) nvm 0.1.97 nvm.