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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T22:07:58+00:00 2026-05-25T22:07:58+00:00

I upgraded to rails 3.1 and I have some problems with my tests now

  • 0

I upgraded to rails 3.1 and I have some problems with my tests now that worked perfectly before.

I get the following warning before the tests:

DEPRECATION WARNING: ActiveRecord::Associations::AssociationCollection is deprecated! Use ActiveRecord::Associations::CollectionProxy instead. (called from at /home/user/rails_projects/project/config/environment.rb:5)

How can I use CollectionProxy instead of AssociationCollection?

Here is my Gemfile:

source 'http://rubygems.org'

gem 'rails', '3.1.0'
gem 'jquery-rails'
gem "therubyracer", "~> 0.9.4"

gem 'carrierwave', '0.5.6'
gem 'haml', '~>3.1.2'
gem 'mysql2', '0.3.7'
gem 'rmagick', '2.13.1'
gem 'sitemap_generator', '2.0.1'
gem 'whenever', '0.6.8', :require => false
gem 'will_paginate', '3.0.pre2'

group :assets do
  gem 'sass-rails', "  ~> 3.1.0"
  gem 'coffee-rails', "~> 3.1.0"
  gem 'uglifier'
end

group :development do
  gem 'rspec-rails', '2.6.1'
  gem 'annotate-models', '1.0.4'
  gem 'faker', '0.9.5', :require => false
  gem 'ruby-debug19', '0.11.6'
end

group :test do
  gem 'rspec-rails', '2.6.1'
  gem 'webrat', '0.7.3'
  gem 'factory_girl_rails', '1.0'
  gem 'spork', '~> 0.9.0.rc'
end

This is my environment.rb:

# Load the rails application
require File.expand_path('../application', __FILE__)

# Initialize the rails application
Project::Application.initialize!

Thank you!

  • 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-25T22:07:59+00:00Added an answer on May 25, 2026 at 10:07 pm

    I had the same problem and fixed it by upgrading to the latest version of will_paginate. So, change this: gem ‘will_paginate’, ‘3.0.pre2’

    to this: gem “will_paginate”, “~> 3.0.2”

    Save your Gemfile then do bundle install.

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

Sidebar

Related Questions

I have been trying for some time now to get my Rails development environment
I have upgraded ruby using the following commands with rvm: rvm get head rvm
I have a rails application that is being upgraded from Rails 2.3.5 to Rails
I have upgraded my app to use Ruby 1.9.3p0 and Rails 3.2.2. To get
I have just upgraded to ruby 1.9.3-p125 (from 1.9.3-p0). All tests were working before
In my rails application I have upgraded in the past from rails 3.0 to
We just upgraded our app to Rails 3.2.2 and are now having a routing
This all worked fine in rails 2.3.5, but when a contractor firm upgraded directly
I recently upgraded one of my applications to Rails 2.2.2. Having done that, I've
I'm getting this deprecation error on my rails 3.2 project which I upgraded from

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.