我正在尝试将我的 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-测试