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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T21:48:38+00:00 2026-06-09T21:48:38+00:00

I’m unable to have rails recognize the mysql2 gem that I’ve installed. I’m using

  • 0

I’m unable to have rails recognize the mysql2 gem that I’ve installed. I’m using rails 3.1 and ruby 1.9.2. I’m stumped here..

dan@luci:~$ cd snorby/
Using: /home/dan/.rvm/gems/ruby-1.9.2-p290@snorby

dan@luci:~/snorby$ gem list -l | grep mysql2
mysql2 (0.3.11)

dan@luci:~/snorby$ rails c
Loading development environment (Rails 3.1.0)
1.9.2p290 :001 > require 'mysql2'
LoadError: no such file to load -- mysql2
        from /home/dan/.rvm/gems/ruby-1.9.2-p290@snorby/gems/activesupport-3.1.0/lib/active_support/dependencies.rb:240:in `require'
        from /home/dan/.rvm/gems/ruby-1.9.2-p290@snorby/gems/activesupport-3.1.0/lib/active_support/dependencies.rb:240:in `block in require'
        from /home/dan/.rvm/gems/ruby-1.9.2-p290@snorby/gems/activesupport-3.1.0/lib/active_support/dependencies.rb:223:in `block in load_dependency'
        from /home/dan/.rvm/gems/ruby-1.9.2-p290@snorby/gems/activesupport-3.1.0/lib/active_support/dependencies.rb:640:in `new_constants_in'
        from /home/dan/.rvm/gems/ruby-1.9.2-p290@snorby/gems/activesupport-3.1.0/lib/active_support/dependencies.rb:223:in `load_dependency'
        from /home/dan/.rvm/gems/ruby-1.9.2-p290@snorby/gems/activesupport-3.1.0/lib/active_support/dependencies.rb:240:in `require'
        from (irb):1
        from /home/dan/.rvm/gems/ruby-1.9.2-p290@snorby/gems/railties-3.1.0/lib/rails/commands/console.rb:45:in `start'
        from /home/dan/.rvm/gems/ruby-1.9.2-p290@snorby/gems/railties-3.1.0/lib/rails/commands/console.rb:8:in `start'
        from /home/dan/.rvm/gems/ruby-1.9.2-p290@snorby/gems/railties-3.1.0/lib/rails/commands.rb:40:in `<top (required)>'
        from script/rails:6:in `require'
        from script/rails:6:in `<main>'

dan@luci:~/snorby$ echo $GEM_PATH
/home/dan/.rvm/gems/ruby-1.9.2-p290@snorby:/home/dan/.rvm/gems/ruby-1.9.2-p290@global

dan@luci:~/snorby$ ls -l /home/dan/.rvm/gems/ruby-1.9.2-p290@snorby/gems/mysql2-0.3.11/
total 68
drwxr-xr-x 2 dan dan  4096 2012-08-17 14:22 benchmark
-rw-r--r-- 1 dan dan 12460 2012-08-17 14:22 CHANGELOG.md
drwxr-xr-x 2 dan dan  4096 2012-08-17 14:22 examples
drwxr-xr-x 3 dan dan  4096 2012-08-17 14:22 ext
-rw-r--r-- 1 dan dan    25 2012-08-17 14:22 Gemfile
drwxr-xr-x 3 dan dan  4096 2012-08-17 14:22 lib
-rw-r--r-- 1 dan dan  1090 2012-08-17 14:22 MIT-LICENSE
-rw-r--r-- 1 dan dan  1099 2012-08-17 14:22 mysql2.gemspec
-rw-r--r-- 1 dan dan    99 2012-08-17 14:22 Rakefile
-rw-r--r-- 1 dan dan 11978 2012-08-17 14:22 README.md
drwxr-xr-x 4 dan dan  4096 2012-08-17 14:22 spec
drwxr-xr-x 2 dan dan  4096 2012-08-17 14:22 tasks

dan@luci:~/snorby$ rvm info

ruby-1.9.2-p290@snorby:

  system:
    uname:       "Linux luci 2.6.32-37-powerpc #81-Ubuntu Fri Dec 2 21:46:08 UTC 2011 ppc GNU/Linux"
    bash:        "/bin/bash => GNU bash, version 4.1.5(1)-release (powerpc-unknown-linux-gnu)"
    zsh:         " => not installed"

  rvm:
    version:      "rvm 1.10.0 by Wayne E. Seguin <wayneeseguin@gmail.com>, Michal Papis <mpapis@gmail.com> [https://rvm.beginrescueend.com/]"
    updated:      "7 months 10 days 23 hours 13 minutes 10 seconds ago"

  ruby:
    interpreter:  "ruby"
    version:      "1.9.2p290"
    date:         "2011-07-09"
    platform:     "powerpc-linux"
    patchlevel:   "2011-07-09 revision 32553"
    full_version: "ruby 1.9.2p290 (2011-07-09 revision 32553) [powerpc-linux]"

  homes:
    gem:          "/home/dan/.rvm/gems/ruby-1.9.2-p290@snorby"
    ruby:         "/home/dan/.rvm/rubies/ruby-1.9.2-p290"

  binaries:
    ruby:         "/home/dan/.rvm/rubies/ruby-1.9.2-p290/bin/ruby"
    irb:          "/home/dan/.rvm/rubies/ruby-1.9.2-p290/bin/irb"
    gem:          "/home/dan/.rvm/rubies/ruby-1.9.2-p290/bin/gem"
    rake:         "/home/dan/.rvm/gems/ruby-1.9.2-p290@snorby/bin/rake"

  environment:
    PATH:         "/home/dan/.rvm/gems/ruby-1.9.2-p290@snorby/bin:/home/dan/.rvm/gems/ruby-1.9.2-p290@global/bin:/home/dan/.rvm/rubies/ruby-1.9.2-p290/bin:/home/dan/.rvm/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games"
    GEM_HOME:     "/home/dan/.rvm/gems/ruby-1.9.2-p290@snorby"
    GEM_PATH:     "/home/dan/.rvm/gems/ruby-1.9.2-p290@snorby:/home/dan/.rvm/gems/ruby-1.9.2-p290@global"
    MY_RUBY_HOME: "/home/dan/.rvm/rubies/ruby-1.9.2-p290"
    IRBRC:        "/home/dan/.rvm/rubies/ruby-1.9.2-p290/.irbrc"
    RUBYOPT:      ""
    gemset:       "snorby"

dan@luci:~/snorby$ bundle exec gem list -l | grep mysql2

dan@luci:~/snorby$ echo $?
1
  • 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-06-09T21:48:40+00:00Added an answer on June 9, 2026 at 9:48 pm

    Rails will automatically use Bundler.setup when starting, it is equivalent with bundle exec from command line, to allow loading mysql gem you need it to your Gemfile and run bundle install, best if you place it in proper group – some projects use pg for production and mysql for development, if you plan always using it then it can be specified without group.

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

Sidebar

Related Questions

That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I have a French site that I want to parse, but am running into
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
We're building an app, our first using Rails 3, and we're having to build
I have thousands of HTML files to process using Groovy/Java and I need to
I have a .ini file as follows: [playlist] numberofentries=2 File1=http://87.230.82.17:80 Title1=(#1 - 365/1400) Example
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
I have a jquery bug and I've been looking for hours now, I can't

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.