2013-09-27 99 views
0
(1.1ms) BEGIN 
    SQL (1.4ms) INSERT INTO "table" ("somedata") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18) RETURNING (OTHER PROPRIETARY DATA) 
    (1.0ms) ROLLBACK 
Errno::ECONNREFUSED: Connection refused - connect(2) 
    from /app/vendor/ruby-2.0.0/lib/ruby/2.0.0/net/http.rb:878:in `initialize' 
    from /app/vendor/ruby-2.0.0/lib/ruby/2.0.0/net/http.rb:878:in `open' 
    from /app/vendor/ruby-2.0.0/lib/ruby/2.0.0/net/http.rb:878:in `block in connect' 
    from /app/vendor/ruby-2.0.0/lib/ruby/2.0.0/timeout.rb:52:in `timeout' 
    from /app/vendor/ruby-2.0.0/lib/ruby/2.0.0/net/http.rb:877:in `connect' 
    from /app/vendor/ruby-2.0.0/lib/ruby/2.0.0/net/http.rb:862:in `do_start' 
    from /app/vendor/ruby-2.0.0/lib/ruby/2.0.0/net/http.rb:851:in `start' 
    from /app/vendor/bundle/ruby/2.0.0/gems/rest-client-1.6.7/lib/restclient/request.rb:172:in `transmit' 
    from /app/vendor/bundle/ruby/2.0.0/gems/rest-client-1.6.7/lib/restclient/request.rb:64:in `execute' 
    from /app/vendor/bundle/ruby/2.0.0/gems/rest-client-1.6.7/lib/restclient/request.rb:33:in `execute' 
    from /app/vendor/bundle/ruby/2.0.0/gems/rest-client-1.6.7/lib/restclient.rb:72:in `post' 
    from /app/vendor/bundle/ruby/2.0.0/gems/tire-0.5.8/lib/tire/http/client.rb:19:in `post' 
    from /app/vendor/bundle/ruby/2.0.0/gems/tire-0.5.8/lib/tire/index.rb:143:in `store' 
    from /app/vendor/bundle/ruby/2.0.0/gems/tire-0.5.8/lib/tire/model/search.rb:148:in `block in update_index' 
    from /app/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.14/lib/active_support/callbacks.rb:403:in `_run__648734676250133765__update_elasticsearch_index__2845407700799110590__callbacks' 
    from /app/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.14/lib/active_support/callbacks.rb:405:in `__run_callback' 
... 10 levels... 
    from /app/vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.14/lib/active_record/validations.rb:50:in `save' 
    from /app/vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.14/lib/active_record/attribute_methods/dirty.rb:22:in `save' 
    from /app/vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.14/lib/active_record/transactions.rb:259:in `block (2 levels) in save' 
    from /app/vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.14/lib/active_record/transactions.rb:313:in `block in with_transaction_returning_status' 
    from /app/vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.14/lib/active_record/connection_adapters/abstract/database_statements.rb:192:in `transaction' 
    from /app/vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.14/lib/active_record/transactions.rb:208:in `transaction' 
    from /app/vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.14/lib/active_record/transactions.rb:311:in `with_transaction_returning_status' 
    from /app/vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.14/lib/active_record/transactions.rb:259:in `block in save' 
    from /app/vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.14/lib/active_record/transactions.rb:270:in `rollback_active_record_state!' 
    from /app/vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.14/lib/active_record/transactions.rb:258:in `save' 
    from (irb):10 
    from /app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.14/lib/rails/commands/console.rb:47:in `start' 
    from /app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.14/lib/rails/commands/console.rb:8:in `start' 
    from /app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.14/lib/rails/commands.rb:41:in `<top (required)>' 
    from script/rails:6:in `require' 

當我嘗試保存從heroku run console數據庫會出現此錯誤......所以基本上我可以讀取數據得很好,但不能寫我很迷茫任何幫助的任何數據?我可以包括任何必要的東西 - 包括我的database.yml文件...的Heroku Postgres數據庫 - 連接被拒絕

回答

1

它看起來像事情正在遇到輪胎寶石內的問題。我的猜測是,Tire正嘗試使用關於您正在更新的模型的索引數據來更新ElasticSearch。你有沒有配置ES並在你的應用程序中正常工作?

+0

這是錯誤......事實證明,我沒有在heroku上設置盆景。我有ES本地設置,但不是在服務器上。感謝您的答覆! – user2825115