0

我一直在尝试几乎所有方法来让 rails/webrick 在开发模式下提供 html 文件,但是我不断收到以下错误:

没有路线匹配 [GET] "/public/index.html"

即使在设置config.assets.enabled = true之后也没有任何变化。运行 Rails 3.2.2

4

1 回答 1

1

从网站的角度来看,公共目录是您的根目录。例如:

/path_to_rails/public/index.html = http://localhost:3000/index.html
/path_to_rails/public/subdir/home.html = http://localhost:3000/subdir/home.html

这假设您正在运行本地开发服务器http://localhost:3000

于 2012-06-02T04:58:55.830 回答