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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T18:00:37+00:00 2026-05-20T18:00:37+00:00

My installation Ubuntu 10.10 Rails 3 gem = sqlite3 and sqlite3-ruby gem = mysql2

  • 0

My installation

  • Ubuntu 10.10
  • Rails 3
  • gem = sqlite3 and sqlite3-ruby
  • gem = mysql2

Now I created a application called mytestapp, using

rails new mytestapp

As usual with rails 3 it defaults to using sqlite3 database. Now I wanted to change the database for mytestapp so that it uses MySql database.

I made changes here

  • database.yml
  • gemfile – I added gem ‘mysql2’ and removed gem ‘sqlite3’

My new database.yml looked something like this

development:
  adapter: mysql2
  encoding: utf8
  reconnect: false
  database: mytestapp_development
  pool: 5
  username: mytestapp
  password: hacked
  socket: /var/run/mysqld/mysqld.sock

Now I goto localhost:3000 and click on the about application’s development environment
I get the following error

ActiveRecord::ConnectionNotEstablished

MySql user mytestapp has proper permissions for the database.

Infact when I create a new rails app using the following

rails new anotherapp -d mysql

It works great. What can be missing here.

  • 1 1 Answer
  • 1 View
  • 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-20T18:00:38+00:00Added an answer on May 20, 2026 at 6:00 pm

    Have you ran bundle install after editing your Gemfile?

    If you did, then try to run the following command to see what’s the difference between your hand-edited application and the new you created with -d mysql:

    diff /path/to/hand-edited-app /path/to/rails-created-mysql-app
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Using ubuntu 10.04, rvm. At first, I've installed ruby 1.9.2 with rvm, gem rails
I have a new installation of Ubuntu 11.10 server with Tomcat6. I am using
I'm trying to install a rails server for my application. I'm using ubuntu 10.04
Trying to get Rails up on ubuntu, and I’m having trouble installing sqlite3-ruby –
Any blog or tutorial for installation of JRuby 1.6.7 and Rails 3 on Ubuntu?
I am using Ubuntu 11.04 (Natty) as a wubi installation in my laptop. i.e
Upon installation of a Windows Service, an application is using a custom action to
Im using the following guide for getting started with rails for ubuntu 9.10. http://guides.rails.info/getting_started.html
I'm still relatively new to Rails and Ruby - and after upgrading to the
I'm trying to install the ruby gem for curl (curb) on Ubuntu 10.10, but

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.