Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7543419
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T08:25:25+00:00 2026-05-30T08:25:25+00:00

This is the error I’m getting: Task not supported by ‘mysql2’ /Users/me/.rvm/gems/ruby-1.8.7-p352@project/gems/rails-2.3.8/lib/tasks/databases.rake:380 Here is

  • 0

This is the error I’m getting:

Task not supported by 'mysql2'
/Users/me/.rvm/gems/ruby-1.8.7-p352@project/gems/rails-2.3.8/lib/tasks/databases.rake:380

Here is the code around the arrea where the error occured:

desc "Empty the test database"
task :purge => :environment do
  abcs = ActiveRecord::Base.configurations
  case abcs["test"]["adapter"]
  when "mysql"
    ActiveRecord::Base.establish_connection(:test)
    ActiveRecord::Base.connection.recreate_database(abcs["test"]["database"], abcs["test"])
  when "postgresql"
    ActiveRecord::Base.clear_active_connections!
    drop_database(abcs['test'])
    create_database(abcs['test'])
  when "sqlite","sqlite3"
    dbfile = abcs["test"]["database"] || abcs["test"]["dbfile"]
    File.delete(dbfile) if File.exist?(dbfile)
  when "sqlserver"
    dropfkscript = "#{abcs["test"]["host"]}.#{abcs["test"]["database"]}.DP1".gsub(/\\/,'-')
    `osql -E -S #{abcs["test"]["host"]} -d #{abcs["test"]["database"]} -i db\\#{dropfkscript}`
    `osql -E -S #{abcs["test"]["host"]} -d #{abcs["test"]["database"]} -i db\\#{RAILS_ENV}_structure.sql`
  when "oci", "oracle"
    ActiveRecord::Base.establish_connection(:test)
    ActiveRecord::Base.connection.structure_drop.split(";\n\n").each do |ddl|
      ActiveRecord::Base.connection.execute(ddl)
    end
  when "firebird"
    ActiveRecord::Base.establish_connection(:test)
    ActiveRecord::Base.connection.recreate_database!
  else
    raise "Task not supported by '#{abcs["test"]["adapter"]}'"
  end
end

line 380, is the raise line at the end.

Everything started working when I added this to mysql case:

  when "mysql", "mysql2"

Is there a newer version of rails that has this fixed? ( < 3.0?)? I don’t want to have to tell everyone to add ,"mysql2" when the want to run tests. =\

Or is this a bug in rails 2.3.x?

I’m using rails 2.3.8 and ruby 1.8.7

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T08:25:26+00:00Added an answer on May 30, 2026 at 8:25 am

    Upgrading to 2.3.10 may fix it per this issue: https://github.com/brianmario/mysql2/issues/83

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This is the error I'm getting: The procedure entry point '_except_handler4_common' could not be
Getting this error: # rails c FFI::NotFoundError: Function 'xmlRelaxNGSetParserStructuredErrors' not found in [libxml2.so, libxslt.so,
This error seems to just pop up now and again. It is not restricted
This error message is driving me nuts. I'm getting it when using Html.ListBox and
Getting this error: 2009-09-03 12:44:02.307 xcodebuild[307:10b] warning: compiler 'com.apple.compilers.llvm.clang.1_0.analyzer' is based on missing compiler
Getting this error with jquery & jquery.form. Site has been live for awhile..upgraded to
I got this error today when trying to open a Visual Studio 2008 project
Got this error trying to do a new project with rails 3.2. haml issue
This error happened after updating to latest may 2009 CTP. Sometimes I do not
Getting this error when I put use Blog; at the top. Warning: The use

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.