我的部署有什么问题?在heroku上使用sunspot_rails gem进行全文搜索

时间:2015-08-26 00:16:40

标签: ruby-on-rails heroku sunspot-rails

我有一个简单的博客应用程序,使用sunspot_rails gem进行全文搜索。该应用程序在开发模式下运行良好。所以,我继续在heroku上进行部署。然而,生产中出现了一些错误,我无法弄明白。

当我跑步时:

heroku run rake console

我得到以下日志:

Running `rails console` attached to terminal... up, run.8600
/app/vendor/bundle/ruby/2.0.0/gems/sunspot_rails-1.3.3/lib/sunspot/rails/configuration.rb:297:in `join': no implicit conversion of nil into String (TypeError)
from /app/vendor/bundle/ruby/2.0.0/gems/sunspot_rails-1.3.3/lib/sunspot/rails/configuration.rb:297:in `user_configuration'
from /app/vendor/bundle/ruby/2.0.0/gems/sunspot_rails-1.3.3/lib/sunspot/rails/configuration.rb:281:in `user_configuration_from_key'
from /app/vendor/bundle/ruby/2.0.0/gems/sunspot_rails-1.3.3/lib/sunspot/rails/configuration.rb:256:in `disabled?'
from /app/vendor/bundle/ruby/2.0.0/gems/sunspot_rails-1.3.3/lib/sunspot/rails.rb:30:in `build_session'
from /app/vendor/bundle/ruby/2.0.0/gems/sunspot_rails-1.3.3/lib/sunspot/rails/init.rb:1:in `<top (required)>'
from /app/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.8/lib/active_support/dependencies.rb:229:in `require'
from /app/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.8/lib/active_support/dependencies.rb:229:in `block in require'
from /app/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.8/lib/active_support/dependencies.rb:214:in `load_dependency'
from /app/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.8/lib/active_support/dependencies.rb:229:in `require'
from /app/vendor/bundle/ruby/2.0.0/gems/sunspot_rails-1.3.3/lib/sunspot_rails.rb:11:in `<top (required)>'
from /app/vendor/bundle/ruby/2.0.0/gems/bundler-1.9.7/lib/bundler/runtime.rb:76:in `require'
from /app/vendor/bundle/ruby/2.0.0/gems/bundler-1.9.7/lib/bundler/runtime.rb:76:in `block (2 levels) in require'
from /app/vendor/bundle/ruby/2.0.0/gems/bundler-1.9.7/lib/bundler/runtime.rb:72:in `each'
from /app/vendor/bundle/ruby/2.0.0/gems/bundler-1.9.7/lib/bundler/runtime.rb:72:in `block in require'
from /app/vendor/bundle/ruby/2.0.0/gems/bundler-1.9.7/lib/bundler/runtime.rb:61:in `each'
from /app/vendor/bundle/ruby/2.0.0/gems/bundler-1.9.7/lib/bundler/runtime.rb:61:in `require'
from /app/vendor/bundle/ruby/2.0.0/gems/bundler-1.9.7/lib/bundler.rb:134:in `require'
from /app/config/application.rb:7:in `<top (required)>'
from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.8/lib/rails/commands.rb:60:in `require'
from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.8/lib/rails/commands.rb:60:in `<top (required)>'
from /app/bin/rails:4:in `require'
from /app/bin/rails:4:in `<main>
2015-08-25T22:43:43.579536+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/bundler-1.9.7/lib/bundler/runtime.rb:76:in `block (2 levels) in require'
2015-08-25T22:43:43.579554+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/bundler-1.9.7/lib/bundler/runtime.rb:72:in `each'
2015-08-25T22:43:43.579573+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/bundler-1.9.7/lib/bundler/runtime.rb:72:in `block in require'
2015-08-25T22:43:43.579609+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/bundler-1.9.7/lib/bundler/runtime.rb:61:in `each'
2015-08-25T22:43:43.579629+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/bundler-1.9.7/lib/bundler/runtime.rb:61:in `require'
2015-08-25T22:43:43.579648+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/bundler-1.9.7/lib/bundler.rb:134:in `require'
2015-08-25T22:43:43.579667+00:00 app[web.1]:    from /app/config/application.rb:7:in `<top (required)>'
2015-08-25T22:43:43.579686+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.8/lib/rails/commands.rb:74:in `require'
2015-08-25T22:43:43.579738+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.8/lib/rails/commands.rb:71:in `tap'
2015-08-25T22:43:43.579718+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.8/lib/rails/commands.rb:74:in `block in <top (required)>'
2015-08-25T22:43:43.579757+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.8/lib/rails/commands.rb:71:in `<top (required)>'
2015-08-25T22:43:43.579776+00:00 app[web.1]:    from bin/rails:4:in `require'
2015-08-25T22:43:43.579795+00:00 app[web.1]:    from bin/rails:4:in `<main>'
2015-08-25T22:43:44.646789+00:00 heroku[web.1]: Process exited with status 1
2015-08-25T22:43:44.676708+00:00 heroku[web.1]: State changed from starting to crashed
2015-08-25T23:20:41.563452+00:00 heroku[api]: Attach WEBSOLR resource by sarrmoussa20@yahoo.com
2015-08-25T23:20:41.563568+00:00 heroku[api]: Release v7 created by sarrmoussa20@yahoo.com
2015-08-25T23:20:41.936820+00:00 heroku[web.1]: State changed from crashed to starting
2015-08-25T23:20:55.449181+00:00 heroku[web.1]: Starting process with command `bin/rails server -p 22273 -e production`
2015-08-25T23:21:02.247768+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/sunspot_rails-1.3.3/lib/sunspot/rails/configuration.rb:281:in `user_configuration_from_key'
2015-08-25T23:21:02.247772+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/sunspot_rails-1.3.3/lib/sunspot/rails/init.rb:1:in `<top (required)>'
2015-08-25T23:21:02.247780+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.8/lib/active_support/dependencies.rb:229:in `require'
2015-08-25T23:21:02.247739+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/sunspot_rails-1.3.3/lib/sunspot/rails/configuration.rb:297:in `join': no implicit conversion of nil into String (TypeError)
2015-08-25T23:21:02.247781+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/sunspot_rails-1.3.3/lib/sunspot_rails.rb:11:in `<top (required)>'
2015-08-25T23:21:02.247765+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/sunspot_rails-1.3.3/lib/sunspot/rails/configuration.rb:297:in `user_configuration'
2015-08-25T23:21:02.247769+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/sunspot_rails-1.3.3/lib/sunspot/rails/configuration.rb:256:in `disabled?'
2015-08-25T23:21:02.247771+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/sunspot_rails-1.3.3/lib/sunspot/rails.rb:30:in `build_session'
2015-08-25T23:21:02.247774+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.8/lib/active_support/dependencies.rb:229:in `require'
2015-08-25T23:21:02.247784+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/bundler-1.9.7/lib/bundler/runtime.rb:76:in `block (2 levels) in require'
2015-08-25T23:21:02.247783+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/bundler-1.9.7/lib/bundler/runtime.rb:76:in `require'
2015-08-25T23:21:02.247787+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/bundler-1.9.7/lib/bundler/runtime.rb:72:in `block in require'
2015-08-25T23:21:02.247785+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/bundler-1.9.7/lib/bundler/runtime.rb:72:in `each'
2015-08-25T23:21:02.247790+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/bundler-1.9.7/lib/bundler/runtime.rb:61:in `each'
2015-08-25T23:21:02.247791+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/bundler-1.9.7/lib/bundler/runtime.rb:61:in `require'
2015-08-25T23:21:02.247793+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/bundler-1.9.7/lib/bundler.rb:134:in `require'
2015-08-25T23:21:02.247797+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.8/lib/rails/commands.rb:74:in `require'
2015-08-25T23:21:02.247799+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.8/lib/rails/commands.rb:74:in `block in <top (required)>'
2015-08-25T23:21:02.247800+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.8/lib/rails/commands.rb:71:in `tap'
2015-08-25T23:21:02.247794+00:00 app[web.1]:    from /app/config/application.rb:7:in `<top (required)>'
2015-08-25T23:21:02.247803+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.8/lib/rails/commands.rb:71:in `<top (required)>'
2015-08-25T23:21:02.247805+00:00 app[web.1]:    from bin/rails:4:in `require'
2015-08-25T23:21:02.247808+00:00 app[web.1]:    from bin/rails:4:in `<main>'
2015-08-25T23:21:02.247775+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.8/lib/active_support/dependencies.rb:229:in `block in require'
2015-08-25T23:21:02.247776+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.8/lib/active_support/dependencies.rb:214:in `load_dependency'
2015-08-25T23:21:03.229459+00:00 heroku[web.1]: State changed from starting to crashed
2015-08-25T23:21:03.229459+00:00 heroku[web.1]: State changed from crashed to starting
2015-08-25T23:21:03.216723+00:00 heroku[web.1]: Process exited with status 1
2015-08-25T23:21:09.602918+00:00 heroku[web.1]: Starting process with command `bin/rails server -p 13571 -e production`
2015-08-25T23:21:14.306158+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/sunspot_rails-1.3.3/lib/sunspot/rails/configuration.rb:297:in `user_configuration'
2015-08-25T23:21:14.306178+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/bundler-1.9.7/lib/bundler/runtime.rb:76:in `require'
2015-08-25T23:21:14.306194+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.8/lib/rails/commands.rb:71:in `tap'
2015-08-25T23:21:14.306137+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/sunspot_rails-1.3.3/lib/sunspot/rails/configuration.rb:297:in `join': no implicit conversion of nil into String (TypeError)
2015-08-25T23:21:14.306176+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/sunspot_rails-1.3.3/lib/sunspot_rails.rb:11:in `<top (required)>'
2015-08-25T23:21:14.306193+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.8/lib/rails/commands.rb:74:in `block in <top (required)>'
2015-08-25T23:21:14.306164+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/sunspot_rails-1.3.3/lib/sunspot/rails/configuration.rb:281:in `user_configuration_from_key'
2015-08-25T23:21:14.306179+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/bundler-1.9.7/lib/bundler/runtime.rb:76:in `block (2 levels) in require'
2015-08-25T23:21:14.306195+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.8/lib/rails/commands.rb:71:in `<top (required)>'
2015-08-25T23:21:14.306166+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/sunspot_rails-1.3.3/lib/sunspot/rails/configuration.rb:256:in `disabled?'
2015-08-25T23:21:14.306180+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/bundler-1.9.7/lib/bundler/runtime.rb:72:in `each'
2015-08-25T23:21:14.306197+00:00 app[web.1]:    from bin/rails:4:in `require'
2015-08-25T23:21:14.306168+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/sunspot_rails-1.3.3/lib/sunspot/rails.rb:30:in `build_session'
2015-08-25T23:21:14.306182+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/bundler-1.9.7/lib/bundler/runtime.rb:72:in `block in require'
2015-08-25T23:21:14.306198+00:00 app[web.1]:    from bin/rails:4:in `<main>'
2015-08-25T23:21:14.306171+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.8/lib/active_support/dependencies.rb:229:in `require'
2015-08-25T23:21:14.306185+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/bundler-1.9.7/lib/bundler/runtime.rb:61:in `require'
2015-08-25T23:21:14.306169+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/sunspot_rails-1.3.3/lib/sunspot/rails/init.rb:1:in `<top (required)>'
2015-08-25T23:21:14.306183+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/bundler-1.9.7/lib/bundler/runtime.rb:61:in `each'
2015-08-25T23:21:14.306172+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.8/lib/active_support/dependencies.rb:229:in `block in require'
2015-08-25T23:21:14.306188+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/bundler-1.9.7/lib/bundler.rb:134:in `require'
2015-08-25T23:21:14.306173+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.8/lib/active_support/dependencies.rb:214:in `load_dependency'
2015-08-25T23:21:14.306190+00:00 app[web.1]:    from /app/config/application.rb:7:in `<top (required)>'
2015-08-25T23:21:14.306175+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.8/lib/active_support/dependencies.rb:229:in `require'
2015-08-25T23:21:14.306191+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.8/lib/rails/commands.rb:74:in `require'
2015-08-25T23:21:15.207054+00:00 heroku[web.1]: Process exited with status 1
2015-08-25T23:21:16.134189+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=moussa-simple-rails-blog.herokuapp.com request_id=dc366c4d-46ea-4ff9-aca3-23300655b667 fwd="158.222.193.118" dyno= connect= service= status=503 bytes=
2015-08-25T23:21:16.358726+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=moussa-simple-rails-blog.herokuapp.com request_id=de0db63a-645b-4c26-a3af-58f41b6aa66b fwd="158.222.193.118" dyno= connect= service= status=503 bytes=
2015-08-25T23:21:15.227907+00:00 heroku[web.1]: State changed from starting to crashed
2015-08-25T23:21:46.699099+00:00 heroku[api]: Starting process with command `rails console` by sarrmoussa20@yahoo.com
2015-08-25T23:21:52.671551+00:00 heroku[run.1067]: Awaiting client
2015-08-25T23:21:52.699360+00:00 heroku[run.1067]: Starting process with command `rails console`
2015-08-25T23:21:52.915042+00:00 heroku[run.1067]: State changed from starting to up
2015-08-25T23:21:57.420588+00:00 heroku[run.1067]: State changed from up to complete
2015-08-25T23:21:57.408745+00:00 heroku[run.1067]: Process exited with status 1
2015-08-25T23:32:04.600004+00:00 heroku[api]: Starting process with command `bundle exec rake console` by sarrmoussa20@yahoo.com
2015-08-25T23:32:13.245236+00:00 heroku[run.3036]: Awaiting client
2015-08-25T23:32:13.313682+00:00 heroku[run.3036]: Starting process with command `bundle exec rake console`
2015-08-25T23:32:13.491199+00:00 heroku[run.3036]: State changed from starting to up
2015-08-25T23:32:19.484033+00:00 heroku[run.3036]: Process exited with status 1
2015-08-25T23:32:19.502551+00:00 heroku[run.3036]: State changed from up to complete
2015-08-25T23:38:04.800833+00:00 heroku[api]: Starting process with command `bundle exec rake sunspot:reindex` by sarrmoussa20@yahoo.com
2015-08-25T23:38:13.610208+00:00 heroku[run.5555]: Awaiting client
2015-08-25T23:38:13.648793+00:00 heroku[run.5555]: Starting process with command `bundle exec rake sunspot:reindex`
2015-08-25T23:38:13.810042+00:00 heroku[run.5555]: State changed from starting to up
2015-08-25T23:38:21.272238+00:00 heroku[run.5555]: State changed from up to complete
2015-08-25T23:38:21.257411+00:00 heroku[run.5555]: Process exited with status 1
2015-08-25T23:49:01.120607+00:00 heroku[api]: Starting process with command `rails console` by sarrmoussa20@yahoo.com
2015-08-25T23:49:09.361381+00:00 heroku[run.8600]: Awaiting client
2015-08-25T23:49:09.436570+00:00 heroku[run.8600]: Starting process with command `rails console`
2015-08-25T23:49:09.539804+00:00 heroku[run.8600]: State changed from starting to up
2015-08-25T23:49:16.952477+00:00 heroku[run.8600]: State changed from up to complete
2015-08-25T23:49:16.933842+00:00 heroku[run.8600]: Process exited with status 1

当我运行heroku日志时:

MacBook-Pro:theBlog MS$ heroku logs
2015-08-25T22:43:43.579573+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/bundler-1.9.7/lib/bundler/runtime.rb:72:in `block in require'
2015-08-25T22:43:43.579609+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/bundler-1.9.7/lib/bundler/runtime.rb:61:in `each'
2015-08-25T22:43:43.579629+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/bundler-1.9.7/lib/bundler/runtime.rb:61:in `require'
2015-08-25T22:43:43.579648+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/bundler-1.9.7/lib/bundler.rb:134:in `require'
2015-08-25T22:43:43.579667+00:00 app[web.1]:    from /app/config/application.rb:7:in `<top (required)>'  
2015-08-25T22:43:43.579686+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.8/lib/rails/commands.rb:74:in `require'
2015-08-25T22:43:43.579738+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.8/lib/rails/commands.rb:71:in `tap'
2015-08-25T22:43:43.579718+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.8/lib/rails/commands.rb:74:in `block in <top (required)>'
2015-08-25T22:43:43.579757+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.8/lib/rails/commands.rb:71:in `<top (required)>'
2015-08-25T22:43:43.579776+00:00 app[web.1]:    from bin/rails:4:in `require'
2015-08-25T22:43:43.579795+00:00 app[web.1]:    from bin/rails:4:in `<main>'
2015-08-25T22:43:44.646789+00:00 heroku[web.1]: Process exited with status 1
2015-08-25T22:43:44.676708+00:00 heroku[web.1]: State changed from starting to crashed
2015-08-25T23:20:41.563452+00:00 heroku[api]: Attach WEBSOLR resource by sarrmoussa20@yahoo.com
2015-08-25T23:20:41.563568+00:00 heroku[api]: Release v7 created by sarrmoussa20@yahoo.com
2015-08-25T23:20:41.936820+00:00 heroku[web.1]: State changed from crashed to starting
2015-08-25T23:20:55.449181+00:00 heroku[web.1]: Starting process with command `bin/rails server -p 22273 -e production`
2015-08-25T23:21:02.247768+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/sunspot_rails-1.3.3/lib/sunspot/rails/configuration.rb:281:in `user_configuration_from_key'
2015-08-25T23:21:02.247772+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/sunspot_rails-1.3.3/lib/sunspot/rails/init.rb:1:in `<top (required)>'
2015-08-25T23:21:02.247780+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.8/lib/active_support/dependencies.rb:229:in `require'
2015-08-25T23:21:02.247739+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/sunspot_rails-1.3.3/lib/sunspot/rails/configuration.rb:297:in `join': no implicit conversion of nil into String (TypeError)
2015-08-25T23:21:02.247781+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/sunspot_rails-1.3.3/lib/sunspot_rails.rb:11:in `<top (required)>'
2015-08-25T23:21:02.247765+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/sunspot_rails-1.3.3/lib/sunspot/rails/configuration.rb:297:in `user_configuration'
2015-08-25T23:21:02.247769+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/sunspot_rails-1.3.3/lib/sunspot/rails/configuration.rb:256:in `disabled?'
2015-08-25T23:21:02.247771+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/sunspot_rails-1.3.3/lib/sunspot/rails.rb:30:in `build_session'
2015-08-25T23:21:02.247774+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.8/lib/active_support/dependencies.rb:229:in `require'
2015-08-25T23:21:02.247784+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/bundler-1.9.7/lib/bundler/runtime.rb:76:in `block (2 levels) in require'
2015-08-25T23:21:02.247783+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/bundler-1.9.7/lib/bundler/runtime.rb:76:in `require'
2015-08-25T23:21:02.247787+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/bundler-1.9.7/lib/bundler/runtime.rb:72:in `block in require'
2015-08-25T23:21:02.247785+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/bundler-1.9.7/lib/bundler/runtime.rb:72:in `each'
2015-08-25T23:21:02.247790+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/bundler-1.9.7/lib/bundler/runtime.rb:61:in `each'
2015-08-25T23:21:02.247791+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/bundler-1.9.7/lib/bundler/runtime.rb:61:in `require'
2015-08-25T23:21:02.247793+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/bundler-1.9.7/lib/bundler.rb:134:in `require'
2015-08-25T23:21:02.247797+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.8/lib/rails/commands.rb:74:in `require'
2015-08-25T23:21:02.247799+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.8/lib/rails/commands.rb:74:in `block in <top (required)>'
2015-08-25T23:21:02.247800+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.8/lib/rails/commands.rb:71:in `tap'
2015-08-25T23:21:02.247794+00:00 app[web.1]:    from /app/config/application.rb:7:in `<top (required)>'
2015-08-25T23:21:02.247803+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.8/lib/rails/commands.rb:71:in `<top (required)>'
2015-08-25T23:21:02.247805+00:00 app[web.1]:    from bin/rails:4:in `require'
2015-08-25T23:21:02.247808+00:00 app[web.1]:    from bin/rails:4:in `<main>'
2015-08-25T23:21:02.247775+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.8/lib/active_support/dependencies.rb:229:in `block in require'
2015-08-25T23:21:02.247776+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.8/lib/active_support/dependencies.rb:214:in `load_dependency'
2015-08-25T23:21:03.229459+00:00 heroku[web.1]: State changed from starting to crashed
2015-08-25T23:21:03.229459+00:00 heroku[web.1]: State changed from crashed to starting
2015-08-25T23:21:03.216723+00:00 heroku[web.1]: Process exited with status 1
2015-08-25T23:21:09.602918+00:00 heroku[web.1]: Starting process with command `bin/rails server -p 13571 -e production`
2015-08-25T23:21:14.306158+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/sunspot_rails-1.3.3/lib/sunspot/rails/configuration.rb:297:in `user_configuration'
2015-08-25T23:21:14.306178+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/bundler-1.9.7/lib/bundler/runtime.rb:76:in `require'
2015-08-25T23:21:14.306194+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.8/lib/rails/commands.rb:71:in `tap'
2015-08-25T23:21:14.306137+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/sunspot_rails-1.3.3/lib/sunspot/rails/configuration.rb:297:in `join': no implicit conversion of nil into String (TypeError)
2015-08-25T23:21:14.306176+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/sunspot_rails-1.3.3/lib/sunspot_rails.rb:11:in `<top (required)>'
2015-08-25T23:21:14.306193+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.8/lib/rails/commands.rb:74:in `block in <top (required)>'
2015-08-25T23:21:14.306164+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/sunspot_rails-1.3.3/lib/sunspot/rails/configuration.rb:281:in `user_configuration_from_key'
2015-08-25T23:21:14.306179+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/bundler-1.9.7/lib/bundler/runtime.rb:76:in `block (2 levels) in require'
2015-08-25T23:21:14.306195+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.8/lib/rails/commands.rb:71:in `<top (required)>'
2015-08-25T23:21:14.306166+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/sunspot_rails-1.3.3/lib/sunspot/rails/configuration.rb:256:in `disabled?'
2015-08-25T23:21:14.306180+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/bundler-1.9.7/lib/bundler/runtime.rb:72:in `each'
2015-08-25T23:21:14.306197+00:00 app[web.1]:    from bin/rails:4:in `require'
2015-08-25T23:21:14.306168+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/sunspot_rails-1.3.3/lib/sunspot/rails.rb:30:in `build_session'
2015-08-25T23:21:14.306182+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/bundler-1.9.7/lib/bundler/runtime.rb:72:in `block in require'
2015-08-25T23:21:14.306198+00:00 app[web.1]:    from bin/rails:4:in `<main>'
2015-08-25T23:21:14.306171+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.8/lib/active_support/dependencies.rb:229:in `require'
2015-08-25T23:21:14.306185+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/bundler-1.9.7/lib/bundler/runtime.rb:61:in `require'
2015-08-25T23:21:14.306169+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/sunspot_rails-1.3.3/lib/sunspot/rails/init.rb:1:in `<top (required)>'
2015-08-25T23:21:14.306183+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/bundler-1.9.7/lib/bundler/runtime.rb:61:in `each'
2015-08-25T23:21:14.306172+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.8/lib/active_support/dependencies.rb:229:in `block in require'
2015-08-25T23:21:14.306188+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/bundler-1.9.7/lib/bundler.rb:134:in `require'
2015-08-25T23:21:14.306173+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.8/lib/active_support/dependencies.rb:214:in `load_dependency'
2015-08-25T23:21:14.306190+00:00 app[web.1]:    from /app/config/application.rb:7:in `<top (required)>'
2015-08-25T23:21:14.306175+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.8/lib/active_support/dependencies.rb:229:in `require'
2015-08-25T23:21:14.306191+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.8/lib/rails/commands.rb:74:in `require'
2015-08-25T23:21:15.207054+00:00 heroku[web.1]: Process exited with status 1
2015-08-25T23:21:16.134189+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=moussa-simple-rails-blog.herokuapp.com request_id=dc366c4d-46ea-4ff9-aca3-23300655b667 fwd="158.222.193.118" dyno= connect= service= status=503 bytes=
2015-08-25T23:21:16.358726+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=moussa-simple-rails-blog.herokuapp.com request_id=de0db63a-645b-4c26-a3af-58f41b6aa66b fwd="158.222.193.118" dyno= connect= service= status=503 bytes=
2015-08-25T23:21:15.227907+00:00 heroku[web.1]: State changed from starting to crashed
2015-08-25T23:21:46.699099+00:00 heroku[api]: Starting process with command `rails console` by sarrmoussa20@yahoo.com
2015-08-25T23:21:52.671551+00:00 heroku[run.1067]: Awaiting client
2015-08-25T23:21:52.699360+00:00 heroku[run.1067]: Starting process with command `rails console`
2015-08-25T23:21:52.915042+00:00 heroku[run.1067]: State changed from starting to up
2015-08-25T23:21:57.420588+00:00 heroku[run.1067]: State changed from up to complete
2015-08-25T23:21:57.408745+00:00 heroku[run.1067]: Process exited with status 1
2015-08-25T23:32:04.600004+00:00 heroku[api]: Starting process with command `bundle exec rake console` by sarrmoussa20@yahoo.com
2015-08-25T23:32:13.245236+00:00 heroku[run.3036]: Awaiting client
2015-08-25T23:32:13.313682+00:00 heroku[run.3036]: Starting process with command `bundle exec rake console`
2015-08-25T23:32:13.491199+00:00 heroku[run.3036]: State changed from starting to up
2015-08-25T23:32:19.484033+00:00 heroku[run.3036]: Process exited with status 1
2015-08-25T23:32:19.502551+00:00 heroku[run.3036]: State changed from up to complete
2015-08-25T23:38:04.800833+00:00 heroku[api]: Starting process with command `bundle exec rake sunspot:reindex` by sarrmoussa20@yahoo.com
2015-08-25T23:38:13.610208+00:00 heroku[run.5555]: Awaiting client
2015-08-25T23:38:13.648793+00:00 heroku[run.5555]: Starting process with command `bundle exec rake sunspot:reindex`
2015-08-25T23:38:13.810042+00:00 heroku[run.5555]: State changed from starting to up
2015-08-25T23:38:21.272238+00:00 heroku[run.5555]: State changed from up to complete
2015-08-25T23:38:21.257411+00:00 heroku[run.5555]: Process exited with status 1
2015-08-25T23:49:01.120607+00:00 heroku[api]: Starting process with command `rails console` by sarrmoussa20@yahoo.com
2015-08-25T23:49:09.361381+00:00 heroku[run.8600]: Awaiting client
2015-08-25T23:49:09.436570+00:00 heroku[run.8600]: Starting process with command `rails console`
2015-08-25T23:49:09.539804+00:00 heroku[run.8600]: State changed from starting to up
2015-08-25T23:49:16.952477+00:00 heroku[run.8600]: State changed from up to complete
2015-08-25T23:49:16.933842+00:00 heroku[run.8600]: Process exited with status 1
2015-08-25T23:51:21.238038+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=moussa-simple-rails-blog.herokuapp.com request_id=e607f590-52c7-4e13-b298-f4350d56f082 fwd="158.222.193.118" dyno= connect= service= status=503 bytes=
2015-08-25T23:51:21.350067+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=moussa-simple-rails-blog.herokuapp.com request_id=cd905e22-05e9-408d-b5c3-b672af03f93a fwd="158.222.193.118" dyno= connect= service= status=503 bytes=

2 个答案:

答案 0 :(得分:0)

看起来你正在尝试使用Sunspot gem提供的捆绑Solr实例。由于以下几个原因,这并不适用于Heroku环境:

  1. Dynos无法在任意端口与其他进程进行通信。只有您的web dyno可通过Heroku的路由器在HTTP上路由。尝试绑定到为您的web dyno提供的$PORT env var以外的任何端口都将失败。
  2. 即使你有一个聪明的方法来运行Solr嵌入你的应用程序或作为自己的dyno,Heroku的文件系统是短暂的,你将无法在任何有意义的时间内保留你的索引数据。 / LI>

    这就是为什么Heroku为专业服务创建了Addons marketplace的原因,这些服务可以与在Heroku上运行的应用程序集成。

    对于搜索等专业服务,您需要使用其中一个插件服务。对于Solr,有Websolr个插件。 (披露:我是其创始人之一。)

答案 1 :(得分:0)

首先命令错了。您正在组合2个不同的命令 Heroku运行控制台 和heroku rake rakecommand 现在你想在heroku中使用solr。为此你需要在heroku中配置solr .. Heroku插件可用于solr。 你需要在heroku中启动并重新索引solr 按照命令

Rake sunspot:solr:star
Rake sunspot:solr:reindex