Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

cattr_accessor not working (outside rails) when active_support is required?

I'm not familiar with active_support, so bear with me!

Fox's library allows searching via google's APIs, but it requires active support. i can't seem to get it working though! Any ideas?

require 'rubygems'
require 'active_support'
require 'google_search'

p GoogleSearch.web :q => "Hello World!"

Gives me:

NoMethodError: undefined method ‘cattr_accessor’ for GoogleSearch:Class

Any ideas what I'm doing wrong?

like image 538
JP. Avatar asked Jun 17 '10 19:06

JP.


1 Answers

With more googling I found this answer - seems to work for me!

I'm now requiring: require 'active_support/all'

I hope this helps someone!

like image 128
JP. Avatar answered Nov 09 '22 20:11

JP.