1

找不到错误的来源(在本地工作正常)

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 ahmetabdi@gmail.com

宝石文件

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

1 回答 1

1

从日志看来错误来自第 5 行/app/config/environment.rb,而实际错误是No such file to load -- GiantBomb (LoadError). 我猜你require 'GiantBomb'在该行,它在本地工作,因为你在 Windows 上,它有一个不区分大小写的文件系统。Heroku 使用具有区分大小写的文件系统的 Linux,因此它会失败,因为实际文件名是giantbomb(全部小写)。

您需要将该行更改为

require 'giantbomb'
于 2012-12-13T15:03:53.230 回答