Hello everyone,
I am getting this database connection error when I run a rake task or
when I try to send with ar_mailer. My app works fine that I know of
but I went to import users into the database and this is what I get.
rake db:load_csv_data --trace
(in /home/greatcar/gcp)
** Invoke db:load_csv_data (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute db:load_csv_data
rake aborted!
Access denied for user ‘root’@‘localhost’ (using password: NO)
/usr/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/
connection_adapters/mysql_adapter.rb:548:in real_connect' /usr/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/ connection_adapters/mysql_adapter.rb:548:in
connect’
/usr/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/
connection_adapters/mysql_adapter.rb:198:in initialize' /usr/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/ connection_adapters/mysql_adapter.rb:74:in
new’
/usr/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/
connection_adapters/mysql_adapter.rb:74:in mysql_connection' /usr/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/ connection_adapters/abstract/connection_pool.rb:223:in
send’
/usr/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/
connection_adapters/abstract/connection_pool.rb:223:in
new_connection' /usr/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/ connection_adapters/abstract/connection_pool.rb:245:in
checkout_new_connection’
/usr/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/
connection_adapters/abstract/connection_pool.rb:188:in checkout' /usr/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/ connection_adapters/abstract/connection_pool.rb:184:in
loop’
/usr/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/
connection_adapters/abstract/connection_pool.rb:184:in checkout' /usr/lib/ruby/1.8/monitor.rb:242:in
synchronize’
/usr/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/
connection_adapters/abstract/connection_pool.rb:183:in checkout' /usr/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/ connection_adapters/abstract/connection_pool.rb:98:in
connection’
/usr/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/
connection_adapters/abstract/connection_pool.rb:326:in
retrieve_connection' /usr/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/ connection_adapters/abstract/connection_specification.rb:121:in
retrieve_connection’
/usr/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/
connection_adapters/abstract/connection_specification.rb:113:in
connection' /usr/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/ base.rb:1220:in
columns’
/usr/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/
base.rb:2839:in attributes_from_column_definition_without_lock' /usr/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/ locking/optimistic.rb:55:in
attributes_from_column_definition’
/usr/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/
base.rb:2279:in initialize' /home/greatcar/gcp/lib/tasks/import.rake:9:in
new’
/home/greatcar/gcp/lib/tasks/import.rake:9
/usr/lib/ruby/gems/1.8/gems/fastercsv-1.4.0/lib/faster_csv.rb:1514:in
each' /usr/lib/ruby/gems/1.8/gems/fastercsv-1.4.0/lib/faster_csv.rb:1017:in
foreach’
/usr/lib/ruby/gems/1.8/gems/fastercsv-1.4.0/lib/faster_csv.rb:1191:in
open' /usr/lib/ruby/gems/1.8/gems/fastercsv-1.4.0/lib/faster_csv.rb:1016:in
foreach’
/home/greatcar/gcp/lib/tasks/import.rake:8
/usr/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:617:in call' /usr/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:617:in
execute’
/usr/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:612:in each' /usr/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:612:in
execute’
/usr/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:578:in
invoke_with_call_chain' /usr/lib/ruby/1.8/monitor.rb:242:in
synchronize’
/usr/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:571:in
invoke_with_call_chain' /usr/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:564:in
invoke’
/usr/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:2019:in
invoke_task' /usr/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:1997:in
top_level’
/usr/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:1997:in each' /usr/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:1997:in
top_level’
/usr/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:2036:in
standard_exception_handling' /usr/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:1991:in
top_level’
/usr/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:1970:in run' /usr/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:2036:in
standard_exception_handling’
/usr/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:1967:in run' /usr/lib/ruby/gems/1.8/gems/rake-0.8.3/bin/rake:31 /usr/local/bin/rake:19:in
load’
/usr/local/bin/rake:19
Thanks for the help,
Sean McGilvray