Hi everybody,
I am new in rubyonrails, and I am trying to learn it so I try to
implement tht examples in the agile web developement with rails. I have
stopped when I want to use scaffold. as it is mentionned in the book:
ruby script/generate scaffold Product Admin
but i get an error: it said no such file or directory /tmp/mysql.sock
I have checked my configuration of mysql and i found that mysql socket
is located on /var/run/mysqld/mysqld.scok
any help would be appreciated
thanks in advance
best regards,
Mustapha M. wrote:
I have checked my configuration of mysql and i found that mysql socket
is located on /var/run/mysqld/mysqld.scok
Hi,
Put that:
/var/run/mysqld/mysqld.scok
into your database.yml in place of the /tmp/mysql.sock line.
HTH
Alan
Hi Alan F.,
thank you for replying me,
I have checked the file config/database.yml but there no socket
parameter inside it.
best regards,
Mustapha M. wrote:
I have checked my configuration of mysql and i found that mysql socket
is located on /var/run/mysqld/mysqld.scok
Hi,
Put that:
/var/run/mysqld/mysqld.scok
into your database.yml in place of the /tmp/mysql.sock line.
HTH
Alan
Then just add the socket parameter in your database.yml file like this:
socket: /var/run/mysqld/mysqld.sock
Goodmorning,
I have followed this suggestion:
Then just add the socket parameter in your database.yml file like this:
socket: /var/run/mysqld/mysqld.sock
but it doesn’t work at all, it still says to me that:
dependency model
exists app/models/
exists test/unit/
exists test/fixtures/
identical app/models/product.rb
identical test/unit/product_test.rb
identical test/fixtures/products.yml
No such file or directory - /tmp/mysql.sock
I have tried to install mysql with gem, also It dosen’t work, he can’t
install mysql and the error is as following:
root@acer:~/source/depot# gem install mysql
Attempting local installation of ‘mysql’
Local gem file not found: mysql*.gem
Attempting remote installation of ‘mysql’
Updating Gem source index for: http://gems.rubyforge.org
Select which gem to install for your platform (i486-linux)
- mysql 2.7.1 (mswin32)
- mysql 2.7 (ruby)
- mysql 2.6 (ruby)
- mysql 2.5.1 (ruby)
- Cancel installation
2
Building native extensions. This could take a while…
extconf.rb:1:in `require’: no such file to load – mkmf (LoadError)
from extconf.rb:1
ERROR: While executing gem … (RuntimeError)
ERROR: Failed to build gem native extension.
Gem files will remain installed in /usr/lib/ruby/gems/1.8/gems/mysql-2.7
for inspection.
ruby extconf.rb install mysql\n
Results logged to /usr/lib/ruby/gems/1.8/gems/mysql-2.7/gem_make.out
where should I found mkmf file?!!!
thanks in advance,
best regards,