无法在Heroku上部署Sinatra应用程序

时间:2011-05-03 07:22:35

标签: ruby heroku sinatra

我是Ruby和Heroku世界的新手,我正在尝试在heroku上部署一个非常基本的Sinatra应用程序。我有以下文件:

config.ru:

require './hi'
run Sinatra::Application

hi.rb:

require 'rubygems'
require 'sinatra'

get '/' do
  "Hello from Sinatra on Heroku!"
end

.gems

sinatra

当推送到heroku并启动应用程序时,它会在日志中使用以下条目崩溃:

2011-05-03T05:52:02+00:00 app[web.1]: /app/.gems/gems/sinatra-1.2.5/lib/sinatra/base.rb:1144:in `define_method': tried to create Proc object without a block (ArgumentError)
2011-05-03T05:52:02+00:00 app[web.1]:   from /app/.gems/gems/sinatra-1.2.5/lib/sinatra/base.rb:1144:in `compile!'
2011-05-03T05:52:02+00:00 app[web.1]:   from /app/.gems/gems/sinatra-1.2.5/lib/sinatra/base.rb:1129:in `route'
2011-05-03T05:52:02+00:00 app[web.1]:   from /app/.gems/gems/sinatra-1.2.5/lib/sinatra/base.rb:1111:in `get'
2011-05-03T05:52:02+00:00 app[web.1]:   from /app/.gems/gems/sinatra-1.2.5/lib/sinatra/base.rb:1474:in `send'
2011-05-03T05:52:02+00:00 app[web.1]:   from /app/.gems/gems/sinatra-1.2.5/lib/sinatra/base.rb:1474:in `get'
2011-05-03T05:52:02+00:00 app[web.1]:   from ./hi.rb:4
2011-05-03T05:52:02+00:00 app[web.1]:   from /usr/ruby1.8.7/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
2011-05-03T05:52:02+00:00 app[web.1]:   from /usr/ruby1.8.7/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
2011-05-03T05:52:02+00:00 app[web.1]:   from config.ru:1
2011-05-03T05:52:02+00:00 app[web.1]:   from /home/heroku_rack/heroku.ru:23
2011-05-03T05:52:02+00:00 app[web.1]:   from /app/.gems/gems/rack-1.2.2/lib/rack/builder.rb:46:in `instance_eval'
2011-05-03T05:52:02+00:00 app[web.1]:   from /app/.gems/gems/rack-1.2.2/lib/rack/builder.rb:46:in `initialize'
2011-05-03T05:52:02+00:00 app[web.1]:   from /app/.gems/gems/rack-1.2.2/lib/rack/builder.rb:63:in `new'
2011-05-03T05:52:02+00:00 app[web.1]:   from /app/.gems/gems/rack-1.2.2/lib/rack/builder.rb:63:in `map'
2011-05-03T05:52:02+00:00 app[web.1]:   from /home/heroku_rack/heroku.ru:18
2011-05-03T05:52:02+00:00 app[web.1]:   from /app/.gems/gems/rack-1.2.2/lib/rack/builder.rb:46:in `instance_eval'
2011-05-03T05:52:02+00:00 app[web.1]:   from /app/.gems/gems/rack-1.2.2/lib/rack/builder.rb:46:in `initialize'
2011-05-03T05:52:02+00:00 app[web.1]:   from /home/heroku_rack/heroku.ru:11:in `new'
2011-05-03T05:52:02+00:00 app[web.1]:   from /home/heroku_rack/heroku.ru:11
2011-05-03T05:52:02+00:00 app[web.1]:   from /app/.gems/gems/rack-1.2.2/lib/rack/builder.rb:46:in `instance_eval'
2011-05-03T05:52:02+00:00 app[web.1]:   from /app/.gems/gems/rack-1.2.2/lib/rack/builder.rb:46:in `initialize'
2011-05-03T05:52:02+00:00 app[web.1]:   from /home/heroku_rack/heroku.ru:1:in `new'
2011-05-03T05:52:02+00:00 app[web.1]:   from /home/heroku_rack/heroku.ru:1
2011-05-02T22:52:03-07:00 heroku[web.1]: State changed from starting to crashed

任何帮助都将不胜感激。

1 个答案:

答案 0 :(得分:3)

问题是sinatra - 他们更新了它,所以现在一切都在1.2.6上顺利运行。