Redmine Installation: rake aborted! SyntaxError: (eval):2: syntax error
Added by Farkhad Rakhimzhanov about 2 years ago
Following https://www.redmine.org/projects/redmine/wiki/RedmineInstall
Stuck on Step 5
This step generates a random key used by Rails to encode cookies storing session data thus preventing their tampering.
Generating a new secret token invalidates all existing sessions after restart.
bundle exec rake generate_secret_token
result in (see rake aborted message)
/usr/lib/ruby/vendor_ruby/rubygems/defaults/operating_system.rb:10: warning: constant Gem::ConfigMap is deprecated /usr/lib/ruby/vendor_ruby/rubygems/defaults/operating_system.rb:10: warning: constant Gem::ConfigMap is deprecated /usr/lib/ruby/vendor_ruby/rubygems/defaults/operating_system.rb:29: warning: constant Gem::ConfigMap is deprecated /usr/lib/ruby/vendor_ruby/rubygems/defaults/operating_system.rb:30: warning: constant Gem::ConfigMap is deprecated /usr/lib/ruby/vendor_ruby/rubygems/defaults/operating_system.rb:10: warning: constant Gem::ConfigMap is deprecated /usr/lib/ruby/vendor_ruby/rubygems/defaults/operating_system.rb:10: warning: constant Gem::ConfigMap is deprecated /usr/lib/ruby/vendor_ruby/rubygems/defaults/operating_system.rb:10: warning: constant Gem::ConfigMap is deprecated /usr/lib/ruby/vendor_ruby/rubygems/defaults/operating_system.rb:29: warning: constant Gem::ConfigMap is deprecated /usr/lib/ruby/vendor_ruby/rubygems/defaults/operating_system.rb:30: warning: constant Gem::ConfigMap is deprecated /usr/lib/ruby/vendor_ruby/rubygems/defaults/operating_system.rb:29: warning: constant Gem::ConfigMap is deprecated /usr/lib/ruby/vendor_ruby/rubygems/defaults/operating_system.rb:30: warning: constant Gem::ConfigMap is deprecated /usr/lib/ruby/vendor_ruby/rubygems/defaults/operating_system.rb:10: warning: constant Gem::ConfigMap is deprecated /usr/lib/ruby/vendor_ruby/rubygems/defaults/operating_system.rb:10: warning: constant Gem::ConfigMap is deprecated /usr/lib/ruby/vendor_ruby/rubygems/defaults/operating_system.rb:10: warning: constant Gem::ConfigMap is deprecated /var/lib/gems/2.5.0/gems/psych-4.0.6/lib/psych/versions.rb:5: warning: already initialized constant Psych::VERSION /usr/lib/ruby/2.5.0/psych/versions.rb:4: warning: previous definition of VERSION was here /var/lib/gems/2.5.0/gems/psych-4.0.6/lib/psych/class_loader.rb:7: warning: already initialized constant Psych::ClassLoader::BIG_DECIMAL /usr/lib/ruby/2.5.0/psych/class_loader.rb:7: warning: previous definition of BIG_DECIMAL was here /var/lib/gems/2.5.0/gems/psych-4.0.6/lib/psych/class_loader.rb:8: warning: already initialized constant Psych::ClassLoader::COMPLEX /usr/lib/ruby/2.5.0/psych/class_loader.rb:8: warning: previous definition of COMPLEX was here /var/lib/gems/2.5.0/gems/psych-4.0.6/lib/psych/class_loader.rb:9: warning: already initialized constant Psych::ClassLoader::DATE /usr/lib/ruby/2.5.0/psych/class_loader.rb:9: warning: previous definition of DATE was here /var/lib/gems/2.5.0/gems/psych-4.0.6/lib/psych/class_loader.rb:10: warning: already initialized constant Psych::ClassLoader::DATE_TIME /usr/lib/ruby/2.5.0/psych/class_loader.rb:10: warning: previous definition of DATE_TIME was here /var/lib/gems/2.5.0/gems/psych-4.0.6/lib/psych/class_loader.rb:11: warning: already initialized constant Psych::ClassLoader::EXCEPTION /usr/lib/ruby/2.5.0/psych/class_loader.rb:11: warning: previous definition of EXCEPTION was here /var/lib/gems/2.5.0/gems/psych-4.0.6/lib/psych/class_loader.rb:12: warning: already initialized constant Psych::ClassLoader::OBJECT /usr/lib/ruby/2.5.0/psych/class_loader.rb:12: warning: previous definition of OBJECT was here /var/lib/gems/2.5.0/gems/psych-4.0.6/lib/psych/class_loader.rb:13: warning: already initialized constant Psych::ClassLoader::PSYCH_OMAP /usr/lib/ruby/2.5.0/psych/class_loader.rb:13: warning: previous definition of PSYCH_OMAP was here /var/lib/gems/2.5.0/gems/psych-4.0.6/lib/psych/class_loader.rb:14: warning: already initialized constant Psych::ClassLoader::PSYCH_SET /usr/lib/ruby/2.5.0/psych/class_loader.rb:14: warning: previous definition of PSYCH_SET was here /var/lib/gems/2.5.0/gems/psych-4.0.6/lib/psych/class_loader.rb:15: warning: already initialized constant Psych::ClassLoader::RANGE /usr/lib/ruby/2.5.0/psych/class_loader.rb:15: warning: previous definition of RANGE was here /var/lib/gems/2.5.0/gems/psych-4.0.6/lib/psych/class_loader.rb:16: warning: already initialized constant Psych::ClassLoader::RATIONAL /usr/lib/ruby/2.5.0/psych/class_loader.rb:16: warning: previous definition of RATIONAL was here /var/lib/gems/2.5.0/gems/psych-4.0.6/lib/psych/class_loader.rb:17: warning: already initialized constant Psych::ClassLoader::REGEXP /usr/lib/ruby/2.5.0/psych/class_loader.rb:17: warning: previous definition of REGEXP was here /var/lib/gems/2.5.0/gems/psych-4.0.6/lib/psych/class_loader.rb:18: warning: already initialized constant Psych::ClassLoader::STRUCT /usr/lib/ruby/2.5.0/psych/class_loader.rb:18: warning: previous definition of STRUCT was here /var/lib/gems/2.5.0/gems/psych-4.0.6/lib/psych/class_loader.rb:19: warning: already initialized constant Psych::ClassLoader::SYMBOL /usr/lib/ruby/2.5.0/psych/class_loader.rb:19: warning: previous definition of SYMBOL was here rake aborted! SyntaxError: (eval):2: syntax error, unexpected =>, expecting '}' load {"Complex"=>Complex, "Exception"=>Excepti... ^~ (eval):2: dynamic constant assignment load {"Complex"=>Complex, "Exception"=>Exception, "Obj... ^ (eval):2: syntax error, unexpected =>, expecting &. or :: or '[' or '.' ...omplex"=>Complex, "Exception"=>Exception, "Object"=>Object, ... ... ^~ (eval):2: dynamic constant assignment ...omplex, "Exception"=>Exception, "Object"=>Object, "Psych::Om... ... ^ (eval):2: syntax error, unexpected =>, expecting &. or :: or '[' or '.' ...ception"=>Exception, "Object"=>Object, "Psych::Omap"=>Psych:... ... ^~ (eval):2: dynamic constant assignment ..."=>Exception, "Object"=>Object, "Psych::Omap"=>Psych::Omap, ... ... ^ (eval):2: syntax error, unexpected =>, expecting &. or :: or '[' or '.' ...bject"=>Object, "Psych::Omap"=>Psych::Omap, "Psych::Set"=>Ps... ... ^~ (eval):2: dynamic constant assignment ...ct, "Psych::Omap"=>Psych::Omap, "Psych::Set"=>Psych::Set, "R... ... ^ (eval):2: syntax error, unexpected =>, expecting &. or :: or '[' or '.' ...p"=>Psych::Omap, "Psych::Set"=>Psych::Set, "Range"=>Range, "... ... ^~ (eval):2: dynamic constant assignment ...Omap, "Psych::Set"=>Psych::Set, "Range"=>Range, "Rational"=>... ... ^ (eval):2: syntax error, unexpected =>, expecting &. or :: or '[' or '.' ...ch::Set"=>Psych::Set, "Range"=>Range, "Rational"=>Rational, ... ... ^~ (eval):2: dynamic constant assignment ...t"=>Psych::Set, "Range"=>Range, "Rational"=>Rational, "Struc... ... ^ (eval):2: syntax error, unexpected =>, expecting &. or :: or '[' or '.' ...t, "Range"=>Range, "Rational"=>Rational, "Struct"=>Struct, "... ... ^~ (eval):2: dynamic constant assignment ..."=>Range, "Rational"=>Rational, "Struct"=>Struct, "Symbol"=>... ... ^ (eval):2: syntax error, unexpected =>, expecting &. or :: or '[' or '.' ...Rational"=>Rational, "Struct"=>Struct, "Symbol"=>Symbol, "Re... ... ^~ (eval):2: dynamic constant assignment ...l"=>Rational, "Struct"=>Struct, "Symbol"=>Symbol, "Regexp"=>... ... ^ (eval):2: syntax error, unexpected =>, expecting &. or :: or '[' or '.' ...l, "Struct"=>Struct, "Symbol"=>Symbol, "Regexp"=>Regexp} ... ^~ (eval):2: dynamic constant assignment ...uct"=>Struct, "Symbol"=>Symbol, "Regexp"=>Regexp} ... ^ (eval):2: syntax error, unexpected =>, expecting &. or :: or '[' or '.' ...t, "Symbol"=>Symbol, "Regexp"=>Regexp} ... ^~ /var/lib/gems/2.5.0/gems/psych-4.0.6/lib/psych/class_loader.rb:38:in `class_eval' /var/lib/gems/2.5.0/gems/psych-4.0.6/lib/psych/class_loader.rb:38:in `block in <class:ClassLoader>' /var/lib/gems/2.5.0/gems/psych-4.0.6/lib/psych/class_loader.rb:36:in `each' /var/lib/gems/2.5.0/gems/psych-4.0.6/lib/psych/class_loader.rb:36:in `<class:ClassLoader>' /var/lib/gems/2.5.0/gems/psych-4.0.6/lib/psych/class_loader.rb:6:in `<module:Psych>' /var/lib/gems/2.5.0/gems/psych-4.0.6/lib/psych/class_loader.rb:5:in `<top (required)>' /var/lib/gems/2.5.0/gems/psych-4.0.6/lib/psych/nodes/node.rb:3:in `require_relative' /var/lib/gems/2.5.0/gems/psych-4.0.6/lib/psych/nodes/node.rb:3:in `<top (required)>' /var/lib/gems/2.5.0/gems/psych-4.0.6/lib/psych/nodes.rb:2:in `require_relative' /var/lib/gems/2.5.0/gems/psych-4.0.6/lib/psych/nodes.rb:2:in `<top (required)>' /var/lib/gems/2.5.0/gems/psych-4.0.6/lib/psych.rb:15:in `require_relative' /var/lib/gems/2.5.0/gems/psych-4.0.6/lib/psych.rb:15:in `<top (required)>' /var/lib/gems/2.5.0/gems/bundler-2.3.24/lib/bundler/runtime.rb:60:in `require' /var/lib/gems/2.5.0/gems/bundler-2.3.24/lib/bundler/runtime.rb:60:in `block (2 levels) in require' /var/lib/gems/2.5.0/gems/bundler-2.3.24/lib/bundler/runtime.rb:55:in `each' /var/lib/gems/2.5.0/gems/bundler-2.3.24/lib/bundler/runtime.rb:55:in `block in require' /var/lib/gems/2.5.0/gems/bundler-2.3.24/lib/bundler/runtime.rb:44:in `each' /var/lib/gems/2.5.0/gems/bundler-2.3.24/lib/bundler/runtime.rb:44:in `require' /var/lib/gems/2.5.0/gems/bundler-2.3.24/lib/bundler.rb:186:in `require' /opt/redmine/config/application.rb:18:in `<top (required)>' /opt/redmine/Rakefile:5:in `require' /opt/redmine/Rakefile:5:in `<top (required)>' /var/lib/gems/2.5.0/gems/rake-13.0.6/exe/rake:27:in `<top (required)>' (See full trace by running task with --trace)
How can this be resolved?
ruby -v ruby 2.5.1p57 (2018-03-29 revision 63029) [x86_64-linux-gnu] rails --version Rails 6.1.7 lsb_release -a Distributor ID: Ubuntu Description: Ubuntu 18.04.6 LTS Release: 18.04 Codename: bionic database Postgres