当我访问“localhost:3000”时,我的浏览器显示“Waiting for localhost...”并且永远不会返回。
以下是日志显示的内容:
Started GET "/" for 127.0.0.1 at Mon Sep 03 10:47:33 -0400 2012
Connecting to database specified by database.yml
我的 database.yml 内容:
development:
adapter: mysql2
encoding: utf8
database: chairsales_development
username: root
password: scrubbed
host: localhost
我可以使用此用户/密码从命令行很好地连接到 MySql 5.5。我尝试将端口 3306 添加到配置 yml 文件中,结果没有任何变化。
routes.rb 文件仅包含以下地图行:
root :to => "home#index"
我该如何进一步诊断并获得有关正在发生的事情的更多信息?有没有办法从 rails 本身的日志中获得更详细的结果?
Windows 7 + MySQL 5.5 + Rails 3.2.8
MySQL 根目录中 my.ini 文件的内容:
[client]
#password = your_password
port = 3306
socket = /tmp/mysql.sock
# The MySQL server
[mysqld]
port = 3306
socket = /tmp/mysql.sock
skip-external-locking
key_buffer_size = 16K
max_allowed_packet = 1M
table_open_cache = 4
sort_buffer_size = 64K
read_buffer_size = 256K
read_rnd_buffer_size = 256K
net_buffer_length = 2K
thread_stack = 128K