1

找不到在哪裏錯誤是來自(當地正常工作)Heroku的拍擊重啓

C:\Users\Ahmet\Documents\GitHub\SkyPig>heroku restart 
Restarting processes... done 

C:\Users\Ahmet\Documents\GitHub\SkyPig>heroku ps:scale web=1 
Scaling web processes... done, now running 1 

C:\Users\Ahmet\Documents\GitHub\SkyPig>heroku ps 
=== web: `bundle exec thin start -R config.ru -e $RAILS_ENV -p $PORT` 
web.1: crashed 2012/12/13 13:17:05 (~ 16s ago) 


C:\Users\Ahmet\Documents\GitHub\SkyPig>heroku logs 

2012-12-13T13:16:52+00:00 heroku[web.1]: State changed from crashed to starting 
2012-12-13T13:16:55+00:00 heroku[web.1]: Starting process with command `bundle exec thin start -R config.ru -e production -p 30968` 

2012-12-13T13:17:01+00:00 app[web.1]: Connecting to database specified by DATABASE_URL 
2012-12-13T13:17:04+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.8/lib/rails/engine.rb:438:in `each' 
2012-12-13T13:17:04+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.8/lib/rails/engine.rb:438:in `block in eager_load!' 
2012-12-13T13:17:04+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:317:in `rescue in depend_on': No such file to load -- GiantBomb (LoadError) 
2012-12-13T13:17:04+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.8/lib/rails/engine.rb:436:in `each' 
2012-12-13T13:17:04+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.8/lib/rails/engine.rb:439:in `block (2 levels) in eager_load!' 
2012-12-13T13:17:04+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.8/lib/rails/initializable.rb:30:in `run' 
2012-12-13T13:17:04+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:225:in `require_dependenc 
y' 
2012-12-13T13:17:04+00:00 app[web.1]: from /app/config/environment.rb:5:in `<top (required)>' 
2012-12-13T13:17:04+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.8/lib/rails/initializable.rb:54:in `run_initializers' 
2012-12-13T13:17:04+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.8/lib/rails/railtie/configurable.rb:30:in `method_missing' 
2012-12-13T13:17:04+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.8/lib/rails/initializable.rb:55:in `block in run_initializers' 
2012-12-13T13:17:04+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.8/lib/rails/initializable.rb:54:in `each' 
2012-12-13T13:17:04+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.8/lib/rails/application/finisher.rb:53:in `block in <module:Finisher>' 
2012-12-13T13:17:04+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.8/lib/rails/initializable.rb:30:in `instance_exec' 
2012-12-13T13:17:04+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:312:in `depend_on' 
2012-12-13T13:17:04+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.8/lib/rails/application.rb:136:in `initialize!' 
2012-12-13T13:17:04+00:00 app[web.1]: from config.ru:3:in `require' 
2012-12-13T13:17:04+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.8/lib/rails/engine.rb:436:in `eager_load!' 
2012-12-13T13:17:04+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/builder.rb:51:in `initialize' 
2012-12-13T13:17:04+00:00 app[web.1]: from config.ru:1:in `<main>' 
2012-12-13T13:17:04+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/thin-1.5.0/lib/thin/controllers/controller.rb:181:in `load_rackup_config' 
2012-12-13T13:17:04+00:00 app[web.1]: from config.ru:1:in `new' 
2012-12-13T13:17:04+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/thin-1.5.0/lib/thin/controllers/controller.rb:71:in `start' 
2012-12-13T13:17:04+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/builder.rb:51:in `instance_eval' 
2012-12-13T13:17:04+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/thin-1.5.0/bin/thin:6:in `<top (required)>' 
2012-12-13T13:17:04+00:00 app[web.1]: from config.ru:3:in `block in <main>' 
2012-12-13T13:17:04+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/bin/thin:19:in `load' 
2012-12-13T13:17:04+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/bin/thin:19:in `<main>' 
2012-12-13T13:17:04+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/thin-1.5.0/lib/rack/adapter/loader.rb:33:in `eval' 
2012-12-13T13:17:04+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/thin-1.5.0/lib/rack/adapter/loader.rb:33:in `load' 
2012-12-13T13:17:04+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/thin-1.5.0/lib/thin/runner.rb:187:in `run_command' 
2012-12-13T13:17:04+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/thin-1.5.0/lib/thin/runner.rb:152:in `run!' 
2012-12-13T13:17:05+00:00 heroku[web.1]: Process exited with status 1 
2012-12-13T13:17:05+00:00 heroku[web.1]: State changed from starting to crashed 
2012-12-13T13:17:14+00:00 heroku[api]: Scale to web=1 by [email protected] 

的Gemfile

source 'https://rubygems.org' 

gem 'rails', '3.2.8' 

# Bundle edge Rails instead: 
# gem 'rails', :git => 'git://github.com/rails/rails.git' 

gem 'sqlite3', :group => [:development, :test] 
group :production do 
    gem 'thin' 
    gem 'pg' 
end 

gem 'giantbomb' 
gem 'stiki' 
gem 'devise' 
gem 'will_paginate' 
gem 'will_paginate-bootstrap' 
gem 'tinymce-rails' 


# 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' 

    gem 'uglifier', '>= 1.0.3' 
end 

gem 'jquery-rails' 

# To use ActiveModel has_secure_password 
# gem 'bcrypt-ruby', '~> 3.0.0' 

# To use Jbuilder templates for JSON 
# gem 'jbuilder' 

# Use unicorn as the web server 
# gem 'unicorn' 

# Deploy with Capistrano 
# gem 'capistrano' 

# To use debugger 
# gem 'ruby-debug19', :require => 'ruby-debug' 

回答

1

從它看起來像錯誤是來自線傳來的日誌5的/app/config/environment.rb,實際的錯誤是No such file to load -- GiantBomb (LoadError)。我猜你在該行有require 'GiantBomb',這在本地工作,因爲你在Windows上有一個不區分大小寫的文件系統。 Heroku使用Linux,它有一個區分大小寫的文件系統,所以它失敗,因爲實際文件名是giantbomb(全部小寫)。

你需要該行更改爲

require 'giantbomb'