ruby / ruby/rubygems

bundle package refuses to save bundler itself

Open
#3,262 8 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Bundler
Dominant language
Ruby
Stars
4k
Forks
1.9k
Avg merge
1d 2h
Merged PRs (30d)
81

Description

Hey, I have an offline installation of ruby and required ruby gems where I ran into a problem.

I am preparing the installation on an online server, and then copy all the gems to the offline production server.

I used bundle package --all to create a vendor/cache folder containing all the gems I need.

Unfortunately Bundler itself is missing. I am adding Bundler gem to the Gemfile to force it, but it did not work for me.

Is this a bug, or is there a way, forcing it to save bundler as well in the cache?

Example project:

Gemfile:

source "https://rubygems.org"

gem "bundler"

Command:

$ bundle update --bundler
Using bundler 2.1.2
Warning: the lockfile is being updated to Bundler 2, after which you will be unable to return to Bundler 1.
Bundle updated!


$ bundle package
Using bundler 2.1.2
Bundle complete! 1 Gemfile dependency, 1 gem now installed.
Use `bundle info [gemname]` to see where a bundled gem is installed.
Updating files in vendor/cache

$ ls -la vendor/cache
total 0

I prefer if Bundler can help me maintain all ruby dependencies. I realize I have to install it myself on the offline server to make bundle install work, but I still prefer the simple maintenance of putting bundler into the gemfile.

What would be the best current option for me?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the case from the Gemfile with gem "bundler", bundle update --bundler, and bundle package --all; inspect the generated vendor/cache contents. Done means determining whether Bundler should be cached with the other gems and adding coverage or documenting the supported workflow.

Written by the indexing model from the issue text.

Assessment

Tech stack
ruby
Domain
cli, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.