Cannot boot server. 'uninitialized constant ActionView::Helpers::ActiveModelHelper (NameError)'

106 views
Skip to first unread message

Zaid Ikhlas

unread,
Sep 4, 2015, 6:31:42 PM9/4/15
to Ruby on Rails: Talk
I created an app but whenever I run
rails server

It gives me the following error
:in `<module:Helpers>': uninitialized constant ActionView::Helpers::ActiveModelHelper (NameError)
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/actionview-4.2.4/lib/action_view/helpers.rb:4:in `
<module:ActionView>'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/actionview-4.2.4/lib/action_view/helpers.rb:3:in `<top (required)>'

       
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/actionview-4.2.4/lib/action_view/base.rb:5:in `require'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/actionview-4.2.4/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.6/lib/bundler/runtime.rb:76:in `require'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.10.6/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.6/lib/bundler/runtime.rb:72:in `each'

       
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.10.6/lib/bundler/runtime.rb:72:in `block in require'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.10.6/lib/bundler/runtime.rb:61:in `
each'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.10.6/lib/bundler/runtime.rb:61:in `require'

       
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.10.6/lib/bundler.rb:134:in `require'
        from C:/Users/xyz/Documents/Sites/simples_cms/config/application.rb:7:in `
<top (required)>'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.4/lib/rails/commands/commands_tasks.rb:78:in `require'

       
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.4/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.4/lib/rails/commands/commands_tasks.rb:75:in `
tap'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.4/lib/rails/commands/commands_tasks.rb:75:in `server'

       
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.4/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.4/lib/rails/commands.rb:17:in `
<top (required)>'
        from bin/rails:4:in `require'

       
from bin/rails:4:in `<main>'
Can anybody help me fix this error and boot up WeBrick?
I'm running on Windows.

Sadaf Noor

unread,
Sep 5, 2015, 2:57:09 AM9/5/15
to rubyonra...@googlegroups.com
Try following:

0. Reinstall actionview gem
1. Switching to ruby 2.0 version.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-ta...@googlegroups.com.
To post to this group, send email to rubyonra...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/188cc6ed-f506-4908-abc7-afdf15e81e99%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
 Md. Sadaf Noor (@sadaf2605)
 www.sadafnoor.com

Colin Law

unread,
Sep 5, 2015, 3:02:15 AM9/5/15
to Ruby on Rails: Talk
On 4 September 2015 at 17:42, Zaid Ikhlas <m.zaid...@gmail.com> wrote:
> I created an app but whenever I run
> rails server
>
> It gives me the following error
> :in `<module:Helpers>': uninitialized constant
> ActionView::Helpers::ActiveModelHelper (NameError)
> from
> C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/actionview-4.2.4/lib/action_view/helpers.rb:4:in
> `<module:ActionView>'

Googling for the error message finds a number of hits that look as if
they might be relevant. Have a look through those and let us know if
any are helpful.

https://www.google.com/search?client=ubuntu&channel=fs&q=uninitialized+constant+ActionView%3A%3AHelpers%3A%3AActiveModelHelper&ie=utf-8&oe=utf-8&gl=uk

Colin

Zaid Ikhlas

unread,
Sep 5, 2015, 8:39:30 AM9/5/15
to Ruby on Rails: Talk
This problem has been fixed.
Here is the solution: http://stackoverflow.com/a/32412231/5303368

Thank you.
Reply all
Reply to author
Forward
0 new messages