Errno::ENOENT in RecipeController#new

I’m brand new to Rails and I’m trying to work through the ONLamp.com
Rolling with Ruby on Rails tutorial.

I’m trying to connect to my mysql database and I’m getting the
following:

Errno::ENOENT in RecipeController#new

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

RAILS_ROOT: /home/jason/rails/cookbook/public/…/config/…
Application Trace | Framework Trace | Full Trace

Request

Parameters: None

Show session dump


Response
Headers: {“cookie”=>[], “Cache-Control”=>“no-cache”}

Any help on guidance is greatly appreciated!!!

On Fri, Jul 07, 2006 at 06:51:39AM +0200, jmvbxx wrote:

I’m brand new to Rails and I’m trying to work through the ONLamp.com
Rolling with Ruby on Rails tutorial.

I’m trying to connect to my mysql database and I’m getting the
following:

Errno::ENOENT in RecipeController#new

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

MySQL thinks your database socket is somewhere other than where it is.
There’s examples of how to specify the socket location in
config/database.yml, or you can just switch to using SQLite3 while
you’re
starting off. If you want to do that, you can just replace your
existing
development stanza with this:

development:
adapter: sqlite3
dbfile: db/devel

And make sure you’ve got the SQLite3 ruby library and the sqlite3
command
line tool available.

  • Matt

Matthew P. wrote:

MySQL thinks your database socket is somewhere other than where it is.
There’s examples of how to specify the socket location in
config/database.yml, or you can just switch to using SQLite3 while
you’re
starting off.

Thank you so much for your post!

I realized that I never installed the the mysql driver thru gem:

gem install mysql

Based on your response, I’m going to guess that this is my problem!

Thank you!

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs