Rails:在任何来源中找不到minitest-4.7.5

时间:2021-08-27 00:20:03

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

这是一个麻烦:在我的远程服务器命令中,gem列表显示:

some gems
minitest (4.7.5)  
....

bundle show minitest command shows:

bundle show minitest命令显示:

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

bundle show rails shows the same directory

bundle show rails显示相同的目录

bundle -v - 1.6.2 (the latest version)

bundle -v - 1.6.2(最新版本)

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

但我有一个错误:在任何来源中都找不到minitest-4.7.5(Bundler :: GemNotFound)

The steps I've made

  • Delete Gemfile.lock and bundle install again
  • 删除Gemfile.lock并再次捆绑安装
  • Reinstall bundler
  • 重新安装bundler
  • Ruby version 2.1.2
  • Ruby版本2.1.2

Bundle install output shows Using minitest (4.7.5)

Bundle install输出显示使用minitest(4.7.5)

2 个解决方案

#1


10  

Before down vote:

投票前:

  • This opinion for remote server.
  • 这个意见对于远程服务器。

On server run gem update bundler and after bundle install.

在服务器上运行gem update bundler并在bundle安装之后。

#2


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.

您可以尝试在本地捆绑包,并提交在vendor / cache中生成的gem。将其拉到服务器上,然后尝试捆绑安装-local。

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

或者,您可以在服务器上使用bundle install --path = vendor / bundle。

Give it a try, and hope this can help.

尝试一下,希望这会有所帮助。

#1


10  

Before down vote:

投票前:

  • This opinion for remote server.
  • 这个意见对于远程服务器。

On server run gem update bundler and after bundle install.

在服务器上运行gem update bundler并在bundle安装之后。

#2


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.

您可以尝试在本地捆绑包,并提交在vendor / cache中生成的gem。将其拉到服务器上,然后尝试捆绑安装-local。

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

或者,您可以在服务器上使用bundle install --path = vendor / bundle。

Give it a try, and hope this can help.

尝试一下,希望这会有所帮助。