Maintenance app

Hi everyone,

I am new to ruby on rails and I have just started reading “Agile web
development with rails” The first testing pages have worked out fine but
I can not create the maintenance application.

Book says:
we configured our application to be able to connect to the databases.
Time
to write the maintenance app.

depot> ruby script/generate scaffold Product Admin
dependency model
exists app/models/
exists test/unit/
exists test/fixtures/
create app/models/product.rb
create test/unit/product_test.rb
: :
create app/views/admin/show.rhtml
create app/views/admin/new.rhtml
create app/views/admin/edit.rhtml
create app/views/admin/_form.rhtml

When I do the same:

depot$ ruby script/generate scaffold Product Admin
exists app/controllers/
exists app/helpers/
exists app/views/admin
exists test/functional/
dependency model
exists app/models/
exists test/unit/
exists test/fixtures/
identical app/models/product.rb
identical test/unit/product_test.rb
identical test/fixtures/products.yml
No such file or directory - /tmp/mysql.sock

I have tried a couple of times and thats why it says exists but what is
wrong with next sentence?
“No such file or directory - /tmp/mysql.sock”

When I try it out at http://localhost:3000/admin I recieve this:
Recognition failed for “/admin”

Please help!

Looks like either mysql is not running or its setup does not match the
way rails is setup

“No such file or directory - /tmp/mysql.sock” means that it tried to
connect to mysql via that socket but could not
Fred

On Nov 5, 2006, at 1:05 PM, Glenn Glennsson wrote:

Recognition failed for “/admin”

Please help!

What does your database.yml look like? If you have “socket: /tmp/
mysql.sock” then you problem is that file (socket) does not exist…
Find out where your socket is created (look in my.cnf), or just
search for mysql.sock and put the correct value into your database.yml.

mysql.sock is a special type of file (a socket) that ruby is trying
to use to communicate with mysql. There are also other alternate ways
of connecting to mysql, i.e. via tcp/ip.


Craig B.

AIM: kreiggers