【发布时间】:2012-11-22 13:42:34
【问题描述】:
我正在尝试将我的 rails 3.2.8 应用程序部署到 heroku,但我一直收到此错误:
2012-11-22T13:26:30+00:00 app[web.1]: Exiting
2012-11-22T13:26:30+00:00 app[web.1]: => Booting WEBrick
2012-11-22T13:26:30+00:00 app[web.1]: => Call with -d to detach
2012-11-22T13:26:30+00:00 app[web.1]: => Rails 3.2.8 application starting in production on http://0.0.0.0:24003
2012-11-22T13:26:31+00:00 heroku[web.1]: Process exited with status 1
2012-11-22T13:26:31+00:00 heroku[web.1]: State changed from starting to crashed
2012-11-22T13:26:49+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/ host=facevid.herokuapp.com fwd= dyno= queue= wait= connect= service= status=503 bytes=
2012-11-22T13:26:49+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/favicon.ico host=facevid.herokuapp.com fwd= dyno= queue= wait= connect= service= status=503 bytes=
这似乎是一个评估错误所以我尝试在本地预编译,更改应用程序变量config.assets.initialize_on_precompile = false,同时更改环境变量config.serve_static_assets = true。
我在本地环境中将捆绑包安装为生产环境,并使用 webrick 启动了生产环境,没有出现任何错误。
编辑:
我将添加我的 gemfile
source 'https://rubygems.org'
ruby '1.9.3'
gem 'heroku'
gem 'rails', '3.2.8'
# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'
# Database gem
# gem 'sqlite3'
group :development, :test do
gem 'mysql2'
end
# heroku needs
gem 'pg', :group => :production
gem 'heroku', :group => :production
gem 'thin', :group => :production
# Gems used only for assets and not required
# in production environments by default.
group :assets do
gem 'sass-rails', '~> 3.2.3'
gem 'coffee-rails', '~> 3.2.1'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer', :platforms => :ruby
gem "therubyracer"
gem "less-rails"
gem 'twitter-bootstrap-rails'
gem 'uglifier', '>= 1.0.3'
end
gem 'jquery-rails'
# Authentication gems
gem 'omniauth-facebook'
gem 'devise'
gem "koala"
我还创建了一个要推送到 heroku 的 rails 3.2.8 应用程序的超级简单示例,但我遇到了同样的错误,此应用程序的代码在这里 https://github.com/andresbravog/heroku-rails-3.2.8-test
【问题讨论】:
-
Heroku 的日志中是否有任何内容?
-
点击
heroku log看看 webrick 在哪里炸毁了。与本地设置相比,Heroku 对资产编译的宽容度较低 -
heroku 日志不可用,如果我运行“heroku 日志”我会得到我正在显示的内容。有更多日志会很好,但我不知道如何获得它。
-
我认为命令是“heroku 运行日志”
-
与
heroku run logs我得到bash: logs: command not found。我正在使用 heroku 工具带
标签: ruby-on-rails ruby-on-rails-3 heroku asset-pipeline