###前提・実現したいこと
cloud9で作成したRuby on Railsアプリケーションをherokuへデプロイした際に、アプリケーションエラーとなってしまい、ログにエラーが出てしまいました。
どなたかわかる方、いらっしゃいましたらお願いします!
###発生している問題・エラーメッセージ
logs -tで取得したログは以下の通りとなります。
自分では、ここが原因かと思っていますが、解決法見つけられていません。
※CarrierWaveは使用していないのですが、そこも不明な点です
bundler: failed to load command: unicorn (/app/vendor/bundle/ruby/2.3.0/bin/unicorn)
NameError: uninitialized constant CarrierWave
2017-04-22T09:35:57.000000+00:00 app[api]: Build succeeded 2017-04-22T09:36:30.266071+00:00 heroku[web.1]: Starting process with command `bundle exec unicorn -p 43511 -c ./config/unicorn.rb` 2017-04-22T09:36:32.232595+00:00 app[web.1]: I, [2017-04-22T09:36:32.232514 #4] INFO -- : Refreshing Gem list 2017-04-22T09:36:33.427947+00:00 app[web.1]: bundler: failed to load command: unicorn (/app/vendor/bundle/ruby/2.3.0/bin/unicorn) 2017-04-22T09:36:33.428026+00:00 app[web.1]: NameError: uninitialized constant CarrierWave 2017-04-22T09:36:33.428027+00:00 app[web.1]: /app/app/uploaders/picture_uploader.rb:1:in `<top (required)>' 2017-04-22T09:36:33.428030+00:00 app[web.1]: /app/vendor/bundle/ruby/2.3.0/gems/railties-4.2.5/lib/rails/engine.rb:472:in `block (2 levels) in eager_load!' 2017-04-22T09:36:33.428031+00:00 app[web.1]: /app/vendor/bundle/ruby/2.3.0/gems/railties-4.2.5/lib/rails/engine.rb:471:in `each' 2017-04-22T09:36:33.428032+00:00 app[web.1]: /app/vendor/bundle/ruby/2.3.0/gems/railties-4.2.5/lib/rails/engine.rb:471:in `block in eager_load!' 2017-04-22T09:36:33.428033+00:00 app[web.1]: /app/vendor/bundle/ruby/2.3.0/gems/railties-4.2.5/lib/rails/engine.rb:469:in `each' 2017-04-22T09:36:33.428034+00:00 app[web.1]: /app/vendor/bundle/ruby/2.3.0/gems/railties-4.2.5/lib/rails/engine.rb:469:in `eager_load!' 2017-04-22T09:36:33.428035+00:00 app[web.1]: /app/vendor/bundle/ruby/2.3.0/gems/railties-4.2.5/lib/rails/engine.rb:346:in `eager_load!' 2017-04-22T09:36:33.428035+00:00 app[web.1]: /app/vendor/bundle/ruby/2.3.0/gems/railties-4.2.5/lib/rails/application/finisher.rb:56:in `each' 2017-04-22T09:36:33.428036+00:00 app[web.1]: /app/vendor/bundle/ruby/2.3.0/gems/railties-4.2.5/lib/rails/application/finisher.rb:56:in `block in <module:Finisher>' 2017-04-22T09:36:33.428037+00:00 app[web.1]: /app/vendor/bundle/ruby/2.3.0/gems/railties-4.2.5/lib/rails/initializable.rb:30:in `instance_exec' 2017-04-22T09:36:33.428038+00:00 app[web.1]: /app/vendor/bundle/ruby/2.3.0/gems/railties-4.2.5/lib/rails/initializable.rb:30:in `run' 2017-04-22T09:36:33.428038+00:00 app[web.1]: /app/vendor/bundle/ruby/2.3.0/gems/railties-4.2.5/lib/rails/initializable.rb:55:in `block in run_initializers' 2017-04-22T09:36:33.428039+00:00 app[web.1]: /app/vendor/ruby-2.3.4/lib/ruby/2.3.0/tsort.rb:228:in `block in tsort_each' 2017-04-22T09:36:33.428040+00:00 app[web.1]: /app/vendor/ruby-2.3.4/lib/ruby/2.3.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component' 2017-04-22T09:36:33.428041+00:00 app[web.1]: /app/vendor/ruby-2.3.4/lib/ruby/2.3.0/tsort.rb:431:in `each_strongly_connected_component_from' 2017-04-22T09:36:33.428041+00:00 app[web.1]: /app/vendor/ruby-2.3.4/lib/ruby/2.3.0/tsort.rb:349:in `block in each_strongly_connected_component' 2017-04-22T09:36:33.428042+00:00 app[web.1]: /app/vendor/ruby-2.3.4/lib/ruby/2.3.0/tsort.rb:347:in `each' 2017-04-22T09:36:33.428043+00:00 app[web.1]: /app/vendor/ruby-2.3.4/lib/ruby/2.3.0/tsort.rb:347:in `call' 2017-04-22T09:36:33.428043+00:00 app[web.1]: /app/vendor/ruby-2.3.4/lib/ruby/2.3.0/tsort.rb:347:in `each_strongly_connected_component' 2017-04-22T09:36:33.428044+00:00 app[web.1]: /app/vendor/ruby-2.3.4/lib/ruby/2.3.0/tsort.rb:226:in `tsort_each' 2017-04-22T09:36:33.428045+00:00 app[web.1]: /app/vendor/ruby-2.3.4/lib/ruby/2.3.0/tsort.rb:205:in `tsort_each' 2017-04-22T09:36:33.428046+00:00 app[web.1]: /app/vendor/bundle/ruby/2.3.0/gems/railties-4.2.5/lib/rails/initializable.rb:54:in `run_initializers' 2017-04-22T09:36:33.428046+00:00 app[web.1]: /app/vendor/bundle/ruby/2.3.0/gems/railties-4.2.5/lib/rails/application.rb:352:in `initialize!' 2017-04-22T09:36:33.428047+00:00 app[web.1]: /app/config/environment.rb:5:in `<top (required)>' 2017-04-22T09:36:33.428048+00:00 app[web.1]: config.ru:4:in `require' 2017-04-22T09:36:33.428048+00:00 app[web.1]: config.ru:4:in `block in <main>' 2017-04-22T09:36:33.428049+00:00 app[web.1]: /app/vendor/bundle/ruby/2.3.0/gems/rack-1.6.4/lib/rack/builder.rb:55:in `instance_eval' 2017-04-22T09:36:33.428050+00:00 app[web.1]: /app/vendor/bundle/ruby/2.3.0/gems/rack-1.6.4/lib/rack/builder.rb:55:in `initialize' 2017-04-22T09:36:33.428050+00:00 app[web.1]: config.ru:1:in `new' 2017-04-22T09:36:33.428051+00:00 app[web.1]: config.ru:1:in `<main>' 2017-04-22T09:36:33.428052+00:00 app[web.1]: /app/vendor/bundle/ruby/2.3.0/gems/unicorn-5.3.0/lib/unicorn.rb:56:in `eval' 2017-04-22T09:36:33.428053+00:00 app[web.1]: /app/vendor/bundle/ruby/2.3.0/gems/unicorn-5.3.0/lib/unicorn.rb:56:in `block in builder' 2017-04-22T09:36:33.428053+00:00 app[web.1]: /app/vendor/bundle/ruby/2.3.0/gems/unicorn-5.3.0/lib/unicorn/http_server.rb:796:in `build_app!' 2017-04-22T09:36:33.428054+00:00 app[web.1]: /app/vendor/bundle/ruby/2.3.0/gems/unicorn-5.3.0/lib/unicorn/http_server.rb:139:in `start' 2017-04-22T09:36:33.428055+00:00 app[web.1]: /app/vendor/bundle/ruby/2.3.0/gems/unicorn-5.3.0/bin/unicorn:126:in `<top (required)>' 2017-04-22T09:36:33.428055+00:00 app[web.1]: /app/vendor/bundle/ruby/2.3.0/bin/unicorn:22:in `load' 2017-04-22T09:36:33.428056+00:00 app[web.1]: /app/vendor/bundle/ruby/2.3.0/bin/unicorn:22:in `<top (required)>' 2017-04-22T09:36:33.545839+00:00 heroku[web.1]: State changed from starting to crashed 2017-04-22T09:36:33.547117+00:00 heroku[web.1]: State changed from crashed to starting 2017-04-22T09:36:33.535113+00:00 heroku[web.1]: Process exited with status 1 2017-04-22T09:36:38.924926+00:00 heroku[web.1]: Starting process with command `bundle exec unicorn -p 3088 -c ./config/unicorn.rb` 2017-04-22T09:36:41.077577+00:00 app[web.1]: I, [2017-04-22T09:36:41.077475 #4] INFO -- : Refreshing Gem list 2017-04-22T09:36:42.364947+00:00 app[web.1]: bundler: failed to load command: unicorn (/app/vendor/bundle/ruby/2.3.0/bin/unicorn) 2017-04-22T09:36:42.365047+00:00 app[web.1]: NameError: uninitialized constant CarrierWave 〜繰り返し部分省略〜 2017-04-22T09:37:01.025518+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=xxxxxx.herokuapp.com request_id=ace3c88a-37a3-42ff-8974-40bfab557408 fwd="xxx.xxx.xx.xxx" dyno= connect= service= status=503 bytes= protocol=https 2017-04-22T09:37:01.628842+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=xxxxxx.herokuapp.com request_id=52fcbc7e-73aa-4a49-af75-3a769487b65e fwd="xxx.xxx.xx.xxx" dyno= connect= service= status=503 bytes= protocol=https 2017-04-22T09:44:32.481699+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=xxxxxx.herokuapp.com request_id=5276a3a5-6e75-4b38-aaad-acd4f5251a99 fwd="xxx.xxx.xx.xxx" dyno= connect= service= status=503 bytes= protocol=https 2017-04-22T09:44:33.360437+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=xxxxxx.herokuapp.com request_id=337ad730-7f2e-4e55-9f87-eb830815e94c fwd="xxx.xxx.xx.xxx" dyno= connect= service= status=503 bytes= protocol=https
###該当のソースコード
◆ /Procfile web: bundle exec unicorn -p $PORT -c ./config/unicorn.rb ◆ /config/unicorn.rb #config/unicorn.rb worker_processes 1 timeout 30 preload_app true before_fork do |server, worker| Signal.trap 'TERM' do puts 'Unicorn master intercepting TERM and sending myself QUIT instead' Process.kill 'QUIT', Process.pid end defined?(ActiveRecord::Base) and ActiveRecord::Base.connection.disconnect! end after_fork do |server, worker| Signal.trap 'TERM' do puts 'Unicorn worker intercepting TERM and doing nothing. Wait for master to sent QUIT' end defined?(ActiveRecord::Base) and ActiveRecord::Base.establish_connection end ◆ /Gemfileにはgem 'unicorn'を記載しています
###補足情報(言語/FW/ツール等のバージョンなど)
ruby '2.3.4'
回答2件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。