# Errno::ENOENT in RecipeController#new

**URL:** <https://www.ruby-forum.com/t/errno-enoent-in-recipecontroller-new/97461>\
**Category:** Rails\
**Created:** [July 7, 2006, 6:51am UTC](https://www.ruby-forum.com/t/errno-enoent-in-recipecontroller-new/97461 "2006-07-07T06:51:39Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jmvbxx](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/ed655f/32.png) [@jmvbxx](https://www.ruby-forum.com/u/jmvbxx)\
**Post date:** [July 7, 2006, 6:51am UTC](https://www.ruby-forum.com/t/errno-enoent-in-recipecontroller-new/97461/1 "2006-07-07T06:51:39Z")

</div>

I’m brand new to Rails and I’m trying to work through the [ONLamp.com](http://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!!!

---

<div class="post-metadata">

**Author:** ![jmvbxx](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/ed655f/32.png) [@jmvbxx](https://www.ruby-forum.com/u/jmvbxx)\
**Post date:** [July 7, 2006, 7:30am UTC](https://www.ruby-forum.com/t/errno-enoent-in-recipecontroller-new/97461/2 "2006-07-07T07:30:27Z")

</div>

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](http://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

---

<div class="post-metadata">

**Author:** ![jmvbxx](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/ed655f/32.png) [@jmvbxx](https://www.ruby-forum.com/u/jmvbxx)\
**Post date:** [July 7, 2006, 8:11am UTC](https://www.ruby-forum.com/t/errno-enoent-in-recipecontroller-new/97461/3 "2006-07-07T08:11:20Z")

</div>

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!
