[英]How to force gem version in rails application?
I need to use addressable 2.2.4 gem, but I have 2.2.5 version (because of an issue discussed here: https://github.com/sporkmonger/addressable/pull/33 ). 我需要使用可寻址的2.2.4 gem,但我有2.2.5版本(因为这里讨论了一个问题: https : //github.com/sporkmonger/addressable/pull/33 )。 I tried:
我试过了:
source 'http://rubygems.org'
source 'http://gems.github.com'
gem "addresable", "2.2.4"
bundle install
and get Could not find gem 'adressable (= 2.2.4, runtime)' in any of the gem sources listed in your Gemfile.
并且
Could not find gem 'adressable (= 2.2.4, runtime)' in any of the gem sources listed in your Gemfile.
If I install/uninstall gem manually by 如果我手动安装/卸载gem
sudo gem install addressable -v 2.2.4
sudo gem uninstall addressable -v 2.2.5
I get the same error. 我犯了同样的错误。
So, how can I force 2.2.4 version for my app? 那么,我怎么能为我的应用强制2.2.4版本?
bundle update
. bundle update
。 It's counter-intuitive, but it'll rebuild your Gemfile.lock with the specified version.
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.