运行 rails s
时出现此错误 .
谁能帮我?
Rails错误:无法访问日志文件 . 请确保/Users/delejnr/Desktop/ruby_playground/observe/log/development.log存在并且是chmod 0666.日志级别已提升为WARN,输出将定向到STDERR,直到问题得到解决 . 退出/Library/Ruby/Gems/2.0.0/gems/rack-1.5.2/lib/rack/server.rb:345:in delete':权限被拒绝 - / Users / delejnr / Desktop / ruby_playground / observe / tmp / pids / server.pid(Errno :: EACCES)来自/Library/Ruby/Gems/2.0.0/gems/rack-1.5.2/lib/rack/server.rb:345:in check_pid!'来自/Library/Ruby/Gems/2.0.0/gems/rack-1.5.2/lib/rack/server.rb:246:in start'from /Library/Ruby/Gems/2.0.0/gems/railties-4.0 .3 / lib / rails / commands / server.rb:84:in start from fromLibrary/Ruby/Gems/2.0.0/gems/railties-4.0.3/lib/rails/commands.rb:76:in block在<top(required)>'from /Library/Ruby/Gems/2.0.0/gems/railties-4.0.3/lib/rails/commands.rb:71:in tap'from /Library/Ruby/Gems/2.0 .0 / gems / railties-4.0.3 / lib / rails / commands.rb:71:在<top(required)>'from bin / rails:4:inrequire'from bin / rails:4:in`'
2 回答
您没有该文件的权限 .
以admin / sudo开头并检查文件权限并相应地进行调整 .
还要确保文件(
/Users/delejnr/Desktop/ruby_playground/observe/log/development.log
)甚至存在 .我收到此错误并运行以下命令来修复权限:
替换<app app>和<app of app>
在你的情况下
对于Mac 10.11.5