Project

General

Profile

Actions

Defect #15949

closed

uninitialized constant Redmine::Scm::Adapters::AbstractAdapter::CommandFailed

Added by Łukasz Zaroda almost 11 years ago. Updated almost 11 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Affected version:

Description

I can see above error suspiciously often. First I tried to migrate a plugin redmine_git_hosting and it gave me this:

redmine@vps:~/redmine-2.4.2$ rake redmine:plugins:migrate RAILS_ENV=production
rake aborted!
uninitialized constant Redmine::Scm::Adapters::AbstractAdapter::CommandFailed
/home/redmine/redmine-2.4.2/lib/redmine/scm/adapters/abstract_adapter.rb:30:in `<class:AbstractAdapter>'
/home/redmine/redmine-2.4.2/lib/redmine/scm/adapters/abstract_adapter.rb:27:in `<module:Adapters>'
/home/redmine/redmine-2.4.2/lib/redmine/scm/adapters/abstract_adapter.rb:26:in `<module:Scm>'
/home/redmine/redmine-2.4.2/lib/redmine/scm/adapters/abstract_adapter.rb:25:in `<module:Redmine>'
/home/redmine/redmine-2.4.2/lib/redmine/scm/adapters/abstract_adapter.rb:24:in `<top (required)>'
/home/redmine/redmine-2.4.2/lib/redmine/scm/adapters/git_adapter.rb:18:in `<top (required)>'
/home/redmine/redmine-2.4.2/app/models/repository/git.rb:19:in `<top (required)>'
/home/redmine/redmine-2.4.2/plugins/redmine_git_hosting/lib/redmine_git_hosting.rb:32:in `block in <top (required)>'
/home/redmine/.rvm/gems/ruby-2.0.0-p353/gems/activesupport-3.2.16/lib/active_support/callbacks.rb:429:in `_run__4315654639566242101__prepare__529810732715233710__callbacks'
/home/redmine/.rvm/gems/ruby-2.0.0-p353/gems/activesupport-3.2.16/lib/active_support/callbacks.rb:405:in `__run_callback'
/home/redmine/.rvm/gems/ruby-2.0.0-p353/gems/activesupport-3.2.16/lib/active_support/callbacks.rb:385:in `_run_prepare_callbacks'
/home/redmine/.rvm/gems/ruby-2.0.0-p353/gems/activesupport-3.2.16/lib/active_support/callbacks.rb:81:in `run_callbacks'
/home/redmine/.rvm/gems/ruby-2.0.0-p353/gems/actionpack-3.2.16/lib/action_dispatch/middleware/reloader.rb:74:in `prepare!'
/home/redmine/.rvm/gems/ruby-2.0.0-p353/gems/actionpack-3.2.16/lib/action_dispatch/middleware/reloader.rb:48:in `prepare!'
/home/redmine/.rvm/gems/ruby-2.0.0-p353/gems/railties-3.2.16/lib/rails/application/finisher.rb:47:in `block in <module:Finisher>'
/home/redmine/.rvm/gems/ruby-2.0.0-p353/gems/railties-3.2.16/lib/rails/initializable.rb:30:in `instance_exec'
/home/redmine/.rvm/gems/ruby-2.0.0-p353/gems/railties-3.2.16/lib/rails/initializable.rb:30:in `run'
/home/redmine/.rvm/gems/ruby-2.0.0-p353/gems/railties-3.2.16/lib/rails/initializable.rb:55:in `block in run_initializers'
/home/redmine/.rvm/gems/ruby-2.0.0-p353/gems/railties-3.2.16/lib/rails/initializable.rb:54:in `each'
/home/redmine/.rvm/gems/ruby-2.0.0-p353/gems/railties-3.2.16/lib/rails/initializable.rb:54:in `run_initializers'
/home/redmine/.rvm/gems/ruby-2.0.0-p353/gems/railties-3.2.16/lib/rails/application.rb:136:in `initialize!'
/home/redmine/.rvm/gems/ruby-2.0.0-p353/gems/railties-3.2.16/lib/rails/railtie/configurable.rb:30:in `method_missing'
/home/redmine/redmine-2.4.2/config/environment.rb:14:in `<top (required)>'
/home/redmine/.rvm/gems/ruby-2.0.0-p353/gems/railties-3.2.16/lib/rails/application.rb:103:in `require_environment!'
/home/redmine/.rvm/gems/ruby-2.0.0-p353/gems/railties-3.2.16/lib/rails/application.rb:305:in `block (2 levels) in initialize_tasks'
/home/redmine/.rvm/gems/ruby-2.0.0-p353/bin/ruby_executable_hooks:15:in `eval'
/home/redmine/.rvm/gems/ruby-2.0.0-p353/bin/ruby_executable_hooks:15:in `<main>'
Tasks: TOP => redmine:plugins:migrate => environment
(See full trace by running task with --trace)

Website seemed to work well, just couldn't migrate this plugin. So I tried to change ruby version and check what will happen, so I changed ruby, installed new gems, and after that I got this - now on website:

uninitialized constant Redmine::Scm::Adapters::AbstractAdapter::CommandFailed (NameError)
  /home/redmine/redmine-2.4.2/lib/redmine/scm/adapters/abstract_adapter.rb:30:in `<class:AbstractAdapter>'
  /home/redmine/redmine-2.4.2/lib/redmine/scm/adapters/abstract_adapter.rb:27:in `<module:Adapters>'
  /home/redmine/redmine-2.4.2/lib/redmine/scm/adapters/abstract_adapter.rb:26:in `<module:Scm>'
  /home/redmine/redmine-2.4.2/lib/redmine/scm/adapters/abstract_adapter.rb:25:in `<module:Redmine>'
  /home/redmine/redmine-2.4.2/lib/redmine/scm/adapters/abstract_adapter.rb:24:in `<top (required)>'
  /home/redmine/redmine-2.4.2/lib/redmine/scm/adapters/git_adapter.rb:18:in `<top (required)>'
  /home/redmine/redmine-2.4.2/app/models/repository/git.rb:19:in `<top (required)>'
  /home/redmine/redmine-2.4.2/plugins/redmine_git_hosting/lib/redmine_git_hosting.rb:19:in `block in <top (required)>'
  /home/redmine/.rvm/gems/ruby-1.9.3-p484/gems/activesupport-3.2.16/lib/active_support/callbacks.rb:429:in `_run__4013759259038737715__prepare__814589955319274788__callbacks'
  /home/redmine/.rvm/gems/ruby-1.9.3-p484/gems/activesupport-3.2.16/lib/active_support/callbacks.rb:405:in `__run_callback'
  /home/redmine/.rvm/gems/ruby-1.9.3-p484/gems/activesupport-3.2.16/lib/active_support/callbacks.rb:385:in `_run_prepare_callbacks'
  /home/redmine/.rvm/gems/ruby-1.9.3-p484/gems/activesupport-3.2.16/lib/active_support/callbacks.rb:81:in `run_callbacks'
  /home/redmine/.rvm/gems/ruby-1.9.3-p484/gems/actionpack-3.2.16/lib/action_dispatch/middleware/reloader.rb:74:in `prepare!'
  /home/redmine/.rvm/gems/ruby-1.9.3-p484/gems/actionpack-3.2.16/lib/action_dispatch/middleware/reloader.rb:48:in `prepare!'
  /home/redmine/.rvm/gems/ruby-1.9.3-p484/gems/railties-3.2.16/lib/rails/application/finisher.rb:47:in `block in <module:Finisher>'
  /home/redmine/.rvm/gems/ruby-1.9.3-p484/gems/railties-3.2.16/lib/rails/initializable.rb:30:in `instance_exec'
  /home/redmine/.rvm/gems/ruby-1.9.3-p484/gems/railties-3.2.16/lib/rails/initializable.rb:30:in `run'
  /home/redmine/.rvm/gems/ruby-1.9.3-p484/gems/railties-3.2.16/lib/rails/initializable.rb:55:in `block in run_initializers'
  /home/redmine/.rvm/gems/ruby-1.9.3-p484/gems/railties-3.2.16/lib/rails/initializable.rb:54:in `each'
  /home/redmine/.rvm/gems/ruby-1.9.3-p484/gems/railties-3.2.16/lib/rails/initializable.rb:54:in `run_initializers'
  /home/redmine/.rvm/gems/ruby-1.9.3-p484/gems/railties-3.2.16/lib/rails/application.rb:136:in `initialize!'
  /home/redmine/.rvm/gems/ruby-1.9.3-p484/gems/railties-3.2.16/lib/rails/railtie/configurable.rb:30:in `method_missing'
  /home/redmine/redmine-2.4.2/config/environment.rb:14:in `<top (required)>'
  config.ru:3:in `require'
  config.ru:3:in `block in <main>'
  /home/redmine/.rvm/gems/ruby-1.9.3-p484/gems/rack-1.4.5/lib/rack/builder.rb:51:in `instance_eval'
  /home/redmine/.rvm/gems/ruby-1.9.3-p484/gems/rack-1.4.5/lib/rack/builder.rb:51:in `initialize'
  config.ru:1:in `new'
  config.ru:1:in `<main>'
  /home/redmine/.rvm/gems/ruby-1.9.3-p484/gems/passenger-4.0.35/helper-scripts/rack-preloader.rb:112:in `eval'
  /home/redmine/.rvm/gems/ruby-1.9.3-p484/gems/passenger-4.0.35/helper-scripts/rack-preloader.rb:112:in `preload_app'
  /home/redmine/.rvm/gems/ruby-1.9.3-p484/gems/passenger-4.0.35/helper-scripts/rack-preloader.rb:158:in `<module:App>'
  /home/redmine/.rvm/gems/ruby-1.9.3-p484/gems/passenger-4.0.35/helper-scripts/rack-preloader.rb:29:in `<module:PhusionPassenger>'
  /home/redmine/.rvm/gems/ruby-1.9.3-p484/gems/passenger-4.0.35/helper-scripts/rack-preloader.rb:28:in `<main>'

So now website doesn't work. What is this error about? Is this some kind of a bug or am I missing something?

I'm using new RVM on Ubuntu 12.04 with "redmine" system user that owns everything.


Related issues

Is duplicate of Redmine - Defect #15756: 500 on admin info/settings page on development environmentClosed

Actions
Actions #1

Updated by Łukasz Zaroda almost 11 years ago

  • Status changed from New to Resolved

Oh I just notices that this plugin is referenced also in second error, so this must to be a plugin problem, sorry I missed this :) , I reported this here: https://github.com/jbox-web/redmine_git_hosting/issues/117

Actions #2

Updated by Toshi MARUYAMA almost 11 years ago

  • Status changed from Resolved to Closed
Actions #3

Updated by Toshi MARUYAMA almost 11 years ago

  • Related to Defect #15756: 500 on admin info/settings page on development environment added
Actions #4

Updated by Nicolas Rodriguez almost 11 years ago

Hi there!

I'm the maintainer of the Redmine Git Hosting plugin https://github.com/jbox-web/redmine_git_hosting

I've done a fresh install of Redmine without the plugin and the error is still here.

ActionView::Template::Error (uninitialized constant Redmine::Scm::Adapters::AbstractAdapter::CommandFailed):
    10:     <th><%= l(:text_scm_command_version) %></th>
    11:   </tr>
    12:   <% Redmine::Scm::Base.all.collect do |choice| %>
    13:     <% scm_class = "Repository::#{choice}".constantize %>
    14:     <% text, value = (choice.is_a?(Array) ? choice : [choice, choice]) %>
    15:     <% setting = :enabled_scm %>
    16:     <% enabled = Setting.send(setting).include?(value) %>
  lib/redmine/scm/adapters/abstract_adapter.rb:30:in `<class:AbstractAdapter>'
  lib/redmine/scm/adapters/abstract_adapter.rb:27:in `<module:Adapters>'
  lib/redmine/scm/adapters/abstract_adapter.rb:26:in `<module:Scm>'
  lib/redmine/scm/adapters/abstract_adapter.rb:25:in `<module:Redmine>'
  lib/redmine/scm/adapters/abstract_adapter.rb:24:in `<top (required)>'
  lib/redmine/scm/adapters/subversion_adapter.rb:18:in `<top (required)>'
  app/models/repository/subversion.rb:18:in `<top (required)>'
  app/views/settings/_repositories.html.erb:13:in `block (2 levels) in _app_views_settings__repositories_html_erb__4034124995262239721_41761500'
  app/views/settings/_repositories.html.erb:12:in `collect'
  app/views/settings/_repositories.html.erb:12:in `block in _app_views_settings__repositories_html_erb__4034124995262239721_41761500'
  app/views/settings/_repositories.html.erb:1:in `_app_views_settings__repositories_html_erb__4034124995262239721_41761500'
  app/views/common/_tabs.html.erb:24:in `block in _app_views_common__tabs_html_erb__1140696018801873812_39142660'
  app/views/common/_tabs.html.erb:23:in `each'
  app/views/common/_tabs.html.erb:23:in `_app_views_common__tabs_html_erb__1140696018801873812_39142660'
  app/helpers/application_helper.rb:272:in `render_tabs'
  app/views/settings/edit.html.erb:3:in `_app_views_settings_edit_html_erb___3147297590595818966_40875280'
  app/controllers/settings_controller.rb:28:in `index'

I've applied the patch given by @pires https://github.com/jbox-web/redmine_git_hosting/issues/117#issuecomment-34422995 and it works.

Here's my config :

Environment:
  Redmine version                2.4.2.stable
  Ruby version                   2.1.0-p0 (2013-12-25) [x86_64-linux]
  Rails version                  3.2.16
  Environment                    development
  Database adapter               Mysql2
SCM:
  Subversion                     1.8.5
  Git                            1.8.5.4
  Filesystem                     
Redmine plugins:
  no plugin installed
Actions #5

Updated by Toshi MARUYAMA over 10 years ago

  • Related to deleted (Defect #15756: 500 on admin info/settings page on development environment)
Actions #6

Updated by Toshi MARUYAMA over 10 years ago

  • Is duplicate of Defect #15756: 500 on admin info/settings page on development environment added
Actions

Also available in: Atom PDF