所以我在我的rails应用程序中添加了CSV上传。它在我当地的主机上工作得很好。我现在将它部署到heroku,我得到“应用程序错误消息”。这是我的heroku日志:
2014-05-26T19:10:44.656816+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.4/lib/active_support/dependencies.rb:229:in `require'
2014-05-26T19:10:44.656779+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.4/lib/rails/initializable.rb:30:in `instance_exec'
2014-05-26T19:10:44.656785+00:00 app[web.1]: from /app/vendor/ruby-2.0.0/lib/ruby/2.0.0/tsort.rb:150:in `block in tsort_each'
2014-05-26T19:10:44.656800+00:00 app[web.1]: from /app/vendor/ruby-2.0.0/lib/ruby/2.0.0/tsort.rb:148:in `tsort_each'
2014-05-26T19:10:44.656783+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.4/lib/rails/initializable.rb:30:in `run'
2014-05-26T19:10:44.656790+00:00 app[web.1]: from /app/vendor/ruby-2.0.0/lib/ruby/2.0.0/tsort.rb:219:in `each_strongly_connected_component_from'
2014-05-26T19:10:44.656794+00:00 app[web.1]: from /app/vendor/ruby-2.0.0/lib/ruby/2.0.0/tsort.rb:182:in `block in each_strongly_connected_component'
2014-05-26T19:10:44.656840+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/builder.rb:55:in `instance_eval'
2014-05-26T19:10:44.656850+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/builder.rb:40:in `parse_file'
2014-05-26T19:10:44.656795+00:00 app[web.1]: from /app/vendor/ruby-2.0.0/lib/ruby/2.0.0/tsort.rb:180:in `each'
2014-05-26T19:10:44.656832+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.4/lib/active_support/dependencies.rb:214:in `load_dependency'
2014-05-26T19:10:44.656838+00:00 app[web.1]: from /app/config.ru:3:in `block in <main>'
2014-05-26T19:10:44.656837+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.4/lib/active_support/dependencies.rb:229:in `require'
2014-05-26T19:10:44.656841+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/builder.rb:55:in `initialize'
2014-05-26T19:10:44.656847+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/builder.rb:49:in `eval'
2014-05-26T19:10:44.656860+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/server.rb:314:in `wrapped_app'
2014-05-26T19:10:44.656855+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/server.rb:199:in `app'
2014-05-26T19:10:44.656865+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.4/lib/rails/commands.rb:76:in `block in <top (required)>'
2014-05-26T19:10:44.656858+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.4/lib/rails/commands/server.rb:48:in `app'
2014-05-26T19:10:44.656863+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.4/lib/rails/commands/server.rb:75:in `start'
2014-05-26T19:10:44.656849+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/builder.rb:49:in `new_from_string'
2014-05-26T19:10:44.656853+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/server.rb:277:in `build_app_and_options_from_config'
2014-05-26T19:10:44.656868+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.4/lib/rails/commands.rb:71:in `tap'
2014-
05-26T19:10:44.656874+00:00 app[web.1]: from bin/rails:4:in `require'
2014-05-26T19:10:44.656871+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.4/lib/rails/commands.rb:71:in `<top (required)>'
2014-05-26T19:10:44.656876+00:00 app[web.1]: from bin/rails:4:in `<main>'
2014-05-26T19:10:45.946278+00:00 heroku[web.1]: State changed from starting to crashed
2014-05-26T19:10:45.929575+00:00 heroku[web.1]: Process exited with status 1
2014-05-26T19:10:46.625585+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/ host=blooming-oasis-2511.herokuapp.com request_id=29e6696b-a46e-4c4a-953a-705be6433c04 fwd="174.63.108.142" dyno= connect= service= status=503 bytes=
2014-05-26T19:10:46.819047+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/favicon.ico host=blooming-oasis-2511.herokuapp.com request_id=feac7669-3457-44cb-97dc-530c966d2035 fwd="174.63.108.142" dyno= connect= service= status=503 bytes=
2014-05-26T19:10:47.613193+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/ host=blooming-oasis-2511.herokuapp.com request_id=70c18b6d-6456-4a80-bc8f-2d1a72dfb963 fwd="174.63.108.142" dyno= connect= service= status=503 bytes=
2014-05-26T19:10:47.773819+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/favicon.ico host=blooming-oasis-2511.herokuapp.com request_id=0b4f8526-5665-46a9-b5ae-2689ea756bee fwd="174.63.108.142" dyno= connect= service= status=503 bytes=
2014-05-26T19:12:28.143417+00:00 heroku[web.1]: State changed from crashed to starting
2014-05-26T19:12:34.708530+00:00 app[web.1]: => Booting WEBrick
2014-05-26T19:12:34.708553+00:00 app[web.1]: => Run `rails server -h` for more startup options
2014-05-26T19:12:34.708551+00:00 app[web.1]: => Rails 4.0.4 application starting in production on http://0.0.0.0:12264
2014-05-26T19:12:34.708554+00:00 app[web.1]: => Ctrl-C to shutdown server
2014-05-26T19:12:34.709422+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.4/lib/active_support/dependencies.rb:214:in `load_dependency'
2014-05-26T19:12:34.708556+00:00 app[web.1]: Exiting
2014-05-26T19:12:34.709430+00:00 app[web.1]: from /app/app/models/routine.rb:3:in `<class:Routine>'
2014-05-26T19:12:34.709414+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.4/lib/active_support/dependencies.rb:229:in `require': No such file to load -- CSV (LoadError)
2014-05-26T19:12:34.709426+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.4/lib/active_support/dependencies.rb:229:in `require'
2014-05-26T19:12:34.709435+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.4/lib/active_support/dependencies.rb:229:in `require'
2014-05-26T19:12:34.709419+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.4/lib/active_support/dependencies.rb:229:in `block in require'
2014-05-26T19:12:34.709433+00:00 app[web.1]: from /app/app/models/routine.rb:1:in `<top (required)>'
2014-05-26T19:12:34.709447+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.4/lib/active_support/dependencies.rb:330:in `require_or_load'
2014-05-26T19:12:34.709439+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.4/lib/active_support/dependencies.rb:229:in `block in require'
2014-05-26T19:12:34.709442+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.4/lib/active_support/dependencies.rb:214:in `load_dependency'
2014-05-26T19:12:34.709443+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.4/lib/active_support/dependencies.rb:229:in `require'
2014-05-26T19:12:34.709454+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.4/lib/active_support/dependencies.rb:207:in `require_dependency'
2014-05-26T19:12:34.709459+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.4/lib/rails/engine.rb:464:in `each'
2014-05-26T19:12:34.709450+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.4/lib/active_support/dependencies.rb:289:in `depend_on'
2014-05-26T19:12:34.709455+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.4/lib/rails/engine.rb:465:in `block (2 levels) in eager_load!'
2014-05-26T19:12:34.709462+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.4/lib/rails/engine.rb:464:in `block in eager_load!'
2014-05-26T19:12:34.709467+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.4/lib/rails/engine.rb:462:in `eager_load!'
2014-05-26T19:12:34.709466+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.4/lib/rails/engine.rb:462:in `each'
2014-05-26T19:12:34.709486+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/r
ailties-4.0.4/lib/rails/engine.rb:347:in `eager_load!'
2014-05-26T19:12:34.709487+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.4/lib/rails/application/finisher.rb:56:in `each'
2014-05-26T19:12:34.709492+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.4/lib/rails/initializable.rb:30:in `run'
2014-05-26T19:12:34.709489+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.4/lib/rails/application/finisher.rb:56:in `block in <module:Finisher>'
2014-05-26T19:12:34.709490+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.4/lib/rails/initializable.rb:30:in `instance_exec'
2014-05-26T19:12:34.709498+00:00 app[web.1]: from /app/vendor/ruby-2.0.0/lib/ruby/2.0.0/tsort.rb:183:in `block (2 levels) in each_strongly_connected_component'
2014-05-26T19:12:34.709505+00:00 app[web.1]: from /app/vendor/ruby-2.0.0/lib/ruby/2.0.0/tsort.rb:180:in `each'
2014-05-26T19:12:34.709493+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.4/lib/rails/initializable.rb:55:in `block in run_initializers'
2014-05-26T19:12:34.709500+00:00 app[web.1]: from /app/vendor/ruby-2.0.0/lib/ruby/2.0.0/tsort.rb:219:in `each_strongly_connected_component_from'
2014-05-26T19:12:34.709497+00:00 app[web.1]: from /app/vendor/ruby-2.0.0/lib/ruby/2.0.0/tsort.rb:150:in `block in tsort_each'
2014-05-26T19:12:34.709501+00:00 app[web.1]: from /app/vendor/ruby-2.0.0/lib
/ruby/2.0.0/tsort.rb:182:in `block in each_strongly_connected_component'
2014-05-26T19:12:34.709507+00:00 app[web.1]: from /app/vendor/ruby-2.0.0/lib/ruby/2.0.0/tsort.rb:180:in `each_strongly_connected_component'
2014-05-26T19:12:34.709510+00:00 app[web.1]: from /app/vendor/ruby-2.0.0/lib/ruby/2.0.0/tsort.rb:148:in `tsort_each'
2014-05-26T19:12:34.709511+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.4/lib/rails/initializable.rb:54:in `run_initializers'
2014-05-26T19:12:34.709515+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.4/lib/rails/application.rb:215:in `initialize!'
2014-05-26T19:12:34.709520+00:00 app[web.1]: from /app/config/environment.rb:5:in `<top (required)>'
2014-05-26T19:12:34.709525+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.4/lib/active_support/dependencies.rb:229:in `block in require'
2014-05-26T19:12:34.709539+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.4/lib/active_support/dependencies.rb:214:in `load_dependency'
2014-05-26T19:12:34.709543+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.4/lib/active_support/dependencies.rb:229:in `require'
2014-05-26T19:12:34.709516+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.4/lib/rails/railtie/configurable.rb:30:in `method_missing'
2014-05-26T19:12:34.709524+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.4/lib/active_support/dependencies.rb:229:in `require'
2014-05-26T19:12:34.709544+00:00 app[web.1]: from /app/config.ru:3:in `block in <main>'
2014-05-26T19:12:34.709546+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/builder.rb:55:in `instance_eval'
2014-05-26T19:12:34.709552+00:00 app[web.1]: from /app/config.ru:in `<main>'
2014-05-26T19:12:34.709547+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/builder.rb:55:in `initialize'
2014-05-26T19:12:34.709549+00:00 app[web.1]: from /app/config.ru:in `new'
2014-05-26T19:12:34.709554+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/builder.rb:49:in `eval'
2014-05-26T19:12:34.709555+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/builder.rb:49:in `new_from_string'
2014-05-26T19:12:34.709557+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/builder.rb:40:in `parse_file'
2014-05-26T19:12:34.709560+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/server.rb:277:in `build_app_and_options_from_config'
2014-05-26T19:12:34.709561+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/server.rb:199:in `app'
2014-05-26T19:12:34.709565+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.4/lib/rails/commands/server.rb:48:in `app'
2014-05-26T19:12:34.709566+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/server.rb:314:in `wrapped_app'
2014-05-26T19:12:34.709570+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.4/lib/rails/commands/server.rb:75:in `start'
2014-05-26T19:12:34.709573+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.4/lib/rails/commands.rb:76:in `block in <top (required)>'
2014-05-26T19:12:34.709574+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.4/lib/rails/commands.rb:71:in `tap'
2014-05-26T19:12:34.709577+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.4/lib/rails/commands.rb:71:in `<top (required)>'
2014-05-26T19:12:34.709581+00:00 app[web.1]: from bin/rails:4:in `require'
2014-05-26T19:12:34.709582+00:00 app[web.1]: from bin/rails:4:in `<main>'
2014-05-26T19:12:36.001937+00:00 heroku[web.1]: Process exited with status 1
2014-05-26T19:12:31.343471+00:00 heroku[web.1]: Starting process with command `bin/rails server -p 12264 -e production`
2014-05-26T19:12:36.020407+00:00 heroku[web.1]: State changed from starting to crashed
2014-05-26T19:13:13.698282+00:00 heroku[api]: Scale to web=1 by XXXX.com
2014-05-26T19:13:52.874579+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/ host=blooming-oasis-2511.herokuapp.com request_id=1a74949c-f1a2-4b46-b368-3a8cf727ca96 fwd="174.63.108.142" dyno= connect= service= status=503 bytes=
2014-05-26T19:13:53.254490+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/favicon.ico host=blooming-oasis-2511.herokuapp.com request_id=136316e5-3f0b-4cb4-89c3-351f2427730a fwd="174.63.108.142" dyno= connect= service= status=503 bytes=
我已经搜索了所有其他Stack帖子,但仍然无法弄清楚什么是错误的。它再次适用于我的本地环境。这是git repository
任何帮助都会非常感激。
答案 0 :(得分:1)
您require 'csv'
模型第3行的Routine
似乎失败了。