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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T11:01:59+00:00 2026-05-23T11:01:59+00:00

Everything seems to work well in the development and production environments: > script/console Loading

  • 0

Everything seems to work well in the development and production environments:

> script/console
Loading development environment (Rails 2.3.8)
ruby-1.8.7-p302 > Tape.find(:first, :conditions => "deleted_at is not null").deleted_at.nil?
 => false 
ruby-1.8.7-p302 > Tape.find(:first, :conditions => "deleted_at is null").deleted_at.nil?
 => true

So why am I getting the exact opposite results in the test environment?

> script/console test
Loading test environment (Rails 2.3.8)
ruby-1.8.7-p302 > Tape.find(:first, :conditions => "deleted_at is not null").deleted_at.nil?
 => true

Searching for deleted_at is null never returns any records in the test environment, even when some calls have deleted_at = nil and some have a timestamp there.

Here’s a partial readout of the mysql table:

mysql> describe tapes;
+-----------------+--------------+------+-----+---------+----------------+
| Field           | Type         | Null | Key | Default | Extra          |
+-----------------+--------------+------+-----+---------+----------------+
| id              | int(11)      | NO   | PRI | NULL    | auto_increment |
...
| deleted_at      | datetime     | YES  |     | NULL    |                |
+-----------------+--------------+------+-----+---------+----------------+

Does anyone know what’s going on? Is this a bug?

  • 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-23T11:01:59+00:00Added an answer on May 23, 2026 at 11:01 am

    So it turns out that the method I was using to create null values in my fixture was incorrect. It seems that if you want a real null value from a csv fixture is to have that field default to null and just don’t include that column in your csv. Hopefully this will help someone else 🙂

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

Sidebar

Related Questions

I'm running fabric (Django deployment to apache) and everything seems to work fine until
I'm trying to re-install a DLL in the GAC, everything seems to work fine
Well is there? From everything I've read, it seems like the answer is no,but
I recently upgraded from Devise 1.2 to 1.4.9 and everything seems to work except
Grails 1.3.5 and have selenium-rc, easyb, and spring-security-core plugins installed. Everything seems to work
I'm working on a socket program and everything seems fine when compiling. First I
I implemented OpenID support for an ASP.Net 2.0 web application and everything seems to
When I try to start Firefox using Process.Start and ProcessStartInfo (.NET) everything seems to
I am trying to use a library (.dll) in my project. Everything seems to
I decided to learn HTML so I installed apache on windows vista. Everything seems

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.