0

重新安装 Windows 10 后,我在安装 Ruby on Rails 时遇到问题。我使用了 RailsInstaller(v. 3.2.0 - 使用 Ruby 2.2.0 和 Rails 4.2.6)。

安装后,我修复了 *.bat 文件中的路径错误(像往常一样,你知道),创建新项目并运行包。一切顺利。

然后我运行了我的项目并在输出中看到了这个错误:

1.

config.eager_load is set to nil. Please update your config/environments/*.rb files accordingly:

  * development - set it to false
  * test - set it to false (unless you use a tool that preloads your test environment)
  * production - set it to true

(实际上所有这些都设置正确)

  1. Rails 错误:无法访问日志文件。请确保 C:/Users/home/Dropbox/test_app/log/C:/RailsInstaller/Ruby2.2.0/bin/.log 存在且可写(即,使其对用户和组可写:chmod 0664 C:/Users /home/Dropbox/test_app/log/C:/RailsInstaller/Ruby2.2.0/bin/.log)。日志级别已提升到 WARN 并且输出定向到 STDERR,直到问题得到解决。

如您所见 - 日志路径完全错误,日志目录为空。

然后服务器运行,但在浏览器中我也有一个错误:

Internal Server Error

    Missing `secret_token` and `secret_key_base` for 'C:\RailsInstaller\Ruby2.2.0\bin\' environment, set these values in `config/secrets.yml`

再次 - 这不是我的项目的路径。有任何想法吗?

4

0 回答 0