English 中文(简体)
跟踪程序beanstalkd,加载rails-env时出现rails日志文件错误
原标题:stalker beanstalkd, error with rails log file when loading rails env

配置/workers.rb

require File.expand_path("../config/environment", __FILE__)

when I run stalk ./配置/workers.rb I get the following (notorious) error:

日志/development.log

Rails Error: Unable to access log file. Please ensure that exists and is chmod 0666. The log level has been raised to WARN and the output directed to STDERR until the problem is fixed.

请注意,它引用了顶部的日志文件,而在错误消息中,它没有引用路径。。。有人能给我解释一下吗?我准备把头发扯下来。。。

谢谢

只是为了确保,这是我的ls-la。。。没有用户问题,因为我在mac中从我的用户那里运行它。。。

-rw-rw-rw-@  1 ericman  staff    0 Feb 10 19:11 development.log
问题回答

在您的环境/development.rb(以及部署前的production.rb)中显式编写

config.logger = Logger.new(Rails.root.join("log","worker_#{Rails.env}.log"))




相关问题
beanstalkd interface/GUI [closed]

Does anyone know of any interface to administer beanstalkd? What I m looking for vaguely is something like PhpMyAdmin for MySQL. Doesn t have to be PHP or web-based, could be any interface, GUI ..etc

What do I use when a cron job isn t enough? (php)

I m trying to figure out the most efficient way to running a pretty hefty PHP task thousands of times a day. It needs to make an IMAP connection to Gmail, loop over the emails, save this info to the ...

Simple scalable work/message queue with delay

I need to set up a job/message queue with the option to set a delay for the task so that it s not picked up immediately by a free worker, but after a certain time (can vary from task to task). I ...

Message Queues Vs DB Table Queue via CRON

We have a large project coming up soon with quite a lot of media processing (Images, Video) as well email output etc, the sort of stuff normally we d put into a table called "email_queue" and we use a ...

Checking the status of my PHP beanstalkd background processes

I have a website written in PHP (CakePHP) where certain resource intensive tasks are handled by a background process. This is done through the Beanstalkd message queue. I need some way to retrieve the ...

热门标签