简体   繁体   English

Rails,已安装的Gem版本和Gemfile.lock版本

[英]Rails, Installed Gem version and Gemfile.lock version

I have a problem. 我有个问题。

Gemfile.lock is always committed if bundle is updated. 如果更新bundle,则始终提交Gemfile.lock。

And today, when I deploy web application, I see this error message, 今天,当我部署Web应用程序时,我看到此错误消息,

Could not find jwt-1.5.3 in any of the sources

jwt-1.5.2 is installed in deployed server at shared gem path. jwt-1.5.2安装在共享gem路径的已部署服务器中。

I think bundle install new jwt-1.5.3 gem because the specified version (1.5.3) in Gemfile.lock and installed version (1.5.2) is not equal. 我认为bundle安装新的jwt-1.5.3 gem,因为Gemfile.lock中指定的版本(1.5.3)和安装版本(1.5.2)不相等。

Why cannot bundle install jwt gem? 为什么不能捆绑安装jwt gem?

Should bundle install that gem if Could not find jwt-1.5.3? 如果无法找到jwt-1.5.3,应该捆绑安装那个gem吗?

Delete the Gemfile.lock file. 删除Gemfile.lock文件。 Then bundle install again. 然后再次bundle install Hopefully it will install again with jwt-1.5.3 . 希望它能再次安装jwt-1.5.3 But make sure you have mentioned the version of jwt in gem file. 但请确保您在gem文件中提到了jwt的版本。

Oh.. I know why. 哦..我知道为什么。

https://rubygems.org/gems/jwt/versions/1.5.3 https://rubygems.org/gems/jwt/versions/1.5.3

jwt 1.5.3 is yanked because of some reasons. 由于某些原因,jwt 1.5.3被猛拉了。 So 1.5.3 version isn't in repository..! 所以1.5.3版本不在存储库中..!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM