使用Ruby 1.9.1,Rails 2.3.2和jrails 0.4“使用const_missing进行救援”错误

时间:2009-06-22 18:39:08

标签: jquery ruby-on-rails ruby jrails

我最近开始了一个项目,团队决定我们想要使用jQuery而不是Prototype / Scriptaculous来满足我们的javascript需求。我们设置了项目,并开始切换。该插件已安装via these instructions,所有内容均按计划进行。不久之后,当试图运行“./script/server”时,我们收到以下错误:

=> Rails 2.3.2 application starting on http://0.0.0.0:3000
/usr/local/lib/ruby/gems/1.9.1/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:105:in `rescue in const_missing': uninitialized constant ActionView::Helpers::JavaScriptElementProxy::ActionView (NameError)
    from /usr/local/lib/ruby/gems/1.9.1/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:94:in `const_missing'
    from /home/company/Development/project/vendor/plugins/jrails/lib/jrails.rb:229:in `<class:JavaScriptElementProxy>'
    from /home/company/Development/project/vendor/plugins/jrails/lib/jrails.rb:226:in `<module:Helpers>'
    from /home/company/Development/project/vendor/plugins/jrails/lib/jrails.rb:2:in `<module:ActionView>'
    from /home/company/Development/project/vendor/plugins/jrails/lib/jrails.rb:1:in `<top (required)>'
    from /usr/local/lib/ruby/gems/1.9.1/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:156:in `require'
    from /usr/local/lib/ruby/gems/1.9.1/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:156:in `block in require'
    from /usr/local/lib/ruby/gems/1.9.1/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:521:in `new_constants_in'
    from /usr/local/lib/ruby/gems/1.9.1/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:156:in `require'
    from /home/company/Development/project/vendor/plugins/jrails/init.rb:6:in `block in evaluate_init_rb'
    from /usr/local/lib/ruby/gems/1.9.1/gems/rails-2.3.2/lib/rails/plugin.rb:146:in `eval'
    from /usr/local/lib/ruby/gems/1.9.1/gems/rails-2.3.2/lib/rails/plugin.rb:146:in `block in evaluate_init_rb'
    from /usr/local/lib/ruby/gems/1.9.1/gems/activesupport-2.3.2/lib/active_support/core_ext/kernel/reporting.rb:11:in `silence_warnings'
    from /usr/local/lib/ruby/gems/1.9.1/gems/rails-2.3.2/lib/rails/plugin.rb:142:in `evaluate_init_rb'
    from /usr/local/lib/ruby/gems/1.9.1/gems/rails-2.3.2/lib/rails/plugin.rb:48:in `load'
    from /usr/local/lib/ruby/gems/1.9.1/gems/rails-2.3.2/lib/rails/plugin/loader.rb:38:in `block in load_plugins'
    from /usr/local/lib/ruby/gems/1.9.1/gems/rails-2.3.2/lib/rails/plugin/loader.rb:37:in `each'
    from /usr/local/lib/ruby/gems/1.9.1/gems/rails-2.3.2/lib/rails/plugin/loader.rb:37:in `load_plugins'
    from /usr/local/lib/ruby/gems/1.9.1/gems/rails-2.3.2/lib/initializer.rb:348:in `load_plugins'
    from /usr/local/lib/ruby/gems/1.9.1/gems/rails-2.3.2/lib/initializer.rb:163:in `process'
    from /usr/local/lib/ruby/gems/1.9.1/gems/rails-2.3.2/lib/initializer.rb:113:in `run'
    from /home/company/Development/project/config/environment.rb:9:in `<top (required)>'
    from /usr/local/lib/ruby/gems/1.9.1/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:156:in `require'
    from /usr/local/lib/ruby/gems/1.9.1/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:156:in `block in require'
    from /usr/local/lib/ruby/gems/1.9.1/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:521:in `new_constants_in'
    from /usr/local/lib/ruby/gems/1.9.1/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:156:in `require'
    from /usr/local/lib/ruby/gems/1.9.1/gems/rails-2.3.2/lib/commands/server.rb:84:in `<top (required)>'
    from script/server:3:in `require'
    from script/server:3:in `<main>'

我已经进行了深思熟虑的搜索,无法找到此错误的原因,或者有关版本兼容性问题的任何文档。我们非常感谢你们给予的任何帮助。

谢谢,

Mike Trpcic

1 个答案:

答案 0 :(得分:4)

看起来它已经修补了使用Ruby 1.9,尝试从这个git repo而不是主站点抓取它: http://github.com/cheald/jrails/tree/master