Ruby 在Heroku上部署Sinatra应用程序时遇到问题

Ruby 在Heroku上部署Sinatra应用程序时遇到问题,ruby,heroku,sinatra,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 .宝石 当推送到heroku并启动应用程序时,它会崩溃,日志中有以下条目: 2011-0

我是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
.宝石

当推送到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

任何帮助都将不胜感激。

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

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

搜索表明1.2.5是您的问题:谢谢!这就成功了。我不得不将我的.gems文件更改为:sinatra——版本1.2.3搜索表明1.2.5是您的问题:谢谢!这就成功了。我不得不将.gems文件更改为:sinatra——版本1.2.3
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