-1
我想在我的工人(也試過在耙任務)來讀取環境變量,如:無法在Rails的工人訪問ENV
puts ENV('APILAYER_KEY')
,但它引發以下錯誤:
NoMethodError: undefined method `ENV' for #<ExchangeRateUpdater:0x0055c5a7a484f0>
正如我所看到的ENV
應該是Ruby方法,並且隨處可用。 https://ruby-doc.org/core-2.2.0/ENV.html
有沒有人看過這個問題?