chicks / sugarcrm

A ruby based REST Client for SugarCRM
MIT License
90 stars 64 forks source link

Undefined Method error in console and server start #31

Closed willfore closed 13 years ago

willfore commented 13 years ago

When booting up the server or the console I keep getting the following error: Any ideas on what may be causing it? I already have all of the requirements met.

undefined method `class_attribute' for SugarCRM::Base:Class

/Library/Ruby/Gems/1.8/gems/sugarcrm-0.9.10/lib/sugarcrm/base.rb:10: undefined method class_attribute' for SugarCRM::Base:Class (NoMethodError) from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:ingem_original_require' from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in require' from /Library/Ruby/Gems/1.8/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:156:inrequire' from /Library/Ruby/Gems/1.8/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:521:in new_constants_in' from /Library/Ruby/Gems/1.8/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:156:inrequire' from /Library/Ruby/Gems/1.8/gems/sugarcrm-0.9.10/lib/sugarcrm.rb:19 from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in gem_original_require' from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:inrequire' from /Library/Ruby/Gems/1.8/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:156:in require' from /Library/Ruby/Gems/1.8/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:521:innew_constants_in' from /Library/Ruby/Gems/1.8/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:156:in require' from /Library/Ruby/Gems/1.8/gems/rails-2.3.8/lib/rails/gem_dependency.rb:215:inload' from /Library/Ruby/Gems/1.8/gems/rails-2.3.8/lib/initializer.rb:307:in load_gems' from /Library/Ruby/Gems/1.8/gems/rails-2.3.8/lib/initializer.rb:307:ineach' from /Library/Ruby/Gems/1.8/gems/rails-2.3.8/lib/initializer.rb:307:in load_gems' from /Library/Ruby/Gems/1.8/gems/rails-2.3.8/lib/initializer.rb:169:inprocess' from /Library/Ruby/Gems/1.8/gems/rails-2.3.8/lib/initializer.rb:113:in send' from /Library/Ruby/Gems/1.8/gems/rails-2.3.8/lib/initializer.rb:113:inrun' from /Users/billy/Sites/incarcerate/config/environment.rb:9 from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in gem_original_require' from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:inrequire' from /Library/Ruby/Gems/1.8/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:156:in require' from /Library/Ruby/Gems/1.8/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:521:innew_constants_in' from /Library/Ruby/Gems/1.8/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:156:in require' from /Library/Ruby/Gems/1.8/gems/rails-2.3.8/lib/commands/server.rb:84 from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:ingem_original_require' from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `require' from script/server:3

davidsulc commented 13 years ago

It seems you're using ActiveSupport v. 2.3.8. The gem requires version >= 3.0.0

Try updating ActiveSupport and it should work (it's tested against Ruby 1.8.7 and 1.9.2).

chicks commented 13 years ago

Yeah, class_attribute is an ActiveSupport extension which permits inherited class attributes that can be overridden without affecting superclass instances.

willfore commented 13 years ago

Thanks guys, I'll upgrade my rails app to >= 3.0 and give that a shot.