Errors in Rspec with rails 3.2 (DEPRECATION WARNING)
-
24-06-2021 - |
Question
I'm starting autotest 'rspec=true autotest' and I have error (rake db:test:prepare is performed):
DEPRECATION WARNING: Calling set_table_name is deprecated. Please use self.table_name = 'the_name'
instead. (called from include at /my_project_name/app/models/ckeditor/asset.rb:2)
DEPRECATION WARNING: Factory.define is deprecated; use the FactoryGirl.define block syntax to declare your factory. (called from at /my_project_name/spec/factories.rb:2)
DEPRECATION WARNING: Factory.define is deprecated; use the FactoryGirl.define block syntax to declare your factory. (called from at /my_project_name/spec/factories.rb:9) /usr/local/lib/ruby/gems/1.9.1/gems/activesupport-3.2.6/lib/active_support/dependencies.rb:251:in `require': cannot load such file -- capybara/rspec (LoadError)
My gemfile:
source 'https://rubygems.org'
gem 'rails', '3.2.6'
gem 'pg', '0.14.0' # БД
gem 'therubyracer', '0.10.1'
gem 'jquery-rails', '2.0.2'
gem 'paperclip', '3.1.2'
gem 'ckeditor', '3.6.3'
group :assets do
gem 'sass-rails', '3.2.5'
gem 'coffee-rails', '~> 3.2.2'
gem 'uglifier', '>= 1.2.6'
end
group :development do
gem 'rspec-rails', '2.11.0'
gem 'annotate', '2.4.0'
end
group :test do
gem 'rspec-rails', '2.11.0'
gem 'factory_girl_rails', '3.5.0'
end
What's wrong? It's works in rails 3.1!
La solution 2
Solved! I just upgraded to the latest version of the gem Ckeditor
Autres conseils
First one is deprecate message emitted by rails. It is introduced in 3.2 as I remember. Edit as directed.
Latter two are the message FactoryGirls is emitting and not rails. I guess you updated it also from old version. To eliminate error, just edit your project files as directed.