سؤال

My code:

require 'rubygems'
require 'basecamp'
basecamp = Basecamp.establish_connection!('example.basecamphq.com', 'example', '123456', true)
projects = Basecamp::Project.find(:all)
projects.inspect

It gives:

/Users/kir/.rvm/gems/ruby-1.8.7-p352@project/gems/activeresource-3.1.0/lib/active_resource/base.rb:922:in `instantiate_collection': undefined method `collect!' for #<Hash:0x105faa450> (NoMethodError)
    from /Users/kir/.rvm/gems/ruby-1.8.7-p352@project/gems/activeresource-3.1.0/lib/active_resource/base.rb:894:in `find_every'
    from /Users/kir/.rvm/gems/ruby-1.8.7-p352@project/gems/activeresource-3.1.0/lib/active_resource/base.rb:806:in `find'
    from bs.rb:4

What's wrong with my code?

هل كانت مفيدة؟

المحلول

There were some problems with the basecamp wrapper gem and rails >= 3.1.x. The "undefined method `collect!'" error was one of them. I pushed some fixes and bumped the gem version to 0.0.7 which should solve that and other problems.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top