Skip to content

Commit 49be7da

Browse files
authored
Merge pull request travis-ci#2567 from eregon/improve-bundler2-docs
Improve and fix Bundler 2.0 docs
2 parents a02abbe + 0aa4182 commit 49be7da

File tree

1 file changed

+16
-15
lines changed

1 file changed

+16
-15
lines changed

user/languages/ruby.md

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,10 @@ To specify them, use the `rvm:` key in your `.travis.yml` file:
4040
```yaml
4141
language: ruby
4242
rvm:
43-
- 2.2
43+
- 2.5
44+
- 2.6
4445
- jruby
4546
- truffleruby
46-
- 2.0.0-p247
4747
```
4848
{: data-file=".travis.yml"}
4949

@@ -85,7 +85,7 @@ language: ruby
8585
rvm:
8686
- truffleruby # latest release
8787
# or
88-
- truffleruby-1.0.0-rc9 # specific version
88+
- truffleruby-19.2.0 # specific version
8989
```
9090
{: data-file=".travis.yml"}
9191

@@ -141,28 +141,29 @@ directory.
141141
#### Bundler 2.0
142142

143143
On January 3rd 2019 the Bundler team released [Bundler 2.0](https://bundler.io/blog/2019/01/03/announcing-bundler-2.html)
144-
which dropped support for Ruby versions 2.2 and older, and added a new dependency
145-
on RubyGems 3.0.0.
146-
A subsequent release, [2.0.1](https://bundler.io/blog/2019/01/04/an-update-on-the-bundler-2-release.html),
147-
requires RubyGems 2.5.0.
144+
which requires Ruby 2.3+.
145+
A subsequent [2.0.1](https://bundler.io/blog/2019/01/04/an-update-on-the-bundler-2-release.html) release
146+
lowered the required RubyGems version to 2.5.0, which is available by default on Ruby 2.3+.
148147

149-
Under many configurations, Travis CI installs the Ruby runtime on the fly.
150-
This means installing the latest Bundler at run time, which may cause problems
151-
due to the unsatisfied requirements.
148+
Therefore, *there is no need to update RubyGems* for Bundler 2.
152149

153-
If you find your builds are failing due to “bundler not installed” errors, try one of the following solutions:
150+
TravisCI uses Bundler 1 by default.
151+
If your `Gemfile.lock` has a `BUNDLED WITH 1.x` section (or no such section),
152+
the default behavior should be enough and require no changes.
153+
154+
If you find your builds are failing due to “bundler not installed” errors or
155+
want to use Bundler 2.0, try one of the following solutions:
154156

155157
* If you’re using Ruby 2.3 or higher, and you wish to upgrade to Bundler 2.0,
156-
use the following in your `.travis.yml` to update RubyGems:
158+
use the following in your `.travis.yml`:
157159

158160
```yaml
159161
before_install:
160-
- gem update --system
161162
- gem install bundler
162163
```
163164
{: data-file=".travis.yml"}
164165

165-
* If you are using Ruby 2.3.x but wish to stay on Bundler 1.x (e.g., for dependency
166+
* If you are using Ruby 2.3.x but wish to explicitly stay on Bundler 1.x (e.g., for dependency
166167
reasons such as Rails 4.2.x), write:
167168

168169
```yaml
@@ -173,7 +174,7 @@ If you find your builds are failing due to “bundler not installed” errors, t
173174
{: data-file=".travis.yml"}
174175

175176
The `gem uninstall` command above removes any Bundler 2.x installed in
176-
RVM's "global" gemset during the Ruby run time installation, which would be
177+
RVM's "global" gemset during the Ruby installation by RVM, which would be
177178
selected as the default `bundle` command.
178179
We ignore the failure from that command, because the failure most likely
179180
means that there was no matching Bundler version to uninstall.

0 commit comments

Comments
 (0)