0
0

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 1 year has passed since last update.

本番環境用のgemを開発環境にインストールしたくない時の対処法

Posted at

本番環境ではpostgresを使いたいけど、開発環境ではsqliteを使うという場合は、Gemfileを編集して開発環境と本番環境のgemを分けるようにする。

開発環境

group :development, :test do
    gem 'sqlite3', '1.4.2'
end

本番環境

group :production do
  gem 'pg', '1.1.4'
end

開発環境に本番環境用のgemを入れないために以下を実行

bundle config set --local without 'production'
0
0
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
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?