Connection refused - connect(2) (Errno::ECONNREFUSED)
Asked Answered
S

2

5

I am developing a spree application ,I recently removed and reinstalled ruby 1.9.3, now whenever I try rails s on terminal I get the following error :

/home/swapnil/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/net/http.rb:762:in `initialize': Connection refused - connect(2) (Errno::ECONNREFUSED)

Sohn answered 16/3, 2012 at 7:49 Comment(0)
A
3

You just need configure your Database connection in your database.yml and launch your SQL server with this configuration

Atronna answered 16/3, 2012 at 9:37 Comment(1)
What if it only happens some of the time? For instance, on my local machine I can log in as a registered user and use the app just fine, but I get the Connection refused - connect(2) when I attempt to register a new user. Any thoughts on that?Annulus
H
8

Try this one : rake sunspot:solr:start
Look at this issue.I guess it may be helpful to you.
sunspot_rails gem - " Errno:: ECONNREFUSED (Connection refused - connect (2)) "

Herbie answered 28/3, 2012 at 11:34 Comment(0)
A
3

You just need configure your Database connection in your database.yml and launch your SQL server with this configuration

Atronna answered 16/3, 2012 at 9:37 Comment(1)
What if it only happens some of the time? For instance, on my local machine I can log in as a registered user and use the app just fine, but I get the Connection refused - connect(2) when I attempt to register a new user. Any thoughts on that?Annulus

© 2022 - 2024 — McMap. All rights reserved.