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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T09:16:53+00:00 2026-06-10T09:16:53+00:00

My rb file is simple like this: require ‘rubygems’ require ‘mysql2’ require ‘sequel’ Sequel.connect(:adapter

  • 0

My rb file is simple like this:

require 'rubygems'
require 'mysql2'
require 'sequel'

Sequel.connect(:adapter => 'mysql2', :database=>'xxx', :user => 'xxx', :password => 'xxxxxx', :host => 'xxxxxxxx.compute-1.amazonaws.com')

when I ran this file I got the following error:

> /usr/lib64/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in
  `require': cannot load such file -- mysql2 (LoadError)    from
> /usr/lib64/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in
  `require'     from t.rb:2:in `<main>'

I ran the command “bundle list” over my amazon instance and I got the following list:

Gems included by the bundle:
* actionmailer (3.2.8)
* actionpack (3.2.8)
* activemodel (3.2.8)
* activerecord (3.2.8)
* activeresource (3.2.8)
* activesupport (3.2.8)
* arel (3.0.2)
* builder (3.0.0)
* bundler (1.0.21)
* coffee-rails (3.2.2)
* coffee-script (2.2.0)
* coffee-script-source (1.3.3)
* erubis (2.7.0)
* execjs (1.4.0)
* hike (1.2.1)
* i18n (0.6.0)
* journey (1.0.4)
* jquery-rails (2.1.1)
* json (1.7.5)
* mail (2.4.4)
* mime-types (1.19)
* multi_json (1.3.6)
* mysql2 (0.3.11)
* polyglot (0.3.3)
* rack (1.4.1)
* rack-cache (1.2)
* rack-ssl (1.3.2)
* rack-test (0.6.1)
* rails (3.2.8)
* railties (3.2.8)
* rake (0.9.2.2)
* rdoc (3.12)
* sass (3.2.1)
* sass-rails (3.2.5)
* sequel (3.38.0)
* sprockets (2.1.3)
* thor (0.16.0)
* tilt (1.3.3)
* treetop (1.4.10)
* tzinfo (0.3.33)

So as we can see there is the mysql2 gem. Any advise?

Thanks all!

  • 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-10T09:16:54+00:00Added an answer on June 10, 2026 at 9:16 am

    Ok! Solve it. In my local environment I edited by hand the Gemfile (maybe is not the right way) I added one line “gem mysql2” then in the console I execute “bundle install” and upload the Gemfile to github.

    Finally, in the amazon instance I deployed my environment to apply changes and execute the command “RAILS_ENV=production bundle exec file.rb” (always use production) and the file execute normal.

    Thanks all!

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

Sidebar

Related Questions

Take a simple XML file formatted like this: <Lists> <List> <Note/> ... <Note/> </List>
A really simple shell script question. I have a file with something like this:
Mostly my entries in seeds.rb are simple, like this: User.create!( name: Peter admin: false;
I need to simply read an .xml file; like this: <exchanges> <exchange> <timestamp>2010-08-19 17:15:56</timestamp>
I am trying to write header file. I can write simple headers like add(int
I'd like to parse a simple, small XML file using python however work on
I have a simple assembly code file called exit.s that looks like the following:
I wrote a simple EventMachine server like this one: EventMachine.run do EventMachine::WebSocket.start(:host => HOST,
I'm a beginner in jQuery area and I have simple question like this :
I'm trying to start serving some static web pages using connect like this: var

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.