English 中文(简体)
在Heroku部署Sinatra应用程序
原标题:Trouble deploying a Sinatra application on Heroku

我是Ruby和Heroku世界的新来,我正试图在她的oku上部署一个非常基本的Sinatra。 我有以下档案:

config.ru:

require  ./hi 
run Sinatra::Application

hi.rb:

require  rubygems 
require  sinatra 

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

页: 1

sinatra

当推向oku湖和发射 app时,该 app子在 log子中坠毁:

2011-05-03T05:52:02+00:00 app[web.1]: /app/页: 1/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/页: 1/gems/sinatra-1.2.5/lib/sinatra/base.rb:1144:in `compile! 
2011-05-03T05:52:02+00:00 app[web.1]:   from /app/页: 1/gems/sinatra-1.2.5/lib/sinatra/base.rb:1129:in `route 
2011-05-03T05:52:02+00:00 app[web.1]:   from /app/页: 1/gems/sinatra-1.2.5/lib/sinatra/base.rb:1111:in `get 
2011-05-03T05:52:02+00:00 app[web.1]:   from /app/页: 1/gems/sinatra-1.2.5/lib/sinatra/base.rb:1474:in `send 
2011-05-03T05:52:02+00:00 app[web.1]:   from /app/页: 1/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/页: 1/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/页: 1/gems/rack-1.2.2/lib/rack/builder.rb:46:in `initialize 
2011-05-03T05:52:02+00:00 app[web.1]:   from /app/页: 1/gems/rack-1.2.2/lib/rack/builder.rb:63:in `new 
2011-05-03T05:52:02+00:00 app[web.1]:   from /app/页: 1/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/页: 1/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/页: 1/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/页: 1/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/页: 1/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

Any help would be appreciated.

问题回答

Problem was sinatra - they updated it, so now everything running smoothly on 1.2.6.





相关问题
Ruby parser in Java

The project I m doing is written in Java and parsers source code files. (Java src up to now). Now I d like to enable parsing Ruby code as well. Therefore I am looking for a parser in Java that parses ...

rails collection_select vs. select

collection_select and select Rails helpers: Which one should I use? I can t see a difference in both ways. Both helpers take a collection and generates options tags inside a select tag. Is there a ...

RubyCAS-Client question: Rails

I ve installed RubyCAS-Client version 2.1.0 as a plugin within a rails app. It s working, but I d like to remove the ?ticket= in the url. Is this possible?

Ordering a hash to xml: Rails

I m building an xml document from a hash. The xml attributes need to be in order. How can this be accomplished? hash.to_xml

multiple ruby extension modules under one directory

Can sources for discrete ruby extension modules live in the same directory, controlled by the same extconf.rb script? Background: I ve a project with two extension modules, foo.so and bar.so which ...

Text Editor for Ruby-on-Rails

guys which text editor is good for Rubyonrails? i m using Windows and i was using E-Texteditor but its not free n its expired now can anyone plese tell me any free texteditor? n which one is best an ...

热门标签