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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T10:55:47+00:00 2026-05-27T10:55:47+00:00

I am using Postgres 9.1, Rails 3.1.3 and Ruby 1.9.3. I tried some things

  • 0

I am using Postgres 9.1, Rails 3.1.3 and Ruby 1.9.3.

I tried some things out in rails console --sandbox and then I ventured to rails console.
On entering Employee.create!(a whole lot of data), I got some errors, most of them to do with not null constraints.

I quickly left the console and using pgadmin3 checked to see if I had changed the database but there was no data so I felt confident that my tests would still pass. Unfortunately, my rspec test now fails and I am not sure where the conflicting data is.

Hopefully someone reading this has an idea or suggestion of how I can undo the entry I entered in my console session, which unfortunately was not the --sandbox session.

I did manage to kill the phantom server which I found through lsof | grep 3000.

Thanks for any help, suggestions or pointers you can spare.

  • 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-27T10:55:48+00:00Added an answer on May 27, 2026 at 10:55 am

    When you play in the console, you’re in the development environment, I don’t think there is a way that it conflicts with your tests which are run in the test env.
    Plus, the tests should not rely on any existant data, since the test database is erased each time you run your tests.

    Try to run rake db:test:prepare and run your tests.

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

Sidebar

Related Questions

Simple rails app using Postgres DB, getting 'integer out of range' error when trying
I'm using Ruby 1.9.2, Rails 3.1, Rspec, Postgres and Spork, but I can't get
I'm using MacOSX Lion, ruby 1.9.2, Rails 3.1.2 and postgres 9.0.4 I did a
Best way to Install RUBY 1.9, Rails 3, Postgres, Heroku, GitHub, Using RVM Can
Using C# .NET 3.5 and WCF, I'm trying to write out some of the
I am using postgres and some of my table's field are arrays. I am
I am developing a windows application and using Postgres as backend database. At some
I'm working on a ruby on rails project that requires recording some simple user
I am creating a rails 3 app on Heroku and it's using postgres as
I am using Rails and postgres. I have a couple of models using STI

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.