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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T00:36:22+00:00 2026-05-16T00:36:22+00:00

SQLite3::BusyException: database is locked: CREATE UNIQUE INDEX index_users_on_email ON users (email) I get the

  • 0
SQLite3::BusyException: database is locked: CREATE UNIQUE INDEX "index_users_on_email" ON "users" ("email")

I get the above error when I try to migrate a migration (written below)

class AddIndexEmailUniquenessToUsers < ActiveRecord::Migration
  def self.up
    add_index :users,:email,:unique => true 
  end

  def self.down
    remove_index :users,:email
  end
end

what went wrong. I didnt do any lock kind of thing in previous transactions.

  • 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-16T00:36:23+00:00Added an answer on May 16, 2026 at 12:36 am

    You have a running process (rails console, ./script/server, etc) which is holding open connections to the database preventing the migration from modifying a table that’s in use.

    Kill off those.

    If you can’t find an obvious culprit, try:

    ps aux | grep ruby
    

    … to see a list of ruby processes that might be holding that db session.

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

Sidebar

Related Questions

Ran into this error message whilst developing tonight: SQLite3::BusyException: database is locked: I have
When I type import sqlite3 in Python 2.5 interpreter (C:\Python25\Python), I get following error:
SQLite3::SQLException: SQL logic error or missing database error when do insert, update and delete
I've been learning sqlite3 programming in C++ for the first time and this error
I have a sqlite3 database with a datetime field, the format of the date/time
My sqlite3 database contains a collate column-constraint. I've placed it in the schema for
I have a sqlite3 full text search table defined like this: CREATE VIRTUAL TABLE
I have an sqlite3 database that I imported from CSV, but the CSV quoted
I have sqlite3 database with locations which have a langitude and a longitude value.
I'm using a sqlite3 database set up as follows in settings.py : DATABASES =

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.