I am rather new to Ruby and have been following along with the book \"Ruby On Rails 3 Tutorial - Learn Ruby by Example - by Michael Hartl\". I am currently in Chapter 3 whic
i am new to it but this might be pretty helpful(if you are in development just check development leave production and test environments):
Create a database and give it a name.
Open up .config/database.yml
adapter: mysql2
database: specify_your_newly_created_database #check if its automatically updated or not
pool: 5
username: your designated username.
password: your designated password.
host: localhost
$ rails server
=> Booting WEBrick
=> Rails 3.2.9 application starting in development on http:// 0. 0. 0 .0 :3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
[2012-12-12 23:31:50] INFO WEBrick 1.3.1
[2012-12-12 23:31:50] INFO ruby 1.9.3 (2012-11-10) [i386-mingw32]
[2012-12-12 23:31:50] INFO WEBrick::HTTPServer#start: pid=4068 port=3000
Started GET "/demo/index" for 127.0.0.1 at 2012-12-12 23:32:40 +0545
Connecting to database specified by database.yml
Processing by DemoController#index as HTML
Rendered demo/index.html.erb within layouts/application (0.0ms)
Compiled demo.css (46ms) (pid 4068)
and so on...........
if your'e just trying to solve the ActiceRecord then this will solve the problem and display your first hello page. This is the problem that occurs sometime since rails searches for the database though we have nothing to do with database when dealing with the first hello page, so just check it once if not the we will solve it together. Cheers!