I want to use dotenv
in pure ruby environments. I mean I'm not using Rails
.
The github instruction says there are two ways for loading the variables.
require 'dotenv/load'
# or
require 'dotenv'
Dotenv.load
In my environments the latter way works, but `require 'dotenv/load' raises the this error:
LoadError: cannot load such file -- dotenv/load
I gonna use Dotenv.load
if former way doesn't work, but I want to know the reason of the error.
I'm using ruby 2.3.3p222
and dotenv (2.1.1)
.
What am I doing wrong?
I'm using bundle exec pry
and `load 'myapp.rb'.
When I load the script I get the error.
'dotenv/load' is implemented from 2.1.2
or 2.2.0
.
To upgrade the dotenv
gem is needed.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With