cannot load such file -- active_record/associations/association_proxy.rb

269 views
Skip to first unread message

Patrick Barnes

unread,
Jul 10, 2013, 1:15:27 AM7/10/13
to compos...@googlegroups.com
Hi,

I'm pretty new to Rails, but I'm trying to use CPK with the active_nutrition gem. Both of these have not been fully updated for Rails 4, so I forked them (with CPK I forked https://github.com/drnic/composite_primary_keys/tree/ar_4.0.x) so I could attempt to update them for Rails 4.

I think I made the correct changes, but I'm getting an error that has really stumped me. I wonder if anyone has gotten this error and found a work-around:

cannot load such file -- active_record/associations/association_proxy.rb

In my case it happens when I attempt the following from within my Rails 4 app, which is using the active_nutrition gem (locally sourced, with CPK as a locally sourced dependency): 

$ bundle exec rake active_nutrition:migrate active_nutrition:rebuild --trace
rake aborted!
cannot load such file -- active_record/associations/association_proxy.rb
/Users/patrick/.rbenv/versions/custom-2.0.0-p247/lib/ruby/gems/2.0.0/gems/composite_primary_keys-3.1.6/lib/composite_primary_keys.rb:37:in `require'
/Users/patrick/.rbenv/versions/custom-2.0.0-p247/lib/ruby/gems/2.0.0/gems/composite_primary_keys-3.1.6/lib/composite_primary_keys.rb:37:in `<top (required)>'
/Users/patrick/projects/mygems/active_nutrition/lib/active_nutrition.rb:16:in `require'
/Users/patrick/projects/mygems/active_nutrition/lib/active_nutrition.rb:16:in `<top (required)>'

I see that someone has had this problem recently, but the solution offered won't work in my case:

http://stackoverflow.com/questions/17079733/cannot-detect-association-proxy-rb-in-rails-4-0-0-rc1

Any ideas? Or anyone know how soon CPK for Rails 4 will be available?

Patrick
Reply all
Reply to author
Forward
0 new messages