简体   繁体   English

如何在Gem Bundler中指定小于版本

[英]How to specify less than version in Gem Bundler

I'm trying to specify factory_girl_rails version less than 3.0 as I don't have ruby 1.9 installed and 3.0 isn't compatible with 1.8.x. 我尝试指定的factory_girl_rails版本低于3.0,因为我没有安装ruby 1.9,而3.0与1.8.x不兼容。 I've tried a few ways round but it always tries to install 3.0.0 and fails on the ruby dependency. 我已经尝试了几种方法,但是它始终尝试安装3.0.0并在ruby依赖项上失败。

According to this , Rails 3.0 should still be compatible with Ruby 1.8.7 (they aren't dropping Ruby 1.8 support until 4.0). 据此 ,Rails 3.0仍应与Ruby 1.8.7兼容(它们直到4.0才会放弃对Ruby 1.8的支持)。

But, if you put this in your Gemfile, bundler should use the latest 2.3 version (the last minor version before 3.0) of Rails: 但是,如果将其放在Gemfile中,捆绑程序应使用最新的2.3版本(3.0之前的最后一个次要版本)的Rails:

gem 'rails', '~>2.3'

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

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