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,243
  • 2
  • 14
  • 36

2 Answers2

11

On the remote server run gem update bundler and after bundle install.

miken32
  • 42,008
  • 16
  • 111
  • 154
Roman Kiselenko
  • 43,210
  • 9
  • 91
  • 103
  • Reinstall bundler means that I've installed the newest version (updated version 1.6.2) – Artem Z. May 21 '14 at 08:55
  • 1
    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,674
  • 1
  • 21
  • 26