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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T10:33:51+00:00 2026-05-18T10:33:51+00:00

I have Active Support 3.0.3 installed and Rails 3.0.3 with Ruby 1.8.7. When I

  • 0

I have Active Support 3.0.3 installed and Rails 3.0.3 with Ruby 1.8.7.

When I try to use 1.week.ago I get

NoMethodError: undefined method 'week' for 1:Fixnum
from (irb):2

The other core extensions seem to work. I tried it on a friend’s computer (same install specs and legacy versions are on his) with the same results.

What gives?

All of this is in IRB.

  • 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-18T10:33:52+00:00Added an answer on May 18, 2026 at 10:33 am

    Since using Rails should handle this automatically I’m going to assume you’re trying to add Active Support to a non-Rails script.

    Read “How to Load Core Extensions“.

    Active Support’s methods got broken into smaller groups in Rails 3, so we don’t end up loading a lot of unneeded stuff with a simple require 'activesupport'. Now we have to do things like

    require 'active_support/core_ext/object/blank'
    

    If you don’t care about granularity, you can choose to load bigger chunks. If you want everything in one big gulp use…

    For 1.9.2:

    rvm 1.9.2
    irb -f
    irb(main):001:0> require 'active_support/all'
    => true
    irb(main):002:0> 1.week.ago
    => 2010-11-14 17:56:16 -0700
    irb(main):003:0> 
    

    For 1.8.7:

    rvm 1.8.7
    irb -f
    irb(main):001:0> require 'rubygems'
    => true
    irb(main):002:0> require 'active_support/all'
    => true
    irb(main):003:0> 1.week.ago
    => Sun Nov 14 17:54:19 -0700 2010
    irb(main):004:0> 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am on rails 2.3.5 and have the latest Ruby installed and my application
I have standard ruby-head and Rails 3.1rc4. I installed ruby-debug with following instructions from
I have both ruby 1.8.7 and 1.9.2 installed on my system. I have a
When I try to debug rails 3.1 (ruby 1.9.2_p290) with RubyMine 3.2.4 on OSX
I have a fresh Ubuntu install with ruby -v 1.9.2, rails -v 3.1.1, gem
I have a fresh install of Ubuntu Karmic, Ruby and Rails. I checkout out
I have installed ruby by downloading and compiling the source... when i run script/server
I have been using Ruby 1.8 + Rails 2.3.5 with oracle_enhanced and it works
I have a problem with setting up rails application. We use rails 3 (we
I have friendly_id and ActiveScaffold installed for my Rails application. Because not all of

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.