How to set environment variable in env.rb to be use in the ruby code

I like to set the server_url to point to different url path based on different env such as dev, qa


How can I set that in env.rb?
and I need to use that env in my ruby code
example: visit(url)

so that when I run cucumber I can pass that env variable in to point to different url path
chrome=true env=dev bundle exec cucumber features/signin.feature