在rake db:migrate之后,Heroku崩溃了

时间:2016-03-04 19:52:47

标签: ruby ruby-on-rails-4 heroku devise devise-invitable

此应用程序已在Heroku上正常运行。最后一次

之后
heroku run rake db:migrate

我发现以下日志有错误:

            2016-03-04T19:40:50.904316+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.0/lib/rails/engine.rb:471:in `block in eager_load!'
            2016-03-04T19:40:50.904317+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.0/lib/rails/engine.rb:469:in `each'
            2016-03-04T19:40:50.904317+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.0/lib/rails/engine.rb:469:in `eager_load!'
            2016-03-04T19:40:50.904318+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.0/lib/rails/engine.rb:346:in `eager_load!'
            2016-03-04T19:40:50.904319+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.0/lib/rails/application/finisher.rb:56:in `block in <module:Finisher>'
            2016-03-04T19:40:50.904319+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.0/lib/rails/application/finisher.rb:56:in `each'
            2016-03-04T19:40:50.904320+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.0/lib/rails/initializable.rb:30:in `instance_exec'
            2016-03-04T19:40:50.904321+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.0/lib/rails/initializable.rb:30:in `run'
            2016-03-04T19:40:50.904323+00:00 app[web.1]:    from /app/vendor/ruby-2.2.1/lib/ruby/2.2.0/tsort.rb:348:in `block (2 levels) in each_strongly_connected_component'
            2016-03-04T19:40:50.904322+00:00 app[web.1]:    from /app/vendor/ruby-2.2.1/lib/ruby/2.2.0/tsort.rb:226:in `block in tsort_each'
            2016-03-04T19:40:50.904323+00:00 app[web.1]:    from /app/vendor/ruby-2.2.1/lib/ruby/2.2.0/tsort.rb:429:in `each_strongly_connected_component_from'
            2016-03-04T19:40:50.904321+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.0/lib/rails/initializable.rb:55:in `block in run_initializers'
            2016-03-04T19:40:50.904324+00:00 app[web.1]:    from /app/vendor/ruby-2.2.1/lib/ruby/2.2.0/tsort.rb:347:in `block in each_strongly_connected_component'
            2016-03-04T19:40:50.904327+00:00 app[web.1]:    from /app/vendor/ruby-2.2.1/lib/ruby/2.2.0/tsort.rb:224:in `tsort_each'
            2016-03-04T19:40:50.904326+00:00 app[web.1]:    from /app/vendor/ruby-2.2.1/lib/ruby/2.2.0/tsort.rb:345:in `each_strongly_connected_component'
            2016-03-04T19:40:50.904327+00:00 app[web.1]:    from /app/vendor/ruby-2.2.1/lib/ruby/2.2.0/tsort.rb:203:in `tsort_each'
            2016-03-04T19:40:50.904325+00:00 app[web.1]:    from /app/vendor/ruby-2.2.1/lib/ruby/2.2.0/tsort.rb:345:in `each'
            2016-03-04T19:40:50.904325+00:00 app[web.1]:    from /app/vendor/ruby-2.2.1/lib/ruby/2.2.0/tsort.rb:345:in `call'
            2016-03-04T19:40:50.904328+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.0/lib/rails/initializable.rb:54:in `run_initializers'
            2016-03-04T19:40:50.904329+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.0/lib/rails/application.rb:352:in `initialize!'
            2016-03-04T19:40:50.904329+00:00 app[web.1]:    from /app/config/environment.rb:5:in `<top (required)>'
            2016-03-04T19:40:50.904330+00:00 app[web.1]:    from /app/config.ru:3:in `block in <main>'
            2016-03-04T19:40:50.904331+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.2.0/gems/rack-1.6.4/lib/rack/builder.rb:55:in `instance_eval'
            2016-03-04T19:40:50.904331+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.2.0/gems/rack-1.6.4/lib/rack/builder.rb:55:in `initialize'
            2016-03-04T19:40:50.904334+00:00 app[web.1]:    from /app/config.ru:in `new'
            2016-03-04T19:40:50.904335+00:00 app[web.1]:    from /app/config.ru:in `<main>'
            2016-03-04T19:40:50.904335+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.2.0/gems/rack-1.6.4/lib/rack/builder.rb:49:in `eval'
            2016-03-04T19:40:50.904336+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.2.0/gems/rack-1.6.4/lib/rack/builder.rb:49:in `new_from_string'
            2016-03-04T19:40:50.904337+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.2.0/gems/rack-1.6.4/lib/rack/builder.rb:40:in `parse_file'
            2016-03-04T19:40:50.904338+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.2.0/gems/rack-1.6.4/lib/rack/server.rb:299:in `build_app_and_options_from_config'
            2016-03-04T19:40:50.904338+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.2.0/gems/rack-1.6.4/lib/rack/server.rb:208:in `app'
            2016-03-04T19:40:50.904339+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.0/lib/rails/commands/server.rb:61:in `app'
            2016-03-04T19:40:50.904339+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.2.0/gems/rack-1.6.4/lib/rack/server.rb:336:in `wrapped_app'
            2016-03-04T19:40:50.904340+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.2.0/gems/rack-1.6.4/lib/rack/server.rb:272:in `start'
            2016-03-04T19:40:50.904341+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.0/lib/rails/commands/server.rb:80:in `start'
            2016-03-04T19:40:50.904342+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:80:in `block in server'
            2016-03-04T19:40:50.904342+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:75:in `tap'
            2016-03-04T19:40:50.904346+00:00 app[web.1]:    from bin/rails:8:in `require'
            2016-03-04T19:40:50.904343+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:75:in `server'
            2016-03-04T19:40:50.904346+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.0/lib/rails/commands.rb:17:in `<top (required)>'
            2016-03-04T19:40:50.904344+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
            2016-03-04T19:40:50.904347+00:00 app[web.1]:    from bin/rails:8:in `<main>'
            2016-03-04T19:40:51.575383+00:00 heroku[web.1]: Process exited with status 1
            2016-03-04T19:40:51.615222+00:00 heroku[web.1]: State changed from starting to crashed
            2016-03-04T19:41:25+00:00 app[heroku-redis]: source=REDIS sample#active-connections=1 sample#load-avg-1m=0.05 sample#load-avg-5m=0.09 sample#load-avg-15m=0.11 sample#read-iops=0 sample#write-iops=0 sample#memory-total=15405632.0kB sample#memory-free=13797896.0kB sample#memory-cached=519196kB sample#memory-redis=328496bytes sample#hit-rate=0.93242 sample#evicted-keys=0
            2016-03-04T19:42:25+00:00 app[heroku-redis]: source=REDIS sample#active-connections=1 sample#load-avg-1m=0.02 sample#load-avg-5m=0.075 sample#load-avg-15m=0.1 sample#read-iops=0 sample#write-iops=0 sample#memory-total=15405632.0kB sample#memory-free=13798020.0kB sample#memory-cached=519196kB sample#memory-redis=328496bytes sample#hit-rate=0.93242 sample#evicted-keys=0
            2016-03-04T19:43:29+00:00 app[heroku-redis]: source=REDIS sample#active-connections=1 sample#load-avg-1m=0.04 sample#load-avg-5m=0.075 sample#load-avg-15m=0.1 sample#read-iops=0 sample#write-iops=0 sample#memory-total=15405632.0kB sample#memory-free=13797656.0kB sample#memory-cached=519200kB sample#memory-redis=328496bytes sample#hit-rate=0.93242 sample#evicted-keys=0
            2016-03-04T19:44:30+00:00 app[heroku-redis]: source=REDIS sample#active-connections=1 sample#load-avg-1m=0.105 sample#load-avg-5m=0.085 sample#load-avg-15m=0.105 sample#read-iops=0 sample#write-iops=0 sample#memory-total=15405632.0kB sample#memory-free=13797688.0kB sample#memory-cached=519200kB sample#memory-redis=328496bytes sample#hit-rate=0.93242 sample#evicted-keys=0
            2016-03-04T19:45:46+00:00 app[heroku-redis]: source=REDIS sample#active-connections=1 sample#load-avg-1m=0.09 sample#load-avg-5m=0.085 sample#load-avg-15m=0.105 sample#read-iops=0 sample#write-iops=0 sample#memory-total=15405632.0kB sample#memory-free=13797928.0kB sample#memory-cached=519200kB sample#memory-redis=328496bytes sample#hit-rate=0.93242 sample#evicted-keys=0
            2016-03-04T19:46:31+00:00 app[heroku-redis]: source=REDIS sample#active-connections=1 sample#load-avg-1m=0.035 sample#load-avg-5m=0.07 sample#load-avg-15m=0.095 sample#read-iops=0 sample#write-iops=0 sample#memory-total=15405632.0kB sample#memory-free=13797796.0kB sample#memory-cached=519200kB sample#memory-redis=328496bytes sample#hit-rate=0.93242 sample#evicted-keys=0
            2016-03-04T19:47:33+00:00 app[heroku-redis]: source=REDIS sample#active-connections=1 sample#load-avg-1m=0.01 sample#load-avg-5m=0.055 sample#load-avg-15m=0.09 sample#read-iops=0 sample#write-iops=0 sample#memory-total=15405632.0kB sample#memory-free=13797980.0kB sample#memory-cached=519204kB sample#memory-redis=328496bytes sample#hit-rate=0.93242 sample#evicted-keys=0
            2016-03-04T19:48:35+00:00 app[heroku-redis]: source=REDIS sample#active-connections=1 sample#load-avg-1m=0.02 sample#load-avg-5m=0.055 sample#load-avg-15m=0.09 sample#read-iops=0 sample#write-iops=0 sample#memory-total=15405632.0kB sample#memory-free=13798144.0kB sample#memory-cached=519204kB sample#memory-redis=328496bytes sample#hit-rate=0.93242 sample#evicted-keys=0
            2016-03-04T19:49:23+00:00 app[heroku-redis]: source=REDIS sample#active-connections=1 sample#load-avg-1m=0.045 sample#load-avg-5m=0.055 sample#load-avg-15m=0.09 sample#read-iops=0 sample#write-iops=0 sample#memory-total=15405632.0kB sample#memory-free=13798260.0kB sample#memory-cached=519204kB sample#memory-redis=328496bytes sample#hit-rate=0.93242 sample#evicted-keys=0
            2016-03-04T19:50:25+00:00 app[heroku-redis]: source=REDIS sample#active-connections=1 sample#load-avg-1m=0.015 sample#load-avg-5m=0.045 sample#load-avg-15m=0.08 sample#read-iops=0 sample#write-iops=0 sample#memory-total=15405632.0kB sample#memory-free=13797936.0kB sample#memory-cached=519204kB sample#memory-redis=328496bytes sample#hit-rate=0.93242 sample#evicted-keys=0
            2016-03-04T19:51:31.568822+00:00 heroku[worker.1]: State changed from crashed to starting
            2016-03-04T19:51:36.943055+00:00 heroku[worker.1]: Starting process with command `bundle exec rake jobs:work`
            2016-03-04T19:51:37.500878+00:00 heroku[worker.1]: State changed from starting to up
            2016-03-04T19:51:40+00:00 app[heroku-redis]: source=REDIS sample#active-connections=1 sample#load-avg-1m=0.17 sample#load-avg-5m=0.08 sample#load-avg-15m=0.09 sample#read-iops=0 sample#write-iops=0 sample#memory-total=15405632.0kB sample#memory-free=13798928.0kB sample#memory-cached=519208kB sample#memory-redis=328496bytes sample#hit-rate=0.93242 sample#evicted-keys=0
            2016-03-04T19:51:41.578717+00:00 app[worker.1]: rake aborted!
            2016-03-04T19:51:41.578736+00:00 app[worker.1]: Don't know how to build task 'jobs:work'
            2016-03-04T19:51:41.578969+00:00 app[worker.1]: 
            2016-03-04T19:51:41.578997+00:00 app[worker.1]: (See full trace by running task with --trace)
            2016-03-04T19:51:42.166907+00:00 heroku[worker.1]: Process exited with status 1
            2016-03-04T19:51:42.176706+00:00 heroku[worker.1]: State changed from up to crashed

然后我尝试了:

git push heroku master

之后我的应用程序突然在我的生产环境(heroku)中无效,我无法在我的本地环境中模拟它。 我正在获取以下错误日志来推送git:

2016-03-04T19:18:22.489968+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.0/lib/rails/engine.rb:472:in `block (2 levels) in eager_load!'
2016-03-04T19:18:22.489969+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.0/lib/rails/engine.rb:471:in `each'
2016-03-04T19:18:22.489970+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.0/lib/rails/engine.rb:471:in `block in eager_load!'
2016-03-04T19:18:22.489971+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.0/lib/rails/engine.rb:469:in `each'
2016-03-04T19:18:22.489971+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.0/lib/rails/engine.rb:469:in `eager_load!'
2016-03-04T19:18:22.489972+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.0/lib/rails/engine.rb:346:in `eager_load!'
2016-03-04T19:18:22.489975+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.0/lib/rails/application/finisher.rb:56:in `each'
2016-03-04T19:18:22.489976+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.0/lib/rails/application/finisher.rb:56:in `block in <module:Finisher>'
2016-03-04T19:18:22.489976+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.0/lib/rails/initializable.rb:30:in `instance_exec'
2016-03-04T19:18:22.489977+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.0/lib/rails/initializable.rb:55:in `block in run_initializers'
2016-03-04T19:18:22.489977+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.0/lib/rails/initializable.rb:30:in `run'
2016-03-04T19:18:22.489978+00:00 app[web.1]:    from /app/vendor/ruby-2.2.1/lib/ruby/2.2.0/tsort.rb:226:in `block in tsort_each'
2016-03-04T19:18:22.489982+00:00 app[web.1]:    from /app/vendor/ruby-2.2.1/lib/ruby/2.2.0/tsort.rb:345:in `each'
2016-03-04T19:18:22.489983+00:00 app[web.1]:    from /app/vendor/ruby-2.2.1/lib/ruby/2.2.0/tsort.rb:345:in `call'
2016-03-04T19:18:22.489979+00:00 app[web.1]:    from /app/vendor/ruby-2.2.1/lib/ruby/2.2.0/tsort.rb:429:in `each_strongly_connected_component_from'
2016-03-04T19:18:22.489979+00:00 app[web.1]:    from /app/vendor/ruby-2.2.1/lib/ruby/2.2.0/tsort.rb:348:in `block (2 levels) in each_strongly_connected_component'
2016-03-04T19:18:22.489980+00:00 app[web.1]:    from /app/vendor/ruby-2.2.1/lib/ruby/2.2.0/tsort.rb:347:in `block in each_strongly_connected_component'
2016-03-04T19:18:22.489983+00:00 app[web.1]:    from /app/vendor/ruby-2.2.1/lib/ruby/2.2.0/tsort.rb:345:in `each_strongly_connected_component'
2016-03-04T19:18:22.489987+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.0/lib/rails/initializable.rb:54:in `run_initializers'
2016-03-04T19:18:22.489985+00:00 app[web.1]:    from /app/vendor/ruby-2.2.1/lib/ruby/2.2.0/tsort.rb:224:in `tsort_each'
2016-03-04T19:18:22.489985+00:00 app[web.1]:    from /app/vendor/ruby-2.2.1/lib/ruby/2.2.0/tsort.rb:203:in `tsort_each'
2016-03-04T19:18:22.490001+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.0/lib/rails/application.rb:352:in `initialize!'
2016-03-04T19:18:22.490002+00:00 app[web.1]:    from /app/config/environment.rb:5:in `<top (required)>'
2016-03-04T19:18:22.490004+00:00 app[web.1]:    from /app/config.ru:3:in `block in <main>'
2016-03-04T19:18:22.490005+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.2.0/gems/rack-1.6.4/lib/rack/builder.rb:55:in `instance_eval'
2016-03-04T19:18:22.490026+00:00 app[web.1]:    from /app/config.ru:in `new'
2016-03-04T19:18:22.490006+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.2.0/gems/rack-1.6.4/lib/rack/builder.rb:55:in `initialize'
2016-03-04T19:18:22.490027+00:00 app[web.1]:    from /app/config.ru:in `<main>'
2016-03-04T19:18:22.490027+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.2.0/gems/rack-1.6.4/lib/rack/builder.rb:49:in `eval'
2016-03-04T19:18:22.490029+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.2.0/gems/rack-1.6.4/lib/rack/builder.rb:49:in `new_from_string'
2016-03-04T19:18:22.490030+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.2.0/gems/rack-1.6.4/lib/rack/builder.rb:40:in `parse_file'
2016-03-04T19:18:22.490032+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.2.0/gems/rack-1.6.4/lib/rack/server.rb:299:in `build_app_and_options_from_config'
2016-03-04T19:18:22.490048+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.2.0/gems/rack-1.6.4/lib/rack/server.rb:208:in `app'
2016-03-04T19:18:22.490049+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.0/lib/rails/commands/server.rb:61:in `app'
2016-03-04T19:18:22.490050+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.2.0/gems/rack-1.6.4/lib/rack/server.rb:336:in `wrapped_app'
2016-03-04T19:18:22.490052+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.2.0/gems/rack-1.6.4/lib/rack/server.rb:272:in `start'
2016-03-04T19:18:22.490053+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.0/lib/rails/commands/server.rb:80:in `start'
2016-03-04T19:18:22.490151+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:80:in `block in server'
2016-03-04T19:18:22.490160+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:75:in `tap'
2016-03-04T19:18:22.490161+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:75:in `server'
2016-03-04T19:18:22.490161+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
2016-03-04T19:18:22.490162+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.0/lib/rails/commands.rb:17:in `<top (required)>'
2016-03-04T19:18:22.490162+00:00 app[web.1]:    from bin/rails:8:in `require'
2016-03-04T19:18:22.490163+00:00 app[web.1]:    from bin/rails:8:in `<main>'
2016-03-04T19:18:23.173071+00:00 heroku[web.1]: State changed from starting to crashed
2016-03-04T19:18:23.174500+00:00 heroku[web.1]: State changed from crashed to starting
2016-03-04T19:18:23.126163+00:00 heroku[web.1]: Process exited with status 1
2016-03-04T19:18:28.828072+00:00 heroku[web.1]: Starting process with command `bin/rails server -p 33437 -e production`
2016-03-04T19:18:35.409674+00:00 app[web.1]: => Booting WEBrick
2016-03-04T19:18:35.409713+00:00 app[web.1]: => Rails 4.2.0 application starting in production on http://0.0.0.0:33437
2016-03-04T19:18:35.409714+00:00 app[web.1]: => Run `rails server -h` for more startup options
2016-03-04T19:18:35.409715+00:00 app[web.1]: => Ctrl-C to shutdown server
2016-03-04T19:18:35.409720+00:00 app[web.1]: Exiting
2016-03-04T19:18:35.409736+00:00 app[web.1]: /app/app/controllers/Users/invitations_controller.rb:1:in `<top (required)>': uninitialized constant Users (NameError)
2016-03-04T19:18:35.409737+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.0/lib/rails/engine.rb:472:in `block (2 levels) in eager_load!'
2016-03-04T19:18:35.409737+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.0/lib/rails/engine.rb:471:in `each'
2016-03-04T19:18:35.409738+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.0/lib/rails/engine.rb:471:in `block in eager_load!'
2016-03-04T19:18:35.409739+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.0/lib/rails/engine.rb:469:in `each'
2016-03-04T19:18:35.409739+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.0/lib/rails/engine.rb:469:in `eager_load!'
2016-03-04T19:18:35.409740+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.0/lib/rails/engine.rb:346:in `eager_load!'
2016-03-04T19:18:35.409742+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.0/lib/rails/initializable.rb:30:in `instance_exec'
2016-03-04T19:18:35.409741+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.0/lib/rails/application/finisher.rb:56:in `block in <module:Finisher>'
2016-03-04T19:18:35.409741+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.0/lib/rails/application/finisher.rb:56:in `each'
2016-03-04T19:18:35.409743+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.0/lib/rails/initializable.rb:30:in `run'
2016-03-04T19:18:35.409745+00:00 app[web.1]:    from /app/vendor/ruby-2.2.1/lib/ruby/2.2.0/tsort.rb:429:in `each_strongly_connected_component_from'
2016-03-04T19:18:35.409744+00:00 app[web.1]:    from /app/vendor/ruby-2.2.1/lib/ruby/2.2.0/tsort.rb:348:in `block (2 levels) in each_strongly_connected_component'
2016-03-04T19:18:35.409744+00:00 app[web.1]:    from /app/vendor/ruby-2.2.1/lib/ruby/2.2.0/tsort.rb:226:in `block in tsort_each'
2016-03-04T19:18:35.409746+00:00 app[web.1]:    from /app/vendor/ruby-2.2.1/lib/ruby/2.2.0/tsort.rb:345:in `each'
2016-03-04T19:18:35.409743+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.0/lib/rails/initializable.rb:55:in `block in run_initializers'
2016-03-04T19:18:35.409747+00:00 app[web.1]:    from /app/vendor/ruby-2.2.1/lib/ruby/2.2.0/tsort.rb:345:in `call'
2016-03-04T19:18:35.409751+00:00 app[web.1]:    from /app/config.ru:3:in `block in <main>'
2016-03-04T19:18:35.409750+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.0/lib/rails/application.rb:352:in `initialize!'
2016-03-04T19:18:35.409748+00:00 app[web.1]:    from /app/vendor/ruby-2.2.1/lib/ruby/2.2.0/tsort.rb:224:in `tsort_each'
2016-03-04T19:18:35.409755+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.2.0/gems/rack-1.6.4/lib/rack/builder.rb:55:in `initialize'
2016-03-04T19:18:35.409751+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.2.0/gems/rack-1.6.4/lib/rack/builder.rb:55:in `instance_eval'
2016-03-04T19:18:35.409750+00:00 app[web.1]:    from /app/config/environment.rb:5:in `<top (required)>'
2016-03-04T19:18:35.409756+00:00 app[web.1]:    from /app/config.ru:in `new'
2016-03-04T19:18:35.409756+00:00 app[web.1]:    from /app/config.ru:in `<main>'
2016-03-04T19:18:35.409758+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.2.0/gems/rack-1.6.4/lib/rack/builder.rb:49:in `new_from_string'
2016-03-04T19:18:35.409745+00:00 app[web.1]:    from /app/vendor/ruby-2.2.1/lib/ruby/2.2.0/tsort.rb:347:in `block in each_strongly_connected_component'
2016-03-04T19:18:35.409747+00:00 app[web.1]:    from /app/vendor/ruby-2.2.1/lib/ruby/2.2.0/tsort.rb:345:in `each_strongly_connected_component'
2016-03-04T19:18:35.409748+00:00 app[web.1]:    from /app/vendor/ruby-2.2.1/lib/ruby/2.2.0/tsort.rb:203:in `tsort_each'
2016-03-04T19:18:35.409762+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.0/lib/rails/commands/server.rb:80:in `start'
2016-03-04T19:18:35.409749+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.0/lib/rails/initializable.rb:54:in `run_initializers'
2016-03-04T19:18:35.409767+00:00 app[web.1]:    from bin/rails:8:in `require'
2016-03-04T19:18:35.409761+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.2.0/gems/rack-1.6.4/lib/rack/server.rb:336:in `wrapped_app'
2016-03-04T19:18:35.409768+00:00 app[web.1]:    from bin/rails:8:in `<main>'
2016-03-04T19:18:35.409758+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.2.0/gems/rack-1.6.4/lib/rack/builder.rb:40:in `parse_file'
2016-03-04T19:18:35.409759+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.2.0/gems/rack-1.6.4/lib/rack/server.rb:208:in `app'
2016-03-04T19:18:35.409761+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.2.0/gems/rack-1.6.4/lib/rack/server.rb:272:in `start'
2016-03-04T19:18:35.409762+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:80:in `block in server'
2016-03-04T19:18:35.409763+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:75:in `tap'
2016-03-04T19:18:35.409766+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:75:in `server'
2016-03-04T19:18:35.409767+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.0/lib/rails/commands.rb:17:in `<top (required)>'
2016-03-04T19:18:35.409759+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.2.0/gems/rack-1.6.4/lib/rack/server.rb:299:in `build_app_and_options_from_config'
2016-03-04T19:18:35.409760+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.0/lib/rails/commands/server.rb:61:in `app'
2016-03-04T19:18:35.409757+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.2.0/gems/rack-1.6.4/lib/rack/builder.rb:49:in `eval'
2016-03-04T19:18:35.409766+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
2016-03-04T19:18:36.172209+00:00 heroku[web.1]: State changed from starting to crashed
2016-03-04T19:18:36.156974+00:00 heroku[web.1]: Process exited with status 1

我做的最后一件事是安装和实现Devise_invitable Gem(在我已经实现的Devise Gem旁边)。

有谁看到出了什么问题?

1 个答案:

答案 0 :(得分:0)

这种情况发生在prod但不是dev,因为dev lazy-loads类,并且prod将它们全部加载到前面。但加载此文件时出错:

应用程序/控制器/用户/ invitations_controller.rb

看起来第一行是使用Users类做某事。该文件的路径也是可疑的。通常在Rails中,您不会像使用Users/invitations_controller.rb这样完成目录。

由于错误在第1行,我猜你有这个:

class Users::InvitationsController
  ...
end

我认为将目录重命名为小写users可以解决您的问题。

请注意,这与运行迁移无关。事实上,我怀疑你的迁移是否成功,所以一旦解决了这个问题并将修复程序推送到Heroku,你应该再次尝试运行它。