Skip to content

Commit

Permalink
Merge pull request #102 from rage-rb/rails-env
Browse files Browse the repository at this point in the history
Correctly set Rails env
  • Loading branch information
rsamoilov authored Aug 24, 2024
2 parents 0f0f9d7 + f647964 commit 94be120
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/rage/cli.rb
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,10 @@ def environment

def set_env(options)
ENV["RAGE_ENV"] = options[:environment] if options[:environment]

# at this point we don't know whether the app is running in standalone or Rails mode;
# we set both variables to make sure applications are running in the same environment;
ENV["RAILS_ENV"] = ENV["RAGE_ENV"] if ENV["RAGE_ENV"] && ENV["RAILS_ENV"] != ENV["RAGE_ENV"]
end
end

Expand Down

0 comments on commit 94be120

Please sign in to comment.