Git Product home page Git Product logo

Comments (5)

allaire avatar allaire commented on May 17, 2024

Yes, clarification would be gladly appreciated. Meanwhile, can anyone explain @1ndivisible 's questions?

Thanks!

from dotenv.

nelsonenzo avatar nelsonenzo commented on May 17, 2024

Along these lines, are there extra configuration requirements for it to load the .env.development file? I can only define variables in .env right now, using Rails 2.3.5., the .env.development does not appear to be loading when I start the application.

from dotenv.

Undistraction avatar Undistraction commented on May 17, 2024

@nelsonenzo

From dotenv/lib/dotenv/railtie.rb you can see that Dotenv loads two files. A file called .env and a file whos name is build using .env. suffixed by the the name of the current environment:

Dotenv.load ".env.#{Rails.env}", '.env'

from dotenv.

chischaschos avatar chischaschos commented on May 17, 2024

I'm under the same confusion, I thought the .env.ENVIRONMENT files would be up loaded automatically, but it doesn't.

I read this https://github.com/bkeepers/dotenv/blob/master/lib/dotenv/railtie.rb#L14, so basically if you don't use rails you need to manually indicate the .env files you want (when using environment specific settings).

I think the README should specify this.

I ended up doing this: https://github.com/chischaschos/scanty/blob/master/main.rb#L5

from dotenv.

bkeepers avatar bkeepers commented on May 17, 2024

Pull requests are welcome.

Note that the auto-loading of ".env.#{Rails.env}" is going to be split out into a separate gem soon (#95).

from dotenv.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.