将应用程序升级到Rails 3.1.0.beta1

时间:2011-05-11 19:24:45

标签: ruby-on-rails ruby-on-rails-3

我正在尝试将我现有的rails app(3.0.3)更新为3.1.0.beta1。我已经安装了rails gem并运行bundle命令来引入所有更新的gem。当我运行rake rails:update但我得到:

rake aborted!
undefined method `join_asset_file_contents' for module `ActionView::Helpers::AssetTagHelper'

我做错了什么?

跟踪输出

rake aborted!
undefined method `join_asset_file_contents' for module `ActionView::Helpers::AssetTagHelper'
/Users/Kyle/.rvm/gems/ruby-1.9.2-p180/gems/activesupport-3.1.0.beta1/lib/active_support/core_ext/module/aliasing.rb:31:in `alias_method'
/Users/Kyle/.rvm/gems/ruby-1.9.2-p180/gems/activesupport-3.1.0.beta1/lib/active_support/core_ext/module/aliasing.rb:31:in `alias_method_chain'
/Users/Kyle/.rvm/gems/ruby-1.9.2-p180/gems/smurf-1.0.6/lib/smurf.rb:15:in `<module:AssetTagHelper>'
/Users/Kyle/.rvm/gems/ruby-1.9.2-p180/gems/smurf-1.0.6/lib/smurf.rb:5:in `<top (required)>'
/Users/Kyle/.rvm/gems/ruby-1.9.2-p180/gems/bundler-1.0.13/lib/bundler/runtime.rb:68:in `require'
/Users/Kyle/.rvm/gems/ruby-1.9.2-p180/gems/bundler-1.0.13/lib/bundler/runtime.rb:68:in `block (2 levels) in require'
/Users/Kyle/.rvm/gems/ruby-1.9.2-p180/gems/bundler-1.0.13/lib/bundler/runtime.rb:66:in `each'
/Users/Kyle/.rvm/gems/ruby-1.9.2-p180/gems/bundler-1.0.13/lib/bundler/runtime.rb:66:in `block in require'
/Users/Kyle/.rvm/gems/ruby-1.9.2-p180/gems/bundler-1.0.13/lib/bundler/runtime.rb:55:in `each'
/Users/Kyle/.rvm/gems/ruby-1.9.2-p180/gems/bundler-1.0.13/lib/bundler/runtime.rb:55:in `require'
/Users/Kyle/.rvm/gems/ruby-1.9.2-p180/gems/bundler-1.0.13/lib/bundler.rb:120:in `require'
/Users/Kyle/Desktop/skateparks-web/config/application.rb:7:in `<top (required)>'
/Users/Kyle/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
/Users/Kyle/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
/Users/Kyle/Desktop/skateparks-web/Rakefile:1:in `<top (required)>'
/Users/Kyle/.rvm/gems/ruby-1.9.2-p180/gems/rake-0.8.7/lib/rake.rb:2383:in `load'
/Users/Kyle/.rvm/gems/ruby-1.9.2-p180/gems/rake-0.8.7/lib/rake.rb:2383:in `raw_load_rakefile'
/Users/Kyle/.rvm/gems/ruby-1.9.2-p180/gems/rake-0.8.7/lib/rake.rb:2017:in `block in load_rakefile'
/Users/Kyle/.rvm/gems/ruby-1.9.2-p180/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling'
/Users/Kyle/.rvm/gems/ruby-1.9.2-p180/gems/rake-0.8.7/lib/rake.rb:2016:in `load_rakefile'
/Users/Kyle/.rvm/gems/ruby-1.9.2-p180/gems/rake-0.8.7/lib/rake.rb:2000:in `block in run'
/Users/Kyle/.rvm/gems/ruby-1.9.2-p180/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling'
/Users/Kyle/.rvm/gems/ruby-1.9.2-p180/gems/rake-0.8.7/lib/rake.rb:1998:in `run'
/Users/Kyle/.rvm/gems/ruby-1.9.2-p180/gems/rake-0.8.7/bin/rake:31:in `<top (required)>'
/Users/Kyle/.rvm/gems/ruby-1.9.2-p180/bin/rake:19:in `load'
/Users/Kyle/.rvm/gems/ruby-1.9.2-p180/bin/rake:19:in `<main>'

删除蓝精灵宝石后

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 <top (required)> at /Users/Kyle/Desktop/skateparks-web/config/application.rb:7)
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 <top (required)> at /Users/Kyle/Desktop/skateparks-web/config/application.rb:7)
** Invoke rails:update (first_time)
** Invoke rails:update:configs (first_time)
** Execute rails:update:configs
    conflict  config/boot.rb
Overwrite /Users/Kyle/Desktop/skateparks-web/config/boot.rb? (enter "h" for help) [Ynaqdh] y
       force  config/boot.rb
       exist  config
    conflict  config/routes.rb
Overwrite /Users/Kyle/Desktop/skateparks-web/config/routes.rb? (enter "h" for help) [Ynaqdh] n
        skip  config/routes.rb
    conflict  config/application.rb
Overwrite /Users/Kyle/Desktop/skateparks-web/config/application.rb? (enter "h" for help) [Ynaqdh] y
       force  config/application.rb
   identical  config/environment.rb
** Invoke rails:update:javascripts (first_time)
** Execute rails:update:javascripts
rake aborted!
undefined method `create_javascript_files' for #<Rails::Generators::AppGenerator:0x00000100fbb160>
/Users/Kyle/.rvm/gems/ruby-1.9.2-p180/gems/railties-3.1.0.beta1/lib/rails/tasks/framework.rake:40:in `invoke_from_app_generator'
/Users/Kyle/.rvm/gems/ruby-1.9.2-p180/gems/railties-3.1.0.beta1/lib/rails/tasks/framework.rake:63:in `block (3 levels) in <top (required)>'
/Users/Kyle/.rvm/gems/ruby-1.9.2-p180/gems/rake-0.8.7/lib/rake.rb:636:in `call'
/Users/Kyle/.rvm/gems/ruby-1.9.2-p180/gems/rake-0.8.7/lib/rake.rb:636:in `block in execute'
/Users/Kyle/.rvm/gems/ruby-1.9.2-p180/gems/rake-0.8.7/lib/rake.rb:631:in `each'
/Users/Kyle/.rvm/gems/ruby-1.9.2-p180/gems/rake-0.8.7/lib/rake.rb:631:in `execute'
/Users/Kyle/.rvm/gems/ruby-1.9.2-p180/gems/rake-0.8.7/lib/rake.rb:597:in `block in invoke_with_call_chain'
/Users/Kyle/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/monitor.rb:201:in `mon_synchronize'
/Users/Kyle/.rvm/gems/ruby-1.9.2-p180/gems/rake-0.8.7/lib/rake.rb:590:in `invoke_with_call_chain'
/Users/Kyle/.rvm/gems/ruby-1.9.2-p180/gems/rake-0.8.7/lib/rake.rb:607:in `block in invoke_prerequisites'
/Users/Kyle/.rvm/gems/ruby-1.9.2-p180/gems/rake-0.8.7/lib/rake.rb:604:in `each'
/Users/Kyle/.rvm/gems/ruby-1.9.2-p180/gems/rake-0.8.7/lib/rake.rb:604:in `invoke_prerequisites'
/Users/Kyle/.rvm/gems/ruby-1.9.2-p180/gems/rake-0.8.7/lib/rake.rb:596:in `block in invoke_with_call_chain'
/Users/Kyle/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/monitor.rb:201:in `mon_synchronize'
/Users/Kyle/.rvm/gems/ruby-1.9.2-p180/gems/rake-0.8.7/lib/rake.rb:590:in `invoke_with_call_chain'
/Users/Kyle/.rvm/gems/ruby-1.9.2-p180/gems/rake-0.8.7/lib/rake.rb:583:in `invoke'
/Users/Kyle/.rvm/gems/ruby-1.9.2-p180/gems/rake-0.8.7/lib/rake.rb:2051:in `invoke_task'
/Users/Kyle/.rvm/gems/ruby-1.9.2-p180/gems/rake-0.8.7/lib/rake.rb:2029:in `block (2 levels) in top_level'
/Users/Kyle/.rvm/gems/ruby-1.9.2-p180/gems/rake-0.8.7/lib/rake.rb:2029:in `each'
/Users/Kyle/.rvm/gems/ruby-1.9.2-p180/gems/rake-0.8.7/lib/rake.rb:2029:in `block in top_level'
/Users/Kyle/.rvm/gems/ruby-1.9.2-p180/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling'
/Users/Kyle/.rvm/gems/ruby-1.9.2-p180/gems/rake-0.8.7/lib/rake.rb:2023:in `top_level'
/Users/Kyle/.rvm/gems/ruby-1.9.2-p180/gems/rake-0.8.7/lib/rake.rb:2001:in `block in run'
/Users/Kyle/.rvm/gems/ruby-1.9.2-p180/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling'
/Users/Kyle/.rvm/gems/ruby-1.9.2-p180/gems/rake-0.8.7/lib/rake.rb:1998:in `run'
/Users/Kyle/.rvm/gems/ruby-1.9.2-p180/gems/rake-0.8.7/bin/rake:31:in `<top (required)>'
/Users/Kyle/.rvm/gems/ruby-1.9.2-p180/bin/rake:19:in `load'
/Users/Kyle/.rvm/gems/ruby-1.9.2-p180/bin/rake:19:in `<main>'

1 个答案:

答案 0 :(得分:1)

join_asset_file_contents方法从

移开
actionpack/lib/action_view/helpers/asset_tag_helper.rb

actionpack/lib/action_view/helpers/asset_tag_helpers/asset_include_tag.rb

这就是您看到此错误的原因。

是否可以使用--trace运行rake命令以查看为什么在调用图中执行join_asset_file_contents?