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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T15:51:43+00:00 2026-05-24T15:51:43+00:00

I’m trying to use sqlite3 in my Rails 3 development environment instead of MySQL

  • 0

I’m trying to use sqlite3 in my Rails 3 development environment instead of MySQL but I’m running into a problem. When trying to do rake db:migrate I get:

SQLite3::SQLException: no such table: users: SELECT "users".* FROM "users"

Obviously there isn’t a users table yet as I’m trying to set up the database. Do I need to run something before I try to migrate?

Rakefile

require File.expand_path('../config/application', __FILE__)
require 'rake'
Skateparks::Application.load_tasks

Source Code

Please feel free to poke through all of my source code for this project on Github.

Trace

** Invoke db:migrate (first_time)
** Invoke environment (first_time)
** Execute environment
rake aborted!
SQLite3::SQLException: no such table: users: SELECT "users".* FROM "users"
/Users/Kyle/.rvm/gems/ruby-1.9.2-p180@skateparks/gems/activerecord-3.0.9/lib/active_record/connection_adapters/abstract_adapter.rb:207:in `rescue in log'
/Users/Kyle/.rvm/gems/ruby-1.9.2-p180@skateparks/gems/activerecord-3.0.9/lib/active_record/connection_adapters/abstract_adapter.rb:199:in `log'
/Users/Kyle/.rvm/gems/ruby-1.9.2-p180@skateparks/gems/activerecord-3.0.9/lib/active_record/connection_adapters/sqlite_adapter.rb:135:in `execute'
/Users/Kyle/.rvm/gems/ruby-1.9.2-p180@skateparks/gems/activerecord-3.0.9/lib/active_record/connection_adapters/sqlite_adapter.rb:284:in `select'
/Users/Kyle/.rvm/gems/ruby-1.9.2-p180@skateparks/gems/activerecord-3.0.9/lib/active_record/connection_adapters/abstract/database_statements.rb:7:in `select_all'
/Users/Kyle/.rvm/gems/ruby-1.9.2-p180@skateparks/gems/activerecord-3.0.9/lib/active_record/connection_adapters/abstract/query_cache.rb:56:in `select_all'
/Users/Kyle/.rvm/gems/ruby-1.9.2-p180@skateparks/gems/activerecord-3.0.9/lib/active_record/base.rb:473:in `find_by_sql'
/Users/Kyle/.rvm/gems/ruby-1.9.2-p180@skateparks/gems/activerecord-3.0.9/lib/active_record/relation.rb:64:in `to_a'
/Users/Kyle/.rvm/gems/ruby-1.9.2-p180@skateparks/gems/activerecord-3.0.9/lib/active_record/relation.rb:13:in `collect'
/Users/Kyle/Desktop/skateparks-web/app/models/skatepark/comment.rb:33:in `<class:Comment>'
/Users/Kyle/Desktop/skateparks-web/app/models/skatepark/comment.rb:1:in `<top (required)>'
/Users/Kyle/.rvm/gems/ruby-1.9.2-p180@skateparks/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:454:in `load'
/Users/Kyle/.rvm/gems/ruby-1.9.2-p180@skateparks/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:454:in `block in load_file'
/Users/Kyle/.rvm/gems/ruby-1.9.2-p180@skateparks/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:596:in `new_constants_in'
/Users/Kyle/.rvm/gems/ruby-1.9.2-p180@skateparks/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:453:in `load_file'
/Users/Kyle/.rvm/gems/ruby-1.9.2-p180@skateparks/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:340:in `require_or_load'
/Users/Kyle/.rvm/gems/ruby-1.9.2-p180@skateparks/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:491:in `load_missing_constant'
/Users/Kyle/.rvm/gems/ruby-1.9.2-p180@skateparks/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:183:in `block in const_missing'
/Users/Kyle/.rvm/gems/ruby-1.9.2-p180@skateparks/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:181:in `each'
/Users/Kyle/.rvm/gems/ruby-1.9.2-p180@skateparks/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:181:in `const_missing'
/Users/Kyle/Desktop/skateparks-web/spec/factories.rb:15:in `<top (required)>'
/Users/Kyle/.rvm/gems/ruby-1.9.2-p180@skateparks/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:235:in `load'
/Users/Kyle/.rvm/gems/ruby-1.9.2-p180@skateparks/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:235:in `block in load'
/Users/Kyle/.rvm/gems/ruby-1.9.2-p180@skateparks/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:225:in `block in load_dependency'
/Users/Kyle/.rvm/gems/ruby-1.9.2-p180@skateparks/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:596:in `new_constants_in'
/Users/Kyle/.rvm/gems/ruby-1.9.2-p180@skateparks/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:225:in `load_dependency'
/Users/Kyle/.rvm/gems/ruby-1.9.2-p180@skateparks/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:235:in `load'
/Users/Kyle/.rvm/gems/ruby-1.9.2-p180@skateparks/gems/factory_girl-2.0.3/lib/factory_girl/find_definitions.rb:16:in `block in find_definitions'
/Users/Kyle/.rvm/gems/ruby-1.9.2-p180@skateparks/gems/factory_girl-2.0.3/lib/factory_girl/find_definitions.rb:15:in `each'
/Users/Kyle/.rvm/gems/ruby-1.9.2-p180@skateparks/gems/factory_girl-2.0.3/lib/factory_girl/find_definitions.rb:15:in `find_definitions'
/Users/Kyle/.rvm/gems/ruby-1.9.2-p180@skateparks/gems/factory_girl_rails-1.1.0/lib/factory_girl_rails/railtie.rb:11:in `block in <class:Railtie>'
/Users/Kyle/.rvm/gems/ruby-1.9.2-p180@skateparks/gems/activesupport-3.0.9/lib/active_support/lazy_load_hooks.rb:34:in `call'
/Users/Kyle/.rvm/gems/ruby-1.9.2-p180@skateparks/gems/activesupport-3.0.9/lib/active_support/lazy_load_hooks.rb:34:in `execute_hook'
/Users/Kyle/.rvm/gems/ruby-1.9.2-p180@skateparks/gems/activesupport-3.0.9/lib/active_support/lazy_load_hooks.rb:43:in `block in run_load_hooks'
/Users/Kyle/.rvm/gems/ruby-1.9.2-p180@skateparks/gems/activesupport-3.0.9/lib/active_support/lazy_load_hooks.rb:42:in `each'
/Users/Kyle/.rvm/gems/ruby-1.9.2-p180@skateparks/gems/activesupport-3.0.9/lib/active_support/lazy_load_hooks.rb:42:in `run_load_hooks'
/Users/Kyle/.rvm/gems/ruby-1.9.2-p180@skateparks/gems/railties-3.0.9/lib/rails/application/finisher.rb:46:in `block in <module:Finisher>'
/Users/Kyle/.rvm/gems/ruby-1.9.2-p180@skateparks/gems/railties-3.0.9/lib/rails/initializable.rb:25:in `instance_exec'
/Users/Kyle/.rvm/gems/ruby-1.9.2-p180@skateparks/gems/railties-3.0.9/lib/rails/initializable.rb:25:in `run'
/Users/Kyle/.rvm/gems/ruby-1.9.2-p180@skateparks/gems/railties-3.0.9/lib/rails/initializable.rb:50:in `block in run_initializers'
/Users/Kyle/.rvm/gems/ruby-1.9.2-p180@skateparks/gems/railties-3.0.9/lib/rails/initializable.rb:49:in `each'
/Users/Kyle/.rvm/gems/ruby-1.9.2-p180@skateparks/gems/railties-3.0.9/lib/rails/initializable.rb:49:in `run_initializers'
/Users/Kyle/.rvm/gems/ruby-1.9.2-p180@skateparks/gems/railties-3.0.9/lib/rails/application.rb:134:in `initialize!'
/Users/Kyle/.rvm/gems/ruby-1.9.2-p180@skateparks/gems/railties-3.0.9/lib/rails/application.rb:77:in `method_missing'
/Users/Kyle/Desktop/skateparks-web/config/environment.rb:2:in `<top (required)>'
/Users/Kyle/.rvm/gems/ruby-1.9.2-p180@skateparks/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:239:in `require'
/Users/Kyle/.rvm/gems/ruby-1.9.2-p180@skateparks/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:239:in `block in require'
/Users/Kyle/.rvm/gems/ruby-1.9.2-p180@skateparks/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:225:in `block in load_dependency'
/Users/Kyle/.rvm/gems/ruby-1.9.2-p180@skateparks/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:596:in `new_constants_in'
/Users/Kyle/.rvm/gems/ruby-1.9.2-p180@skateparks/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:225:in `load_dependency'
/Users/Kyle/.rvm/gems/ruby-1.9.2-p180@skateparks/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:239:in `require'
/Users/Kyle/.rvm/gems/ruby-1.9.2-p180@skateparks/gems/railties-3.0.9/lib/rails/application.rb:103:in `require_environment!'
/Users/Kyle/.rvm/gems/ruby-1.9.2-p180@skateparks/gems/railties-3.0.9/lib/rails/application.rb:218:in `block in initialize_tasks'
/Users/Kyle/.rvm/gems/ruby-1.9.2-p180@skateparks/gems/rake-0.9.2/lib/rake/task.rb:205:in `call'
/Users/Kyle/.rvm/gems/ruby-1.9.2-p180@skateparks/gems/rake-0.9.2/lib/rake/task.rb:205:in `block in execute'
/Users/Kyle/.rvm/gems/ruby-1.9.2-p180@skateparks/gems/rake-0.9.2/lib/rake/task.rb:200:in `each'
/Users/Kyle/.rvm/gems/ruby-1.9.2-p180@skateparks/gems/rake-0.9.2/lib/rake/task.rb:200:in `execute'
/Users/Kyle/.rvm/gems/ruby-1.9.2-p180@skateparks/gems/rake-0.9.2/lib/rake/task.rb:158:in `block in invoke_with_call_chain'
/Users/Kyle/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/monitor.rb:201:in `mon_synchronize'
/Users/Kyle/.rvm/gems/ruby-1.9.2-p180@skateparks/gems/rake-0.9.2/lib/rake/task.rb:151:in `invoke_with_call_chain'
/Users/Kyle/.rvm/gems/ruby-1.9.2-p180@skateparks/gems/rake-0.9.2/lib/rake/task.rb:176:in `block in invoke_prerequisites'
/Users/Kyle/.rvm/gems/ruby-1.9.2-p180@skateparks/gems/rake-0.9.2/lib/rake/task.rb:174:in `each'
/Users/Kyle/.rvm/gems/ruby-1.9.2-p180@skateparks/gems/rake-0.9.2/lib/rake/task.rb:174:in `invoke_prerequisites'
/Users/Kyle/.rvm/gems/ruby-1.9.2-p180@skateparks/gems/rake-0.9.2/lib/rake/task.rb:157:in `block in invoke_with_call_chain'
/Users/Kyle/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/monitor.rb:201:in `mon_synchronize'
/Users/Kyle/.rvm/gems/ruby-1.9.2-p180@skateparks/gems/rake-0.9.2/lib/rake/task.rb:151:in `invoke_with_call_chain'
/Users/Kyle/.rvm/gems/ruby-1.9.2-p180@skateparks/gems/rake-0.9.2/lib/rake/task.rb:144:in `invoke'
/Users/Kyle/.rvm/gems/ruby-1.9.2-p180@skateparks/gems/rake-0.9.2/lib/rake/application.rb:112:in `invoke_task'
/Users/Kyle/.rvm/gems/ruby-1.9.2-p180@skateparks/gems/rake-0.9.2/lib/rake/application.rb:90:in `block (2 levels) in top_level'
/Users/Kyle/.rvm/gems/ruby-1.9.2-p180@skateparks/gems/rake-0.9.2/lib/rake/application.rb:90:in `each'
/Users/Kyle/.rvm/gems/ruby-1.9.2-p180@skateparks/gems/rake-0.9.2/lib/rake/application.rb:90:in `block in top_level'
/Users/Kyle/.rvm/gems/ruby-1.9.2-p180@skateparks/gems/rake-0.9.2/lib/rake/application.rb:129:in `standard_exception_handling'
/Users/Kyle/.rvm/gems/ruby-1.9.2-p180@skateparks/gems/rake-0.9.2/lib/rake/application.rb:84:in `top_level'
/Users/Kyle/.rvm/gems/ruby-1.9.2-p180@skateparks/gems/rake-0.9.2/lib/rake/application.rb:62:in `block in run'
/Users/Kyle/.rvm/gems/ruby-1.9.2-p180@skateparks/gems/rake-0.9.2/lib/rake/application.rb:129:in `standard_exception_handling'
/Users/Kyle/.rvm/gems/ruby-1.9.2-p180@skateparks/gems/rake-0.9.2/lib/rake/application.rb:59:in `run'
/Users/Kyle/.rvm/gems/ruby-1.9.2-p180@skateparks/gems/rake-0.9.2/bin/rake:32:in `<top (required)>'
/Users/Kyle/.rvm/gems/ruby-1.9.2-p180@skateparks/bin/rake:19:in `load'
/Users/Kyle/.rvm/gems/ruby-1.9.2-p180@skateparks/bin/rake:19:in `<main>'
Tasks: TOP => db:migrate => environment
  • 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-24T15:51:43+00:00Added an answer on May 24, 2026 at 3:51 pm

    On this line: https://github.com/kyledecot/skateparks-web/blob/master/app/models/skatepark/comment.rb#L33

    You are making a call to the User model which attempts to load the users table. Rather than doing this, why not have a foreign key constraint?

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

Sidebar

Related Questions

I am trying to understand how to use SyndicationItem to display feed which is
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I'm trying to use string.replace('’','') to replace the dreaded weird single-quote character: ’ (aka
Basically, what I'm trying to create is a page of div tags, each has
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
Seemingly simple, but I cannot find anything relevant on the web. What is the
this is what i have right now Drawing an RSS feed into the php,
I am trying to loop through a bunch of documents I have to put
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
We're building an app, our first using Rails 3, and we're having to build

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.