2016-05-02 16 views
1

具体的には、ヘロクでレールコンソールを実行しているときに、herokuログをプルアップするときに「ロードするためのそのようなファイルがありません(LoadError)」というH10エラーが発生します。RailsアプリケーションをHerokuにデプロイする際の問題

Railsアプリはlocalhostで正常に動作します。私はすべてのアプリケーションのファイルを調べて、 "pry"を必要とする "および" binding.pry "の呼び出しを削除しました。 pry-railspry-navの宝石は、Herokuのプロダクションでは実行しないでください。私はbundle installを再実行し、ローカルとHeroku上のデータベースをリセットし、これらの調整後にコードがプッシュアップされ、Heroku上のdynosがリセットされるようにしました。

何がありますか?

Herokuのログ

/app/vendor/bundle/ruby/2.2.0/gems/activesupport-4.0.1/lib/active_support/values/time_zone.rb:282: warning: circular argument reference - now 
/app/vendor/bundle/ruby/2.2.0/gems/activesupport-4.0.1/lib/active_support/dependencies.rb:229:in `require': No such file to load -- pry (LoadError) 
/app/vendor/bundle/ruby/2.2.0/gems/activesupport-4.0.1/lib/active_support/values/time_zone.rb:282: warning: circular argument reference - now 
/app/vendor/bundle/ruby/2.2.0/gems/activesupport-4.0.1/lib/active_support/dependencies.rb:229:in `require': No such file to load -- pry (LoadError) 
    from /app/vendor/bundle/ruby/2.2.0/gems/activesupport-4.0.1/lib/active_support/dependencies.rb:229:in `block in require' 
    from /app/vendor/bundle/ruby/2.2.0/gems/activesupport-4.0.1/lib/active_support/dependencies.rb:214:in `load_dependency' 
    from /app/vendor/bundle/ruby/2.2.0/gems/activesupport-4.0.1/lib/active_support/dependencies.rb:229:in `require' 
    from /app/app/controllers/pieces_controller.rb:1:in `<top (required)>' 
    from /app/vendor/bundle/ruby/2.2.0/gems/activesupport-4.0.1/lib/active_support/dependencies.rb:229:in `require' 
    from /app/vendor/bundle/ruby/2.2.0/gems/activesupport-4.0.1/lib/active_support/dependencies.rb:229:in `block in require' 
    from /app/vendor/bundle/ruby/2.2.0/gems/activesupport-4.0.1/lib/active_support/dependencies.rb:214:in `load_dependency' 
    from /app/vendor/bundle/ruby/2.2.0/gems/activesupport-4.0.1/lib/active_support/dependencies.rb:229:in `require' 
    from /app/vendor/bundle/ruby/2.2.0/gems/activesupport-4.0.1/lib/active_support/dependencies.rb:330:in `require_or_load' 
    from /app/vendor/bundle/ruby/2.2.0/gems/activesupport-4.0.1/lib/active_support/dependencies.rb:289:in `depend_on' 
    from /app/vendor/bundle/ruby/2.2.0/gems/activesupport-4.0.1/lib/active_support/dependencies.rb:207:in `require_dependency' 
    from /app/vendor/bundle/ruby/2.2.0/gems/railties-4.0.1/lib/rails/engine.rb:465:in `block (2 levels) in eager_load!' 
    from /app/vendor/bundle/ruby/2.2.0/gems/railties-4.0.1/lib/rails/engine.rb:464:in `each' 
    from /app/vendor/bundle/ruby/2.2.0/gems/railties-4.0.1/lib/rails/engine.rb:464:in `block in eager_load!' 
    from /app/vendor/bundle/ruby/2.2.0/gems/railties-4.0.1/lib/rails/engine.rb:462:in `each' 
    from /app/vendor/bundle/ruby/2.2.0/gems/railties-4.0.1/lib/rails/engine.rb:462:in `eager_load!' 
    from /app/vendor/bundle/ruby/2.2.0/gems/railties-4.0.1/lib/rails/engine.rb:347:in `eager_load!' 
    from /app/vendor/bundle/ruby/2.2.0/gems/railties-4.0.1/lib/rails/application/finisher.rb:56:in `each' 
    from /app/vendor/bundle/ruby/2.2.0/gems/railties-4.0.1/lib/rails/application/finisher.rb:56:in `block in <module:Finisher>' 
    from /app/vendor/bundle/ruby/2.2.0/gems/railties-4.0.1/lib/rails/initializable.rb:30:in `instance_exec' 
    from /app/vendor/bundle/ruby/2.2.0/gems/railties-4.0.1/lib/rails/initializable.rb:30:in `run' 
    from /app/vendor/bundle/ruby/2.2.0/gems/railties-4.0.1/lib/rails/initializable.rb:55:in `block in run_initializers' 
    from /app/vendor/ruby-2.2.4/lib/ruby/2.2.0/tsort.rb:226:in `block in tsort_each' 
    from /app/vendor/ruby-2.2.4/lib/ruby/2.2.0/tsort.rb:348:in `block (2 levels) in each_strongly_connected_component' 
    from /app/vendor/ruby-2.2.4/lib/ruby/2.2.0/tsort.rb:429:in `each_strongly_connected_component_from' 
    from /app/vendor/ruby-2.2.4/lib/ruby/2.2.0/tsort.rb:347:in `block in each_strongly_connected_component' 
    from /app/vendor/ruby-2.2.4/lib/ruby/2.2.0/tsort.rb:345:in `each' 
    from /app/vendor/ruby-2.2.4/lib/ruby/2.2.0/tsort.rb:345:in `call' 
    from /app/vendor/ruby-2.2.4/lib/ruby/2.2.0/tsort.rb:345:in `each_strongly_connected_component' 
    from /app/vendor/ruby-2.2.4/lib/ruby/2.2.0/tsort.rb:224:in `tsort_each' 
    from /app/vendor/ruby-2.2.4/lib/ruby/2.2.0/tsort.rb:203:in `tsort_each' 
    from /app/vendor/bundle/ruby/2.2.0/gems/railties-4.0.1/lib/rails/initializable.rb:54:in `run_initializers' 
    from /app/vendor/bundle/ruby/2.2.0/gems/railties-4.0.1/lib/rails/application.rb:215:in `initialize!' 
    from /app/vendor/bundle/ruby/2.2.0/gems/railties-4.0.1/lib/rails/railtie/configurable.rb:30:in `method_missing' 
    from /app/config/environment.rb:5:in `<top (required)>' 
    from /app/vendor/bundle/ruby/2.2.0/gems/activesupport-4.0.1/lib/active_support/dependencies.rb:229:in `require' 
    from /app/vendor/bundle/ruby/2.2.0/gems/activesupport-4.0.1/lib/active_support/dependencies.rb:229:in `block in require' 
    from /app/vendor/bundle/ruby/2.2.0/gems/activesupport-4.0.1/lib/active_support/dependencies.rb:214:in `load_dependency' 
    from /app/vendor/bundle/ruby/2.2.0/gems/activesupport-4.0.1/lib/active_support/dependencies.rb:229:in `require' 
    from /app/vendor/bundle/ruby/2.2.0/gems/railties-4.0.1/lib/rails/application.rb:189:in `require_environment!' 
    from /app/vendor/bundle/ruby/2.2.0/gems/railties-4.0.1/lib/rails/commands.rb:61:in `<top (required)>' 
    from /app/bin/rails:4:in `require' 
    from /app/bin/rails:4:in `<main>' 

Gemfile C

2016-05-02T21:45:04.892586+00:00 heroku[router]: at=error code=H10 
desc="App crashed" method=GET path="/" host=chess-workout-andrew-smith.herokuapp.com request_id=f05db461-e4ef-48e4-b920-6b5163fa0ea2 fwd="69.156.77.15" dyno= connect= service= status=503 bytes= 

2016-05-02T21:45:05.175027+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=chess-workout-andrew-smith.herokuapp.com request_id=fdbd387c-63fa-49e7-8d2c-e94f36558356 fwd="69.156.77.15" dyno= connect= service= status=503 bytes= 

Herokuの実行レール:

source 'https://rubygems.org' 

gem 'simple_form' 

gem 'rails', '4.0.1' 

gem 'pg' 

gem 'sass-rails', '~> 4.0.0' 

gem 'uglifier', '>= 1.3.0' 

gem 'coffee-rails', '~> 4.0.0' 

gem 'rails_12factor', group: :production 

gem 'jquery-rails' 

gem 'turbolinks' 

gem 'jbuilder', '~> 1.2' 

gem 'pry-rails', :group => :development 

gem 'pry-nav', :group => :development 

gem 'awesome_print', :group => :development 

group :development, :test do 
gem 'rspec-rails', '~> 3.0' 
end 

group :doc do 
    gem 'sdoc', require: false 
end 

gem 'bootstrap-sass', '~> 3.3.4.1' 

gem 'sprockets', '<= 2.11.0' 

gem "devise" 

gem "factory_girl_rails", "~> 4.0" 

database.ymlの

development: 
    adapter: postgresql 
    encoding: unicode 
    database: chess_workout_development 
    pool: 5 
    username: postgres 
    password: password 
    host: localhost 


test: 
    adapter: postgresql 
    encoding: unicode 
    database: chess_workout_test 
    pool: 5 
    username: postgres 
    password: password 
    host: localhost 

production: 
    adapter: postgresql 
    encoding: unicode 
    database: chess_workout_production 
    pool: 5 
    username: postgres 
    password: password 
    host: localhost 
+0

エラーバックトレースの残りの部分にさらに情報がある可能性があります。 Ruby 2.2.0と互換性のある最初のバージョンのruby 2.2.0はかなり後のバージョンでした。 –

+0

@FrederickCheung 上記の詳細なエラーバックトレースは含まれていますが、私はそれを見ても何の意味もありません。 Ruby 2.2.0でRails 4.0.1を使用すると、Herokuにデプロイするときに問題が発生する可能性があると思いますか? –

+0

それは間違いなく循環引数の参照の原因です。 pieces_controller.rb(1行目)を参照しているようです。 –

答えて

0

heroku run rails consoleからエラーログにはpryがないと述べました。 Gemfileでは、herokuが混乱するようにコントローラファイルに 'pry'が設定されていることは間違いなく確かですが、開発環境のためのものです。

Gemfileの:group => :developmentから削除することができ、heroku run bundle installを忘れないでください。

関連する問題