Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我的 Gemfile 中有以下内容,但是当我在本地运行 bundle install 时,我收到有关 postgres 不可用的错误。
group :development do gem 'dm-sqlite-adapter' end group :production do gem 'dm-postgres-adapter' end
您需要告诉 Bundler 排除生产组:
bundle install --without production
它会记住这一点,以便将来在同一台机器上运行(它将它存储在.bundle目录中),因此您只需执行一次,然后可以简单地执行bundle或bundle install在将来执行。
.bundle
bundle
bundle install