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

  • Home
  • SEARCH
  • 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 1018347
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T10:50:40+00:00 2026-05-16T10:50:40+00:00

When running Rails 3 RC with Ruby 1.9.2.rc2 under RVM I keep getting a

  • 0

When running Rails 3 RC with Ruby 1.9.2.rc2 under RVM I keep getting a very large number of errors from the MySQL driver bundle that look like this:

/opt/local/rvm/gems/ruby-1.9.2-rc2/gems/mysql-2.8.1/lib/mysql_api.bundle: warning: already initialized constant MysqlRes
/opt/local/rvm/gems/ruby-1.9.2-rc2/gems/mysql-2.8.1/lib/mysql_api.bundle: warning: already initialized constant MysqlField
/opt/local/rvm/gems/ruby-1.9.2-rc2/gems/mysql-2.8.1/lib/mysql_api.bundle: warning: already initialized constant MysqlError
/opt/local/rvm/gems/ruby-1.9.2-rc2/gems/mysql-2.8.1/lib/mysql_api.bundle: warning: already initialized constant VERSION
/opt/local/rvm/gems/ruby-1.9.2-rc2/gems/mysql-2.8.1/lib/mysql_api.bundle: warning: already initialized constant OPT_CONNECT_TIMEOUT
/opt/local/rvm/gems/ruby-1.9.2-rc2/gems/mysql-2.8.1/lib/mysql_api.bundle: warning: already initialized constant OPT_COMPRESS
/opt/local/rvm/gems/ruby-1.9.2-rc2/gems/mysql-2.8.1/lib/mysql_api.bundle: warning: already initialized constant OPT_NAMED_PIPE
/opt/local/rvm/gems/ruby-1.9.2-rc2/gems/mysql-2.8.1/lib/mysql_api.bundle: warning: already initialized constant INIT_COMMAND

This shows up in rails console and unit tests, anything that requires the full Rails stack, but not a script that uses Sequel directly in the same environment.

Although the bundle itself does load and the MySQL driver does work, this enormous pile of warnings prefaces anything run through Rails. Usually this results from a redundant load of the mysql gem somewhere within the Rails environment. The gem is declared in the Gemfile:

gem 'rails', '3.0.0.rc'

gem 'haml'
gem 'sequel'

gem 'mysqlplus'
gem 'mysql'

I’d suppose this is the Rails autoloader failing to understand the Mysql library has already been loaded, and loading it again. Is there an easy way to fix this?

Update:

Load mysql or mysqlplus but not both at the same time or you will get warnings like this. mysqlplus includes all of the functionality of mysql and is a dependency of Sequel.

  • 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-16T10:50:40+00:00Added an answer on May 16, 2026 at 10:50 am

    Do you need the mysqlplus gem? I am using Rails 3 with only mysql 2.8.1:

    gem 'mysql', '2.8.1'

    Although I have not used mysqlplus, I am guessing that it sets the constants you are seeing in the warnings, and then the mysql gem sets these constants again when it is loaded.

    UPDATE: Use mysql2 instead

    #gem 'mysql', '2.8.1'
    gem 'mysql2'
    

    You also need to update your database adapters in database.yml:

    development:
      #adapter: mysql
      adapter: mysql2
      database: somedatabase_development
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 499k
  • Answers 500k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer This is not pretty but it works: rm -R $(ls… May 16, 2026 at 12:45 pm
  • Editorial Team
    Editorial Team added an answer Yes. Override the base1 and base2 methods in Derived to… May 16, 2026 at 12:45 pm
  • Editorial Team
    Editorial Team added an answer No, you can't. Unfortunately, UIEvent doesn't expose any public way… May 16, 2026 at 12:45 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

I'm using rvm (Ruby Version Manager) and running Rails 3 RC. I need to
I'm running Rails 2.3.3 application which is deployed with passenger/mod_rails with ruby-enterprise-1.8.6-20090610 and apache
We're using EngineYard Cloud to deploy our Ruby on Rails application. We are running
After, reading and understanding Dan Benjamin's post about installing Ruby, Rails, etc. on OSX
I have developed a Ruby on Rails application and successfully deployed on Weblogic using
I'm following along with RailsSpace: Building a Social Networking Website with Ruby on Rails
I'm currently looking at hosting solutions for my Ruby on Rails SaaS web application,
Rails can't load (404 error) CSS & JS files on production but has no
I'm a big fan of the ruby way. However today it got in my
I'm having issues when running the default tests in Rails3 beta4 with Cancan (

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.