I know that I can set my ENV variables in bash via
export admin_password = \"secret\"
But is there a way to do it in my rails source code s
The system environment and rails' environment are different things. ENV
let's you work with the rails' environment, but if what you want to do is to change the system's environment in runtime you can just surround the command with backticks.
# ruby code
`export admin_password="secret"`
# more ruby code