Peter Marklund

Peter Marklund's Home

2007-10-31

Rails Plugin: mysql_requirement

I added the plugin mysql_requirement that allows me to check the encoding/charset settings of the MySQL server as well as its version when my Rails application starts up and abort otherwise.

2 comment(s)

Comments

AP said 2009-06-28 01:07:

@Andre I had the same problem, and I think I got around it with this in my initializer: unless defined?(Rake) && Rake.application.top_level_tasks.include?("db:create") MysqlRequirement.require do |req| ...
--------------------------------------------------------------------------------

Andre said 2007-12-19 15:35:

Hi Peter, In Rails 2.0, if I add the "MysqlRequirement..." commands to an initializer file, then I can't do "rake db:create" -- it gives an error. What should I do?
--------------------------------------------------------------------------------