gpt4 book ai didi

ruby-on-rails - 我的 Rails 应用程序突然变成只读的

转载 作者:太空宇宙 更新时间:2023-11-04 13:04:22 25 4
gpt4 key购买 nike

我正在开发我的 Rails 应用程序,离开它一段时间,然后回来,并尝试重新启动我的服务器。作为回应,我得到了这个错误:

Rails Error: Unable to access log file. Please ensure that /home/user/app/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.

我不知道我该怎么做才能造成这种情况。我什至从未碰过我的日志目录。我尝试运行 chmod 0666/home/user/app/log/development.log 然后运行各种其他 chmod 命令,例如 chmod 0664chmod 777。每次我回来时:

chmod: changing permissions of ‘/home/user/app/log/development.log’: Read-only file system

但我总是从 rails s 返回同样的错误。

然后我放弃并切换到我正在开发的另一个应用程序,但是在为那个应用程序运行 rails s 之后,我基本上得到了相同的错误:

Rails Error: Unable to access log file. Please ensure that /home/user/sweat/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.

这是怎么回事?我正在使用 Ubuntu 14.04。

更新

运行 sudo chmod 777 -R log 给我返回:

sudo: unable to open /var/lib/sudo/user/1: No such file or directory
chmod: changing permissions of ‘log’: Read-only file system
chmod: changing permissions of ‘log/development.log’: Read-only file system
chmod: changing permissions of ‘log/.keep’: Read-only file system

最佳答案

如果您使用的是 Linux!试试这个 => cd home/user/app然后 => sudo chmod 777 -R log

希望对你有帮助!

关于ruby-on-rails - 我的 Rails 应用程序突然变成只读的,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33094469/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com