Не получается заставить Синатру и MacRuby / control_tower работать вместе.
Мой сервер синатры довольно прост (main.rb):
require 'rubygems'
require 'sinatra'
get "/" do
"Hello World!"
end
С очень простым RackUpфайл (config.ru):
require 'main'
run Sinatra::Application
работает: control_tower
похоже, что работает, но затем взрывается:
You are cleared for take-off!
Listening on 0.0.0.0:3000
NoMethodError - undefined method `GET /' for #<Sinatra::Application:0x20026c9e0>:
/Users/jpoz/.rvm/gems/macruby-0.7.1/gems/sinatra-1.1.0/lib/sinatra/base.rb:1033:in `block'
/Users/jpoz/.rvm/gems/macruby-0.7.1/gems/sinatra-1.1.0/lib/sinatra/base.rb:604:in `block'
/Users/jpoz/.rvm/gems/macruby-0.7.1/gems/sinatra-1.1.0/lib/sinatra/base.rb:654:in `block'
/Users/jpoz/.rvm/gems/macruby-0.7.1/gems/sinatra-1.1.0/lib/sinatra/base.rb:631:in `process_route:'
/Users/jpoz/.rvm/gems/macruby-0.7.1/gems/sinatra-1.1.0/lib/sinatra/base.rb:603:in `block'
/Users/jpoz/.rvm/gems/macruby-0.7.1/gems/sinatra-1.1.0/lib/sinatra/base.rb:600:in `route!'
/Users/jpoz/.rvm/gems/macruby-0.7.1/gems/sinatra-1.1.0/lib/sinatra/base.rb:739:in `dispatch!'
/Users/jpoz/.rvm/gems/macruby-0.7.1/gems/sinatra-1.1.0/lib/sinatra/base.rb:530:in `block'
/Users/jpoz/.rvm/gems/macruby-0.7.1/gems/sinatra-1.1.0/lib/sinatra/base.rb:706:in `block'
/Users/jpoz/.rvm/gems/macruby-0.7.1/gems/sinatra-1.1.0/lib/sinatra/base.rb:706:in `invoke'
/Users/jpoz/.rvm/gems/macruby-0.7.1/gems/sinatra-1.1.0/lib/sinatra/base.rb:523:in `call!:'
/Users/jpoz/.rvm/gems/macruby-0.7.1/gems/rack-1.2.1/lib/rack/showexceptions.rb:24:in `call:'
/Users/jpoz/.rvm/gems/macruby-0.7.1/gems/sinatra-1.1.0/lib/sinatra/base.rb:1142:in `block'
/Users/jpoz/.rvm/gems/macruby-0.7.1/gems/sinatra-1.1.0/lib/sinatra/base.rb:1142:in `call:'
/Users/jpoz/.rvm/gems/macruby-0.7.1/gems/control_tower-1.0/lib/control_tower/rack_socket.rb:46:in `block'
NoMethodError: undefined method `GET /' for #<Sinatra::Application:0x20026c9e0>
/Users/jpoz/.rvm/gems/macruby-0.7.1/gems/sinatra-1.1.0/lib/sinatra/base.rb:739:in `dispatch!'
/Users/jpoz/.rvm/gems/macruby-0.7.1/gems/sinatra-1.1.0/lib/sinatra/base.rb:530:in `block'
/Users/jpoz/.rvm/gems/macruby-0.7.1/gems/sinatra-1.1.0/lib/sinatra/base.rb:706:in `block'
/Users/jpoz/.rvm/gems/macruby-0.7.1/gems/sinatra-1.1.0/lib/sinatra/base.rb:706:in `invoke'
/Users/jpoz/.rvm/gems/macruby-0.7.1/gems/sinatra-1.1.0/lib/sinatra/base.rb:523:in `call!:'
/Users/jpoz/.rvm/gems/macruby-0.7.1/gems/rack-1.2.1/lib/rack/showexceptions.rb:24:in `call:'
/Users/jpoz/.rvm/gems/macruby-0.7.1/gems/sinatra-1.1.0/lib/sinatra/base.rb:1142:in `block'
/Users/jpoz/.rvm/gems/macruby-0.7.1/gems/sinatra-1.1.0/lib/sinatra/base.rb:1142:in `call:'