vigetlabs / gulp-rails-pipeline

Ditch the Rails Asset Pipeline and roll your own with Gulp
MIT License
646 stars 64 forks source link

How to get process.env.RAILS_ENV? #14

Closed geoRG77 closed 9 years ago

geoRG77 commented 9 years ago

Hi, thanks for your repo, very nice work!

I only have problem with process.env.RAILS_ENV, as it's always undefined. I guess you must be using some Rails code to set this, maybe .env file?

Thanks

geoRG77 commented 9 years ago

I guess I found it out: export RAILS_ENV=production, right?

greypants commented 9 years ago

Yep, that's a way. I think I've only been explicitly using it on Heroku, and I set up the environment variables through the admin. You can also set it on the command line before whatever command you run RAILS_ENV=production gulp