This question already has an answer here:
这个问题已经有了答案:
- Meaning of tilde-greater-than (~>) in version requirement? 4 answers
- 在版本要求中,倾斜度大于(~>)的含义是什么?4答案
In the gem file for https://github.com/justinfrench/formtastic they have:
在https://github.com/justinfrench/formtastic的gem文件中:
gem 'formtastic', '~> 2.0.0'
What does the ~> mean. It actually gives me the error "Could not find gem 'formtastic (~> 2.0.0, runtime)' in any of the gem sources."
>是什么意思?它实际上给了我一个错误“在任何一个gem源中都找不到gem 'formtastic(~> 2.0.0,运行时)”。
1 个解决方案
#1
81
It's a confusing operand, but it limits versions to a subset of the possible versions. So ~> 2.0.0
means ">= 2.0.0 and < 2.1" in version numbers.
这是一个令人困惑的操作数,但它将版本限制为可能版本的子集。所以~> 2.0.0在版本号中表示“>= 2.0.0,< 2.1”。
1.2.3 seems to be the latest version of Formtasic, that's why you're getting this error message.
1.2.3似乎是Formtasic的最新版本,这就是为什么您会收到这个错误消息。
#1
81
It's a confusing operand, but it limits versions to a subset of the possible versions. So ~> 2.0.0
means ">= 2.0.0 and < 2.1" in version numbers.
这是一个令人困惑的操作数,但它将版本限制为可能版本的子集。所以~> 2.0.0在版本号中表示“>= 2.0.0,< 2.1”。
1.2.3 seems to be the latest version of Formtasic, that's why you're getting this error message.
1.2.3似乎是Formtasic的最新版本,这就是为什么您会收到这个错误消息。