I copy the file to the plugin folder and execute the migration command
rake redmine:plugins:migrate NAME=redmine_wktime RAILS_ENV=production
But an error occur and migration is aborted.
below are the errors I got. I am new in Ruby and just managing the server./usr/local/rvm/gems/ruby-2.6.3/gems/activesupport-4.2.8/lib/active_support/core_ext/object/duplicable.rb:111: warning: BigDecimal.new is deprecated; use BigDecimal() method instead. Migrating redmine_wktime (ERPmine)... -- [](4.2) -- [](4.2) rake aborted! NoMethodError: undefined method[]' for #
/usr/local/rvm/gems/ruby-2.6.3/gems/activerecord-4.2.8/lib/active_record/migration.rb:664:in block in method_missing' /usr/local/rvm/gems/ruby-2.6.3/gems/activerecord-4.2.8/lib/active_record/migration.rb:634:inblock in say_with_time'
/usr/local/rvm/gems/ruby-2.6.3/gems/activerecord-4.2.8/lib/active_record/migration.rb:634:in say_with_time' /usr/local/rvm/gems/ruby-2.6.3/gems/activerecord-4.2.8/lib/active_record/migration.rb:654:inmethod_missing'
/usr/local/rvm/gems/ruby-2.6.3/gems/activerecord-4.2.8/lib/active_record/migration.rb:416:in method_missing' /usr/share/redmine/plugins/redmine_wktime/db/migrate/020_create_wk_income_tax.rb:1:in<top (required)>'
/usr/local/rvm/gems/ruby-2.6.3/gems/activesupport-4.2.8/lib/active_support/dependencies.rb:274:in require' /usr/local/rvm/gems/ruby-2.6.3/gems/activesupport-4.2.8/lib/active_support/dependencies.rb:274:inblock in require'
/usr/local/rvm/gems/ruby-2.6.3/gems/activesupport-4.2.8/lib/active_support/dependencies.rb:240:in load_dependency' /usr/local/rvm/gems/ruby-2.6.3/gems/activesupport-4.2.8/lib/active_support/dependencies.rb:274:inrequire'
/usr/local/rvm/gems/ruby-2.6.3/gems/activerecord-4.2.8/lib/active_record/migration.rb:777:in load_migration' /usr/local/rvm/gems/ruby-2.6.3/gems/activerecord-4.2.8/lib/active_record/migration.rb:773:inmigration'
/usr/local/rvm/gems/ruby-2.6.3/gems/activerecord-4.2.8/lib/active_record/migration.rb:768:in disable_ddl_transaction' /usr/local/rvm/gems/ruby-2.6.3/gems/activerecord-4.2.8/lib/active_record/migration.rb:1051:inuse_transaction?'
/usr/local/rvm/gems/ruby-2.6.3/gems/activerecord-4.2.8/lib/active_record/migration.rb:961:in rescue in block in migrate' /usr/local/rvm/gems/ruby-2.6.3/gems/activerecord-4.2.8/lib/active_record/migration.rb:958:inblock in migrate'
/usr/local/rvm/gems/ruby-2.6.3/gems/activerecord-4.2.8/lib/active_record/migration.rb:955:in each' /usr/local/rvm/gems/ruby-2.6.3/gems/activerecord-4.2.8/lib/active_record/migration.rb:955:inmigrate'
/usr/local/rvm/gems/ruby-2.6.3/gems/activerecord-4.2.8/lib/active_record/migration.rb:823:in up' /usr/local/rvm/gems/ruby-2.6.3/gems/activerecord-4.2.8/lib/active_record/migration.rb:801:inmigrate'
/usr/share/redmine/lib/redmine/plugin.rb:481:in migrate_plugin' /usr/share/redmine/lib/redmine/plugin.rb:453:inmigrate'
/usr/share/redmine/lib/redmine/plugin.rb:464:in migrate' /usr/share/redmine/lib/tasks/redmine.rake:135:inblock (3 levels) in <top (required)>'
/usr/local/rvm/gems/ruby-2.6.3/gems/rake-13.0.1/exe/rake:27:in <top (required)>' /usr/local/rvm/gems/ruby-2.6.3/bin/ruby_executable_hooks:24:ineval'
/usr/local/rvm/gems/ruby-2.6.3/bin/ruby_executable_hooks:24:in `'
Caused by:
NoMethodError: undefined method []' for #<ActiveRecord::Migration:0x0000000002911868> /usr/local/rvm/gems/ruby-2.6.3/gems/activerecord-4.2.8/lib/active_record/migration.rb:664:inblock in method_missing'
/usr/local/rvm/gems/ruby-2.6.3/gems/activerecord-4.2.8/lib/active_record/migration.rb:634:in block in say_with_time' /usr/local/rvm/gems/ruby-2.6.3/gems/activerecord-4.2.8/lib/active_record/migration.rb:634:insay_with_time'
/usr/local/rvm/gems/ruby-2.6.3/gems/activerecord-4.2.8/lib/active_record/migration.rb:654:in method_missing' /usr/local/rvm/gems/ruby-2.6.3/gems/activerecord-4.2.8/lib/active_record/migration.rb:416:inmethod_missing'
/usr/share/redmine/plugins/redmine_wktime/db/migrate/020_create_wk_income_tax.rb:1:in <top (required)>' /usr/local/rvm/gems/ruby-2.6.3/gems/activesupport-4.2.8/lib/active_support/dependencies.rb:274:inrequire'
/usr/local/rvm/gems/ruby-2.6.3/gems/activesupport-4.2.8/lib/active_support/dependencies.rb:274:in block in require' /usr/local/rvm/gems/ruby-2.6.3/gems/activesupport-4.2.8/lib/active_support/dependencies.rb:240:inload_dependency'
/usr/local/rvm/gems/ruby-2.6.3/gems/activesupport-4.2.8/lib/active_support/dependencies.rb:274:in require' /usr/local/rvm/gems/ruby-2.6.3/gems/activerecord-4.2.8/lib/active_record/migration.rb:777:inload_migration'
/usr/local/rvm/gems/ruby-2.6.3/gems/activerecord-4.2.8/lib/active_record/migration.rb:773:in migration' /usr/local/rvm/gems/ruby-2.6.3/gems/activerecord-4.2.8/lib/active_record/migration.rb:768:indisable_ddl_transaction'
/usr/local/rvm/gems/ruby-2.6.3/gems/activerecord-4.2.8/lib/active_record/migration.rb:1051:in use_transaction?' /usr/local/rvm/gems/ruby-2.6.3/gems/activerecord-4.2.8/lib/active_record/migration.rb:1043:inddl_transaction'
/usr/local/rvm/gems/ruby-2.6.3/gems/activerecord-4.2.8/lib/active_record/migration.rb:997:in execute_migration_in_transaction' /usr/local/rvm/gems/ruby-2.6.3/gems/activerecord-4.2.8/lib/active_record/migration.rb:959:inblock in migrate'
/usr/local/rvm/gems/ruby-2.6.3/gems/activerecord-4.2.8/lib/active_record/migration.rb:955:in each' /usr/local/rvm/gems/ruby-2.6.3/gems/activerecord-4.2.8/lib/active_record/migration.rb:955:inmigrate'
/usr/local/rvm/gems/ruby-2.6.3/gems/activerecord-4.2.8/lib/active_record/migration.rb:823:in up' /usr/local/rvm/gems/ruby-2.6.3/gems/activerecord-4.2.8/lib/active_record/migration.rb:801:inmigrate'
/usr/share/redmine/lib/redmine/plugin.rb:481:in migrate_plugin' /usr/share/redmine/lib/redmine/plugin.rb:453:inmigrate'
/usr/share/redmine/lib/redmine/plugin.rb:464:in migrate' /usr/share/redmine/lib/tasks/redmine.rake:135:inblock (3 levels) in <top (required)>'
/usr/local/rvm/gems/ruby-2.6.3/gems/rake-13.0.1/exe/rake:27:in <top (required)>' /usr/local/rvm/gems/ruby-2.6.3/bin/ruby_executable_hooks:24:ineval'
/usr/local/rvm/gems/ruby-2.6.3/bin/ruby_executable_hooks:24:in <main>' Tasks: TOP => redmine:plugins:migrate (See full trace by running task with --trace)
How to solve this issue.
I copy the file to the plugin folder and execute the migration command
/usr/local/rvm/gems/ruby-2.6.3/gems/activerecord-4.2.8/lib/active_record/migration.rb:664:in '
rake redmine:plugins:migrate NAME=redmine_wktime RAILS_ENV=production
But an error occur and migration is aborted. below are the errors I got. I am new in Ruby and just managing the server./usr/local/rvm/gems/ruby-2.6.3/gems/activesupport-4.2.8/lib/active_support/core_ext/object/duplicable.rb:111: warning: BigDecimal.new is deprecated; use BigDecimal() method instead. Migrating redmine_wktime (ERPmine)... -- [](4.2) -- [](4.2) rake aborted! NoMethodError: undefined method
[]' for #block in method_missing' /usr/local/rvm/gems/ruby-2.6.3/gems/activerecord-4.2.8/lib/active_record/migration.rb:634:in
block in say_with_time' /usr/local/rvm/gems/ruby-2.6.3/gems/activerecord-4.2.8/lib/active_record/migration.rb:634:insay_with_time' /usr/local/rvm/gems/ruby-2.6.3/gems/activerecord-4.2.8/lib/active_record/migration.rb:654:in
method_missing' /usr/local/rvm/gems/ruby-2.6.3/gems/activerecord-4.2.8/lib/active_record/migration.rb:416:inmethod_missing' /usr/share/redmine/plugins/redmine_wktime/db/migrate/020_create_wk_income_tax.rb:1:in
<top (required)>' /usr/local/rvm/gems/ruby-2.6.3/gems/activesupport-4.2.8/lib/active_support/dependencies.rb:274:inrequire' /usr/local/rvm/gems/ruby-2.6.3/gems/activesupport-4.2.8/lib/active_support/dependencies.rb:274:in
block in require' /usr/local/rvm/gems/ruby-2.6.3/gems/activesupport-4.2.8/lib/active_support/dependencies.rb:240:inload_dependency' /usr/local/rvm/gems/ruby-2.6.3/gems/activesupport-4.2.8/lib/active_support/dependencies.rb:274:in
require' /usr/local/rvm/gems/ruby-2.6.3/gems/activerecord-4.2.8/lib/active_record/migration.rb:777:inload_migration' /usr/local/rvm/gems/ruby-2.6.3/gems/activerecord-4.2.8/lib/active_record/migration.rb:773:in
migration' /usr/local/rvm/gems/ruby-2.6.3/gems/activerecord-4.2.8/lib/active_record/migration.rb:768:indisable_ddl_transaction' /usr/local/rvm/gems/ruby-2.6.3/gems/activerecord-4.2.8/lib/active_record/migration.rb:1051:in
use_transaction?' /usr/local/rvm/gems/ruby-2.6.3/gems/activerecord-4.2.8/lib/active_record/migration.rb:961:inrescue in block in migrate' /usr/local/rvm/gems/ruby-2.6.3/gems/activerecord-4.2.8/lib/active_record/migration.rb:958:in
block in migrate' /usr/local/rvm/gems/ruby-2.6.3/gems/activerecord-4.2.8/lib/active_record/migration.rb:955:ineach' /usr/local/rvm/gems/ruby-2.6.3/gems/activerecord-4.2.8/lib/active_record/migration.rb:955:in
migrate' /usr/local/rvm/gems/ruby-2.6.3/gems/activerecord-4.2.8/lib/active_record/migration.rb:823:inup' /usr/local/rvm/gems/ruby-2.6.3/gems/activerecord-4.2.8/lib/active_record/migration.rb:801:in
migrate' /usr/share/redmine/lib/redmine/plugin.rb:481:inmigrate_plugin' /usr/share/redmine/lib/redmine/plugin.rb:453:in
migrate' /usr/share/redmine/lib/redmine/plugin.rb:464:inmigrate' /usr/share/redmine/lib/tasks/redmine.rake:135:in
block (3 levels) in <top (required)>' /usr/local/rvm/gems/ruby-2.6.3/gems/rake-13.0.1/exe/rake:27:in<top (required)>' /usr/local/rvm/gems/ruby-2.6.3/bin/ruby_executable_hooks:24:in
eval' /usr/local/rvm/gems/ruby-2.6.3/bin/ruby_executable_hooks:24:in `Caused by: NoMethodError: undefined method
[]' for #<ActiveRecord::Migration:0x0000000002911868> /usr/local/rvm/gems/ruby-2.6.3/gems/activerecord-4.2.8/lib/active_record/migration.rb:664:in
block in method_missing' /usr/local/rvm/gems/ruby-2.6.3/gems/activerecord-4.2.8/lib/active_record/migration.rb:634:inblock in say_with_time' /usr/local/rvm/gems/ruby-2.6.3/gems/activerecord-4.2.8/lib/active_record/migration.rb:634:in
say_with_time' /usr/local/rvm/gems/ruby-2.6.3/gems/activerecord-4.2.8/lib/active_record/migration.rb:654:inmethod_missing' /usr/local/rvm/gems/ruby-2.6.3/gems/activerecord-4.2.8/lib/active_record/migration.rb:416:in
method_missing' /usr/share/redmine/plugins/redmine_wktime/db/migrate/020_create_wk_income_tax.rb:1:in<top (required)>' /usr/local/rvm/gems/ruby-2.6.3/gems/activesupport-4.2.8/lib/active_support/dependencies.rb:274:in
require' /usr/local/rvm/gems/ruby-2.6.3/gems/activesupport-4.2.8/lib/active_support/dependencies.rb:274:inblock in require' /usr/local/rvm/gems/ruby-2.6.3/gems/activesupport-4.2.8/lib/active_support/dependencies.rb:240:in
load_dependency' /usr/local/rvm/gems/ruby-2.6.3/gems/activesupport-4.2.8/lib/active_support/dependencies.rb:274:inrequire' /usr/local/rvm/gems/ruby-2.6.3/gems/activerecord-4.2.8/lib/active_record/migration.rb:777:in
load_migration' /usr/local/rvm/gems/ruby-2.6.3/gems/activerecord-4.2.8/lib/active_record/migration.rb:773:inmigration' /usr/local/rvm/gems/ruby-2.6.3/gems/activerecord-4.2.8/lib/active_record/migration.rb:768:in
disable_ddl_transaction' /usr/local/rvm/gems/ruby-2.6.3/gems/activerecord-4.2.8/lib/active_record/migration.rb:1051:inuse_transaction?' /usr/local/rvm/gems/ruby-2.6.3/gems/activerecord-4.2.8/lib/active_record/migration.rb:1043:in
ddl_transaction' /usr/local/rvm/gems/ruby-2.6.3/gems/activerecord-4.2.8/lib/active_record/migration.rb:997:inexecute_migration_in_transaction' /usr/local/rvm/gems/ruby-2.6.3/gems/activerecord-4.2.8/lib/active_record/migration.rb:959:in
block in migrate' /usr/local/rvm/gems/ruby-2.6.3/gems/activerecord-4.2.8/lib/active_record/migration.rb:955:ineach' /usr/local/rvm/gems/ruby-2.6.3/gems/activerecord-4.2.8/lib/active_record/migration.rb:955:in
migrate' /usr/local/rvm/gems/ruby-2.6.3/gems/activerecord-4.2.8/lib/active_record/migration.rb:823:inup' /usr/local/rvm/gems/ruby-2.6.3/gems/activerecord-4.2.8/lib/active_record/migration.rb:801:in
migrate' /usr/share/redmine/lib/redmine/plugin.rb:481:inmigrate_plugin' /usr/share/redmine/lib/redmine/plugin.rb:453:in
migrate' /usr/share/redmine/lib/redmine/plugin.rb:464:inmigrate' /usr/share/redmine/lib/tasks/redmine.rake:135:in
block (3 levels) in <top (required)>' /usr/local/rvm/gems/ruby-2.6.3/gems/rake-13.0.1/exe/rake:27:in<top (required)>' /usr/local/rvm/gems/ruby-2.6.3/bin/ruby_executable_hooks:24:in
eval' /usr/local/rvm/gems/ruby-2.6.3/bin/ruby_executable_hooks:24:in<main>' Tasks: TOP => redmine:plugins:migrate (See full trace by running task with --trace)
How to solve this issue.