Dele Jnr Dele Jnr - 6 months ago 8
Ruby Question

Ruby error, can't start the rails server

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:in
require' from bin/rails:4:in
`'

Answer

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.