0

我按照本教程在我的 vServer 上部署 Redmine 实例:https: //support.plesk.com/hc/en-us/articles/115001670625

我在点 14.2 “插入 RAILS_ENV=production db:迁移到任务参数字段并单击运行”处收到错误。

Redmine-版本:4.0.4 Ruby 版本:2.6.3-p62

** Invoke db:migrate (first_time)
** Invoke db:load_config (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute db:load_config
** Execute db:migrate
rake aborted!
ArgumentError: string contains null byte
/var/www/vhosts/redmine.domain/vendor/bundle/ruby/2.6.0/gems/mysql2-0.5.2/lib/mysql2/client.rb:90:in `connect'
/var/www/vhosts/redmine.domain/vendor/bundle/ruby/2.6.0/gems/mysql2-0.5.2/lib/mysql2/client.rb:90:in `initialize'
/var/www/vhosts/redmine.domain/vendor/bundle/ruby/2.6.0/gems/activerecord-5.2.3/lib/active_record/connection_adapters/mysql2_adapter.rb:22:in `new'
/var/www/vhosts/redmine.domain/vendor/bundle/ruby/2.6.0/gems/activerecord-5.2.3/lib/active_record/connection_adapters/mysql2_adapter.rb:22:in `mysql2_connection'
/var/www/vhosts/redmine.domain/vendor/bundle/ruby/2.6.0/gems/activerecord-5.2.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:811:in `new_connection'
/var/www/vhosts/redmine.domain/vendor/bundle/ruby/2.6.0/gems/activerecord-5.2.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:855:in `checkout_new_connection'
/var/www/vhosts/redmine.domain/vendor/bundle/ruby/2.6.0/gems/activerecord-5.2.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:834:in `try_to_checkout_new_connection'
/var/www/vhosts/redmine.domain/vendor/bundle/ruby/2.6.0/gems/activerecord-5.2.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:795:in `acquire_connection'
/var/www/vhosts/redmine.domain/vendor/bundle/ruby/2.6.0/gems/activerecord-5.2.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:523:in `checkout'
/var/www/vhosts/redmine.domain/vendor/bundle/ruby/2.6.0/gems/activerecord-5.2.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:382:in `connection'
/var/www/vhosts/redmine.domain/vendor/bundle/ruby/2.6.0/gems/activerecord-5.2.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:1014:in `retrieve_connection'
/var/www/vhosts/redmine.domain/vendor/bundle/ruby/2.6.0/gems/activerecord-5.2.3/lib/active_record/connection_handling.rb:118:in `retrieve_connection'
/var/www/vhosts/redmine.domain/vendor/bundle/ruby/2.6.0/gems/activerecord-5.2.3/lib/active_record/connection_handling.rb:90:in `connection'
/var/www/vhosts/redmine.domain/vendor/bundle/ruby/2.6.0/gems/activerecord-5.2.3/lib/active_record/tasks/database_tasks.rb:172:in `migrate'
/var/www/vhosts/redmine.domain/vendor/bundle/ruby/2.6.0/gems/activerecord-5.2.3/lib/active_record/railties/databases.rake:60:in `block (2 levels) in '
/var/www/vhosts/redmine.domain/vendor/bundle/ruby/2.6.0/gems/rake-12.3.3/lib/rake/task.rb:273:in `block in execute'
/var/www/vhosts/redmine.domain/vendor/bundle/ruby/2.6.0/gems/rake-12.3.3/lib/rake/task.rb:273:in `each'
/var/www/vhosts/redmine.domain/vendor/bundle/ruby/2.6.0/gems/rake-12.3.3/lib/rake/task.rb:273:in `execute'
/var/www/vhosts/redmine.domain/vendor/bundle/ruby/2.6.0/gems/rake-12.3.3/lib/rake/task.rb:214:in `block in invoke_with_call_chain'
/opt/plesk/ruby/2.6.3/lib/x86_64-linux-gnu/ruby/2.6.0/monitor.rb:230:in `mon_synchronize'
/var/www/vhosts/redmine.domain/vendor/bundle/ruby/2.6.0/gems/rake-12.3.3/lib/rake/task.rb:194:in `invoke_with_call_chain'
/var/www/vhosts/redmine.domain/vendor/bundle/ruby/2.6.0/gems/rake-12.3.3/lib/rake/task.rb:183:in `invoke'
/var/www/vhosts/redmine.domain/vendor/bundle/ruby/2.6.0/gems/rake-12.3.3/lib/rake/application.rb:160:in `invoke_task'
/var/www/vhosts/redmine.domain/vendor/bundle/ruby/2.6.0/gems/rake-12.3.3/lib/rake/application.rb:116:in `block (2 levels) in top_level'
/var/www/vhosts/redmine.domain/vendor/bundle/ruby/2.6.0/gems/rake-12.3.3/lib/rake/application.rb:116:in `each'
/var/www/vhosts/redmine.domain/vendor/bundle/ruby/2.6.0/gems/rake-12.3.3/lib/rake/application.rb:116:in `block in top_level'
/var/www/vhosts/redmine.domain/vendor/bundle/ruby/2.6.0/gems/rake-12.3.3/lib/rake/application.rb:125:in `run_with_threads'
/var/www/vhosts/redmine.domain/vendor/bundle/ruby/2.6.0/gems/rake-12.3.3/lib/rake/application.rb:110:in `top_level'
/var/www/vhosts/redmine.domain/vendor/bundle/ruby/2.6.0/gems/rake-12.3.3/lib/rake/application.rb:83:in `block in run'
/var/www/vhosts/redmine.domain/vendor/bundle/ruby/2.6.0/gems/rake-12.3.3/lib/rake/application.rb:186:in `standard_exception_handling'
/var/www/vhosts/redmine.domain/vendor/bundle/ruby/2.6.0/gems/rake-12.3.3/lib/rake/application.rb:80:in `run'
/var/www/vhosts/redmine.domain/vendor/bundle/ruby/2.6.0/gems/rake-12.3.3/exe/rake:27:in `'
/var/www/vhosts/redmine.domain/vendor/bundle/ruby/2.6.0/bin/rake:23:in `load'
/var/www/vhosts/redmine.domain/vendor/bundle/ruby/2.6.0/bin/rake:23:in `
'
Tasks: TOP => db:migrate

我不知道还能做什么。在 Plesk 和 Redmine 的论坛中,到目前为止没有人能帮助我......

4

1 回答 1

-1

亚历山大·帕维奇是对的:

如我所见,在 Plesk 教程中它说 Redmine 3.4 而不是 Redmine 4.x,请使用 Redmine 3.4 重试...


使用 Redmine 3.4.X 它工作!十分感谢!

于 2019-08-15T11:48:41.277 回答