Rails mysql problem

software development

#1

I am a new user, I faced many problems in getting my rails site working, but with help of my friends/colleagues.

  1. I have implemented a rails site using Capistrano and svn.

I face one major hurdle, hope if any one can help on it, will be able to get my home site this weekend itself

I am using migrations, but I cannot connect to Mysql db

I have checked in mysql console, i am able to connect but when I try to use rake, I get the following error,

rake aborted!
Can’t connect to local MySQL server through socket ‘/var/run/mysqld/mysqld.sock’

there is no socket reference in my database.yml file

I am using production environment, as suggested in wiki

As an alternative I have even tried Sqlite, I am able to remotely migrate and create the db file but I cannot use it

in script/console, using activerecord i get the same socket error, even though this time the DB is SQLITE not Mysql

has anyone faced this problem, can you suggest any fix or solution

any help, code, link can be useful

regards
Sampoorna


#2

Try

rake migrate RAILS_ENV=production

As you have to make sure rake is using the production enviroment as well.

Use promo code My50 to save $50 on any year of these nice plans


#3

Thank you,
my sqlite now works, will try with mysql
and confirm

regards
Sampoorna