Code Monkey home page Code Monkey logo

Comments (8)

rafaelfranca avatar rafaelfranca commented on July 4, 2024 1

@dhh could this be the env.erb file being loaded by foreman and using an non-existent RAILS_MASTER_KEY?

@rubys can you see if by deleting that file before starting the server it works?

from rails.

morgoth avatar morgoth commented on July 4, 2024 1

@dhh I think the .env file picked up both by default by kamal and foreman might be a big source of confusion and bugs, vide basecamp/kamal#233 and basecamp/kamal#420

Can we maybe differentiate somehow those 2 env files so they do not interfere with each other?

from rails.

rubys avatar rubys commented on July 4, 2024

Neither deleting .env.erb or config/master.key solves this problem. I also wasn't seeing this problem on --main on Friday.

from rails.

skipkayhil avatar skipkayhil commented on July 4, 2024

Looks like the .env.erb gets rendered to .env, after removing that file foreman works again for me

from rails.

rubys avatar rubys commented on July 4, 2024

Confirming that the following fixes the problem for me:

erb .env.erb > .env

from rails.

andrewn617 avatar andrewn617 commented on July 4, 2024

Yeah, it seems kamal init is being called before we create the .env.erb template. So the .env has dummy values. But even if I swap the order of those calls, it seems kamal init is not template aware.

from rails.

dhh avatar dhh commented on July 4, 2024

Ah yeah, will add a call to evaluate .env.erb on first run. Then it'll yank the key from master.key into .env.

from rails.

Flixt avatar Flixt commented on July 4, 2024

I stumbled over the same problem when having credentials per environment. Forman always picked up the master key from .env (needed for kamal deployment) although running locally in development environment and config/credentials/development.key was present. I just forced foreman to not load any env file by adding --env /dev/null to the foreman command in bin/dev like this:

exec foreman start -f Procfile.dev --env /dev/null "$@"

This approach is mentioned here ddollar/foreman#702

from rails.

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.