thomasklein / redmine2mite

Redmine2mite connects your Redmine account with your mite.account. Track your time easily on issues within Redmine and get them automatically send to mite.
http://mite.yo.lk/
MIT License
13 stars 6 forks source link

rake failing after installing plugin #9

Closed sbrisko closed 12 years ago

sbrisko commented 12 years ago

Hello,

I am having an issue getting the plugin migration or Rake working on it's own after installing the Redmine2Mite plugin.

We are using Redmine 1.2.1, on a server with RVM running the app under Ruby Enterprise Edition.

rake db:migrate_plugins --trace
(in /var/www/redmine-1.2.1)
rake/rdoctask is deprecated.  Use rdoc/task instead (in RDoc 2.4.2+)
rake aborted!
undefined local variable or method `acts_as_customizable' for #<Class:0x476c9e8>
/var/www/redmine-1.2.1/vendor/rails/activerecord/lib/active_record/base.rb:1998:in `method_missing'
/var/www/redmine-1.2.1/app/models/time_entry.rb:28
/var/www/redmine-1.2.1/vendor/rails/activesupport/lib/active_support/dependencies.rb:406:in `load_without_new_constant_marking'
/var/www/redmine-1.2.1/vendor/rails/activesupport/lib/active_support/dependencies.rb:406:in `load_file'
/var/www/redmine-1.2.1/vendor/rails/activesupport/lib/active_support/dependencies.rb:547:in `new_constants_in'
/var/www/redmine-1.2.1/vendor/rails/activesupport/lib/active_support/dependencies.rb:405:in `load_file'
/var/www/redmine-1.2.1/vendor/rails/activesupport/lib/active_support/dependencies.rb:285:in `require_or_load'
/var/www/redmine-1.2.1/vendor/rails/activesupport/lib/active_support/dependencies.rb:250:in `depend_on'
/var/www/redmine-1.2.1/vendor/rails/activesupport/lib/active_support/dependencies.rb:162:in `require_dependency'
/var/www/redmine-1.2.1/vendor/plugins/Redmine2mite/lib/time_entry_patch.rb:1
/usr/local/rvm/rubies/ree-1.8.7-2010.02/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:29:in `gem_original_require'
/usr/local/rvm/rubies/ree-1.8.7-2010.02/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:29:in `require'
/var/www/redmine-1.2.1/vendor/rails/activesupport/lib/active_support/dependencies.rb:182:in `require'
/var/www/redmine-1.2.1/vendor/rails/activesupport/lib/active_support/dependencies.rb:547:in `new_constants_in'
/var/www/redmine-1.2.1/vendor/rails/activesupport/lib/active_support/dependencies.rb:182:in `require'
/var/www/redmine-1.2.1/vendor/plugins/Redmine2mite/init.rb:3:in `evaluate_init_rb'
/var/www/redmine-1.2.1/config/../vendor/rails/railties/lib/rails/plugin.rb:158:in `evaluate_init_rb'
/var/www/redmine-1.2.1/vendor/rails/activesupport/lib/active_support/core_ext/kernel/reporting.rb:11:in `silence_warnings'
/var/www/redmine-1.2.1/config/../vendor/rails/railties/lib/rails/plugin.rb:154:in `evaluate_init_rb'
/var/www/redmine-1.2.1/config/../vendor/rails/railties/lib/rails/plugin.rb:48:in `load'
/var/www/redmine-1.2.1/config/../vendor/plugins/engines/lib/engines/plugin.rb:44:in `load'
/var/www/redmine-1.2.1/config/../vendor/rails/railties/lib/rails/plugin/loader.rb:38:in `load_plugins'
/var/www/redmine-1.2.1/config/../vendor/rails/railties/lib/rails/plugin/loader.rb:37:in `each'
/var/www/redmine-1.2.1/config/../vendor/rails/railties/lib/rails/plugin/loader.rb:37:in `load_plugins'
/var/www/redmine-1.2.1/config/../vendor/rails/railties/lib/initializer.rb:369:in `load_plugins'
/var/www/redmine-1.2.1/config/../vendor/rails/railties/lib/initializer.rb:165:in `process'
/var/www/redmine-1.2.1/config/../vendor/rails/railties/lib/initializer.rb:113:in `send'
/var/www/redmine-1.2.1/config/../vendor/rails/railties/lib/initializer.rb:113:in `run'
/var/www/redmine-1.2.1/config/environment.rb:20
/usr/local/rvm/rubies/ree-1.8.7-2010.02/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:29:in `gem_original_require'
/usr/local/rvm/rubies/ree-1.8.7-2010.02/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:29:in `require'
/var/www/redmine-1.2.1/vendor/rails/activesupport/lib/active_support/dependencies.rb:182:in `require'
/var/www/redmine-1.2.1/vendor/rails/activesupport/lib/active_support/dependencies.rb:547:in `new_constants_in'
/var/www/redmine-1.2.1/vendor/rails/activesupport/lib/active_support/dependencies.rb:182:in `require'
/var/www/redmine-1.2.1/vendor/plugins/redmine_reminder/lib/tasks/reminder_all.rake:29
/var/www/redmine-1.2.1/vendor/rails/activesupport/lib/active_support/dependencies.rb:171:in `load_without_new_constant_marking'
/var/www/redmine-1.2.1/vendor/rails/activesupport/lib/active_support/dependencies.rb:171:in `load'
/var/www/redmine-1.2.1/vendor/rails/activesupport/lib/active_support/dependencies.rb:547:in `new_constants_in'
/var/www/redmine-1.2.1/vendor/rails/activesupport/lib/active_support/dependencies.rb:171:in `load'
/var/www/redmine-1.2.1/vendor/rails/railties/lib/tasks/rails.rb:13
/var/www/redmine-1.2.1/vendor/rails/railties/lib/tasks/rails.rb:13:in `each'
/var/www/redmine-1.2.1/vendor/rails/railties/lib/tasks/rails.rb:13
/usr/local/rvm/rubies/ree-1.8.7-2010.02/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:29:in `gem_original_require'
/usr/local/rvm/rubies/ree-1.8.7-2010.02/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:29:in `require'
/var/www/redmine-1.2.1/Rakefile:10
/usr/local/rvm/gems/ree-1.8.7-2010.02/gems/rake-0.9.2/lib/rake/rake_module.rb:25:in `load'
/usr/local/rvm/gems/ree-1.8.7-2010.02/gems/rake-0.9.2/lib/rake/rake_module.rb:25:in `load_rakefile'
/usr/local/rvm/gems/ree-1.8.7-2010.02/gems/rake-0.9.2/lib/rake/application.rb:495:in `raw_load_rakefile'
/usr/local/rvm/gems/ree-1.8.7-2010.02/gems/rake-0.9.2/lib/rake/application.rb:78:in `load_rakefile'
/usr/local/rvm/gems/ree-1.8.7-2010.02/gems/rake-0.9.2/lib/rake/application.rb:129:in `standard_exception_handling'
/usr/local/rvm/gems/ree-1.8.7-2010.02/gems/rake-0.9.2/lib/rake/application.rb:77:in `load_rakefile'
/usr/local/rvm/gems/ree-1.8.7-2010.02/gems/rake-0.9.2/lib/rake/application.rb:61:in `run'
/usr/local/rvm/gems/ree-1.8.7-2010.02/gems/rake-0.9.2/lib/rake/application.rb:129:in `standard_exception_handling'
/usr/local/rvm/gems/ree-1.8.7-2010.02/gems/rake-0.9.2/lib/rake/application.rb:59:in `run'
/usr/local/rvm/gems/ree-1.8.7-2010.02/gems/rake-0.9.2/bin/rake:32
/usr/local/rvm/gems/ree-1.8.7-2010.02/bin/rake:19:in `load'
/usr/local/rvm/gems/ree-1.8.7-2010.02/bin/rake:19
thomasklein commented 12 years ago

hi! do you have the plugin "acts_as_customizable" installed? should be in "\vendor\plugins\acts_as_customizable\lib\acts_as_customizable.rb"

Greetings

sbrisko commented 12 years ago

It is installed/present within vendors/plugins/. I am going to install it on a clean version of Redmine locally and see if I can replicate it there.

thomasklein commented 12 years ago

Ok. Wating for your result.

sbrisko commented 12 years ago

Going to close the ticket. I did not get a chance to test on a clean install of Redmine, but a decision has been made to go with another tracker vs Mite.

floeschie commented 12 years ago

I'm having the very same issue on a fresh Redmine installation (on Ubuntu Lucid 10.04 LTS). I used the lates stable branch from Redmine's Subversion repo. On my server it is located at /usr/local/share/redmine

The act_as_customizable plugin is available, it came with the rest of the Redmine code straight from Subversion checkout:

/usr/local/share/redmine# find ./vendor/plugins/acts_as_customizable | grep -v svn ./vendor/plugins/acts_as_customizable ./vendor/plugins/acts_as_customizable/lib ./vendor/plugins/acts_as_customizable/lib/acts_as_customizable.rb ./vendor/plugins/acts_as_customizable/init.rb

Any hints?

floeschie commented 12 years ago

Found the solution: I cloned the GitHub repository without defining a custom target on my machine, so the code was checked out into the folder "Redmine2mite". However, it seems that the plugin folder must not begin with a capital "R"... Renaming it from "Redmine2mite" to "redmine2mite" fixed the issue.

I think you should mention this in your installation tutorial. Additionally, I would add some more details to the installation instructions, for example:

1) Change to plugins directory: $ cd /path/to/redmine/vendor/plugins

2) Clone source code from GitHub: $ git clone http://github.com/thomasklein/Redmine2mite redmine2mite

3) Install the plugin schema via console within your redmine directory $ cd /path/to/redmine $ RAILS_ENV=production rake db:migrate_plugins (This will produce a bunch of status messages...)

4) Restart your Redmine web server (e.g. Mongrel, Thin, WEBrick)

5) Voilá, you're done!