我正在试图将我的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=
它似乎是一个assest错误,所以我尝试在本地预编译,更改应用程序变量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"
我还创建了一个rails 3.2.8应用程序的超简单示例,将其推送到heroku并且我得到相同的错误,此应用程序的代码在这里https://github.com/andresbravog/heroku-rails-3.2.8-test
答案 0 :(得分:0)
好的我会自己回答:我需要将config.ru文件添加到我的repo应用程序才能使用瘦身。
希望有所帮助