Stuff To Do Plugin -- install error

Added by m p about 12 years ago

/opt/redmine$ rake db:migrate_plugins RAILS_ENV=production --trace
(in /opt/redmine)
  • Invoke db:migrate_plugins (first_time)
  • Invoke environment (first_time)
  • Execute environment
    rake aborted!
    wrong number of arguments (0 for 1)
    /opt/redmine/vendor/plugins/stuff_to_do_plugin/rails/init.rb:3:in `directory'
    /opt/redmine/vendor/plugins/stuff_to_do_plugin/rails/init.rb:3
    /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'
    /opt/redmine/vendor/rails/activesupport/lib/active_support/dependencies.rb:510:in `require'
    /opt/redmine/vendor/rails/activesupport/lib/active_support/dependencies.rb:355:in `new_constants_in'
    /opt/redmine/vendor/rails/activesupport/lib/active_support/dependencies.rb:510:in `require'
    /opt/redmine/vendor/plugins/stuff_to_do_plugin/init.rb:1:in `evaluate_init_rb'
    /opt/redmine/vendor/rails/railties/lib/rails/plugin.rb:95:in `evaluate_init_rb'
    /opt/redmine/vendor/rails/activesupport/lib/active_support/core_ext/kernel/reporting.rb:11:in `silence_warnings'
    /opt/redmine/vendor/rails/railties/lib/rails/plugin.rb:91:in `evaluate_init_rb'
    /opt/redmine/vendor/rails/railties/lib/rails/plugin.rb:44:in `load'
    /opt/redmine/config/../vendor/plugins/engines/lib/engines/plugin.rb:77:in `load'
    /opt/redmine/vendor/rails/railties/lib/rails/plugin/loader.rb:33:in `load_plugins'
    /opt/redmine/vendor/rails/railties/lib/rails/plugin/loader.rb:32:in `each'
    /opt/redmine/vendor/rails/railties/lib/rails/plugin/loader.rb:32:in `load_plugins'
    /opt/redmine/vendor/rails/railties/lib/initializer.rb:292:in `load_plugins'
    /opt/redmine/vendor/rails/railties/lib/initializer.rb:142:in `process'
    /opt/redmine/vendor/rails/railties/lib/initializer.rb:97:in `send'
    /opt/redmine/vendor/rails/railties/lib/initializer.rb:97:in `run'
    /opt/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'
    /opt/redmine/vendor/rails/activesupport/lib/active_support/dependencies.rb:510:in `require'
    /opt/redmine/vendor/rails/activesupport/lib/active_support/dependencies.rb:355:in `new_constants_in'
    /opt/redmine/vendor/rails/activesupport/lib/active_support/dependencies.rb:510:in `require'
    /opt/redmine/vendor/rails/railties/lib/tasks/misc.rake:3
    /usr/lib/ruby/1.8/rake.rb:546:in `call'
    /usr/lib/ruby/1.8/rake.rb:546:in `execute'
    /usr/lib/ruby/1.8/rake.rb:541:in `each'
    /usr/lib/ruby/1.8/rake.rb:541:in `execute'
    /usr/lib/ruby/1.8/rake.rb:508:in `invoke_with_call_chain'
    /usr/lib/ruby/1.8/rake.rb:501:in `synchronize'
    /usr/lib/ruby/1.8/rake.rb:501:in `invoke_with_call_chain'
    /usr/lib/ruby/1.8/rake.rb:518:in `invoke_prerequisites'
    /usr/lib/ruby/1.8/rake.rb:1183:in `each'
    /usr/lib/ruby/1.8/rake.rb:1183:in `send'
    /usr/lib/ruby/1.8/rake.rb:1183:in `each'
    /usr/lib/ruby/1.8/rake.rb:515:in `invoke_prerequisites'
    /usr/lib/ruby/1.8/rake.rb:507:in `invoke_with_call_chain'
    /usr/lib/ruby/1.8/rake.rb:501:in `synchronize'
    /usr/lib/ruby/1.8/rake.rb:501:in `invoke_with_call_chain'
    /usr/lib/ruby/1.8/rake.rb:494:in `invoke'
    /usr/lib/ruby/1.8/rake.rb:1931:in `invoke_task'
    /usr/lib/ruby/1.8/rake.rb:1909:in `top_level'
    /usr/lib/ruby/1.8/rake.rb:1909:in `each'
    /usr/lib/ruby/1.8/rake.rb:1909:in `top_level'
    /usr/lib/ruby/1.8/rake.rb:1948:in `standard_exception_handling'
    /usr/lib/ruby/1.8/rake.rb:1903:in `top_level'
    /usr/lib/ruby/1.8/rake.rb:1881:in `run'
    /usr/lib/ruby/1.8/rake.rb:1948:in `standard_exception_handling'
    /usr/lib/ruby/1.8/rake.rb:1878:in `run'
    /usr/bin/rake:28

Replies (5)

RE: Stuff To Do Plugin -- install error - Added by Jerry Hilts about 12 years ago

I got the same error.

This seems to be the offending line...

Dir[File.join(directory,'vendor','plugins','*')].each do |dir|

... which is expecting a variable or method called 'directory' to return the Rails Root directory as a String.

As a quick and dirty workaround, you can replace 'directory' with the a string containing your Rails root directory path and migrate should work.

j.h.

RE: Stuff To Do Plugin -- install error - Added by Jerry Hilts about 12 years ago

Don't why I didn't just do this the first time, but you should change the 'directory' call to 'RAILS_ROOT'.

Open 'stuff_to_do_plugin/rails/init.rb' and change line 3:

OLD:

Dir[File.join(directory,'vendor','plugins','*')].each do |dir|

NEW:

Dir[File.join(RAILS_ROOT,'vendor','plugins','*')].each do |dir|

RE: Stuff To Do Plugin -- install error - Added by Mischa The Evil about 12 years ago

IIRC Eric confirmed this issue already on IRC.

Have you tried contacting him (the Stuff-To-Do plugin author) via https://projects.littlestreamsoftware.com?

Regards,

Mischa.

RE: Stuff To Do Plugin -- install error - Added by m p about 12 years ago

worked like a charm, thanks to all

RE: Stuff To Do Plugin -- install error - Added by Ken W about 12 years ago

Thanks for posting this.
I had the same problem.

(1-5/5)