Posted by Chris Blackburn Tue, 18 Sep 2007 21:38:00 GMT

If you are getting an error message like this:

ActiveRecord::StatementInvalid: Mysql::Error: Table configurable_settings doesn't exist

… when trying to use Jacob Radford’s http://agilewebdevelopment.com/plugins/acts_as_configurable

Just do this:

./script/console development ConfigurableSetting.create_table

Of course replace ‘development’ above with whatever environment you need.

Posted by Chris Blackburn Thu, 31 May 2007 18:10:00 GMT

If you are experiencing the error: “undefined class/module MyClass” when fetching data from memcached, be assured that you are not alone. It is a known bug and the simplest way I know of to get around it is to reference the class or classes right before you retrieve data from the cache.

For example, if the following code causes the problem:

if not (genres = Cache.get(key))
  genres = Genre.find(:all, :condition => "platform_id = 1")
  Cache.put(key, genres, 60*60*24) # cache for 1 day
end

… then this code will work around it:

Genre
if not (genres = Cache.get(key))
  genres = Genre.find(:all, :condition => "platform_id = 1")
  Cache.put(key, genres, 60*60*24) # cache for 1 day
end

Notice the ‘Genre’ reference before the if statement. Some have reported success by using the ‘model’ statement within the controller, however that is deprecated. This workaround will get you going again.

Older posts: 1 2