← 返回命令列表

Linux command

bundle 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Install

bundle install

Update

bundle update

Execute

bundle exec [rake test]

Show

bundle show [rails]

Create

bundle gem [my_gem]

说明

bundle (Bundler) is a dependency manager for Ruby. It ensures that the exact gem versions specified in a Gemfile are installed and loaded, preventing version conflicts and ensuring consistent environments. The tool is essential for Ruby development and comes bundled with Ruby since version 2.6.

参数

install
Install gems from Gemfile
update _gems_
Update gems
exec _command_
Execute command with bundle environment
show _gem_
Show gem installation path
list
List installed gems
outdated
Show outdated gems
clean
Remove unused gems
lock
Create/update Gemfile.lock
gem _name_
Create new gem scaffold

FAQ

What is the bundle command used for?

bundle (Bundler) is a dependency manager for Ruby. It ensures that the exact gem versions specified in a Gemfile are installed and loaded, preventing version conflicts and ensuring consistent environments. The tool is essential for Ruby development and comes bundled with Ruby since version 2.6.

How do I run a basic bundle example?

Run `bundle install` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does install do in bundle?

Install gems from Gemfile