vdaubry
vdaubry

Reputation: 11439

Migrating to rails 3.1 gives DEPRECATION WARNING: class_inheritable_attribute is deprecated

Since i migrated from Rails 3.0 to Rails 3.1 i get these warnings :

DEPRECATION WARNING: class_inheritable_attribute is deprecated, please use class_attribute method instead. Notice their behavior are slightly different, so refer to class_attribute documentation first. (called from require at /Users/vincentdaubry/.rvm/gems/ruby-1.9.2-p318@global/gems/bundler-1.1.3/lib/bundler/runtime.rb:74)

I do not have any reference to class_inheritable_attribute in my code.

I guess one of the gem i'm using is producing this error, but how can i know which one ? Or is there something else to do to fix this warning ?

EDIT 2 :

None of the gem i'm using has any reference to class_inheritable_attribute (i tried to ack "class_inheritable_attribute" in the gem directory).

If i deploy my app on another computer on rails 3.1.3 that doesn't use RVM i dont get the warning, so i think it comes from RVM. Does it sound reasonable ? I tried to update RVM with rvm get stable but i still get the warning..

Any ideas ?

EDIT :

Here is my gemfile

source 'http://rubygems.org'

gem 'rails', '3.1.3'
gem 'paperclip', '2.4.5'
gem 'pdf-toolkit', '0.5.0'
gem 'omniauth-facebook', '1.2.0'
gem 'delayed_job', '2.1.4'
gem 'devise', '1.5.3'
gem 'mini_magick', '3.4'
gem 'faraday', '0.6.1' #WARNING : this faraday version is specify, because on 0.7.5 this breaks facebook connection
gem 'acts-as-taggable-on', '2.2.2'
gem 'kaminari', '0.13.0'
gem 'forem', :git => "git://github.com/radar/forem.git"
gem 'forem-redcarpet', :git => "git://github.com/radar/forem-redcarpet"
gem 's3_swf_upload', :git => 'https://github.com/nathancolgate/s3-swf-upload-plugin.git'
gem 'aws-s3', '0.6.2', :require => 'aws/s3'
gem 'jquery-rails', '1.0.13'
gem 'dalli', '1.1.4'
gem 'bson', '1.5.2'
gem 'bson_ext', '1.5.2'
gem 'exception_notification_rails3', '1.2.0', :require => 'exception_notifier'

######################################################################
# unused
######################################################################

#gem 'newrelic_rpm', '3.3.1'
#gem 'mongo',  '1.5.2'
#gem 'mongoid', '2.4.0'
#gem "rdiscount"



######################################################################
# Environment specific
######################################################################

group :development, :test do
    gem 'sqlite3'
    gem 'rspec-rails'
    gem 'factory_girl_rails'
    gem 'mocha'
end

group :production do
  gem "pg"
end

Thanks, Vincent

Upvotes: 3

Views: 501

Answers (2)

Siarhei Kavaliou
Siarhei Kavaliou

Reputation: 1

It's bundler depreacation. Try update bundler. So far it works well with bundler 1.0.22

Upvotes: 0

mikdiet
mikdiet

Reputation: 10018

You can grep by code of all installed gems to find all entries of class_inheritable_attribute. When you find it, try to update it.

Upvotes: 0

Related Questions