我一直在关注Thoughtbot Middleman guide。当我推到Heroku的时候它曾经工作得很好,但是在过去的两周里它停止了工作。
赫鲁库原木:

2015-04-14T00:28:52.265232+00:00 heroku[web.1]: Starting process with command `bundle exec rackup config.ru -p 33769`
2015-04-14T00:28:54.785358+00:00 app[web.1]: /app/config.ru:4:in `block in <main>': undefined method `server' for Middleman:Module (NoMethodError)
2015-04-14T00:28:54.785381+00:00 app[web.1]: 	from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.6.0/lib/rack/builder.rb:55:in `instance_eval'
2015-04-14T00:28:54.785384+00:00 app[web.1]: 	from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.6.0/lib/rack/builder.rb:55:in `initialize'
2015-04-14T00:28:54.785389+00:00 app[web.1]: 	from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.6.0/lib/rack/builder.rb:49:in `eval'
2015-04-14T00:28:54.785390+00:00 app[web.1]: 	from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.6.0/lib/rack/builder.rb:49:in `new_from_string'
2015-04-14T00:28:54.785385+00:00 app[web.1]: 	from /app/config.ru:in `new'
2015-04-14T00:28:54.785387+00:00 app[web.1]: 	from /app/config.ru:in `<main>'
2015-04-14T00:28:54.785405+00:00 app[web.1]: 	from /app/vendor/bundle/ruby/2.0.0/bin/rackup:23:in `load'
2015-04-14T00:28:54.785392+00:00 app[web.1]: 	from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.6.0/lib/rack/builder.rb:40:in `parse_file'
2015-04-14T00:28:54.785403+00:00 app[web.1]: 	from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.6.0/bin/rackup:4:in `<top (required)>'
2015-04-14T00:28:54.785399+00:00 app[web.1]: 	from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.6.0/lib/rack/server.rb:336:in `wrapped_app'
2015-04-14T00:28:54.785400+00:00 app[web.1]: 	from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.6.0/lib/rack/server.rb:272:in `start'
2015-04-14T00:28:54.785402+00:00 app[web.1]: 	from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.6.0/lib/rack/server.rb:147:in `start'
2015-04-14T00:28:54.785408+00:00 app[web.1]: 	from /app/vendor/bundle/ruby/2.0.0/bin/rackup:23:in `<main>'
2015-04-14T00:28:54.785394+00:00 app[web.1]: 	from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.6.0/lib/rack/server.rb:299:in `build_app_and_options_from_config'
2015-04-14T00:28:54.785397+00:00 app[web.1]: 	from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.6.0/lib/rack/server.rb:208:in `app'
2015-04-14T00:28:55.506629+00:00 heroku[web.1]: State changed from crashed to starting
2015-04-14T00:28:55.505287+00:00 heroku[web.1]: State changed from starting to crashed
2015-04-14T00:28:55.494009+00:00 heroku[web.1]: Process exited with status 1
2015-04-14T00:28:59.625355+00:00 heroku[web.1]: Starting process with command `bundle exec rackup config.ru -p 30791`
2015-04-14T00:29:02.364349+00:00 app[web.1]: 	from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.6.0/lib/rack/builder.rb:55:in `initialize'
2015-04-14T00:29:02.364325+00:00 app[web.1]: /app/config.ru:4:in `block in <main>': undefined method `server' for Middleman:Module (NoMethodError)
2015-04-14T00:29:02.364362+00:00 app[web.1]: 	from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.6.0/lib/rack/builder.rb:40:in `parse_file'
2015-04-14T00:29:02.364358+00:00 app[web.1]: 	from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.6.0/lib/rack/builder.rb:49:in `new_from_string'
2015-04-14T00:29:02.364356+00:00 app[web.1]: 	from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.6.0/lib/rack/builder.rb:49:in `eval'
2015-04-14T00:29:02.364347+00:00 app[web.1]: 	from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.6.0/lib/rack/builder.rb:55:in `instance_eval'
2015-04-14T00:29:02.364352+00:00 app[web.1]: 	from /app/config.ru:in `<main>'
2015-04-14T00:29:02.364351+00:00 app[web.1]: 	from /app/config.ru:in `new'
2015-04-14T00:29:02.364372+00:00 app[web.1]: 	from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.6.0/lib/rack/server.rb:336:in `wrapped_app'
2015-04-14T00:29:02.364376+00:00 app[web.1]: 	from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.6.0/lib/rack/server.rb:272:in `start'
2015-04-14T00:29:02.364410+00:00 app[web.1]: 	from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.6.0/lib/rack/server.rb:147:in `start'
2015-04-14T00:29:02.364413+00:00 app[web.1]: 	from /app/vendor/bundle/ruby/2.0.0/bin/rackup:23:in `load'
2015-04-14T00:29:02.364369+00:00 app[web.1]: 	from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.6.0/lib/rack/server.rb:208:in `app'
2015-04-14T00:29:02.364412+00:00 app[web.1]: 	from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.6.0/bin/rackup:4:in `<top (required)>'
2015-04-14T00:29:02.364417+00:00 app[web.1]: 	from /app/vendor/bundle/ruby/2.0.0/bin/rackup:23:in `<main>'
2015-04-14T00:29:02.364365+00:00 app[web.1]: 	from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.6.0/lib/rack/server.rb:299:in `build_app_and_options_from_config'
2015-04-14T00:29:03.495350+00:00 heroku[web.1]: Process exited with status 1
2015-04-14T00:29:03.512947+00:00 heroku[web.1]: State changed from starting to crashed
2015-04-14T00:29:04.147197+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=afternoon-caverns-1614.herokuapp.com request_id=d52f8ceb-4076-4371-b2b4-daf621689b2b fwd="198.2.47.2" dyno= connect= service= status=503 bytes=
2015-04-14T00:29:04.920600+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=afternoon-caverns-1614.herokuapp.com request_id=edc85d48-13ef-4b60-b758-351e8d465a75 fwd="198.2.47.2" dyno= connect= service= status=503 bytes=
WARNING: Toolbelt v3.31.3 update available.

最后两行显示了一个h10错误,我似乎无法理解。

最佳答案

Middleman的机架服务器支持在3.3.9版之后被破坏。
现在的解决方法是使用3.3.8或之前的版本。
您可能需要在Gemfile中指定版本:

gem 'middleman', '3.3.8'

p.s.我在github上为此打开了an issue

关于ruby - Heroku for Middleman网站上的应用程序错误,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/29617339/

10-09 05:54