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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T21:05:39+00:00 2026-06-01T21:05:39+00:00

So I am developing locally using Rails 3.2 and mysql. My local machine is

  • 0

So I am developing locally using Rails 3.2 and mysql. My local machine is a Mac and my database.yml for development is:

development:
    adapter: mysql2
    database: dbname
    encoding: utf8
    host: localhost 
    port: 3306
    timeout: 5000
    socket: /tmp/mysql.sock

And for test it’s

test:
    adapter: mysql2
    database: dbname
    encoding: utf8
    host: localhost 
    port: 3306
    timeout: 5000
    socket: /var/lib/mysql/mysql.sock

Test and production servers are on CentOS and the socket works correctly when deploying to them. However I just went to do a manual rake and got the

Can’t connect to local MySQL server through socket ‘/tmp/mysql.sock’ (2)

My site works, but I’m curious if I’m should be handling database.yml separately for deployment since it’s somehow looking at development when I run rake?

Looked for a suggestion and didn’t see the same issue, apologize in advance if I missed it.

  • 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-01T21:05:40+00:00Added an answer on June 1, 2026 at 9:05 pm

    You can specify the Rails environment when you run the Rake task.

    rake db:migrate RAILS_ENV=production
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've been developing a project locally and using a local svn server for versioning
I'm using flatpages in a site that I'm developing in a locally server. I
I'm developing locally. and I'm using this code for AJAX: function getChart(num,ld,margin,idr) { idr
While developing my app (asp.net mvc3) locally everything was fine using the VS dev
I'm developing a site locally using xampp. The path the images are using is
I am developing a django site locally using rc1.3 and after making several adjustments
I have a client's Django project that I'm developing locally, using Mercurial for version
I'm developing an app locally (under Domain name <mydomain>.dev ). In order to work
Currently developing an application using the newest version of symfony, obtained through PEAR. This
While developing a firefox extension, I create a wizard window from overlay.js using: this.wizard

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.