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: <i> 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"} </i> Any help on guidance is greatly appreciated!!! -- Posted via http://www.ruby-forum.com/.
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: > > <i> > Errno::ENOENT in RecipeController#new > > No such file or directory - /tmp/mysql.sockMySQL 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 Palmer 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! -- Posted via http://www.ruby-forum.com/.