Rails Error: Unable to access log file. Make sure /home.../log/development.log exists and is chmod 0666

I am trying to migrate a db2 database to Ruby on Rails, but when I run rails g scaffold , I get the following:

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 checked and my development.log does not exist! I do not know why, since I followed every step during the installation, but still my file does not exist. How can I create it? I already tried uninstalling and installing Rails again, but the problem remains.

+6
source share
2 answers

Maybe just do what he asks you to do:

 $ touch the_required_path/development.log $ chmod 0666 the_required_path/development.log 
+19
source

I always had success with access rights to the log file as 644. When this happened to me, I repeatedly added, it always answered the question below. Since this is the first answer on Google for the query I use, I refer to the answer I really want.

Rails: unable to access log file

0
source

Source: https://habr.com/ru/post/959136/


All Articles