[英]Could not find gem 'jquery-rails (= 2.0.0) ruby' in the gems available on this machine
So in the GemFile if I leave it as gem 'query-rails' and install the bundle, it works. 所以在GemFile中,如果我将它作为gem'query -rails'保留并安装捆绑包,它就可以工作。 But if I specify the version like this:
但是,如果我指定这样的版本:
gem 'jquery-rails', '2.0.0'
and want to install or update the bundle, it doesn't work and shows the error in the title. 并且想要安装或更新捆绑包,它不起作用并在标题中显示错误。
I also did a 我也做了一个
sudo gem install jquery-rails
and tried again to give a version to jQuery but still didn't work. 并再次尝试给jQuery一个版本,但仍然无法正常工作。
Why?! 为什么?!
There is no v2.0.0 jquery-rails gem available - it was yanked . 没有v2.0.0 jquery-rails gem可用 - 它被猛拉了 。 You should try using 2.0.1 or later.
您应该尝试使用2.0.1或更高版本。 Generally, it's better to specify the '~>' helper to get the latest bug fixes for that minor version:
通常,最好指定'〜>'帮助程序以获取该次要版本的最新错误修复:
gem 'jquery-rails', '~> 2.0.0'
This will install v2.0.3 which is the latest of the 2.0.x series. 这将安装v2.0.3,这是2.0.x系列的最新版本。 Read What does tilde-greater-than (~>) mean in Ruby gem dependencies?
阅读在Ruby gem依赖项中,tilde-greater-than(〜>)的含义是什么? and http://semver.org/ for more info on this.
和http://semver.org/了解更多相关信息。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.