DEV Community

thomis
thomis

Posted on • Updated on

learning_ruby.rb

today i've learned about how rails deal with different environment (production, development and test).

  • i can setup my environment in three ways, each one i can put selected gems and versions and i think that is so cool.
* rails console -e production
Enter fullscreen mode Exit fullscreen mode
def ambiente_rails
      if Rails.env.development?
         "Development"
         elsif Rails.env.production?
         "Production" 
         else 
         "Test"
      end
Enter fullscreen mode Exit fullscreen mode

Top comments (0)