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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T08:08:31+00:00 2026-06-12T08:08:31+00:00

I installed the ruby-mysql gem using bundler. But Mysql.connect is crashing with the following

  • 0

I installed the ruby-mysql gem using bundler. But Mysql.connect is crashing with the following trace.

/home/kris/.rvm/gems/ruby-1.9.3-p194-perf@dispatch/gems/ruby-mysql-2.9.10/lib/mysql/protocol.rb:167:in `initialize': No such file or directory - /tmp/\
mysql.sock (Errno::ENOENT)
        from /home/kris/.rvm/gems/ruby-1.9.3-p194-perf@dispatch/gems/ruby-mysql-2.9.10/lib/mysql/protocol.rb:167:in `new'
        from /home/kris/.rvm/gems/ruby-1.9.3-p194-perf@dispatch/gems/ruby-mysql-2.9.10/lib/mysql/protocol.rb:167:in `block in initialize'
        from /home/kris/.rvm/rubies/ruby-1.9.3-p194-perf/lib/ruby/1.9.1/timeout.rb:54:in `timeout'
        from /home/kris/.rvm/gems/ruby-1.9.3-p194-perf@dispatch/gems/ruby-mysql-2.9.10/lib/mysql/protocol.rb:164:in `initialize'
        from /home/kris/.rvm/gems/ruby-1.9.3-p194-perf@dispatch/gems/ruby-mysql-2.9.10/lib/mysql.rb:114:in `new'
        from /home/kris/.rvm/gems/ruby-1.9.3-p194-perf@dispatch/gems/ruby-mysql-2.9.10/lib/mysql.rb:114:in `connect'
        from /home/kris/.rvm/gems/ruby-1.9.3-p194-perf@dispatch/gems/ruby-mysql-2.9.10/lib/mysql.rb:49:in `new'
        from /home/kris/dev/dispatch/application.rb:38:in `<top (required)>'
        from config.ru:1:in `require'
        from config.ru:1:in `block in <main>'
        from /home/kris/.rvm/gems/ruby-1.9.3-p194-perf@dispatch/gems/rack-1.3.6/lib/rack/builder.rb:51:in `instance_eval'
        from /home/kris/.rvm/gems/ruby-1.9.3-p194-perf@dispatch/gems/rack-1.3.6/lib/rack/builder.rb:51:in `initialize'
        from config.ru:1:in `new'
        from config.ru:1:in `<main>'
        from /home/kris/.rvm/gems/ruby-1.9.3-p194-perf@dispatch/gems/thin-1.4.1/lib/rack/adapter/loader.rb:33:in `eval'
        from /home/kris/.rvm/gems/ruby-1.9.3-p194-perf@dispatch/gems/thin-1.4.1/lib/rack/adapter/loader.rb:33:in `load'
        from /home/kris/.rvm/gems/ruby-1.9.3-p194-perf@dispatch/gems/thin-1.4.1/lib/thin/controllers/controller.rb:181:in `load_rackup_config'
        from /home/kris/.rvm/gems/ruby-1.9.3-p194-perf@dispatch/gems/thin-1.4.1/lib/thin/controllers/controller.rb:71:in `start'
        from /home/kris/.rvm/gems/ruby-1.9.3-p194-perf@dispatch/gems/thin-1.4.1/lib/thin/runner.rb:185:in `run_command'
        from /home/kris/.rvm/gems/ruby-1.9.3-p194-perf@dispatch/gems/thin-1.4.1/lib/thin/runner.rb:151:in `run!'
        from /home/kris/.rvm/gems/ruby-1.9.3-p194-perf@dispatch/gems/thin-1.4.1/bin/thin:6:in `<top (required)>'
        from /home/kris/.rvm/gems/ruby-1.9.3-p194-perf@dispatch/bin/thin:23:in `load'
        from /home/kris/.rvm/gems/ruby-1.9.3-p194-perf@dispatch/bin/thin:23:in `<main>'

My machine is running Ubuntu 12.04 and i have libmysqlclient-dev already installed. How can i fix this problem ?

Thank You

  • 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-12T08:08:32+00:00Added an answer on June 12, 2026 at 8:08 am

    I believe that you should just change socket in your database.yml.

    Try changing it from

    /tmp/mysql.sock

    to

    /var/run/mysqld/mysqld.sock

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

Sidebar

Related Questions

I'm using rvm with ruby 1.9.3, rails 3.1, gems i18n and i18n-active_record and mysql.
I installed the ruby gem for mysql and it looks like it installed correctly
I have been using rvm and when I installed ruby 1.9.2, it installed ruby-1.9.2-p290
I've used whenever gem with ruby 1.9.2 without any problems, but I installed ruby
I just installed ruby on rails on windows. install mysql and created a new
I've installed ruby and the sass gem on a Win 7 Enterprise box. I've
I am using Ubuntu 9.04 I just installed ruby and rails in my system
I've installed rails, the mysql2 gem, and mysql and have created a project called
I'm installing 1.87. I got ruby installed and ruby gems then I tried this
I have installed rails and mysql. I have also installed mysql2 gem. I created

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.