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 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 have an application thats going to use Active Directory for Authentication. This will
I have this code to connect to Active Directory and get all the groups
I'm using Ubuntu 8.10 and I installed Ruby and Ruby on Rails following the
I'm trying to get tags working in my rails application and want to use
I have this error when I try to start script/server: /opt/ruby1.8/lib/ruby/site_ruby/1.8/rubygems.rb:827:in `report_activate_error': RubyGem version
I'm attempting to use Mongoid from a plain Ruby script (not via Rails or
I have a Rails Model: ruby-1.9.2-p0 > NavItem => NavItem(id: integer, item_identifier: string, description:
Simple performance test, I have installed ruby-prof and no other gems are missing, rake
I have been using Ruby 1.8 + Rails 2.3.5 with oracle_enhanced and it works
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.