Rails environment how to find out in code?
Are there any solutions how I can find out in which environment my application is running? I have some rake calls which need to have the environment like this: system "RAILS_ENV=development rake crons:dosomething" But this should not only work in development I want to use this in test production and development? how can I do this? second task where I need this is in config/schedule.rb the should also run in all environments rake "crons:dosomething", :environment => :development rake "crons:dosomething", :environment => :production this doesn't work
0 upvotes
View original discussion ↗
Comments
Sign in or sign up to comment and upvote.
No comments yet.