上帝没有运行:服务器不可用(或者你没有权限访问它)
我试图让上帝启动我的resque队列。 但是,当我运行god load config/resque.god
它返回The server is not available (or you do not have permissions to access it)
这是我的resque.god文件:
rails_env = ENV['RAILS_ENV'] || "production" rails_root = ENV['RAILS_ROOT'] || "/Users/andrewlynch/sites/wellness/wellbot" God.watch do |w| w.name = "resque-worker" w.group = "resque" w.interval = 60.seconds w.dir = "#{rails_root}" w.start = "RAILS_ENV=development QUEUE=* rake resque:work" w.start_grace = 30.seconds end
god load
用于将配置加载或重新加载到已经运行的实例中。
在您的情况下,您的上帝服务器没有运行。
这是执行上帝的命令:
god -c config/resque.god
通过执行以下操作检查上帝服务的运行方式:ps aux | grep god
很有可能你会看到上帝以root身份运行。
如果您停止此服务,则由与正在运行的resque相同的用户重新启动,您将不再看到此错误。