Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6841795
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T00:00:40+00:00 2026-05-27T00:00:40+00:00

When I try to seed my application I get the error: No connection could

  • 0

When I try to seed my application I get the error:

No connection could be made because the – target machine actively refused it. – connect(2)

I believe the reason why is because I was having issues with mysql2 so I uninstalled it along with the MySQL 5.5 Servers and then switched to sqlite3. I think the server for mysql2 is running in the background so this could be the issue. How would I fix this? How would I turn off the Mysql2 local host server or whichever server it is that’s causing this issue?

I am running on Windows 7 64-bit.

Rails 3.0.9
SQLite3 1.3.4

Thanks.

Note: I can migrate and drop fine.

Edit:

config/database.yml

# SQLite version 3.x
#   gem install sqlite3
development:
  adapter: sqlite3
  database: db/development.sqlite3
  pool: 5
  timeout: 5000

test:
  adapter: sqlite3
  database: db/test.sqlite3
  pool: 5
  timeout: 5000

production:
  adapter: sqlite3
  database: db/production.sqlite3
  pool: 5
  timeout: 5000

UPDATE:

I tried restarting the PC and also remade my application from scratch, still get the error. Disabled Windows Firewall/Comodo Firewall and tried again, still failure. I did a System Restore but this did not work either.

Here’s the full rake db:seed: https://gist.github.com/1375566


SOLVED:

I have another application I ran rake db:seed in and it worked correctly, so as the accepted answer by clyfe pointed out, Sunspot was the issue. I put together again my application and stopped at adding sunspot and suddenly I got the error:

rake db:seed
(in C:/testagain)
Deleting database now...
rake aborted!
undefined method `searchable' for #<Class:0x52cdca0>

Which means the rake was reading my code inside of my UserPrice model that dealt with Sunspot:

class UserPrice < ActiveRecord::Base
  # Sunspot and Websolr configuration.
  #searchable do
   # text :product_name do
   #   product.name
   # end
 # end
end

I commented this out and was able to seed correctly. Then I went on to try sunspot using these commands in the following order:

rails g sunspot_rails:install
rake sunspot:solr:start (also un-comment model)
rake sunspot:reindex
rails server
rake db:seed

Everything works as it should.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T00:00:40+00:00Added an answer on May 27, 2026 at 12:00 am

    You are using Sunspot for indexing and search as I see from your gist https://gist.github.com/1375566
    Make sure that the Solr server is started before you seed.

    What happens is that:

    • when the model saves
    • it tries to send data to the Solr server for indexing
    • but it cannot connect

    Possible issues:

    • the Solr server is not started
    • the Sunspot Solr connection is not configured corectly in /config/sunspot.yml
    • the port it’s blocked by a firewall

    If you haven’t started a Solr server instance already, you can start the Sunspot-bundled Solr server with the following rake command:

    rake sunspot:solr:start
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Try loading this normal .jpg file in Internet Explorer 6.0. I get an error
Using ruby 1.9.2 and Rails 3 I get an encoding error when I try
Try as I might I cannot get my head around what the IteratorIterator class
Try as I might, I can't get a JNLP file to run locally (via
Try running this in a .VBS file MsgBox(545.14-544.94) You get a neat little answer
Try as I might, I can't get a RegEx to exclude space or single
I've made a NSIS script to create an installer for a Rails application. The
I get this exception thrown whenever I try and submit data through a form
I made this code and i try to test it with minitest, but it
try { ... } catch (SQLException sqle) { String theError = (sqle).getSQLState(); ... }

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.