← 返回命令列表

Linux command

bundler 命令

文本

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

常用示例

Install dependencies from Gemfile

bundle install

Add a gem to Gemfile

bundle add [gem]

Update all gems

bundle update

Update specific gem

bundle update [gem]

Execute command with bundled gems

bundle exec [command]

Initialize new Gemfile

bundle init

Show installed gems

bundle list

Check for security vulnerabilities

bundle audit

说明

bundler manages Ruby application dependencies by tracking and installing exact gem versions needed. It ensures consistent environments across development, staging, and production by using a Gemfile and Gemfile.lock. Since Ruby 2.6, Bundler is part of Ruby's standard library.

参数

--no-color
Disable colored output
--verbose
Enable verbose output
--path _directory_
Install gems to specified directory
--without _groups_
Exclude gem groups from installation
--deployment
Install in deployment mode

FAQ

What is the bundler command used for?

bundler manages Ruby application dependencies by tracking and installing exact gem versions needed. It ensures consistent environments across development, staging, and production by using a Gemfile and Gemfile.lock. Since Ruby 2.6, Bundler is part of Ruby's standard library.

How do I run a basic bundler example?

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

What does --no-color do in bundler?

Disable colored output