7
6

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

【Rails】Railsの3つの環境

Last updated at Posted at 2018-04-09

Railsの3つの環境

Railsにはテスト環境 (test)、開発環境 (development)、そして本番環境 (production) の3つの環境がデフォルトで装備されています。Rails consoleのデフォルトの環境はdevelopmentです。
デバッグとRails環境(コラム7.1)

  • 環境を明示して実行する。(指定なしは"development")
console
# consoleコマンド
$ rails console production

# serverコマンド
$ rails server --environment production

# migrateコマンド
$ rails db:migrate RAILS_ENV=production
7
6
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
7
6

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?