Ruby-on-rails development and production on same server -



Ruby-on-rails development and production on same server -

is possible (or normal) have ror development , production on same server? , ok have sqlite development , postgreesql production?

it not normal, possible - , needed - debug problems showing in production. couple of examples assets (javascripts, images, etc) served differently in development opposed production due asset pipeline. area caching tends different in production , disabled in development.

in ruby on rails there (at least) 3 modes server can run in. these referred 'environments'.

development. local machine , utilize locally during development

tests. used when run tests , test suites.

production. mode used actual production servers on remote server.

sometimes want/need run local development server in 'production mode' , in these cases inline with

rails_env=production rails server

or

rails server -e production

or

rails server -e production 3001 # specify port (dev default 3000) if want run on different port, # e.g. run in development mode in 1 window , production mode in another.

when run local server in mode, such production, you'll need aware affects database connection. config/database.yml has database connection , also uses rails_env settings. may want/need run server in production mode - utilize local database. can temporarily using actual setting development block in production block of config/database.yml. sure save original settings / restore afterwards (before next push).

it's totally ok , indeed mutual have sqlite locally , mysql/postgres/oracle in production.

ruby-on-rails ruby-on-rails-4

Comments

Popular posts from this blog

Delphi change the assembly code of a running process -

json - Hibernate and Jackson (java.lang.IllegalStateException: Cannot call sendError() after the response has been committed) -

C++ 11 "class" keyword -