没有这样的文件来加载 active_record/associations/has_and_belongs_to_many_association [英] no such file to load active_record/associations/has_and_belongs_to_many_association

查看:27
本文介绍了没有这样的文件来加载 active_record/associations/has_and_belongs_to_many_association的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 Gemfile 中添加了 Composite_primary_keys gem.在本地环境中它运行良好,但在 centos 机器上它因以下错误而中断.Ruby 版本是 1.9.2p290,rubygems 版本是 1.3.7 在这两种环境中.有谁知道为什么会这样?

I added the composite_primary_keys gem in my Gemfile. On local environment it runs fine, but on a centos machine it breaks with the following error. Ruby version is 1.9.2p290 and rubygems version is 1.3.7 on both environments. Does anyone know why that could be?

bundle exec rake db:create --trace

no such file to load -- active_record/associations/has_and_belongs_to_many_association
/var/tmp/jenkins/gem_cache/myapp/gems/activesupport-3.1.3/lib/active_support/dependencies.rb:240:in `require'
/var/tmp/jenkins/gem_cache/myapp/gems/activesupport-3.1.3/lib/active_support/dependencies.rb:240:in `block in require'
/var/tmp/jenkins/gem_cache/myapp/gems/activesupport-3.1.3/lib/active_support/dependencies.rb:223:in `block in load_dependency'
/var/tmp/jenkins/gem_cache/myapp/gems/activesupport-3.1.3/lib/active_support/dependencies.rb:640:in `new_constants_in'
/var/tmp/jenkins/gem_cache/myapp/gems/activesupport-3.1.3/lib/active_support/dependencies.rb:223:in `load_dependency'
/var/tmp/jenkins/gem_cache/myapp/gems/activesupport-3.1.3/lib/active_support/dependencies.rb:240:in `require'
/var/tmp/jenkins/gem_cache/myapp/gems/composite_primary_keys-4.1.2/lib/composite_primary_keys.rb:40:in `<top (required)>'
/opt/ruby/1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.22/lib/bundler/runtime.rb:68:in `require'
/opt/ruby/1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.22/lib/bundler/runtime.rb:68:in `block (2 levels) in require'
/opt/ruby/1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.22/lib/bundler/runtime.rb:66:in `each'
/opt/ruby/1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.22/lib/bundler/runtime.rb:66:in `block in require'
/opt/ruby/1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.22/lib/bundler/runtime.rb:55:in `each'
/opt/ruby/1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.22/lib/bundler/runtime.rb:55:in `require'
/opt/ruby/1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.22/lib/bundler.rb:122:in `require'

推荐答案

清理 jenkins 机器上的共享 gems 列表解决了这个问题.

Cleaning the shared gems list on the jenkins machine fixed the issue.

这篇关于没有这样的文件来加载 active_record/associations/has_and_belongs_to_many_association的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆