Problem with First Try at Ruby On Rails

Hi There,
I am a complete newbie - just doing the training at Lynda.com. I'm
having a problem with one of the first exercises.

I've installed Ruby, Rails, Ruby Gems, etc. I'm using webrick as my
local webserver. I'm running an exercise where I have a controller
called say_controller with the following content:

You need to install the sqlite3 gem.

   gem install sqlite3

A recent change to Rails changed the default from MySQL to sqlite. If
you don't want to do use sqlite and want to use MySQL, then edit
config/database.yml in your Rails app to work with MySQL, or, even
easier, regenerate your Rails application like so:

   rails your_application -d mysql

--Jeremy

Dude what is the DataBase u using?
It seems u don have a database for this application.
In yr config folder of the application there is a file called
database.yml..
Try to create a database with the name as in the development mode..

From yr log it seems u using sqlite as yr database server..?
Is it so..?

Try this..

Jeremy,

Thanks. I regenerated the application as you suggested - makes
complete sense. Now I am still getting an error. (see below) looks
like it is still having problems accessing the database even though it
knows to look for mysql. Is it expecting a database password??

Mysql::Error in BayController#hello

#28000Access denied for user 'root'@'localhost' (using password: NO)

RAILS_ROOT: /Users/daniel/Sites/my_appp
Application Trace | Framework Trace | Full Trace

/usr/local/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/
vendor/mysql.rb:523:in `read'
/usr/local/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/
vendor/mysql.rb:153:in `real_connect'
/usr/local/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/
connection_adapters/mysql_adapter.rb:471:in `connect'
/usr/local/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/
connection_adapters/mysql_adapter.rb:165:in `initialize'
/usr/local/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/
connection_adapters/mysql_adapter.rb:88:in `new'
/usr/local/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/
connection_adapters/mysql_adapter.rb:88:in `mysql_connection'
/usr/local/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/
connection_adapters/abstract/connection_specification.rb:291:in `send'
/usr/local/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/
connection_adapters/abstract/connection_specification.rb:291:in
`connection='
/usr/local/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/
connection_adapters/abstract/connection_specification.rb:259:in
`retrieve_connection'
/usr/local/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/
connection_adapters/abstract/connection_specification.rb:78:in
`connection'
/usr/local/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/
query_cache.rb:8:in `cache'
/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/
action_controller/caching.rb:677:in `perform_action'
/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/
action_controller/base.rb:524:in `send'
/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/
action_controller/base.rb:524:in `process_without_filters'
/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/
action_controller/filters.rb:685:in
`process_without_session_management_support'
/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/
action_controller/session_management.rb:123:in `process'
/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/
action_controller/base.rb:388:in `process'
/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/
action_controller/dispatcher.rb:171:in `handle_request'
/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/
action_controller/dispatcher.rb:115:in `dispatch'
/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/
action_controller/dispatcher.rb:126:in `dispatch_cgi'
/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/
action_controller/dispatcher.rb:9:in `dispatch'
/usr/local/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/webrick_server.rb:
112:in `handle_dispatch'
/usr/local/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/webrick_server.rb:
78:in `service'
/usr/local/lib/ruby/1.8/webrick/httpserver.rb:104:in `service'
/usr/local/lib/ruby/1.8/webrick/httpserver.rb:65:in `run'
/usr/local/lib/ruby/1.8/webrick/server.rb:173:in `start_thread'
/usr/local/lib/ruby/1.8/webrick/server.rb:162:in `start'
/usr/local/lib/ruby/1.8/webrick/server.rb:162:in `start_thread'
/usr/local/lib/ruby/1.8/webrick/server.rb:95:in `start'
/usr/local/lib/ruby/1.8/webrick/server.rb:92:in `each'
/usr/local/lib/ruby/1.8/webrick/server.rb:92:in `start'
/usr/local/lib/ruby/1.8/webrick/server.rb:23:in `start'
/usr/local/lib/ruby/1.8/webrick/server.rb:82:in `start'
/usr/local/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/webrick_server.rb:
62:in `dispatch'
/usr/local/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/commands/servers/
webrick.rb:66
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`gem_original_require'
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`require'
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/
active_support/dependencies.rb:496:in `require'
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/
active_support/dependencies.rb:342:in `new_constants_in'
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/
active_support/dependencies.rb:496:in `require'
/usr/local/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/commands/server.rb:
39
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`gem_original_require'
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`require'
script/server:3

/usr/local/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/
vendor/mysql.rb:523:in `read'
/usr/local/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/
vendor/mysql.rb:153:in `real_connect'
/usr/local/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/
connection_adapters/mysql_adapter.rb:471:in `connect'
/usr/local/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/
connection_adapters/mysql_adapter.rb:165:in `initialize'
/usr/local/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/
connection_adapters/mysql_adapter.rb:88:in `new'
/usr/local/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/
connection_adapters/mysql_adapter.rb:88:in `mysql_connection'
/usr/local/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/
connection_adapters/abstract/connection_specification.rb:291:in `send'
/usr/local/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/
connection_adapters/abstract/connection_specification.rb:291:in
`connection='
/usr/local/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/
connection_adapters/abstract/connection_specification.rb:259:in
`retrieve_connection'
/usr/local/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/
connection_adapters/abstract/connection_specification.rb:78:in
`connection'
/usr/local/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/
query_cache.rb:8:in `cache'
/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/
action_controller/caching.rb:677:in `perform_action'
/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/
action_controller/base.rb:524:in `send'
/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/
action_controller/base.rb:524:in `process_without_filters'
/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/
action_controller/filters.rb:685:in
`process_without_session_management_support'
/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/
action_controller/session_management.rb:123:in `process'
/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/
action_controller/base.rb:388:in `process'
/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/
action_controller/dispatcher.rb:171:in `handle_request'
/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/
action_controller/dispatcher.rb:115:in `dispatch'
/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/
action_controller/dispatcher.rb:126:in `dispatch_cgi'
/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/
action_controller/dispatcher.rb:9:in `dispatch'
/usr/local/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/webrick_server.rb:
112:in `handle_dispatch'
/usr/local/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/webrick_server.rb:
78:in `service'
/usr/local/lib/ruby/1.8/webrick/httpserver.rb:104:in `service'
/usr/local/lib/ruby/1.8/webrick/httpserver.rb:65:in `run'
/usr/local/lib/ruby/1.8/webrick/server.rb:173:in `start_thread'
/usr/local/lib/ruby/1.8/webrick/server.rb:162:in `start'
/usr/local/lib/ruby/1.8/webrick/server.rb:162:in `start_thread'
/usr/local/lib/ruby/1.8/webrick/server.rb:95:in `start'
/usr/local/lib/ruby/1.8/webrick/server.rb:92:in `each'
/usr/local/lib/ruby/1.8/webrick/server.rb:92:in `start'
/usr/local/lib/ruby/1.8/webrick/server.rb:23:in `start'
/usr/local/lib/ruby/1.8/webrick/server.rb:82:in `start'
/usr/local/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/webrick_server.rb:
62:in `dispatch'
/usr/local/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/commands/servers/
webrick.rb:66
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`gem_original_require'
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`require'
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/
active_support/dependencies.rb:496:in `require'
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/
active_support/dependencies.rb:342:in `new_constants_in'
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/
active_support/dependencies.rb:496:in `require'
/usr/local/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/commands/server.rb:
39
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`gem_original_require'
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`require'
script/server:3

Request

Parameters:

None

Show session dump

check out for your mysql db password and edit the same in database.yml file.

Hi vaibhav,
u need to cahnge the database.yml to the following:
development:
  adapter: sqlite
  database: test_development
  username: root
  password: root
  host: localhost

And dont forget to install the gems for sqlite and
mysql....!.....otherwise this change will still hang u with the error

Vaibhav Pandey wrote:

Thanks everyone,
I will get onto this later tonight. One thing I am REALLY confused
about though. In the exercise I am currently doing on Lynda.com we
have not setup a specific database yet for the exercise. This is
supposed to be an interaction between the browser, controller, and
view module only. The database comes later in the exercise. I don't
understand why I am having a database interaction/problem when I'm not
supposed to be interacting with one yet??

taffyc

Thanks everyone,
I will get onto this later tonight. One thing I am REALLY confused
about though. In the exercise I am currently doing on Lynda.com we
have not setup a specific database yet for the exercise. This is
supposed to be an interaction between the browser, controller, and
view module only. The database comes later in the exercise. I don't
understand why I am having a database interaction/problem when I'm not
supposed to be interacting with one yet??

Short version: because it's trying to setup some databasey things for
you (to be quite precise it's trying to setup the query cache, which
didn't exist in older version of rails, which your tutorial was
probably written for)

Fred

OK. I haven't done anything with sqlite as I am telling rails to use
mysql. Apart from that I have done everything above but it still
doesn't work. heres my current error message below. Any thoughts
before I go buy OS 10.5??

Mysql::Error in BayController#hello

Can't connect to local MySQL server through socket '/tmp/
mysql.sock' (2)

RAILS_ROOT: /Users/daniel/Sites/my_appp
Application Trace | Framework Trace | Full Trace

/usr/local/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/
connection_adapters/mysql_adapter.rb:471:in `real_connect'
/usr/local/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/
connection_adapters/mysql_adapter.rb:471:in `connect'
/usr/local/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/
connection_adapters/mysql_adapter.rb:165:in `initialize'
/usr/local/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/
connection_adapters/mysql_adapter.rb:88:in `new'
/usr/local/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/
connection_adapters/mysql_adapter.rb:88:in `mysql_connection'
/usr/local/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/
connection_adapters/abstract/connection_specification.rb:291:in `send'
/usr/local/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/
connection_adapters/abstract/connection_specification.rb:291:in
`connection='
/usr/local/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/
connection_adapters/abstract/connection_specification.rb:259:in
`retrieve_connection'
/usr/local/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/
connection_adapters/abstract/connection_specification.rb:78:in
`connection'
/usr/local/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/
query_cache.rb:8:in `cache'
/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/
action_controller/caching.rb:677:in `perform_action'
/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/
action_controller/base.rb:524:in `send'
/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/
action_controller/base.rb:524:in `process_without_filters'
/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/
action_controller/filters.rb:685:in
`process_without_session_management_support'
/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/
action_controller/session_management.rb:123:in `process'
/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/
action_controller/base.rb:388:in `process'
/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/
action_controller/dispatcher.rb:171:in `handle_request'
/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/
action_controller/dispatcher.rb:115:in `dispatch'
/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/
action_controller/dispatcher.rb:126:in `dispatch_cgi'
/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/
action_controller/dispatcher.rb:9:in `dispatch'
/usr/local/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/webrick_server.rb:
112:in `handle_dispatch'
/usr/local/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/webrick_server.rb:
78:in `service'
/usr/local/lib/ruby/1.8/webrick/httpserver.rb:104:in `service'
/usr/local/lib/ruby/1.8/webrick/httpserver.rb:65:in `run'
/usr/local/lib/ruby/1.8/webrick/server.rb:173:in `start_thread'
/usr/local/lib/ruby/1.8/webrick/server.rb:162:in `start'
/usr/local/lib/ruby/1.8/webrick/server.rb:162:in `start_thread'
/usr/local/lib/ruby/1.8/webrick/server.rb:95:in `start'
/usr/local/lib/ruby/1.8/webrick/server.rb:92:in `each'
/usr/local/lib/ruby/1.8/webrick/server.rb:92:in `start'
/usr/local/lib/ruby/1.8/webrick/server.rb:23:in `start'
/usr/local/lib/ruby/1.8/webrick/server.rb:82:in `start'
/usr/local/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/webrick_server.rb:
62:in `dispatch'
/usr/local/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/commands/servers/
webrick.rb:66
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`gem_original_require'
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`require'
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/
active_support/dependencies.rb:496:in `require'
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/
active_support/dependencies.rb:342:in `new_constants_in'
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/
active_support/dependencies.rb:496:in `require'
/usr/local/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/commands/server.rb:
39
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`gem_original_require'
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`require'
script/server:3

/usr/local/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/
connection_adapters/mysql_adapter.rb:471:in `real_connect'
/usr/local/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/
connection_adapters/mysql_adapter.rb:471:in `connect'
/usr/local/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/
connection_adapters/mysql_adapter.rb:165:in `initialize'
/usr/local/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/
connection_adapters/mysql_adapter.rb:88:in `new'
/usr/local/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/
connection_adapters/mysql_adapter.rb:88:in `mysql_connection'
/usr/local/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/
connection_adapters/abstract/connection_specification.rb:291:in `send'
/usr/local/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/
connection_adapters/abstract/connection_specification.rb:291:in
`connection='
/usr/local/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/
connection_adapters/abstract/connection_specification.rb:259:in
`retrieve_connection'
/usr/local/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/
connection_adapters/abstract/connection_specification.rb:78:in
`connection'
/usr/local/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/
query_cache.rb:8:in `cache'
/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/
action_controller/caching.rb:677:in `perform_action'
/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/
action_controller/base.rb:524:in `send'
/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/
action_controller/base.rb:524:in `process_without_filters'
/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/
action_controller/filters.rb:685:in
`process_without_session_management_support'
/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/
action_controller/session_management.rb:123:in `process'
/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/
action_controller/base.rb:388:in `process'
/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/
action_controller/dispatcher.rb:171:in `handle_request'
/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/
action_controller/dispatcher.rb:115:in `dispatch'
/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/
action_controller/dispatcher.rb:126:in `dispatch_cgi'
/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/
action_controller/dispatcher.rb:9:in `dispatch'
/usr/local/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/webrick_server.rb:
112:in `handle_dispatch'
/usr/local/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/webrick_server.rb:
78:in `service'
/usr/local/lib/ruby/1.8/webrick/httpserver.rb:104:in `service'
/usr/local/lib/ruby/1.8/webrick/httpserver.rb:65:in `run'
/usr/local/lib/ruby/1.8/webrick/server.rb:173:in `start_thread'
/usr/local/lib/ruby/1.8/webrick/server.rb:162:in `start'
/usr/local/lib/ruby/1.8/webrick/server.rb:162:in `start_thread'
/usr/local/lib/ruby/1.8/webrick/server.rb:95:in `start'
/usr/local/lib/ruby/1.8/webrick/server.rb:92:in `each'
/usr/local/lib/ruby/1.8/webrick/server.rb:92:in `start'
/usr/local/lib/ruby/1.8/webrick/server.rb:23:in `start'
/usr/local/lib/ruby/1.8/webrick/server.rb:82:in `start'
/usr/local/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/webrick_server.rb:
62:in `dispatch'
/usr/local/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/commands/servers/
webrick.rb:66
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`gem_original_require'
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`require'
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/
active_support/dependencies.rb:496:in `require'
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/
active_support/dependencies.rb:342:in `new_constants_in'
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/
active_support/dependencies.rb:496:in `require'
/usr/local/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/commands/server.rb:
39
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`gem_original_require'
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`require'
script/server:3

Request

Parameters:

None

Show session dump

Do a list of your installed gems:

gem list

Make sure mysql is among them. If not, then install the mysql gem doing:

sudo gem install mysql

Check to make sure mysql is running by typing:

mysql

Assuming it is running, type:

status

That should tell you the UNIX socket (normally /tmp/mysql.sock)

Copy that and in your database.yml add the line:

socket: /tmp/mysql.sock

Try again.

OK - thanks. Looks like Mysql had shut down. Here is the latest below
(Do I need to create the database my_appp_development ??):

Mysql::Error in BayController#hello

Unknown database 'my_appp_development'

RAILS_ROOT: /Users/daniel/Sites/my_appp

OK - thanks. Looks like Mysql had shut down. Here is the latest below
(Do I need to create the database my_appp_development ??):

Mysql::Error in BayController#hello

Unknown database 'my_appp_development'

RAILS_ROOT: /Users/daniel/Sites/my_appp

OK - thanks. Looks like Mysql had shut down. Here is the latest below
(Do I need to create the database my_appp_development ??):

Mysql::Error in BayController#hello

Unknown database 'my_appp_development'

RAILS_ROOT: /Users/daniel/Sites/my_appp

Yup.

mysqladmin -uroot create my_appp_development

mysqladmin -uroot create my_appp_test

Lynda.com tutorials are a bit older. You are using Rails 2.0.2 and
there is a change in current version that you must setup a database
before developing your application.

Thank You a thousand times!!!! It works.