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 4571166
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T19:27:56+00:00 2026-05-21T19:27:56+00:00

I am getting some errors whilst connecting to MySQL and the fixing of it

  • 0

I am getting some errors whilst connecting to MySQL and the fixing of it led me to upgrade the mysql2 gem.

I ran this command to install mysql2:

ruby install mysql2

and now “gem list” shows this gem: mysql2 (0.3.2)

But I think it isn’t part of my application environment still since the server gives this error:

Please install the mysql2 adapter: `gem install activerecord-mysql2-adapter` (no such file to load -- active_record/connection_adapters/mysql2_adapter)

I have RVM and I’ve used bundler to make a gemset for this application. How can I add mysql2 to this application’s gemset?

This is my gemfile:

source 'http://rubygems.org'

gem 'rails', '3.0.7'

# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'

gem 'sqlite3'

gem 'mysql2' , '0.3.2' 

And this is my MySQL adapter version:

$bundle show mysql2
/home/agenadinik/workspace/udfr/mysql2/ruby/1.9.1/gems/mysql2-0.3.2

Also

$ rvm gemdir
/home/agenadinik/.rvm/rubies/ruby-1.9.2-p180/bin/gem:4: warning: Insecure world writable dir /home/agenadinik in PATH, mode 040777
/home/agenadinik/.rvm/gems/ruby-1.9.2-p180

  • 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-21T19:27:57+00:00Added an answer on May 21, 2026 at 7:27 pm

    Note that you cannot use mysql2 version 0.3.x with Rails version less than 3.1.x.
    I assume you are using Rails 3.0.x or below (and thus you need to use mysql2 version 0.2.x):

    Here is an example of how to set up a gemset and the Gemfile to use mysql2:

    ~/code/myapp $ rvm gemset create myapp
    ~/code/myapp $ rvm use @myapp
    <<<<<Edit the Gemfile and add the line gem "mysql2","0.2.7" then save and exit editor.>>>>>
    ~/code/myapp $ bundle install
    ~/code/myapp $ bundle show mysql2
    <<<<<Output should be similar to: /home/<your-name>/.rvm/gems/ruby-<some-version>@myapp/gems/mysql2-0.2.7>>>>>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I hate giving out my code like this but I'm getting some errors about
I'm posting this question not because I am getting some errors but because I
My document is getting some errors when using the W3C validator because some of
I'm new in subsonic3, and I'm getting some errors when I try to use
I published an app 2 moths ago and sometimes, I am getting some errors
I'm getting some very wierd errors. The compiler seems to want to call the
Im a getting errors from some code developed in Java that want to use
Getting these errors in some java code http://tutorials.jenkov.com/java-multithreaded-servers/multithreaded-server.html Exception in thread Thread-0 java.lang.RuntimeException: Cannot
I want to log some seemingly random errors I'm getting in a Delphi written
MessageBox.Show((some_string.Length).ToString); I am getting two errors for this: The best overloaded method match for

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.