[Newbie] Errno::ECONNREFUSED

Hello-

Just trying to get a basic CRUD going using the sample database on XP
system. I have edited my database.yml file as follows:

development:
adapter: mysql
database: sample
username: app
password: app
host: localhost

When I try to connect I get the following:

Errno::ECONNREFUSED in TestController#index
Connection refused
RAILS_ROOT: script/…/config/…

Application Trace | Framework Trace | Full Trace

C:/Program Files/NetBeans 6.0 M9/ruby1/jruby-0.9.8/lib/ruby/gems/1.8/
gems/activerecord-1.15.3/lib/active_record/vendor/mysql.rb:111:in
new' C:/Program Files/NetBeans 6.0 M9/ruby1/jruby-0.9.8/lib/ruby/gems/1.8/ gems/activerecord-1.15.3/lib/active_record/vendor/mysql.rb:111:inreal_connect’
C:/Program Files/NetBeans 6.0 M9/ruby1/jruby-0.9.8/lib/ruby/gems/1.8/
gems/activerecord-1.15.3/lib/active_record/connection_adapters/
mysql_adapter.rb:389:in connect' C:/Program Files/NetBeans 6.0 M9/ruby1/jruby-0.9.8/lib/ruby/gems/1.8/ gems/activerecord-1.15.3/lib/active_record/connection_adapters/ mysql_adapter.rb:152:ininitialize’
C:/Program Files/NetBeans 6.0 M9/ruby1/jruby-0.9.8/lib/ruby/gems/1.8/
gems/activerecord-1.15.3/lib/active_record/connection_adapters/
mysql_adapter.rb:82:in new' C:/Program Files/NetBeans 6.0 M9/ruby1/jruby-0.9.8/lib/ruby/gems/1.8/ gems/activerecord-1.15.3/lib/active_record/connection_adapters/ mysql_adapter.rb:82:inmysql_connection’
C:/Program Files/NetBeans 6.0 M9/ruby1/jruby-0.9.8/lib/ruby/gems/1.8/
gems/activerecord-1.15.3/lib/active_record/connection_adapters/
abstract/connection_specification.rb:262:in send' C:/Program Files/NetBeans 6.0 M9/ruby1/jruby-0.9.8/lib/ruby/gems/1.8/ gems/activerecord-1.15.3/lib/active_record/connection_adapters/ abstract/connection_specification.rb:262:inconnection=’
C:/Program Files/NetBeans 6.0 M9/ruby1/jruby-0.9.8/lib/ruby/gems/1.8/
gems/activerecord-1.15.3/lib/active_record/query_cache.rb:54:in
connection=' C:/Program Files/NetBeans 6.0 M9/ruby1/jruby-0.9.8/lib/ruby/gems/1.8/ gems/activerecord-1.15.3/lib/active_record/connection_adapters/ abstract/connection_specification.rb:230:inretrieve_connection’
C:/Program Files/NetBeans 6.0 M9/ruby1/jruby-0.9.8/lib/ruby/gems/1.8/
gems/activerecord-1.15.3/lib/active_record/connection_adapters/
abstract/connection_specification.rb:78:in connection' C:/Program Files/NetBeans 6.0 M9/ruby1/jruby-0.9.8/lib/ruby/gems/1.8/ gems/activerecord-1.15.3/lib/active_record/base.rb:763:incolumns’
C:/Program Files/NetBeans 6.0 M9/ruby1/jruby-0.9.8/lib/ruby/gems/1.8/
gems/activerecord-1.15.3/lib/active_record/calculations.rb:257:in
column_for' C:/Program Files/NetBeans 6.0 M9/ruby1/jruby-0.9.8/lib/ruby/gems/1.8/ gems/activerecord-1.15.3/lib/active_record/calculations.rb:116:incalculate’
C:/Program Files/NetBeans 6.0 M9/ruby1/jruby-0.9.8/lib/ruby/gems/1.8/
gems/activerecord-1.15.3/lib/active_record/calculations.rb:45:in
count' C:/Program Files/NetBeans 6.0 M9/ruby1/jruby-0.9.8/lib/ruby/gems/1.8/ gems/actionpack-1.13.3/lib/action_controller/pagination.rb:176:incount_collection_for_pagination’
C:/Program Files/NetBeans 6.0 M9/ruby1/jruby-0.9.8/lib/ruby/gems/1.8/
gems/actionpack-1.13.3/lib/action_controller/pagination.rb:197:in
paginator_and_collection_for' C:/Program Files/NetBeans 6.0 M9/ruby1/jruby-0.9.8/lib/ruby/gems/1.8/ gems/actionpack-1.13.3/lib/action_controller/pagination.rb:130:inpaginate’
C:/Program Files/NetBeans 6.0 M9/ruby1/jruby-0.9.8/lib/ruby/gems/1.8/
gems/actionpack-1.13.3/lib/action_controller/scaffolding.rb:7:in
list' C:/Program Files/NetBeans 6.0 M9/ruby1/jruby-0.9.8/lib/ruby/gems/1.8/ gems/actionpack-1.13.3/lib/action_controller/scaffolding.rb:2:inindex’
C:/Program Files/NetBeans 6.0 M9/ruby1/jruby-0.9.8/lib/ruby/gems/1.8/
gems/actionpack-1.13.3/lib/action_controller/base.rb:1095:in send' C:/Program Files/NetBeans 6.0 M9/ruby1/jruby-0.9.8/lib/ruby/gems/1.8/ gems/actionpack-1.13.3/lib/action_controller/base.rb:1095:inperform_action’
C:/Program Files/NetBeans 6.0 M9/ruby1/jruby-0.9.8/lib/ruby/gems/1.8/
gems/actionpack-1.13.3/lib/action_controller/filters.rb:631:in
call_filter' C:/Program Files/NetBeans 6.0 M9/ruby1/jruby-0.9.8/lib/ruby/gems/1.8/ gems/actionpack-1.13.3/lib/action_controller/filters.rb:635:incall_filter’
C:/Program Files/NetBeans 6.0 M9/ruby1/jruby-0.9.8/lib/ruby/gems/1.8/
gems/actionpack-1.13.3/lib/action_controller/filters.rb:619:in
perform_action_with_filters' C:/Program Files/NetBeans 6.0 M9/ruby1/jruby-0.9.8/lib/ruby/gems/1.8/ gems/actionpack-1.13.3/lib/action_controller/benchmarking.rb:65:inperform_action_with_benchmark’
C:/Program Files/NetBeans 6.0 M9/ruby1/jruby-0.9.8/lib/ruby/gems/1.8/
gems/actionpack-1.13.3/lib/action_controller/rescue.rb:83:in measure' C:/Program Files/NetBeans 6.0 M9/ruby1/jruby-0.9.8/lib/ruby/gems/1.8/ gems/actionpack-1.13.3/lib/action_controller/benchmarking.rb:66:inperform_action_with_benchmark’
C:/Program Files/NetBeans 6.0 M9/ruby1/jruby-0.9.8/lib/ruby/gems/1.8/
gems/actionpack-1.13.3/lib/action_controller/rescue.rb:83:in
perform_action_with_rescue' C:/Program Files/NetBeans 6.0 M9/ruby1/jruby-0.9.8/lib/ruby/gems/1.8/ gems/actionpack-1.13.3/lib/action_controller/base.rb:431:insend’
C:/Program Files/NetBeans 6.0 M9/ruby1/jruby-0.9.8/lib/ruby/gems/1.8/
gems/actionpack-1.13.3/lib/action_controller/base.rb:431:in process' C:/Program Files/NetBeans 6.0 M9/ruby1/jruby-0.9.8/lib/ruby/gems/1.8/ gems/actionpack-1.13.3/lib/action_controller/filters.rb:624:inprocess_with_filters’
C:/Program Files/NetBeans 6.0 M9/ruby1/jruby-0.9.8/lib/ruby/gems/1.8/
gems/actionpack-1.13.3/lib/action_controller/session_management.rb:
114:in process_with_session_management_support' C:/Program Files/NetBeans 6.0 M9/ruby1/jruby-0.9.8/lib/ruby/gems/1.8/ gems/actionpack-1.13.3/lib/action_controller/base.rb:330:inprocess’
C:/Program Files/NetBeans 6.0 M9/ruby1/jruby-0.9.8/lib/ruby/gems/1.8/
gems/rails-1.2.3/lib/dispatcher.rb:41:in dispatch' C:/Program Files/NetBeans 6.0 M9/ruby1/jruby-0.9.8/lib/ruby/gems/1.8/ gems/rails-1.2.3/lib/webrick_server.rb:118:inhandle_dispatch’
C:/Program Files/NetBeans 6.0 M9/ruby1/jruby-0.9.8/lib/ruby/gems/1.8/
gems/rails-1.2.3/lib/webrick_server.rb:81:in service' C:/Program Files/NetBeans 6.0 M9/ruby1/jruby-0.9.8/lib/ruby/1.8/ webrick/httpserver.rb:104:inservice’
C:/Program Files/NetBeans 6.0 M9/ruby1/jruby-0.9.8/lib/ruby/1.8/
webrick/httpserver.rb:65:in run' C:/Program Files/NetBeans 6.0 M9/ruby1/jruby-0.9.8/lib/ruby/1.8/ webrick/server.rb:173:instart_thread’
C:/Program Files/NetBeans 6.0 M9/ruby1/jruby-0.9.8/lib/ruby/1.8/
webrick/server.rb:95:in start' C:/Program Files/NetBeans 6.0 M9/ruby1/jruby-0.9.8/lib/ruby/gems/1.8/ gems/activerecord-1.15.3/lib/active_record/vendor/mysql.rb:111:innew’
C:/Program Files/NetBeans 6.0 M9/ruby1/jruby-0.9.8/lib/ruby/gems/1.8/
gems/activerecord-1.15.3/lib/active_record/vendor/mysql.rb:111:in
real_connect' C:/Program Files/NetBeans 6.0 M9/ruby1/jruby-0.9.8/lib/ruby/gems/1.8/ gems/activerecord-1.15.3/lib/active_record/connection_adapters/ mysql_adapter.rb:389:inconnect’
C:/Program Files/NetBeans 6.0 M9/ruby1/jruby-0.9.8/lib/ruby/gems/1.8/
gems/activerecord-1.15.3/lib/active_record/connection_adapters/
mysql_adapter.rb:152:in initialize' C:/Program Files/NetBeans 6.0 M9/ruby1/jruby-0.9.8/lib/ruby/gems/1.8/ gems/activerecord-1.15.3/lib/active_record/connection_adapters/ mysql_adapter.rb:82:innew’
C:/Program Files/NetBeans 6.0 M9/ruby1/jruby-0.9.8/lib/ruby/gems/1.8/
gems/activerecord-1.15.3/lib/active_record/connection_adapters/
mysql_adapter.rb:82:in mysql_connection' C:/Program Files/NetBeans 6.0 M9/ruby1/jruby-0.9.8/lib/ruby/gems/1.8/ gems/activerecord-1.15.3/lib/active_record/connection_adapters/ abstract/connection_specification.rb:262:insend’
C:/Program Files/NetBeans 6.0 M9/ruby1/jruby-0.9.8/lib/ruby/gems/1.8/
gems/activerecord-1.15.3/lib/active_record/connection_adapters/
abstract/connection_specification.rb:262:in connection=' C:/Program Files/NetBeans 6.0 M9/ruby1/jruby-0.9.8/lib/ruby/gems/1.8/ gems/activerecord-1.15.3/lib/active_record/query_cache.rb:54:inconnection=’
C:/Program Files/NetBeans 6.0 M9/ruby1/jruby-0.9.8/lib/ruby/gems/1.8/
gems/activerecord-1.15.3/lib/active_record/connection_adapters/
abstract/connection_specification.rb:230:in retrieve_connection' C:/Program Files/NetBeans 6.0 M9/ruby1/jruby-0.9.8/lib/ruby/gems/1.8/ gems/activerecord-1.15.3/lib/active_record/connection_adapters/ abstract/connection_specification.rb:78:inconnection’
C:/Program Files/NetBeans 6.0 M9/ruby1/jruby-0.9.8/lib/ruby/gems/1.8/
gems/activerecord-1.15.3/lib/active_record/base.rb:763:in columns' C:/Program Files/NetBeans 6.0 M9/ruby1/jruby-0.9.8/lib/ruby/gems/1.8/ gems/activerecord-1.15.3/lib/active_record/calculations.rb:257:incolumn_for’
C:/Program Files/NetBeans 6.0 M9/ruby1/jruby-0.9.8/lib/ruby/gems/1.8/
gems/activerecord-1.15.3/lib/active_record/calculations.rb:116:in
calculate' C:/Program Files/NetBeans 6.0 M9/ruby1/jruby-0.9.8/lib/ruby/gems/1.8/ gems/activerecord-1.15.3/lib/active_record/calculations.rb:45:incount’
C:/Program Files/NetBeans 6.0 M9/ruby1/jruby-0.9.8/lib/ruby/gems/1.8/
gems/actionpack-1.13.3/lib/action_controller/pagination.rb:176:in
count_collection_for_pagination' C:/Program Files/NetBeans 6.0 M9/ruby1/jruby-0.9.8/lib/ruby/gems/1.8/ gems/actionpack-1.13.3/lib/action_controller/pagination.rb:197:inpaginator_and_collection_for’
C:/Program Files/NetBeans 6.0 M9/ruby1/jruby-0.9.8/lib/ruby/gems/1.8/
gems/actionpack-1.13.3/lib/action_controller/pagination.rb:130:in
paginate' C:/Program Files/NetBeans 6.0 M9/ruby1/jruby-0.9.8/lib/ruby/gems/1.8/ gems/actionpack-1.13.3/lib/action_controller/scaffolding.rb:7:inlist’
C:/Program Files/NetBeans 6.0 M9/ruby1/jruby-0.9.8/lib/ruby/gems/1.8/
gems/actionpack-1.13.3/lib/action_controller/scaffolding.rb:2:in
index' C:/Program Files/NetBeans 6.0 M9/ruby1/jruby-0.9.8/lib/ruby/gems/1.8/ gems/actionpack-1.13.3/lib/action_controller/base.rb:1095:insend’
C:/Program Files/NetBeans 6.0 M9/ruby1/jruby-0.9.8/lib/ruby/gems/1.8/
gems/actionpack-1.13.3/lib/action_controller/base.rb:1095:in
perform_action' C:/Program Files/NetBeans 6.0 M9/ruby1/jruby-0.9.8/lib/ruby/gems/1.8/ gems/actionpack-1.13.3/lib/action_controller/filters.rb:631:incall_filter’
C:/Program Files/NetBeans 6.0 M9/ruby1/jruby-0.9.8/lib/ruby/gems/1.8/
gems/actionpack-1.13.3/lib/action_controller/filters.rb:635:in
call_filter' C:/Program Files/NetBeans 6.0 M9/ruby1/jruby-0.9.8/lib/ruby/gems/1.8/ gems/actionpack-1.13.3/lib/action_controller/filters.rb:619:inperform_action_with_filters’
C:/Program Files/NetBeans 6.0 M9/ruby1/jruby-0.9.8/lib/ruby/gems/1.8/
gems/actionpack-1.13.3/lib/action_controller/benchmarking.rb:65:in
perform_action_with_benchmark' C:/Program Files/NetBeans 6.0 M9/ruby1/jruby-0.9.8/lib/ruby/gems/1.8/ gems/actionpack-1.13.3/lib/action_controller/rescue.rb:83:inmeasure’
C:/Program Files/NetBeans 6.0 M9/ruby1/jruby-0.9.8/lib/ruby/gems/1.8/
gems/actionpack-1.13.3/lib/action_controller/benchmarking.rb:66:in
perform_action_with_benchmark' C:/Program Files/NetBeans 6.0 M9/ruby1/jruby-0.9.8/lib/ruby/gems/1.8/ gems/actionpack-1.13.3/lib/action_controller/rescue.rb:83:inperform_action_with_rescue’
C:/Program Files/NetBeans 6.0 M9/ruby1/jruby-0.9.8/lib/ruby/gems/1.8/
gems/actionpack-1.13.3/lib/action_controller/base.rb:431:in send' C:/Program Files/NetBeans 6.0 M9/ruby1/jruby-0.9.8/lib/ruby/gems/1.8/ gems/actionpack-1.13.3/lib/action_controller/base.rb:431:inprocess’
C:/Program Files/NetBeans 6.0 M9/ruby1/jruby-0.9.8/lib/ruby/gems/1.8/
gems/actionpack-1.13.3/lib/action_controller/filters.rb:624:in
process_with_filters' C:/Program Files/NetBeans 6.0 M9/ruby1/jruby-0.9.8/lib/ruby/gems/1.8/ gems/actionpack-1.13.3/lib/action_controller/session_management.rb: 114:inprocess_with_session_management_support’
C:/Program Files/NetBeans 6.0 M9/ruby1/jruby-0.9.8/lib/ruby/gems/1.8/
gems/actionpack-1.13.3/lib/action_controller/base.rb:330:in process' C:/Program Files/NetBeans 6.0 M9/ruby1/jruby-0.9.8/lib/ruby/gems/1.8/ gems/rails-1.2.3/lib/dispatcher.rb:41:indispatch’
C:/Program Files/NetBeans 6.0 M9/ruby1/jruby-0.9.8/lib/ruby/gems/1.8/
gems/rails-1.2.3/lib/webrick_server.rb:118:in handle_dispatch' C:/Program Files/NetBeans 6.0 M9/ruby1/jruby-0.9.8/lib/ruby/gems/1.8/ gems/rails-1.2.3/lib/webrick_server.rb:81:inservice’
C:/Program Files/NetBeans 6.0 M9/ruby1/jruby-0.9.8/lib/ruby/1.8/
webrick/httpserver.rb:104:in service' C:/Program Files/NetBeans 6.0 M9/ruby1/jruby-0.9.8/lib/ruby/1.8/ webrick/httpserver.rb:65:inrun’
C:/Program Files/NetBeans 6.0 M9/ruby1/jruby-0.9.8/lib/ruby/1.8/
webrick/server.rb:173:in start_thread' C:/Program Files/NetBeans 6.0 M9/ruby1/jruby-0.9.8/lib/ruby/1.8/ webrick/server.rb:95:instart’
Request
Parameters: None

Show session dump


flash: !map:ActionController::Flash::FlashHash {}

Response
Headers: {“cookie”=>[], “Cache-Control”=>“no-cache”}

Any help on getting me hooked up is appreciated.

Thanks,

Andrew Maddox

On May 25, 2007, at 11:13 AM, andrew maddox wrote:

host: localhost

When I try to connect I get the following:

Errno::ECONNREFUSED in TestController#index
Connection refused
RAILS_ROOT: script/…/config/…

Any help on getting me hooked up is appreciated.

Thanks,

Andrew Maddox

Did you create the database named “sample” that you specified in the
database.yml file?

-Rob

Rob B. http://agileconsultingllc.com
[email protected]

Hello-

I’m using the sample database that came preinstalled with Netbeans.

Thanks,

Andrew

On May 25, 3:29 pm, Rob B. [email protected]

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs