how to solve ActiveRecord::ConnectionNotEstablished

im using mysql as a database

**im getting the error which says that **

ActiveRecord::ConnectionNotEstablished in GreetingsController#index


Rails.root: C:/railsdev/hello

Application Trace | Framework Trace | Full Trace

app/controllers/greetings_controller.rb:7:in `index'

**please assist me with this.**



Is your database.yml file set up? You have created the DB and ran migrations?

yes. database.yml file is ok…

even i can run the rake db:create and rake db:migrate commands with zero errors…

wat can be the problem?


What is on line 7 of this file ? B.

In fact show us from the start of file to the end of that action, and also the model file (presumably greetings.rb). Strip out irrelevant methods from there if it is big.