10

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.

mustaccio
  • 18,234
  • 16
  • 48
  • 57
user3055728
  • 117
  • 1
  • 1
  • 5

2 Answers2

24

Maybe just do what it asks you to do?:

$ touch the_required_path/development.log
$ chmod 0666  the_required_path/development.log
Petr Skocik
  • 58,047
  • 6
  • 95
  • 142
1

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

Community
  • 1
  • 1
J Edward Ellis
  • 1,368
  • 2
  • 12
  • 21