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

我试图将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,但问题仍然存在。

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

 $ touch the_required_path/development.log $ chmod 0666 the_required_path/development.log 

我总是将日志文件权限设置为644.当发生这种情况时,我不止一次添加,它总是通过下面链接的问题回答。 由于这是我使用的查询的第一个答案,我正在链接到我真正想要的答案。

Rails:无法访问日志文件