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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T13:47:38+00:00 2026-05-28T13:47:38+00:00

First things first: I’m using Ruby 1.9.3 and DataMapper 1.2.0. I created the following

  • 0

First things first: I’m using Ruby 1.9.3 and DataMapper 1.2.0.

I created the following seemingly simple model:

class User
    include DataMapper::Resource

    property :id,           Serial
    property :username,     String
    property :password,     BCryptHash
    property :name,         String
    property :email,        String
    property :created_at,   DateTime
end

I can fire this up in an irb shell, it creates a database, and everybody’s happy. But then I try:

tim = User.new(:username => "tim", :password => "password", :name => "Tim", :email => "my@email.com", :created_at => Time.now)

I receive back a User instance, printable to the console and with all its attributes intact. I can run tim.save! and see success. However, if I try to list users at this point, I run up against an error:

irb(main):001:0> User.all
(Object doesn't support #inspect)
=> 
irb(main):002:0> User.first
NoMethodError: undefined method `new!' for DateTime:Class
    from /usr/local/Cellar/ruby/1.9.3-p0/lib/ruby/gems/1.9.1/gems/dm-do-adapter-1.2.0/lib/dm-do-adapter/adapter.rb:153:in `next!'
    from /usr/local/Cellar/ruby/1.9.3-p0/lib/ruby/gems/1.9.1/gems/dm-do-adapter-1.2.0/lib/dm-do-adapter/adapter.rb:153:in `block in read'
    from /usr/local/Cellar/ruby/1.9.3-p0/lib/ruby/gems/1.9.1/gems/dm-do-adapter-1.2.0/lib/dm-do-adapter/adapter.rb:276:in `with_connection'
    from /usr/local/Cellar/ruby/1.9.3-p0/lib/ruby/gems/1.9.1/gems/dm-do-adapter-1.2.0/lib/dm-do-adapter/adapter.rb:141:in `read'
    from /usr/local/Cellar/ruby/1.9.3-p0/lib/ruby/gems/1.9.1/gems/dm-core-1.2.0/lib/dm-core/repository.rb:162:in `read'
    from /usr/local/Cellar/ruby/1.9.3-p0/lib/ruby/gems/1.9.1/gems/dm-core-1.2.0/lib/dm-core/model.rb:377:in `first'
    from (irb):5
    from /usr/local/Cellar/ruby/1.9.3-p0/bin/irb:12:in `<main>''

Any clues? Nothing else is really turning up on SO or Google for not supporting #inspect, and the Ruby stdlib docs distinctly lack a new! method for DateTime.

  • 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-28T13:47:39+00:00Added an answer on May 28, 2026 at 1:47 pm

    Figured this out – it had to do with the version of the do_sqlite3 gem I was using not having been reinstalled since I switched to Ruby 1.9.3. As mentioned in this bug, I needed to reinstall all my do_* gems to relink against 1.9.3 before it worked.

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

Sidebar

Related Questions

first things first. I have the following classes: class Employee { private int employeeID;
One of the first things I learned in C++ was that #include <iostream> int
Everything is an object was one of the first things I learned about Ruby,
I have an app with a UITextField, amongst other things. When the user first
First things first, I'm using the compatibility library and here's the error I'm getting:
First things first. This application is an ASP.NET application using windows authentication. Situation: The
First things first, I'm using cygwin version 1.7.1 on a Windows 7 box. Code
I've started using blocks, and one of the first things I encountered is an
First things first, I'm using: Java 1.7.0_02 MySQL 5.1.50 ZendServer CE (if that matters)
One of the first things I like to do when I make a site

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.