未初始化的常量ActionView :: Helpers :: ActionModeHelper

时间:2015-03-31 05:07:19

标签: ruby-on-rails ruby windows-7

我是ruby on rails的新手,在我安装必要的工具以在win7中运行我的项目后,它显示了这些错误:

D:\SaaSProject>rails s
=> Booting WEBrick
=> Rails 4.2.0 application starting in development on http://localhost:3000
=> Run `rails server -h` for more startup options
=> Ctrl-C to shutdown server
Exiting
G:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/actionview-4.2.0/lib/action_view/helpers.
rb:40:in `<module:Helpers>': uninitialized constant ActionView::Helpers::ActiveM
odelHelper (NameError)
        from G:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/actionview-4.2.0/lib/action_
view/helpers.rb:4:in `<module:ActionView>'
        from G:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/actionview-4.2.0/lib/action_
view/helpers.rb:3:in `<top (required)>'
        from G:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/actionview-4.2.0/lib/action_
view/base.rb:5:in `<top (required)>'
        from G:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/actionview-4.2.0/lib/action_
view/view_paths.rb:1:in `<top (required)>'
        from G:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/actionpack-4.2.0/lib/abstrac
t_controller/rendering.rb:4:in `<top (required)>'
        from G:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/actionmailer-4.2.0/lib/actio
n_mailer/base.rb:423:in `<class:Base>'
        from G:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/actionmailer-4.2.0/lib/actio
n_mailer/base.rb:417:in `<module:ActionMailer>'
        from G:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/actionmailer-4.2.0/lib/actio
n_mailer/base.rb:9:in `<top (required)>'
        from G:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rspec-rails-3.2.1/lib/rspec-
rails.rb:29:in `block in <class:Railtie>'
        from G:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.0/lib/rails/ini
tializable.rb:30:in `instance_exec'
        from G:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.0/lib/rails/ini
tializable.rb:30:in `run'
        from G:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.0/lib/rails/ini
tializable.rb:55:in `block in run_initializers'
        from G:/Ruby22-x64/lib/ruby/2.2.0/tsort.rb:226:in `block in tsort_each'
        from G:/Ruby22-x64/lib/ruby/2.2.0/tsort.rb:348:in `block (2 levels) in e
ach_strongly_connected_component'
        from G:/Ruby22-x64/lib/ruby/2.2.0/tsort.rb:420:in `block (2 levels) in e
ach_strongly_connected_component_from'
        from G:/Ruby22-x64/lib/ruby/2.2.0/tsort.rb:429:in `each_strongly_connect
ed_component_from'
        from G:/Ruby22-x64/lib/ruby/2.2.0/tsort.rb:419:in `block in each_strongl
y_connected_component_from'
        from G:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.0/lib/rails/ini
tializable.rb:44:in `each'
        from G:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.0/lib/rails/ini
tializable.rb:44:in `tsort_each_child'
        from G:/Ruby22-x64/lib/ruby/2.2.0/tsort.rb:413:in `call'
        from G:/Ruby22-x64/lib/ruby/2.2.0/tsort.rb:413:in `each_strongly_connect
ed_component_from'
        from G:/Ruby22-x64/lib/ruby/2.2.0/tsort.rb:347:in `block in each_strongl
y_connected_component'
        from G:/Ruby22-x64/lib/ruby/2.2.0/tsort.rb:345:in `each'
        from G:/Ruby22-x64/lib/ruby/2.2.0/tsort.rb:345:in `call'
        from G:/Ruby22-x64/lib/ruby/2.2.0/tsort.rb:345:in `each_strongly_connect
ed_component'
        from G:/Ruby22-x64/lib/ruby/2.2.0/tsort.rb:224:in `tsort_each'
        from G:/Ruby22-x64/lib/ruby/2.2.0/tsort.rb:203:in `tsort_each'
        from G:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.0/lib/rails/ini
tializable.rb:54:in `run_initializers'
        from G:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.0/lib/rails/app
lication.rb:352:in `initialize!'
        from D:/SaaSProject/config/environment.rb:5:in `<top (required)>'
        from D:/SaaSProject/config.ru:3:in `block in <main>'
        from G:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rack-1.6.0/lib/rack/builder.
rb:55:in `instance_eval'
        from G:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rack-1.6.0/lib/rack/builder.
rb:55:in `initialize'
        from D:/SaaSProject/config.ru:in `new'
        from D:/SaaSProject/config.ru:in `<main>'
        from G:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rack-1.6.0/lib/rack/builder.
rb:49:in `eval'
        from G:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rack-1.6.0/lib/rack/builder.
rb:49:in `new_from_string'
        from G:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rack-1.6.0/lib/rack/builder.
rb:40:in `parse_file'
        from G:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rack-1.6.0/lib/rack/server.r
b:299:in `build_app_and_options_from_config'
        from G:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rack-1.6.0/lib/rack/server.r
b:208:in `app'
        from G:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.0/lib/rails/com
mands/server.rb:61:in `app'
        from G:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rack-1.6.0/lib/rack/server.r
b:336:in `wrapped_app'
        from G:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.0/lib/rails/com
mands/server.rb:139:in `log_to_stdout'
        from G:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.0/lib/rails/com
mands/server.rb:78:in `start'
        from G:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.0/lib/rails/com
mands/commands_tasks.rb:80:in `block in server'
        from G:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.0/lib/rails/com
mands/commands_tasks.rb:75:in `tap'
        from G:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.0/lib/rails/com
mands/commands_tasks.rb:75:in `server'
        from G:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.0/lib/rails/com
mands/commands_tasks.rb:39:in `run_command!'
        from G:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.0/lib/rails/com
mands.rb:17:in `<top (required)>'
        from bin/rails:8:in `require'
        from bin/rails:8:in `<main>'

当我检查问题时,在第40行显示包括ActiveModelHelper。你能帮助我解决这个问题吗?我真的很感激。

0 个答案:

没有答案