I have created a simple application using
rails new simple_cms -d mysql2
After running the WEBRick using command
rails s
I created a controller and view
rails generate controller demo index
When I am pointing my browser to
localhost:3000/demo/index
I am getting error
ActiveRecord::ConnectionNotEstablished
Rails.root: /Users/username/Sites/simple_cms
here is my gemfile
gem 'rails', '3.0.1'
gem 'mysql2', '0.3.11'
You also need to create a MySQL database and configure the connection details in your
config/database.ymlfile.If the username and password in your
database.ymlfile identify a user who has a global CREATE permission on your development database, then you can use the rake taskto get Rails to set up the database.