Got this "uninitialized constant ApplicationHelper::GravatarHelper" when install a plugin

Added by Billy T over 10 years ago

I followed the instruction to install a plugin. And I got this
"uninitialized constant ApplicationHelper::GravatarHelpe"

Did I do anything wrong?
Sorry, I know nothing about Ruby.

Could you help me?

System: Debian testing

Here is all output of running rake:
  1. rake db:migrate_plugins RAILS_ENV=production --trace
    (in /home/data/rails/redmine)
    • Invoke db:migrate_plugins (first_time)
    • Invoke environment (first_time)
    • Execute environment
      rake aborted!
      uninitialized constant ApplicationHelper::GravatarHelper
      /home/data/rails/redmine/vendor/rails/activesupport/lib/active_support/dependencies.rb:276:in `load_missing_constant'
      /home/data/rails/redmine/vendor/rails/activesupport/lib/active_support/dependencies.rb:468:in `const_missing'
      /home/data/rails/redmine/app/helpers/application_helper.rb:25
      /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
      /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `require'
      /home/data/rails/redmine/vendor/rails/activesupport/lib/active_support/dependencies.rb:510:in `require'
      /home/data/rails/redmine/vendor/rails/activesupport/lib/active_support/dependencies.rb:355:in `new_constants_in'
      /home/data/rails/redmine/vendor/rails/activesupport/lib/active_support/dependencies.rb:510:in `require'
      /home/data/rails/redmine/vendor/rails/activesupport/lib/active_support/dependencies.rb:102:in `require_or_load'
      /home/data/rails/redmine/vendor/rails/activesupport/lib/active_support/dependencies.rb:61:in `depend_on'
      /home/data/rails/redmine/vendor/rails/activesupport/lib/active_support/dependencies.rb:457:in `require_dependency'
      /home/data/rails/redmine/vendor/rails/actionpack/lib/action_controller/helpers.rb:193:in `default_helper_module!'
      /home/data/rails/redmine/vendor/rails/actionpack/lib/action_controller/helpers.rb:208:in `send!'
      /home/data/rails/redmine/vendor/rails/actionpack/lib/action_controller/helpers.rb:208:in `inherited'
      /home/data/rails/redmine/app/controllers/application.rb:21
      /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
      /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `require'
      /home/data/rails/redmine/vendor/rails/activesupport/lib/active_support/dependencies.rb:510:in `require'
      /home/data/rails/redmine/vendor/rails/activesupport/lib/active_support/dependencies.rb:355:in `new_constants_in'
      /home/data/rails/redmine/vendor/rails/activesupport/lib/active_support/dependencies.rb:510:in `require'
      /home/data/rails/redmine/vendor/plugins/Ubik-redmine_local_avatars-5abd8455f018e688f53283eb90891d33833a9b41/lib/users_avatar_patch.rb:1
      /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
      /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `require'
      /home/data/rails/redmine/vendor/rails/activesupport/lib/active_support/dependencies.rb:510:in `require'
      /home/data/rails/redmine/vendor/rails/activesupport/lib/active_support/dependencies.rb:355:in `new_constants_in'
      /home/data/rails/redmine/vendor/rails/activesupport/lib/active_support/dependencies.rb:510:in `require'
      /home/data/rails/redmine/vendor/plugins/Ubik-redmine_local_avatars-5abd8455f018e688f53283eb90891d33833a9b41/init.rb:3:in `evaluate_init_rb'
      /home/data/rails/redmine/vendor/rails/railties/lib/rails/plugin.rb:95:in `evaluate_init_rb'
      /home/data/rails/redmine/vendor/rails/activesupport/lib/active_support/core_ext/kernel/reporting.rb:11:in `silence_warnings'
      /home/data/rails/redmine/vendor/rails/railties/lib/rails/plugin.rb:91:in `evaluate_init_rb'
      /home/data/rails/redmine/vendor/rails/railties/lib/rails/plugin.rb:44:in `load'
      /home/data/rails/redmine/config/../vendor/plugins/engines/lib/engines/plugin.rb:77:in `load'
      /home/data/rails/redmine/vendor/rails/railties/lib/rails/plugin/loader.rb:33:in `load_plugins'
      /home/data/rails/redmine/vendor/rails/railties/lib/rails/plugin/loader.rb:32:in `each'
      /home/data/rails/redmine/vendor/rails/railties/lib/rails/plugin/loader.rb:32:in `load_plugins'
      /home/data/rails/redmine/vendor/rails/railties/lib/initializer.rb:292:in `load_plugins'
      /home/data/rails/redmine/vendor/rails/railties/lib/initializer.rb:142:in `process'
      /home/data/rails/redmine/vendor/rails/railties/lib/initializer.rb:97:in `send'
      /home/data/rails/redmine/vendor/rails/railties/lib/initializer.rb:97:in `run'
      /home/data/rails/redmine/config/environment.rb:20
      /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
      /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `require'
      /home/data/rails/redmine/vendor/rails/activesupport/lib/active_support/dependencies.rb:510:in `require'
      /home/data/rails/redmine/vendor/rails/activesupport/lib/active_support/dependencies.rb:355:in `new_constants_in'
      /home/data/rails/redmine/vendor/rails/activesupport/lib/active_support/dependencies.rb:510:in `require'
      /home/data/rails/redmine/vendor/rails/railties/lib/tasks/misc.rake:3
      /usr/lib/ruby/1.8/rake.rb:617:in `call'
      /usr/lib/ruby/1.8/rake.rb:617:in `execute'
      /usr/lib/ruby/1.8/rake.rb:612:in `each'
      /usr/lib/ruby/1.8/rake.rb:612:in `execute'
      /usr/lib/ruby/1.8/rake.rb:578:in `invoke_with_call_chain'
      /usr/lib/ruby/1.8/monitor.rb:242:in `synchronize'
      /usr/lib/ruby/1.8/rake.rb:571:in `invoke_with_call_chain'
      /usr/lib/ruby/1.8/rake.rb:588:in `invoke_prerequisites'
      /usr/lib/ruby/1.8/rake.rb:585:in `each'
      /usr/lib/ruby/1.8/rake.rb:585:in `invoke_prerequisites'
      /usr/lib/ruby/1.8/rake.rb:577:in `invoke_with_call_chain'
      /usr/lib/ruby/1.8/monitor.rb:242:in `synchronize'
      /usr/lib/ruby/1.8/rake.rb:571:in `invoke_with_call_chain'
      /usr/lib/ruby/1.8/rake.rb:564:in `invoke'
      /usr/lib/ruby/1.8/rake.rb:2027:in `invoke_task'
      /usr/lib/ruby/1.8/rake.rb:2005:in `top_level'
      /usr/lib/ruby/1.8/rake.rb:2005:in `each'
      /usr/lib/ruby/1.8/rake.rb:2005:in `top_level'
      /usr/lib/ruby/1.8/rake.rb:2044:in `standard_exception_handling'
      /usr/lib/ruby/1.8/rake.rb:1999:in `top_level'
      /usr/lib/ruby/1.8/rake.rb:1977:in `run'
      /usr/lib/ruby/1.8/rake.rb:2044:in `standard_exception_handling'
      /usr/lib/ruby/1.8/rake.rb:1974:in `run'
      /usr/bin/rake:28

Replies (6)

RE: Got this "uninitialized constant ApplicationHelper::GravatarHelper" when install a plugin - Added by Eric Davis over 10 years ago

Do you have a directory vendor/plugins/gravatar in your Redmine?

Eric Davis

RE: Got this "uninitialized constant ApplicationHelper::GravatarHelper" when install a plugin - Added by Christophe Absil about 10 years ago

Got the same problem, how do you solve this.

Indeed I have a vendor/plugins/gravatar directory

RE: Got this "uninitialized constant ApplicationHelper::GravatarHelper" when install a plugin - Added by Eric Davis about 10 years ago

What's in vendor/plugins/gravatar? Here's mine from a working Redmine system:

|-- MIT-LICENSE
|-- README.rdoc
|-- Rakefile
|-- about.yml
|-- init.rb
|-- lib
|   `-- gravatar.rb
`-- spec
    `-- gravatar_spec.rb

2 directories, 7 files

Eric Davis

RE: Got this "uninitialized constant ApplicationHelper::GravatarHelper" when install a plugin - Added by Wayne j about 10 years ago

I am having this same problem. Has anyone managed to solve this one?

Thanks

RE: Got this "uninitialized constant ApplicationHelper::GravatarHelper" when install a plugin - Added by Rafael Martins about 10 years ago

I had this problem too. using redmine 0.8.5, ruby 1.8.6, rake 0.8.7, and got the gravatar error when trying to install the plugin bterlson-redmine-status-updates.

Although it is different to the plugin listed above (Ubik-redmine_local_avatars, i think), i solve removing the directory of the new plugin from vendor/plugin and works again. Try this.

In your case could be a conflict(local-avatars x gravatar), I don't know....newbie in redmine too( < 1 week).

RE: Got this "uninitialized constant ApplicationHelper::GravatarHelper" when install a plugin - Added by Rafael Martins about 10 years ago

installing gravatar_helper before make me able to install the plugin I want

  1. I move the plugin(in my case statusupdate) out of redmine
  2. Had installed gravatar_helper
  3. then I move back the plugin to redmine and rake works
(at /var/www/redmine#)
#> mv vendor/plugins/<your-plugin> ~/    
#> ruby script/plugin install http://mattmccray.com/svn/rails/plugins/gravatar_helper
#> mv ~/<your-plugin> vendor/plugins/<your-plugin>
#> rake db:migrate_plugins RAILS_ENV=production

hope it help
regards

(1-6/6)