这是我从Heroku收到的消息:
应用程序错误 应用程序中发生错误,无法提供您的页面。请稍后重试。 如果您是应用程序所有者,请查看日志以获取详细信息。
以下是我的Heroku日志:
2014-04-08T22:02:13.178588+00:00 heroku[api]: Starting process with command `bundle exec rake db:create` by xxxx@.com
2014-04-08T22:02:18.527588+00:00 heroku[run.8019]: State changed from starting to up
2014-04-08T22:02:18.788718+00:00 heroku[run.8019]: Awaiting client
2014-04-08T22:02:18.828968+00:00 heroku[run.8019]: Starting process with command `bundle exec rake db:create`
2014-04-08T22:02:22.272358+00:00 heroku[run.8019]: Process exited with status 0
2014-04-08T22:02:22.284341+00:00 heroku[run.8019]: State changed from up to complete
2014-04-08T22:02:48.921183+00:00 heroku[web.1]: State changed from crashed to starting
2014-04-08T22:02:52.316261+00:00 heroku[web.1]: Starting process with command `bundle exec thin start -R config.ru -e production -p 4765`
2014-04-08T22:02:53.429918+00:00 app[web.1]: bundler: command not found: thin
2014-04-08T22:02:53.429929+00:00 app[web.1]: Install missing gem executables with `bundle install`
2014-04-08T22:02:54.847354+00:00 heroku[web.1]: State changed from starting to crashed
2014-04-08T22:02:54.832762+00:00 heroku[web.1]: Process exited with status 127
2014-04-08T22:02:56.215218+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/ host=radiant-castle-7002.herokuapp.com request_id=feed828c-36f7-494b-9fc7-373682fe93fa fwd="150.131.104.237" dyno= connect= service= status=503 bytes=
2014-04-08T22:02:56.605129+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/favicon.ico host=radiant-castle-7002.herokuapp.com request_id=89331d0e-764e-4a2e-be91-a6b687f5016c fwd="150.131.104.237" dyno= connect= service= status=503 bytes=
有人会介意解释这意味着什么吗?它在我的电脑上运行完美。 感谢。
编辑:的Gemfile
source 'https://rubygems.org'
gem 'rails', '3.2.12'
gem 'devise'
gem 'simple_form'
gem 'state_machine'
gem 'draper', '~> 1.0'
gem 'js-routes'
gem 'paperclip'
gem 'will_paginate'
gem 'bootstrap-will_paginate'
group :development do
gem 'thin'
end
group :test do
gem 'shoulda'
gem 'factory_girl_rails'
end
group :development, :test do
gem 'sqlite3'
gem 'log_buddy'
end
group :production do
gem "pg"
end
group :assets do
gem 'sass-rails', '~> 3.2.3'
gem 'coffee-rails', '~> 3.2.1'
gem 'uglifier', '>= 1.0.3'
end
gem 'jquery-rails'
问题2:去除薄宝石后。 Heroku日志:
2014-04-08T22:26:06.268271+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/ host=radiant-castle-7002.herokuapp.com request_id=0a8782a3-e8e4-45b2-b642-23bb2519283f fwd="150.131.104.237" dyno= connect= service= status=503 bytes=
2014-04-08T22:26:06.597458+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/favicon.ico host=radiant-castle-7002.herokuapp.com request_id=d4bafa55-9945-436b-be44-102542c539fb fwd="150.131.104.237" dyno= connect= service= status=503 bytes=
答案 0 :(得分:1)
当然,你的prod gemset中没有瘦身
从group :development
行周围取出gem thin
。
Heroku并没有下载需要成为您的网络服务器的宝石(瘦身)
修改强>
来自所有日志输出的麻烦的关键线是
app[web.1]: bundler: command not found: thin
这意味着Bundler正在尝试启动您的应用,但不知道名为thin
的内容。你如何教导'你的应用程序关于新事物?宝石文件。这是我经历的思考过程。
默认情况下,Heroku始终将RAILS_ENV
设置为:production
,这只会安装默认或生产宝石集中的宝石。那是这里的核心问题。