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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T14:41:02+00:00 2026-05-17T14:41:02+00:00

EDIT: This is with Rails 2.3.5 For some reason, when I try to associate

  • 0

EDIT: This is with Rails 2.3.5

For some reason, when I try to associate a CreditCard with Band in my project, I get the following errors

SQLite3::SQLException: table credit_cards has no column named band: INSERT INTO "credit_cards" ("created_at", "vault_token", "billing_zipcode", "billing_first_name", "updated_at", "band", "billing_state", "billing_city", "id", "billing_email_address", "billing_country", "billing_address", "billing_phone_number", "billing_last_name") VALUES ('2010-10-08 03:26:07', 'vaulttokenvalue', 12345, 'Test', '2010-10-08 03:26:07', 'beekin', 'TX', 'AnyCity', 714867248, 'none@none.com', 'US', '1234 Any Street', '5555555555', 'User')

and

SQLite3::SQLException: table bands has no column named credit_card: INSERT INTO "bands" ("name", "created_at", "next_payment_date", "updated_at", "credit_card", "account_type_id", "id", "hometown_city", "account_status", "subdomain", "hometown_state", "website", "account_type_name") VALUES ('Beekin', '2010-10-08 03:29:16', '2010-10-07', '2010-10-08 03:29:16', 'card_one', 715507355, 862144657, 'Nashville', 'ACTIVE', 'beekin', 'TN', 'http://www.beekin.com', 'MONTHLY')

My migration looks like

class CreateCreditCards < ActiveRecord::Migration
  def self.up
    create_table :credit_cards do |t|
      t.references :band
      t.string :billing_first_name
      t.string :billing_last_name
      t.string :billing_address
      t.string :billing_city
      t.string :billing_state
      t.string :billing_zipcode
      t.string :billing_country
      t.string :billing_email_address
      t.string :billing_phone_number
      t.string :vault_token

      t.timestamps
    end

    add_column :bands, :credit_card_id, :integer
  end
end

My bands.yml fixture looks like:

beekin:
  name: Beekin
  website: "http://www.beekin.com"
  hometown_city: Nashville
  hometown_state: TN
  subdomain: beekin
  account_type: monthly
  account_type_name: "MONTHLY"
  account_status: "ACTIVE"
  credit_card: card_one
  next_payment_date: <%= Date.today %>

And my credit_cards.yml fixture looks like:

card_one:
  band: beekin
  billing_first_name: Test
  billing_last_name: User
  billing_address: "1234 Any Street"
  billing_city: AnyCity
  billing_state: TX
  billing_zipcode: 12345
  billing_country: US
  billing_email_address: "none@none.com"
  billing_phone_number: "5555555555"
  vault_token: vaulttokenvalue

Can someone PLEASE point out what I’m doing wrong. I’ve compared it to other fixtures and it looks like it should work, but it’s not.

Have the has_one :credit_card (in band model) and belongs_to :band (in credit_card model). I’m just really lost now.

  • 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-05-17T14:41:02+00:00Added an answer on May 17, 2026 at 2:41 pm
    card_one:
      band_id: 1 //or any other Band id
      billing_first_name: Test
      billing_last_name: User
      billing_address: "1234 Any Street"
      billing_city: AnyCity
      billing_state: TX
      billing_zipcode: 12345
      billing_country: US
      billing_email_address: "none@none.com"
      billing_phone_number: "5555555555"
      vault_token: vaulttokenvalue
    

    and

    beekin:
      name: Beekin
      website: "http://www.beekin.com" 
      hometown_city: Nashville
      hometown_state: TN
      subdomain: beekin
      account_type: monthly
      account_type_name: "MONTHLY"
      account_status: "ACTIVE"
      credit_card_id: 1 // or any other Card id
      next_payment_date: <%= Date.today %>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

For some reason, my project has messed up and now its throwing errors every
Edit: This was accidentally posted twice. Original: VB.NET Importing Classes I've seen some code
For some reason, one of my models in rails is returning nil when I
When I save an apartment record in rails, for some reason it is updating
I am developing an app in JRuby on Rails. For some reason, when I
Right now I'm building a project management app in rails, here is some background
I've got an issue where Rails is for some reason redirecting the new and
For some reason when I run rails command, it installs 2.2.3 version of Rails
I have a seeds.rb file and for some reason, this doesn't work: #doesn't work
I'm retroactively writing some tests, using RSpec, for a Rails project. I'm using the

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.