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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T02:33:22+00:00 2026-06-04T02:33:22+00:00

Basic Information I have a rails app A that is connected to a mysql

  • 0

Basic Information

I have a rails app A that is connected to a mysql database hosted on dotcloud.com. Below is how my database.yml file looks like,

production:
  adapter: mysql2
  host: <host>
  port: <port>
  database: <database_name>
  username: <username>
  password: <password>

Until here it works fine, I can access the records in the database from A, do queries and stuff.

Now I have another rails app B that needs to be connected to the same database as A, so i simply copy and paste the exact same details above into the database.yml file in B. However, when I tried to go into the rails console on production, I can’t seem to access the database. For example if I had a User Table, it will just say NameError: uninitialized constant User.

Is this an access control issue? How should I go about debugging this problem?

Appreciate any advice.


Update

So I copy and paste the .rb and schema files from A to B. However I am getting uninitialized constant ActiveRecord (NameError) when trying to access the database in rails console. Anyone know how to ?

  • 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-04T02:33:24+00:00Added an answer on June 4, 2026 at 2:33 am

    I ended up creating a new rails app, and setup everything again. Copy the same database.yml config then did rake db:migrate, then include the necessary model files, went into rails console and it works now.

    🙂

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

Sidebar

Related Questions

MVC 3, VB.NET. I have a form in my app that gets basic information
I have a couple of basic Rails problems that I'm having trouble finding relevant
I have an xml file containing basic information about products, with the following structure:
I have a small WPF application that writes some basic information to the registry
I need a live test server that accepts my requests for basic information via
i have a basic information form with textfield, radiofield, and numberfield <TableRow android:id=@+id/tableRow1 android:layout_width=wrap_content
on my website I have an Enroll page where users submit some basic information,
First off, some basic information about my project: I have a website with about
I need a Global variable/class that stores some basic information about the currently logged
I have three tables one of this storing users basic information, the other one

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.