Rails错误:无法访问日志文件.请确保/home.../log/development.log存在并且是chmod 0666

use*_*728 6 ruby ruby-on-rails database-migration

我试图将db2数据库迁移到Ruby on Rails,但是当我运行时rails g scaffold,我得到了这个:

Rails Error: Unable to access log file. Please ensure that /home/.../log/development.log exists and is chmod 0666. The log level has been raised to WARN and the output directed to STDERR until the problem is fixed.

我检查过,我development.log不存在!我不知道为什么,因为我在安装过程中遵循了每一步,但我的文件仍然不存在.我该如何创建它?我已经尝试过再次卸载和安装Rails,但问题仍然存在.

PSk*_*cik 21

也许只是做它要求你做的事情?:

$ touch the_required_path/development.log
$ chmod 0666  the_required_path/development.log
Run Code Online (Sandbox Code Playgroud)