Stage environment #267

Merged
merged 1 commit into from Sep 6, 2012

Conversation

Projects
None yet
5 participants
Contributor

d018a502 commented Sep 2, 2012

Using convention over configuration, it seems that the rails environment should default to the name of the stage... I cant imagine a situation where two different stages would want to use the same rails environment.

This pull request passes (merged b1bdae38 into 30a942c).

Contributor

carsomyr commented Sep 6, 2012

@d018a502 Can you point to a place where rails_env is being used? Also, please rewrite your pull request history to remove the 0b2b25c commit.

Contributor

d018a502 commented Sep 6, 2012

Removed the offending commit. rails_env is used wherever rake command is invoked... at the least. if I grep for rails_env in capistrano repo, I get many examples.

@carsomyr carsomyr added a commit that referenced this pull request Sep 6, 2012

@carsomyr carsomyr Merge pull request #267 from monsoonrains/stage_environment
Stage environment
2d217a8

@carsomyr carsomyr merged commit 042e7d9 into capistrano:master Sep 6, 2012

1 check passed

default The Travis build passed
Details
Contributor

carsomyr commented Sep 6, 2012

@d018a502 It's merged. Thanks!

@d018a502 , @carsomyr
Hi, we're using one environment (production) for all our stages (maybe not the best decision..), and things stopped working after 2.13.4...

Doing set :rails_env, 'production' in deploy.rb doesn't help, environment still gets set to stage name.

Should we set :rails_env in every stage file separately or is there a better solution? Thanks!

@whatthewhat
+1 on this one... we use production rails_env on staging servers too

Contributor

carsomyr commented Sep 19, 2012

@d018a502, @whatthewhat Are you saying that Capistrano is overwriting whatever you set for rails_env?

Contributor

d018a502 commented Sep 19, 2012

@whatthewhat, @marcelloma, you should be able to override rails_env... I'll be happy to gist you something that works for me. Are you using production env in your staging? so your stage env is pointing to prod db?

Im using set :rails_env, "production" outside my stages since I want it to
be production for all stages(in my case staging and production)

2012/9/19 Anand notifications@github.com

@whatthewhat https://github.com/whatthewhat, @marcellomahttps://github.com/marcelloma,
you should be able to override rails_env... I'll be happy to gist you
something that works for me. Are you using production env in your staging?
so your stage env is pointing to prod db?


Reply to this email directly or view it on GitHubhttps://github.com/capistrano/capistrano/pull/267#issuecomment-8707194.

Marcello Milhomem Albuquerque

Same here, if I set rails_env individually in every stage file, then it works fine, but now there is no way to set default rails_env for all stages in deploy.rb

Contributor

carsomyr commented Sep 24, 2012

Hi guys, I'm getting more reports of this feature being a problem and will probably revert the change soon. Please take the discussion to the newly created #274.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment