Forum: Ruby on Rails Problem in Database Connection...

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
449d84cde181c45885fbe3ec2e485d97?d=identicon&s=25 Dhiraj Mundada (dhirajmundada)
on 2007-01-17 12:35
Hi guys,

I have installed rails on my LINUX machine and was following a tutorial
on following link

http://www.onlamp.com/pub/a/onlamp/2005/01/20/rail...

But I was unable to proceed after creating respective tables in MySQL
database.
When I executed command,

ruby script\generate controller Recipe

it worked fine. The next step was to add a line
                scaffold :recipe
to the file recipe_controller.rb . I did that. But when I wrote

          http://localhost:3000/recipe/new
inside my browser window, it gave me an error,

Errno::ENOENT in RecipeController#new

No such file or directory - /tmp/mysql.sock

RAILS_ROOT: script/../config/..

What do I do now????

Thanks & Regards,

Dhiraj Mundada
4375b4aca04b8d72482fd409fb6d0b47?d=identicon&s=25 Roderick van Domburg (Guest)
on 2007-01-17 13:56
(Received via mailing list)
> No such file or directory - /tmp/mysql.sock

Your mysql.sock file may be in a different directory (or even called
differently). Consult your MySQL configuration or use `find / -name
mysql.sock` to find its whereabouts and adjust your config/database.yml
accordingly.

Regards,

Roderick

--
Nedforce Informatica Specialisten B.V.
http://www.nedforce.nl
+31 (0)53 4500225
449d84cde181c45885fbe3ec2e485d97?d=identicon&s=25 Dhiraj Mundada (dhirajmundada)
on 2007-01-17 14:41
Hi Rodrisk,
I found the path to mysql.sock...
It is      /var/lib/mysql/mysql.sock

But I dont know what changes to make to config/database.yml file....

Will you please tell me???

Thanks & Regards..
4375b4aca04b8d72482fd409fb6d0b47?d=identicon&s=25 Roderick van Domburg (Guest)
on 2007-01-17 14:59
(Received via mailing list)
> I found the path to mysql.sock...
> It is      /var/lib/mysql/mysql.sock
>
> But I dont know what changes to make to config/database.yml file....

If you can't find out by yourself, you should consider buying a book
about Rails. You will have many more questions and there's no free
helpdesk.

But here you go:

  socket: /var/lib/mysql/mysql.sock

- Roderick

--
Nedforce Informatica Specialisten B.V.
http://www.nedforce.nl
+31 (0)53 4500225
This topic is locked and can not be replied to.