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: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: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: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: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: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: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: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: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: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: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: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: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: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: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: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: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: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: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: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: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: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: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: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: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: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: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: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: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: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: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: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: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: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: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: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:in service' 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:in run' 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: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: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: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: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: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: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: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: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: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: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: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: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: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: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: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: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: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: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: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: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: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: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: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: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: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: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: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: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: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: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: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: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: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: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: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: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: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:in
service’
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:in
run’
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:in
start’
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