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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T18:25:01+00:00 2026-05-22T18:25:01+00:00

I can’t get these fixtures to load and I don’t know why. After spending

  • 0

I can’t get these fixtures to load and I don’t know why. After spending a few hours on the problem and starting to seriously question my grasp of reality. So I turn here in hope of someone pointing out the error with hopefully minimal ridicule.

I have tried doing it the same way as the api-docs describe and combining with the authlogic documentation. None of the posts I could find here on SO were of any help either.

Using ruby 1.9.2-p180

users.yml

one:
  id: 0
  username: testuserone
  email: whatever@whatever.com
  password_salt: <%= salt = Authlogic::Random.hex_token %>
  crypted_password: <%= Authlogic::CryptoProviders::Sha512.encrypt("benrocks" + salt) %>
  persistence_token: <%= Authlogic::Random.hex_token %>
  posts: one, two

two:
  id: 1
  username: testusertwo
  email: test@gmail.com
  password_salt: <%= salt = Authlogic::Random.hex_token %>
  crypted_password: <%= Authlogic::CryptoProviders::Sha512.encrypt("benrocks" + salt) %>
  persistence_token: <%= Authlogic::Random.hex_token %>
  posts: one, two, valid_post

posts.yml

one:
  title: First valid Awesome post
  content: Clearly awesome content
  user: one

two:
  title: Second valid Awesome post
  content: Clearly more awesome content
  user: one

valid_post:
  title: Awesome post
  content: Clearly awesome content
  user: one

empty_post:
  title: 
  content: 
  user: one 

schema.rb

ActiveRecord::Schema.define(:version => 20110527132832) do

  create_table "posts", :force => true do |t|
    t.string   "title"
    t.string   "content"
    t.datetime "created_at"
    t.datetime "updated_at"
    t.integer  "user_id"
  end

  create_table "users", :force => true do |t|
    t.string   "username"
    t.string   "email"
    t.string   "crypted_password"
    t.string   "password_salt"
    t.string   "persistence_token"
    t.datetime "created_at"
    t.datetime "updated_at"
  end

end

post.rb – model

class Post < ActiveRecord::Base
  cattr_reader :per_page
  @@per_page = 3
  default_scope :order => 'created_at DESC' 
  validates :title, :presence => true

  belongs_to :user
end

user.rb – model

class User < ActiveRecord::Base
  attr_accessible :username, :email, :password, :password_confirmation

  acts_as_authentic

  has_many :posts
end

rake db:fixtures:load gives

rake aborted!
SQLite3::SQLException: table users has no column named posts: INSERT INTO “users” (“id”, “username”, “email”, “password_salt”, “crypted_password”, “persistence_token”, “posts”, “created_at”, “updated_at”) VALUES (0, ‘testuserone’, ‘whatever@whatever.com’, ‘ce407b78abcdf7ef7a179f2ef3c4452892411fe0705fc363623f669c420204c3ceb452167a2470ef737d2d8eae6ff0eca75e1eae2f7965d2eeaf2262a3ce61df’, ‘ecd509731f30ed38442d4f0e6c0da81e7e747e5ded086be96a3b45b896cde0b99b314d187b1f0011ba5c6a1f661c9748fd20ac11332a413b8046ee9738167cc2’, ‘784c46f5e1f8218592e5f46a00111a00281e53a25a36133c17de9e31f3a1e99fe8c45fc5c327b87f32dff6147b56337b900c6a1342329479dfd1c372d700a37c’, ‘one, two’, ‘2011-05-28 13:28:44’, ‘2011-05-28 13:28:44’)

Gems in use

source ‘http://rubygems.org&#8217;

gem ‘rails’, ‘3.0.7’
gem ‘will_paginate’, ‘3.0.pre2’
gem ‘authlogic’
gem ‘nifty-generators’
gem ‘sqlite3’
gem ‘factory_girl_rails’
gem ‘faker’
gem “mocha”, :group => :test

  • 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-22T18:25:02+00:00Added an answer on May 22, 2026 at 6:25 pm

    Well turns out it started working either when I migrated the test db or when I gave all posts names that differed from users like :user_one, :user_two

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

Sidebar

Related Questions

Can anyone let me know how can we change the value of kendo combobox
Can I order my users in the database, so I don't have to say
Can I change the field public virtual ClassOne ClassOne { get; set; } to
Can any one tell, how to get the result of LINQ query contains group
I have a jquery bug and I've been looking for hours now, I can't
Can MOSS integrate and get user profiles from multiple Active Directory and/or LDAP stores?
Can anyone tell me what i am doing wrong? I am trying to get
Can someone please explain how this code is working for me? I don't understand
I'm trying to convert HTML to plain text. I get many &\#8217; &\#8220; etc.
Does anyone know how can I replace this 2 symbol below from the string

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.