f🤔
Size: a a a
f🤔
T
f🤔
IB
AK
f🤔
T
T
f🤔
T
LK
REDIS_URL=redis://134.56.80.12:6379
// пример ип, не реальный если что )RAILS_ENV=production
RAKE_ENV=production
config/initializers/resque.rb
config_file = "./config/resque.yml"
resque_config = YAML.load(ERB.new(IO.read(config_file)).result)
uri = URI.parse(resque_config[Rails.env])
Resque.redis = uri
config/resque.yml
development: localhost:6379когда запускаю
test: localhost:6379
production: <%= ENV['REDIS_URL'] %>
rails c
и ввожу ENV['REDIS_URL']
model = Model.find 1
model.runJob
Redis::CannotConnectError: Error connecting to Redis on 127.0.0.1:6379 (Errno::ECONNREFUSED
config/initializers/resque.yml
и написал Rails.logger.debug(Rails.env)
поулчаю development
вместо production
RAILS_ENV=production
spring stop
надо ввести и тогда заново консоль запустить что бы env подхватился новыйf🤔
T
f🤔
T
f🤔
T
T