I'm trying to install Redmine based on Official Wiki, but when I try to run rake generate_secret_token the following error shows
rake aborted!
Don't know how to build task 'generate_secret_token'
I already went into this question with no success
Redmine: rake error when installing
** For the problem above, I believe running the command rake secret has resolved, cause no generate_secret_token is listed when I call rake -T **
And when I try to run RAILS_ENV=production rake redmine:load_default_data I get
rake aborted!
Don't know how to build task 'redmine:load_default_data'
Following is the trace:
/home/nuno/.rvm/gems/ruby-1.9.3-p194#global/gems/rake-0.9.2.2/lib/rak /task_manager.rb:49:in `[]'
/home/nuno/.rvm/gems/ruby-1.9.3-p194#global/gems/rake-0.9.2.2/lib/rake/application.rb:115:in `invoke_task'
/home/nuno/.rvm/gems/ruby-1.9.3-p194#global/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `block (2 levels) in top_level'
/home/nuno/.rvm/gems/ruby-1.9.3-p194#global/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `each'
/home/nuno/.rvm/gems/ruby-1.9.3-p194#global/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `block in top_level'
/home/nuno/.rvm/gems/ruby-1.9.3-p194#global/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
/home/nuno/.rvm/gems/ruby-1.9.3-p194#global/gems/rake-0.9.2.2/lib/rake/application.rb:88:in `top_level'
/home/nuno/.rvm/gems/ruby-1.9.3-p194#global/gems/rake-0.9.2.2/lib/rake/application.rb:66:in `block in run'
/home/nuno/.rvm/gems/ruby-1.9.3-p194#global/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
/home/nuno/.rvm/gems/ruby-1.9.3-p194#global/gems/rake-0.9.2.2/lib/rake/application.rb:63:in `run'
/home/nuno/.rvm/gems/ruby-1.9.3-p194#global/gems/rake-0.9.2.2/bin/rake:33:in `<top (required)>'
/home/nuno/.rvm/gems/ruby-1.9.3-p194#global/bin/rake:19:in `load'
/home/nuno/.rvm/gems/ruby-1.9.3-p194#global/bin/rake:19:in `<main>'
/home/nuno/.rvm/gems/ruby-1.9.3-p194/bin/ruby_noexec_wrapper:14:in `eval'
/home/nuno/.rvm/gems/ruby-1.9.3-p194/bin/ruby_noexec_wrapper:14:in `<main>'
The generate_secret_token task is only available for Redmine >= 2.0.0. If you use an older version (which seems likely), the related task is called generate_session_store As such, try
bundle exec rake generate_session_store
At end I solved my problem installing Bitnami's package for Redmine http://bitnami.com/stack/redmine
Related
I have a capistrano task I am trying to make into a gem so I can use it in multiple projects. The repository for this gem is located here:
https://github.com/FoamFactory/capistrano-monorepo-assets/tree/jwir3/initial-commit
I essentially used https://github.com/sheharyarn/capistrano-rake as a basis for creating my gem.
I've tested the actual rake script, but I'm actually not importing it into the project right now. Instead, I'm trying to get it to actually import the gem successfully. When I add the gem to my Gemfile as such:
gem 'capistrano-monorepoassets','0.0.6', path: "~/Source/capistrano-monorepo-assets/pkg"
Run bundle install, then attempt to import it using the following in my Capfile:
require 'capistrano/monorepoassets'
I get an error when I run cap --tasks --trace:
cap aborted!
LoadError: cannot load such file -- capistrano/monorepoassets
/home/scottj/Source/foamfactory/designsystem/Capfile:37:in `require'
/home/scottj/Source/foamfactory/designsystem/Capfile:37:in `<top (required)>'
/home/scottj/.rvm/gems/ruby-2.6.1/gems/rake-12.3.3/lib/rake/rake_module.rb:29:in `load'
/home/scottj/.rvm/gems/ruby-2.6.1/gems/rake-12.3.3/lib/rake/rake_module.rb:29:in `load_rakefile'
/home/scottj/.rvm/gems/ruby-2.6.1/gems/rake-12.3.3/lib/rake/application.rb:703:in `raw_load_rakefile'
/home/scottj/.rvm/gems/ruby-2.6.1/gems/rake-12.3.3/lib/rake/application.rb:104:in `block in load_rakefile'
/home/scottj/.rvm/gems/ruby-2.6.1/gems/rake-12.3.3/lib/rake/application.rb:186:in `standard_exception_handling'
/home/scottj/.rvm/gems/ruby-2.6.1/gems/rake-12.3.3/lib/rake/application.rb:103:in `load_rakefile'
/home/scottj/.rvm/gems/ruby-2.6.1/gems/rake-12.3.3/lib/rake/application.rb:82:in `block in run'
/home/scottj/.rvm/gems/ruby-2.6.1/gems/rake-12.3.3/lib/rake/application.rb:186:in `standard_exception_handling'
/home/scottj/.rvm/gems/ruby-2.6.1/gems/rake-12.3.3/lib/rake/application.rb:80:in `run'
/home/scottj/.rvm/gems/ruby-2.6.1/gems/capistrano-3.11.0/lib/capistrano/application.rb:14:in `run'
/home/scottj/.rvm/gems/ruby-2.6.1/gems/capistrano-3.11.0/bin/cap:3:in `<top (required)>'
/home/scottj/.rvm/gems/ruby-2.6.1/bin/cap:23:in `load'
/home/scottj/.rvm/gems/ruby-2.6.1/bin/cap:23:in `<main>'
/home/scottj/.rvm/gems/ruby-2.6.1/bin/ruby_executable_hooks:24:in `eval'
/home/scottj/.rvm/gems/ruby-2.6.1/bin/ruby_executable_hooks:24:in `<main>
I can't seem to get it to load the module using require, which is where I'm stuck. Can someone tell me what I'm doing incorrectly?
So this actually was happening because I didn't understand that bundle install doesn't support installing local gems by specifying the path in the Gemfile. This question actually covers the problem, and, more specifically, the answer here solved it for me.
I'm trying to install backlogs module on my Redmine server, exactly following this guide: https://backlogs.github.io/www/en/installation.html
Though, that is what happens:
root#tannenfels:/var/www/redmine# bundle exec rake redmine:backlogs:install --trace
rake aborted!
Don't know how to build task 'redmine:backlogs:install' (see --tasks)
/var/www/redmine/.gem/ruby/2.3.0/gems/rake-12.3.1/lib/rake/task_manager.rb:59:in `[]'
/var/www/redmine/.gem/ruby/2.3.0/gems/rake-12.3.1/lib/rake/application.rb:159:in `invoke_task '
/var/www/redmine/.gem/ruby/2.3.0/gems/rake-12.3.1/lib/rake/application.rb:116:in `block (2 le vels) in top_level'
/var/www/redmine/.gem/ruby/2.3.0/gems/rake-12.3.1/lib/rake/application.rb:116:in `each'
/var/www/redmine/.gem/ruby/2.3.0/gems/rake-12.3.1/lib/rake/application.rb:116:in `block in to p_level'
/var/www/redmine/.gem/ruby/2.3.0/gems/rake-12.3.1/lib/rake/application.rb:125:in `run_with_th reads'
/var/www/redmine/.gem/ruby/2.3.0/gems/rake-12.3.1/lib/rake/application.rb:110:in `top_level'
/var/www/redmine/.gem/ruby/2.3.0/gems/rake-12.3.1/lib/rake/application.rb:83:in `block in run '
/var/www/redmine/.gem/ruby/2.3.0/gems/rake-12.3.1/lib/rake/application.rb:186:in `standard_ex ception_handling'
/var/www/redmine/.gem/ruby/2.3.0/gems/rake-12.3.1/lib/rake/application.rb:80:in `run'
/var/www/redmine/.gem/ruby/2.3.0/gems/rake-12.3.1/exe/rake:27:in `<top (required)>'
/var/www/redmine/.gem/ruby/2.3.0/bin/rake:23:in `load'
/var/www/redmine/.gem/ruby/2.3.0/bin/rake:23:in `<main>'
All dependencies seem to be resolved, and module tar.gz archive placed in right place. What I am doing wrong?
I've spent way too much time debugging this, and I have no idea what's going on. "cap production deploy" worked fine this morning, and now it just throws an error. Google has not been of much help so far, surprisingly. Nothing has changed in the code base that I know of:
➜ sesac-mm-matching git:(deploy) cap production deploy --trace
** Invoke production (first_time)
** Execute production
cap aborted!
NoMethodError: undefined method `already_invoked' for <Rake::Task load:defaults => []>:Rake::Task
/Users/***/.rvm/gems/ruby-2.3.0#global/gems/capistrano-3.6.0/lib/capistrano/dsl.rb:16:in `invoke'
/Users/***/.rvm/gems/ruby-2.3.0#global/gems/capistrano-3.6.0/lib/capistrano/setup.rb:24:in `block (2 levels) in <top (required)>'
/Users/***/.rvm/gems/ruby-2.3.0/gems/rake-10.5.0/lib/rake/task.rb:240:in `block in execute'
/Users/***/.rvm/gems/ruby-2.3.0/gems/rake-10.5.0/lib/rake/task.rb:235:in `each'
/Users/***/.rvm/gems/ruby-2.3.0/gems/rake-10.5.0/lib/rake/task.rb:235:in `execute'
/Users/***/.rvm/gems/ruby-2.3.0/gems/rake-10.5.0/lib/rake/task.rb:179:in `block in invoke_with_call_chain'
/Users/***/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/monitor.rb:214:in `mon_synchronize'
/Users/***/.rvm/gems/ruby-2.3.0/gems/rake-10.5.0/lib/rake/task.rb:172:in `invoke_with_call_chain'
/Users/***/.rvm/gems/ruby-2.3.0/gems/rake-10.5.0/lib/rake/task.rb:165:in `invoke'
/Users/***/.rvm/gems/ruby-2.3.0/gems/rake-10.5.0/lib/rake/application.rb:150:in `invoke_task'
/Users/***/.rvm/gems/ruby-2.3.0/gems/rake-10.5.0/lib/rake/application.rb:106:in `block (2 levels) in top_level'
/Users/***/.rvm/gems/ruby-2.3.0/gems/rake-10.5.0/lib/rake/application.rb:106:in `each'
/Users/***/.rvm/gems/ruby-2.3.0/gems/rake-10.5.0/lib/rake/application.rb:106:in `block in top_level'
/Users/***/.rvm/gems/ruby-2.3.0/gems/rake-10.5.0/lib/rake/application.rb:115:in `run_with_threads'
/Users/***/.rvm/gems/ruby-2.3.0/gems/rake-10.5.0/lib/rake/application.rb:100:in `top_level'
/Users/***/.rvm/gems/ruby-2.3.0/gems/rake-10.5.0/lib/rake/application.rb:78:in `block in run'
/Users/***/.rvm/gems/ruby-2.3.0/gems/rake-10.5.0/lib/rake/application.rb:176:in `standard_exception_handling'
/Users/***/.rvm/gems/ruby-2.3.0/gems/rake-10.5.0/lib/rake/application.rb:75:in `run'
/Users/***/.rvm/gems/ruby-2.3.0#global/gems/capistrano-3.6.0/lib/capistrano/application.rb:14:in `run'
/Users/***/.rvm/gems/ruby-2.3.0#global/gems/capistrano-3.6.0/bin/cap:3:in `<top (required)>'
/Users/***/.rvm/gems/ruby-2.3.0/bin/cap:23:in `load'
/Users/***/.rvm/gems/ruby-2.3.0/bin/cap:23:in `<main>'
/Users/***/.rvm/gems/ruby-2.3.0/bin/ruby_executable_hooks:15:in `eval'
/Users/***/.rvm/gems/ruby-2.3.0/bin/ruby_executable_hooks:15:in `<main>'
Tasks: TOP => production
Is anyone able provide some direction?
Yes, it looks like you've found a bug in the newly-released Capistrano 3.6.0. Please report the bug here: https://github.com/capistrano/capistrano/issues
The underlying problem is that Capistrano 3.6.0 is (mistakenly) incompatible with Rake < 11.0.0.
In the meantime, you can work around this issue by upgrading Rake to version 11.0.0 or higher with gem install rake or bundle update rake (depending on whether you use bundle exec for Capistrano or not).
If you are unable to upgrade Rake, downgrade Capistrano to version 3.5.0 until the bug has been fixed.
Update: Capistrano 3.6.1 has been released and restores compatibility with Rake < 11.0.0.
I'm learning rails and going step by step with lynda video series.
I tried rake . It gives following error.
$ rake generate migration DoNothingYet
rake aborted!
Don't know how to build task 'generate'
I used --trace to find the problem. However, it doesn't point the error.
$ rake generate migration DoNothingYet --trace
rake aborted!
Don't know how to build task 'generate'
/Users/boss/.rbenv/versions/2.2.2/lib/ruby/2.2.0/rake/task_manager.rb:62:in `[]'
/Users/boss/.rbenv/versions/2.2.2/lib/ruby/2.2.0/rake/application.rb:149:in `invoke_task'
/Users/boss/.rbenv/versions/2.2.2/lib/ruby/2.2.0/rake/application.rb:106:in `block (2 levels) in top_level'
/Users/boss/.rbenv/versions/2.2.2/lib/ruby/2.2.0/rake/application.rb:106:in `each'
/Users/boss/.rbenv/versions/2.2.2/lib/ruby/2.2.0/rake/application.rb:106:in `block in top_level'
/Users/boss/.rbenv/versions/2.2.2/lib/ruby/2.2.0/rake/application.rb:115:in `run_with_threads'
/Users/boss/.rbenv/versions/2.2.2/lib/ruby/2.2.0/rake/application.rb:100:in `top_level'
/Users/boss/.rbenv/versions/2.2.2/lib/ruby/2.2.0/rake/application.rb:78:in `block in run'
/Users/boss/.rbenv/versions/2.2.2/lib/ruby/2.2.0/rake/application.rb:176:in `standard_exception_handling'
/Users/boss/.rbenv/versions/2.2.2/lib/ruby/2.2.0/rake/application.rb:75:in `run'
/Users/boss/.rbenv/versions/2.2.2/bin/rake:33:in `<main>'
You should use rails command, not rake for this:
rails generate migration DoNothingYet
Good luck!
I am using capistrano through Magentify. I am using RVM as a regular user on archlinux. I have it using Ruby 2.0.0 and I ran gem install magentify in a gemset I defined for this purpose. It installed Capistrano 3.0.1 and a about 9 other gems. When I set the recipe, I tried
cap -T
and it writes
cap aborted!
undefined method `map' for :except:Symbol
/home/dirtymikeandtheboys/.rvm/gems/ruby-1.9.3-p484/gems/magentify-0.0.6/lib/nonrails.rb:24:in `block in <top (required)>'
I also tried cap deploy with the same result (not sure what I expected.) How do I get started trying to fix this?
Edit: ran --trace with command cap -T:
cap aborted!
undefined method `map' for :except:Symbol
/home/dirtymike/.rvm/gems/ruby-1.9.3-p484/gems/rake-10.1.1/lib/rake/task.rb:304:in `set_arg_names'
/home/dirtymike/.rvm/gems/ruby-1.9.3-p484/gems/rake-10.1.1/lib/rake/task_manager.rb:29:in `define_task'
/home/dirtymike/.rvm/gems/ruby-1.9.3-p484/gems/rake-10.1.1/lib/rake/task.rb:360:in `define_task'
/home/dirtymike/.rvm/gems/ruby-1.9.3-p484/gems/rake-10.1.1/lib/rake/dsl_definition.rb:32:in `task'
/home/dirtymike/.rvm/gems/ruby-1.9.3-p484/gems/magentify-0.0.6/lib/nonrails.rb:24:in `block in <top (required)>'
/home/dirtymike/.rvm/gems/ruby-1.9.3-p484/gems/rake-10.1.1/lib/rake/task_manager.rb:196:in `in_namespace'
/home/dirtymike/.rvm/gems/ruby-1.9.3-p484/gems/rake-10.1.1/lib/rake/dsl_definition.rb:104:in `namespace'
/home/dirtymike/.rvm/gems/ruby-1.9.3-p484/gems/magentify-0.0.6/lib/nonrails.rb:7:in `<top (required)>'
/home/dirtymike/.rvm/gems/ruby-1.9.3-p484/gems/magentify-0.0.6/lib/mage.rb:1:in `load'
/home/dirtymike/.rvm/gems/ruby-1.9.3-p484/gems/magentify-0.0.6/lib/mage.rb:1:in `<top (required)>'
/home/dirtymike/public_html/project/Capfile:3:in `load'
/home/dirtymike/public_html/project/Capfile:3:in `<top (required)>'
/home/dirtymike/.rvm/gems/ruby-1.9.3-p484/gems/rake-10.1.1/lib/rake/rake_module.rb:25:in `load'
/home/dirtymike/.rvm/gems/ruby-1.9.3-p484/gems/rake-10.1.1/lib/rake/rake_module.rb:25:in `load_rakefile'
/home/dirtymike/.rvm/gems/ruby-1.9.3-p484/gems/rake-10.1.1/lib/rake/application.rb:637:in `raw_load_rakefile'
/home/dirtymike/.rvm/gems/ruby-1.9.3-p484/gems/rake-10.1.1/lib/rake/application.rb:94:in `block in load_rakefile'
/home/dirtymike/.rvm/gems/ruby-1.9.3-p484/gems/rake-10.1.1/lib/rake/application.rb:165:in `standard_exception_handling'
/home/dirtymike/.rvm/gems/ruby-1.9.3-p484/gems/rake-10.1.1/lib/rake/application.rb:93:in `load_rakefile'
/home/dirtymike/.rvm/gems/ruby-1.9.3-p484/gems/capistrano-3.0.1/lib/capistrano/application.rb:22:in `load_rakefile'
/home/dirtymike/.rvm/gems/ruby-1.9.3-p484/gems/rake-10.1.1/lib/rake/application.rb:77:in `block in run'
/home/dirtymike/.rvm/gems/ruby-1.9.3-p484/gems/rake-10.1.1/lib/rake/application.rb:165:in `standard_exception_handling'
/home/dirtymike/.rvm/gems/ruby-1.9.3-p484/gems/rake-10.1.1/lib/rake/application.rb:75:in `run'
/home/dirtymike/.rvm/gems/ruby-1.9.3-p484/gems/capistrano-3.0.1/lib/capistrano/application.rb:12:in `run'
/home/dirtymike/.rvm/gems/ruby-1.9.3-p484/gems/capistrano-3.0.1/bin/cap:3:in `<top (required)>'
/home/dirtymike/.rvm/gems/ruby-1.9.3-p484/bin/cap:23:in `load'
/home/dirtymike/.rvm/gems/ruby-1.9.3-p484/bin/cap:23:in `<main>'
/home/dirtymike/.rvm/gems/ruby-1.9.3-p484/bin/ruby_executable_hooks:15:in `eval'
/home/dirtymike/.rvm/gems/ruby-1.9.3-p484/bin/ruby_executable_hooks:15:in `<main>'
EDIT
This is fixed in version 0.0.7 of the Gem. I submitted a patch and it now forces to Capistrano 2.X, which is the only compatible version. The original answer was wrong, the problem was not with Rake.
Original Answer
It seems that the problem is with Rake and not with Capistrano. You may need to, either use an older version of rake (possibly 0.9.6), or update the Magentify gem to work with rake 10. Maybe you can open an issue on that repo.
EDIT
Confirmed: It works with rake 0.9.6.
You can add this Gemfile to your project:
source 'http://rubygems.org'
gem 'rake', '~> 0.9'
gem 'magentify'
and then running it like bundle exec cap -T