0

我刚刚在 Heroku 上部署了我的应用程序。我可以访问主页,但是当我创建帐户时出现错误“我们很抱歉,但出了点问题”。在 heroku 控制台中有以下几行:

2013-07-25T14:43:57.205734+00:00 app[web.1]:
2013-07-25T14:43:57.326077+00:00 app[web.1]:
2013-07-25T14:43:57.326077+00:00 app[web.1]:   app/controllers/users_controller.rb:36:in `create'
2013-07-25T14:43:57.326077+00:00 app[web.1]: Errno::ECONNREFUSED (Connection refused - {:data=>"<?xml version=\"1.0\" encoding=\"UTF-8\"?><add><doc><field name=\"id\">User 23</field><field name=\"type\">User</field><field name=\"type\">ActiveRecord::Base</field><field name=\"class_name\">User</field><field name=\"nom_text\">julien</field><field name=\"email_text\">julien@resenders.com</field></doc></add>", :headers=>{"Content-Type"=>"text/xml"}, :method=>:post, :params=>{:wt=>:ruby}, :query=>"wt=ruby", :path=>"update", :uri=>#<URI::HTTP:0x007f987b4c48a0 URL:http://localhost:8080/solr/update?wt=ruby>, :open_timeout=>nil, :read_timeout=>nil, :retry_503=>nil, :retry_after_limit=>nil}):
2013-07-25T14:43:57.337273+00:00 app[web.1]: Processing by UsersController#create as HTML
2013-07-25T14:43:57.326077+00:00 app[web.1]:
2013-07-25T14:43:57.326077+00:00 app[web.1]:
2013-07-25T14:43:57.337273+00:00 app[web.1]: Completed 500 Internal Server Error in 850ms
2013-07-25T14:43:57.337273+00:00 app[web.1]:   Parameters: {"utf8"=>"???", "authenticity_token"=>"gdLt0F1TJi+GaFCe8sFFKRikXgAEEnW6DmIyPbLeCa4=", "user"=>{"nom"=>"julien", "email"=>"julien@resenders.com", "password"=>"[FILTERED]", "password_confirmation"=>"[FILTERED]", "resender"=>"0", "gang_id"=>"1", "addresses_attributes"=>{"0"=>{"first_name"=>"L", "last_name"=>"L"}}}, "commit"=>"Inscription"}
2013-07-25T14:43:57.337273+00:00 app[web.1]:   Rendered devise/mailer/confirmation_instructions.html.erb (1.3ms)
2013-07-25T14:43:57.344954+00:00 heroku[router]: at=info method=POST path=/users host=www.resenders.com fwd="37.58.138.20" dyno=web.1 connect=4ms service=930ms status=500 bytes=643

我用“rake sunspot:solr:run”在本地解决了这个问题,但即使“heroku run rake sunspot:solr:run”似乎有效,它也不能解决 Heroku 上的这个问题。我能怎么做 ?也许与 Websolr ?提前谢谢你们!

4

1 回答 1

0

4 建议:

  • 确保您的服务器正在运行

  • 确保您的路线设置正确

  • 将 websolr 添加到您的 heroku 堆栈中 --> https://devcenter.heroku.com/articles/websolr

  • 将代码粘贴到互联网时,请务必始终删除个人数据

于 2013-07-25T15:40:41.900 回答