Understanding the Use of Bundler to Manage Gems for Multiple Projects

Asked 2 years ago, Updated 2 years ago, 110 views

If I'm developing two projects on my PC and I use the same version of rails, installing the same version of rails in the directory of each project is a waste of capacity, but what do you think?

ruby-on-rails ruby rubygems bundler

2022-09-30 15:04

1 Answers

If you do not specify the installation destination in --path during bundle installation, you can use the Gem installed on the Ruby body, so it can be used in common.However, in this case, the running user must have permission to install the package in gem.If you manage Ruby itself with rbenv, it won't contaminate Ruby in the system, so you shouldn't specify --path in the development environment.

If you really don't want to use Ruby's gem, you can use it in common by specifying a common directory in --path as an absolute path.


2022-09-30 15:04

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.