9

Here is a trouble: on my remote server command gem list shows:

some gems
minitest (4.7.5)  
....

bundle show minitest command shows:

/var/lib/gems/1.9.1/gems/minitest-4.7.5

bundle show rails shows the same directory

bundle -v - 1.6.2 (the latest version)

But I've an error: Could not find minitest-4.7.5 in any of the sources (Bundler::GemNotFound)

The steps I've made

  • Delete Gemfile.lock and bundle install again
  • Reinstall bundler
  • Ruby version 2.1.2

Bundle install output shows Using minitest (4.7.5)

Artem Z.
  • 1,234
  • 2
  • 14
  • 35

2 Answers2

11

Before down vote:

  • This opinion for remote server.

On server run gem update bundler and after bundle install.

Philidor
  • 40,933
  • 9
  • 84
  • 94
  • Reinstall bundler means that I've installed the newest version (updated version 1.6.2) – Artem Z. May 21 '14 at 08:55
  • This answer seems to be helpful for people but would be greatly improved if it could have a sentence or two explaining why it works and what was wrong in the first place; you seem to be knowledgeable so it would be great if you could help here. – Peter Ellis Jun 16 '16 at 19:47
  • This error is happening on local machine, not remote server. – IgorGanapolsky Jan 28 '19 at 16:41
0

I think maybe the gems you installed system-wide cause the problem.

You may try bundle package locally, and commit the gems generated in vendor/cache. Pull it on server, and try bundle install —local.

Or, you may just use bundle install --path=vendor/bundle on server.

Give it a try, and hope this can help.

ifyouseewendy
  • 6,664
  • 1
  • 20
  • 26