Application ruby on rails

1

Is it possible to change the state of a rails application, from production to test? with the possibility of going back to production again

    
asked by anonymous 17.01.2018 / 12:30

3 answers

1

The correct thing would be for you to stop the application and then start it already in the test environment, it would not be good practice.

    
19.01.2018 / 10:33
1

Yes.

RAILS_ENV=<ambiente> <comando>

For example, to run seeding from the test database, do the following:

RAILS_ENV=test rails db:seed

Environments are test , development , staging and production .

    
23.01.2018 / 11:58
1

You can run the command below:

RAILS_ENV=test rails s

or

RAILS_ENV=production rails s
    
12.09.2018 / 12:42