Taryn East

Results 12 comments of Taryn East

Same here, for ruby 1.8.7 and Rails 2.3.2 /usr/lib/ruby/gems/1.8/gems/bj-1.0.1/lib/bj/logger.rb:2: uninitialized constant Logger (NameError) from /usr/lib/ruby/gems/1.8/gems/bj-1.0.1/lib/bj.rb:64:in `load' from /usr/lib/ruby/gems/1.8/gems/bj-1.0.1/lib/bj.rb:64 from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:55:in`gem_original_require' from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:55:in `require' from /usr/lib/ruby/gems/1.8/gems/bj-1.0.1/bin/bj:3 from /usr/bin/bj:23:in`load' from /usr/bin/bj:23

Ok, I've solved it by hacking /usr/lib/ruby/gems/1.8/gems/bj-1.0.1/lib/bj/logger.rb and adding "require 'logger'" at the top Idea stolen from here: https://github.com/lsegal/yard/issues/22

Me too. The problem is the line that begins: insert_sql = ActiveRecord::Base.send(:sanitize_sql, [ SQL queries seem no longer allowed on ActiveRecord::Base - you need to find an _actual_ Active Record...

I've solved it with a horrible monkey-patch: ``` class Object # ActiveRecord::Base *is* an abstract class. unless defined?(abstract_class?) def abstract_class? true end end end ```

For a quick fix try: CoolResource.new(:owner => current_user.attributes) ???

or: CoolResource.new(:owner_id => current_user.id)

Hmm, weird. Looking at your backtrace, it seems to think that current_user is an Array. Can you try again and also do a current_user.inspect to show us what is being...

Cool. Good to know there's at least a workaround. I have this vague feeling that ActiveRecord has similar issues with accepting real objects for associations on creation. Not sure why...

There isn't query cacheing in HyRes yet (sorry), but there is simple associations-caching - so if you reuse the same object-instance it'll be cached on the object... I realise this...