=> Booting WEBrick
=> Rails 4.0.2 application starting in development on http://0.0.0.0:3000
=> Run `rails server -h` for more startup options
=> Ctrl-C to shutdown server
Rails Error: Unable to access log file. Please ensure that /home/joey/joeyhu.info/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.
Exiting
/home/joey/.rvm/gems/ruby-2.1.2/gems/rack-1.5.2/lib/rack/server.rb:332:in `initialize': Permission denied @ rb_sysopen - /home/joey/joeyhu.info/tmp/pids/server.pid (Errno::EACCES)
from /home/joey/.rvm/gems/ruby-2.1.2/gems/rack-1.5.2/lib/rack/server.rb:332:in `open'
from /home/joey/.rvm/gems/ruby-2.1.2/gems/rack-1.5.2/lib/rack/server.rb:332:in `write_pid'
from /home/joey/.rvm/gems/ruby-2.1.2/gems/rack-1.5.2/lib/rack/server.rb:254:in `start'
from /home/joey/.rvm/gems/ruby-2.1.2/gems/railties-4.0.2/lib/rails/commands/server.rb:84:in `start'
from /home/joey/.rvm/gems/ruby-2.1.2/gems/railties-4.0.2/lib/rails/commands.rb:76:in `block in <top (required)>'
from /home/joey/.rvm/gems/ruby-2.1.2/gems/railties-4.0.2/lib/rails/commands.rb:71:in `tap'
from /home/joey/.rvm/gems/ruby-2.1.2/gems/railties-4.0.2/lib/rails/commands.rb:71:in `<top (required)>'
from bin/rails:4:in `require'
from bin/rails:4:in `<main>'
尝试启动rails服务器时出错。我在DigitalOcean上有一个Ubuntu 13.10并且安装了Rails和Ruby作为用户(不是sudo)。当我用sudo安装rails时,我没有遇到这个问题。我该如何解决这个问题?
答案 0 :(得分:0)
错误很明显
Unable to access log file. Please ensure that sure /home/joey/joeyhu.info/log/development.log exists
在所有文件夹和文件上使用chmod使目录可访问。