0
votes

I get this error when I run rails s.

Can anyone help me?

Rails Error: Unable to access log file. Please ensure that /Users/delejnr/Desktop/ruby_playground/observe/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 /Library/Ruby/Gems/2.0.0/gems/rack-1.5.2/lib/rack/server.rb:345:in delete': Permission denied - /Users/delejnr/Desktop/ruby_playground/observe/tmp/pids/server.pid (Errno::EACCES) from /Library/Ruby/Gems/2.0.0/gems/rack-1.5.2/lib/rack/server.rb:345:in check_pid!' from /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 /Library/Ruby/Gems/2.0.0/gems/railties-4.0.3/lib/rails/commands.rb:76:in block in <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:in <top (required)>' from bin/rails:4:inrequire' from bin/rails:4:in `'

2

2 Answers

2
votes

You don't have permission for that file(s).

Start as admin / sudo and check the file permissions and adjust them accordingly.

Also make sure that file( /Users/delejnr/Desktop/ruby_playground/observe/log/development.log ) even exists.

0
votes

I received this error and ran the following command to fix the permissions:

 sudo chmod 0664 <path to app>/<name of app>/log/development.log

Replace <path to app> and <name of app>

in your case

sudo chmod 0664 /Users/delejnr/Desktop/ruby_playground/observe/log/development.log

For Mac 10.11.5