rake aborted! undefined method `text_area' for class `ActionView::Base'
I am very confused by a sudden problem with running rake tasks:
softwareclick:/myapp/current# rake my_task --trace
(in /myapp/releases/20100621162444)
** Invoke my_task (first_time)
** Invoke environment (first_time)
** Execute environment
rake aborted!
undefined method `text_area' for class `ActionView::Base'
/myapp/releases/20100621162444/vendor/rails/activesupport/lib/active_support/core_ext/module/aliasing.rb:33:in `alias_method'
/myapp/releases/20100621162444/vendor/rails/activesupport/lib/active_support/core_ext/module/aliasing.rb:33:in `alias_method_chain'
/myapp/releases/20100621162444/vendor/gems/lipsiadmin-5.1.2/lib/view/helpers/view_helper.rb:11:in `included'
/myapp/releases/20100621162444/vendor/gems/lipsiadmin-5.1.2/lib/lipsiadmin.rb:41:in `include'
/myapp/releases/20100621162444/vendor/gems/lipsiadmin-5.1.2/lib/lipsiadmin.rb:41
/myapp/releases/20100621162444/vendor/gems/lipsiadmin-5.1.2/lib/lipsiadmin.rb:40:in `class_eval'
/myapp/releases/20100621162444/vendor/gems/lipsiadmin-5.1.2/lib/lipsiadmin.rb:40
/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
/myapp/releases/20100621162444/vendor/rails/activesupport/lib/active_support/dependencies.rb:158:in `require'
/myapp/releases/20100621162444/config/../vendor/rails/railties/lib/rails/gem_dependency.rb:208:in `load'
/myapp/releases/20100621162444/config/../vendor/rails/railties/lib/initializer.rb:307:in `load_gems'
/myapp/releases/20100621162444/config/../vendor/rails/railties/lib/initializer.rb:307:in `each'
/myapp/releases/20100621162444/config/../vendor/rails/railties/lib/initializer.rb:307:in `load_gems'
/myapp/releases/20100621162444/config/../vendor/rails/railties/lib/initializer.rb:164:in `process'
/myapp/releases/20100621162444/config/../vendor/rails/railties/lib/initializer.rb:113:in `send'
/myapp/releases/20100621162444/config/../vendor/rails/railties/lib/initializer.rb:113:in `run'
/myapp/releases/20100621162444/config/environment.rb:12
/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
/myapp/releases/20100621162444/vendor/rails/activesupport/lib/active_support/dependencies.rb:156:in `require'
/myapp/releases/20100621162444/vendor/rails/activesupport/lib/active_support/dependencies.rb:521:in `new_constants_in'
/myapp/releases/20100621162444/vendor/rails/activesupport/lib/active_support/dependencies.rb:156:in `require'
/myapp/releases/20100621162444/vendor/rails/railties/lib/tasks/misc.rake:4
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in `call'
/usr/lib/ruby/gems/1.8/gems/rake-0开发者_如何学运维.8.7/lib/rake.rb:636:in `execute'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in `each'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in `execute'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:597:in `invoke_with_call_chain'
/usr/lib/ruby/1.8/monitor.rb:238:in `synchronize'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:590:in `invoke_with_call_chain'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:607:in `invoke_prerequisites'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:604:in `each'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:604:in `invoke_prerequisites'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:596:in `invoke_with_call_chain'
/usr/lib/ruby/1.8/monitor.rb:238:in `synchronize'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:590:in `invoke_with_call_chain'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:583:in `invoke'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2051:in `invoke_task'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `top_level'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `each'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `top_level'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2023:in `top_level'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2001:in `run'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1998:in `run'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/bin/rake:31
/usr/bin/rake:19:in `load'
/usr/bin/rake:19
I run a passenger/nginx app on debian with ruby 1.8.5 and the following gems installed:
actionmailer (2.3.8)
actionpack (2.3.8)
activerecord (2.3.8)
activeresource (2.3.8)
activesupport (2.3.8)
ancestry (1.2.0)
chronic (0.2.3)
fastthread (1.0.7)
git (1.2.5)
haml (3.0.12)
hoe (2.6.1)
json (1.4.3)
json_pure (1.4.3)
lipsiadmin (5.1.2)
nokogiri (1.4.2)
passenger (2.2.14)
postgres (0.7.9.2008.01.28)
rack (1.2.1, 1.0.1, 1.0.0)
rails (2.3.8)
rake (0.8.7)
RedCloth (4.2.3)
rubyforge (2.0.4)
sitemap_generator (0.3.3)
texticle (1.0.2)
version (0.9.2)
whenever (0.4.2)
Due to the --trace I think it's something between lipsiadmin and active_support, but I simply can't figure out how to go forward.
Does anyone have an idea?
Thanks for your help,
Val
What does the rake task look like? Are you including a dependency on :environment?
Do any other rake tasks work?
Remember that rake does NOT start up the rails stack unless your task has an :environment dependency.
Jason's rake overview
UPDATED: My further suggestion, in the comments, was the right answer:
Gems, and plugins, can have dependencies on each other that require specific load order. So the solution is to remove gems/plugins to find which one is causing the problem. Then add it back into the system and choose the load order explicitly.
精彩评论