Topic: ActiveRecord::ConnectionNotEstablished

Hi,

I am new rails guy i am getting a problem when i am establishing  a database mysql  connection with rails 3  on window 7. I am getting a error please see below:


ActiveRecord::ConnectionNotEstablished (ActiveRecord::ConnectionNotEstablished):



Rendered C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/actionpack-3.1.0/l
ib/action_dispatch/middleware/templates/rescues/_trace.erb (2.0ms)
Rendered C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/actionpack-3.1.0/l
ib/action_dispatch/middleware/templates/rescues/_request_and_response.erb (54.0m
s)
Rendered C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/actionpack-3.1.0/l
ib/action_dispatch/middleware/templates/rescues/diagnostics.erb within rescues/l
ayout (138.0ms)

I have install gem mysql (2.8.1 x86-mingw32).


So please help me..

Re: ActiveRecord::ConnectionNotEstablished

check config/database.yml

it has all the information needed to log into the database,  is the database name correct,  the login id, the password, etc?

Joe got a job, on the day shift, at the Utility Muffin Research Kitchen, arrogantly twisting the sterile canvas snout of a fully charged icing anointment utensil.

Re: ActiveRecord::ConnectionNotEstablished

Thanks for the feedback.I have checked the database YML file. All the information is correct. Please check below my database yml file. 

# MySQL.  Versions 4.1 and 5.0 are recommended.
#
# Install the MYSQL driver
#   gem install mysql2
#
# Ensure the MySQL gem is defined in your Gemfile
#   gem 'mysql2'
#
# And be sure to use new-style password hashing:
#   http://dev.mysql.com/doc/refman/5.0/en/old-client.html
development:
  adapter: mysql
  encoding: utf8
  reconnect: false
  database: ctfs
  pool: 5
  username: root
  password: root
  host: localhost

# Warning: The database defined as "test" will be erased and
# re-generated from your development database when you run "rake".
# Do not set this db to the same as development or production.
test:
  adapter: mysql
  encoding: utf8
  reconnect: false
  database: ctfs
  pool: 5
  username: root
  password: root
  host: localhost

production:
  adapter: mysql
  encoding: utf8
  reconnect: false
  database: ctfs
  pool: 5   
  username: root
  password: root
  host: localhost

Please help me i am still facing same problem.

Last edited by chandraamit29 (2011-10-04 03:23:11)

Re: ActiveRecord::ConnectionNotEstablished

Hi,

I am using rails 3 on window 7 . I am facing the below problem. So we can not start the development.

Please help me.


Error: [Window Title]
Ruby interpreter (CUI) 1.9.2p290 [i386-mingw32]

[Main Instruction]
Ruby interpreter (CUI) 1.9.2p290 [i386-mingw32] has stopped working

[Content]
Windows can check online for a solution to the problem.

[V] View problem details  [Check online for a solution and close the program] [Close the program]