没有这样的文件加载active_record / associations / has_and_belongs_to_many_association - composite_primary_keys

时间:2014-05-13 02:05:27

标签: ruby-on-rails

我遇到的问题与no such file to load active_record/associations/has_and_belongs_to_many_association相同?

尝试了建议的解决方案

然而,问题在gems源代码的ar_4.1.x分支中得到修复。如果您的项目使用Bundler,则解决方案是编辑其Gemfile并替换行

`gem composite_primary_keys`

gem composite_primary_keys, {
:git => git://github.com/composite-primary-keys/composite_primary_keys.git,
:branch => ar_4.1.x
}`

但是我得到了以下错误 -

$ bundle update
Updating git://github.com/composite-primary-keys/composite_primary_keys.git
Fetching gem metadata from https://rubygems.org/.........
Fetching additional metadata from https://rubygems.org/..
Resolving dependencies...
Bundler could not find compatible versions for gem "activerecord":
In Gemfile:
rails (= 4.1.0) ruby depends on
activerecord (= 4.1.0) ruby

composite_primary_keys (>= 0) ruby depends on
activerecord (4.1.0.rc2)`

请告知如何离开这里?

0 个答案:

没有答案