[typo] Help with mysql and installer

Scott Laird scott at sigkill.org
Thu Aug 10 14:17:41 EDT 2006

I don't use mysql, so fixing mysql problems is kind of hard for me :-).

I'd like to get native mysql support into the installer.  I'd really
like to get it in *today*.  So I'd like some help.  It's not all that
complex--here's the important part of the postgres driver:

    class Postgresql < RailsInstaller::Database
      def self.yml(installer)
        login: &login
          adapter: postgresql
          host: #{db_host installer}
          username: #{db_user installer}
          password: #{installer.config['db_password']}
          database: #{db_name installer}

          <<: *login

          <<: *login

          database: #{db_name installer}-test
          <<: *login

      # Create a PostgreSQL database.
      def self.create_database(installer)
        installer.message "Creating PostgreSQL database"
        system("createdb -U #{db_user installer} #{db_name installer}")
        system("createdb -U #{db_user installer} #{db_name installer}-test")

Basically, I need a 'yml' method that builds a database.yml, and a
create_database method that can create a MySQL db.

If someone can implement this *now* and let me know, then I can
include it in Typo 4.0.2.  The source lives in
http://rails-app-installer.googlecode.com/svn/trunk; you should be
able to check it out via svn.


More information about the Typo-list mailing list