I’m having a similar problem creating the scaffolding for the Depot
demo. When I run the generate scaffold script, it seems to stall after
it creates products.yml with no error. I am connecting to MySQL as root
with no password using socket. Has anybody else run into this?
After it prints this, it just stalls. No error message is printed, nor
does anything happen for 10+ minutes until I hit ctrl-C. When I hit
ctrl-C this is what is printed:
^C/usr/lib/ruby/gems/1.8/gems/activerecord-1.13.2/lib/active_record/vendor/mysql.rb:1079:in read': Interrupt from /usr/lib/ruby/gems/1.8/gems/activerecord-1.13.2/lib/active_record/vendor/mysql.rb:1079:inread’
from
/usr/lib/ruby/gems/1.8/gems/activerecord-1.13.2/lib/active_record/vendor/mysql.rb:499:in read' from /usr/lib/ruby/gems/1.8/gems/activerecord-1.13.2/lib/active_record/vendor/mysql.rb:492:incommand’
from
/usr/lib/ruby/gems/1.8/gems/activerecord-1.13.2/lib/active_record/vendor/mysql.rb:339:in stat' from /usr/lib/ruby/gems/1.8/gems/activerecord-1.13.2/lib/active_record/connection_adapters/mysql_adapter.rb:147:inactive?’
from
/usr/lib/ruby/gems/1.8/gems/activerecord-1.13.2/lib/active_record/connection_adapters/abstract/connection_specification.rb:103:in retrieve_connection' from /usr/lib/ruby/gems/1.8/gems/activerecord-1.13.2/lib/active_record/connection_adapters/abstract/connection_specification.rb:20:inconnection’
from
/usr/lib/ruby/gems/1.8/gems/activerecord-1.13.2/lib/active_record/connection_adapters/abstract/connection_specification.rb:107:in retrieve_connection' ... 20 levels... from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18:inrequire__’
from
/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18:in require' from /usr/lib/ruby/gems/1.8/gems/activesupport-1.2.5/lib/active_support/dependencies.rb:214:inrequire’
from script/generate:3
I am able to connect to MySQL fine as root.
depot> mysql depot_development -h localhost -u root
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 70 to server version: 5.0.18-standard
Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the buffer.
mysql>
My .yml file:
development:
adapter: mysql
database: depot_development
username: root
password:
socket: /tmp/mysql.sock
ctrl-C this is what is printed:
from retrieve_connection' /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18:inrequire’
You can turn off this feature to get a quicker startup with -A
My .yml file:
development:
adapter: mysql
database: depot_development
username: root
password:
socket: /tmp/mysql.sock
are you sure ^^^^^^^^^^^^^ that this is where your mysql.sock is?
ps aux|grep mysql.sock
on my Linux systems, the socket is /var/lib/mysql/mysql.sock
When I had a similar issue, I was able to resolve it by changing host
to 127.0.0.1 instead of localhost. Have you tried chaning your host
name? Also pay attention to the MySQL permissions table.
Hope it helps.
Frank
Craig W. [email protected] wrote: On Sun, 2006-01-29 at 04:50
+0100, jeff wrote:
and see if you connect
exists app/helpers/
I guess I forgot to mention, I’m running on Mac OS x 10.4.4 with MySQL
5.0.18.
When I had a similar issue, I was able to resolve it by changing host
to 127.0.0.1 instead of localhost. Have you tried chaning your host
name? Also pay attention to the MySQL permissions table.
Hope it helps.
Frank
Nope, no luck. Thanks for the suggestions. I guess I’ll keep trying…
development:
adapter: mysql
database: depot_development
username: root
password:
socket: /tmp/mysql.sock
are you sure ^^^^^^^^^^^^^ that this is where your mysql.sock is?
ps aux|grep mysql.sock
on my Linux systems, the socket is /var/lib/mysql/mysql.sock
Craig
Well, technically the socket is in /private/tmp/mysql.sock, but there is
a link from root to /tmp. So, yes, this is the correct location of
mysql.sock. I also tried commenting out the socket connection and using
host: localhost
port: 3306
instead. Same problem. The script just stalls in the same place as
before.