简体   繁体   中英

Getting an error when running Rails server

I am very new to Ruby on Rails and just trying to play around. I'm trying to run the rails server and I cannot get it to start because I get the following error:

C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/actionview-4.2.2/lib/action_view/helpers.rb:40:in `<module:Helpers>': uninitialized constant ActionView::Helpers::ActiveModelHelper (NameError)
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/actionview-4.2.2/lib/action_view/helpers.rb:4:in `<module:ActionView>'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/actionview-4.2.2/lib/action_view/helpers.rb:3:in `<top (required)>'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/actionview-4.2.2/lib/action_view/base.rb:5:in `require'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/actionview-4.2.2/lib/action_view/base.rb:5:in `<top (required)>'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/web-console-2.2.1/lib/web_console/template.rb:7:in `<class:Template>'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/web-console-2.2.1/lib/web_console/template.rb:6:in `<module:WebConsole>'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/web-console-2.2.1/lib/web_console/template.rb:1:in `<top (required)>'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/web-console-2.2.1/lib/web_console.rb:12:in `require'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/web-console-2.2.1/lib/web_console.rb:12:in `<top (required)>'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/web-console-2.2.1/lib/web-console.rb:1:in `require'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/web-console-2.2.1/lib/web-console.rb:1:in `<top (required)>'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.10.4/lib/bundler/runtime.rb:76:in `require'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.10.4/lib/bundler/runtime.rb:76:in `block (2 levels) in require'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.10.4/lib/bundler/runtime.rb:72:in `each'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.10.4/lib/bundler/runtime.rb:72:in `block in require'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.10.4/lib/bundler/runtime.rb:61:in `each'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.10.4/lib/bundler/runtime.rb:61:in `require'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.10.4/lib/bundler.rb:134:in `require'
        from C:/wamp/www/simple_cms/config/application.rb:7:in `<top (required)>'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.2/lib/rails/commands/commands_tasks.rb:78:in `require'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.2/lib/rails/commands/commands_tasks.rb:78:in `block in server'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.2/lib/rails/commands/commands_tasks.rb:75:in `tap'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.2/lib/rails/commands/commands_tasks.rb:75:in `server'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.2/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.2/lib/rails/commands.rb:17:in `<top (required)>'
        from bin/rails:4:in `require'
        from bin/rails:4:in `<main>'

Any help would be much appreciated. Thanks!

Have you bundled from the command prompt?

bundle install

Is this the error you get when running server? What appears on your localhost:3000?

Try running bundle install in your command line. If that isn't it, please check back in with the results from your command line and we can try to troubleshoot the problem from there.

Good luck.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM