Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Rails Error: Unable to access log file. Please ensure that /home.../log/development.log exists and is chmod 0666

Im trying to migrate a db2 database to Ruby on Rails, but just when I run rails g scaffold, I get this:

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

I have checked and my development.log does not exist! I'm not sure why, since I followed every step during the installation, but still my file doesn't exist. How can I create it? I have already tried uninstalling and installing Rails again, but the problem remains.

like image 813
user3055728 Avatar asked Dec 02 '13 01:12

user3055728


2 Answers

Maybe just do what it asks you to do?:

$ touch the_required_path/development.log
$ chmod 0666  the_required_path/development.log
like image 160
PSkocik Avatar answered Nov 07 '22 14:11

PSkocik


I've always had success with the the log file permissions as 644. When this has happened to me, more than once I might add, it has always been answered by the question linked below. Since this is the first answer in Google for the query I use, I'm linking to the answer that I really want.

Rails: Unable to access log file

like image 1
J Edward Ellis Avatar answered Nov 07 '22 16:11

J Edward Ellis