Install Redmine Debian 9

Asked

Viewed 83 times

0

I am trying to install Redmine in debian 9 (stretch), following the tutorial: http://www.redmine.org/projects/redmine/wiki/HowTo_Install_Redmine_on_Debian_9 When I go to migrate from the bank, the following message appears:

root@redmine:/opt/redmine-3.4.3# bundle exec rake generate_secret_token
root@redmine:/opt/redmine-3.4.3# RAILS_ENV=production bundle exec rake db:migrate
== 28 CreateWikiPages: migrating ==============================================
-- create_table(:wiki_pages)
rake aborted!
StandardError: An error has occurred, all later migrations canceled:

Mysql2::Error: Table 'wiki_pages' already exists: CREATE TABLE `wiki_pages` (`id` int(11) auto_increment PRIMARY KEY, `wiki_id` int(11) NOT NULL, `title` varchar(255) NOT NULL, `created_on` datetime NOT NULL) ENGINE=InnoDB
/var/lib/gems/2.3.0/gems/mysql2-0.4.9/lib/mysql2/client.rb:120:in `_query'
/var/lib/gems/2.3.0/gems/mysql2-0.4.9/lib/mysql2/client.rb:120:in `block in query'
/var/lib/gems/2.3.0/gems/mysql2-0.4.9/lib/mysql2/client.rb:119:in `handle_interrupt'
/var/lib/gems/2.3.0/gems/mysql2-0.4.9/lib/mysql2/client.rb:119:in `query'
/var/lib/gems/2.3.0/gems/activerecord-4.2.8/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:309:in `block in execute'
/var/lib/gems/2.3.0/gems/activerecord-4.2.8/lib/active_record/connection_adapters/abstract_adapter.rb:484:in `block in log'
/var/lib/gems/2.3.0/gems/activesupport-4.2.8/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
/var/lib/gems/2.3.0/gems/activerecord-4.2.8/lib/active_record/connection_adapters/abstract_adapter.rb:478:in `log'
/var/lib/gems/2.3.0/gems/activerecord-4.2.8/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:309:in `execute'
/var/lib/gems/2.3.0/gems/activerecord-4.2.8/lib/active_record/connection_adapters/mysql2_adapter.rb:225:in `execute'
/var/lib/gems/2.3.0/gems/activerecord-4.2.8/lib/active_record/connection_adapters/abstract/schema_statements.rb:222:in `create_table'
/var/lib/gems/2.3.0/gems/activerecord-4.2.8/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:474:in `create_table'
/var/lib/gems/2.3.0/gems/activerecord-4.2.8/lib/active_record/migration.rb:665:in `block in method_missing'
/var/lib/gems/2.3.0/gems/activerecord-4.2.8/lib/active_record/migration.rb:634:in `block in say_with_time'
/var/lib/gems/2.3.0/gems/activerecord-4.2.8/lib/active_record/migration.rb:634:in `say_with_time'
/var/lib/gems/2.3.0/gems/activerecord-4.2.8/lib/active_record/migration.rb:654:in `method_missing'
/var/lib/gems/2.3.0/gems/activerecord-4.2.8/lib/active_record/migration.rb:416:in `method_missing'
/opt/redmine-3.4.3/db/migrate/028_create_wiki_pages.rb:3:in `up'
/var/lib/gems/2.3.0/gems/activerecord-4.2.8/lib/active_record/migration.rb:571:in `up'
/var/lib/gems/2.3.0/gems/activerecord-4.2.8/lib/active_record/migration.rb:611:in `exec_migration'
/var/lib/gems/2.3.0/gems/activerecord-4.2.8/lib/active_record/migration.rb:592:in `block (2 levels) in migrate'
/var/lib/gems/2.3.0/gems/activerecord-4.2.8/lib/active_record/migration.rb:591:in `block in migrate'
/var/lib/gems/2.3.0/gems/activerecord-4.2.8/lib/active_record/connection_adapters/abstract/connection_pool.rb:292:in `with_connection'
/var/lib/gems/2.3.0/gems/activerecord-4.2.8/lib/active_record/migration.rb:590:in `migrate'
/var/lib/gems/2.3.0/gems/activerecord-4.2.8/lib/active_record/migration.rb:768:in `migrate'
/var/lib/gems/2.3.0/gems/activerecord-4.2.8/lib/active_record/migration.rb:998:in `block in execute_migration_in_transaction'
/var/lib/gems/2.3.0/gems/activerecord-4.2.8/lib/active_record/migration.rb:1046:in `ddl_transaction'
/var/lib/gems/2.3.0/gems/activerecord-4.2.8/lib/active_record/migration.rb:997:in `execute_migration_in_transaction'
/var/lib/gems/2.3.0/gems/activerecord-4.2.8/lib/active_record/migration.rb:959:in `block in migrate'
/var/lib/gems/2.3.0/gems/activerecord-4.2.8/lib/active_record/migration.rb:955:in `each'
/var/lib/gems/2.3.0/gems/activerecord-4.2.8/lib/active_record/migration.rb:955:in `migrate'
/var/lib/gems/2.3.0/gems/activerecord-4.2.8/lib/active_record/migration.rb:823:in `up'
/var/lib/gems/2.3.0/gems/activerecord-4.2.8/lib/active_record/migration.rb:801:in `migrate'
/var/lib/gems/2.3.0/gems/activerecord-4.2.8/lib/active_record/tasks/database_tasks.rb:137:in `migrate'
/var/lib/gems/2.3.0/gems/activerecord-4.2.8/lib/active_record/railties/databases.rake:44:in `block (2 levels) in <top (required)>'
/var/lib/gems/2.3.0/gems/rake-12.2.1/exe/rake:27:in `<top (required)>'

Caused by:
ActiveRecord::StatementInvalid: Mysql2::Error: Table 'wiki_pages' already exists: CREATE TABLE `wiki_pages` (`id` int(11) auto_increment PRIMARY KEY, `wiki_id` int(11) NOT NULL, `title` varchar(255) NOT NULL, `created_on` datetime NOT NULL) ENGINE=InnoDB
/var/lib/gems/2.3.0/gems/mysql2-0.4.9/lib/mysql2/client.rb:120:in `_query'
/var/lib/gems/2.3.0/gems/mysql2-0.4.9/lib/mysql2/client.rb:120:in `block in query'
/var/lib/gems/2.3.0/gems/mysql2-0.4.9/lib/mysql2/client.rb:119:in `handle_interrupt'
/var/lib/gems/2.3.0/gems/mysql2-0.4.9/lib/mysql2/client.rb:119:in `query'
/var/lib/gems/2.3.0/gems/activerecord-4.2.8/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:309:in `block in execute'
/var/lib/gems/2.3.0/gems/activerecord-4.2.8/lib/active_record/connection_adapters/abstract_adapter.rb:484:in `block in log'
/var/lib/gems/2.3.0/gems/activesupport-4.2.8/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
/var/lib/gems/2.3.0/gems/activerecord-4.2.8/lib/active_record/connection_adapters/abstract_adapter.rb:478:in `log'
/var/lib/gems/2.3.0/gems/activerecord-4.2.8/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:309:in `execute'
/var/lib/gems/2.3.0/gems/activerecord-4.2.8/lib/active_record/connection_adapters/mysql2_adapter.rb:225:in `execute'
/var/lib/gems/2.3.0/gems/activerecord-4.2.8/lib/active_record/connection_adapters/abstract/schema_statements.rb:222:in `create_table'
/var/lib/gems/2.3.0/gems/activerecord-4.2.8/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:474:in `create_table'
/var/lib/gems/2.3.0/gems/activerecord-4.2.8/lib/active_record/migration.rb:665:in `block in method_missing'
/var/lib/gems/2.3.0/gems/activerecord-4.2.8/lib/active_record/migration.rb:634:in `block in say_with_time'
/var/lib/gems/2.3.0/gems/activerecord-4.2.8/lib/active_record/migration.rb:634:in `say_with_time'
/var/lib/gems/2.3.0/gems/activerecord-4.2.8/lib/active_record/migration.rb:654:in `method_missing'
/var/lib/gems/2.3.0/gems/activerecord-4.2.8/lib/active_record/migration.rb:416:in `method_missing'
/opt/redmine-3.4.3/db/migrate/028_create_wiki_pages.rb:3:in `up'
/var/lib/gems/2.3.0/gems/activerecord-4.2.8/lib/active_record/migration.rb:571:in `up'
/var/lib/gems/2.3.0/gems/activerecord-4.2.8/lib/active_record/migration.rb:611:in `exec_migration'
/var/lib/gems/2.3.0/gems/activerecord-4.2.8/lib/active_record/migration.rb:592:in `block (2 levels) in migrate'
/var/lib/gems/2.3.0/gems/activerecord-4.2.8/lib/active_record/migration.rb:591:in `block in migrate'
/var/lib/gems/2.3.0/gems/activerecord-4.2.8/lib/active_record/connection_adapters/abstract/connection_pool.rb:292:in `with_connection'
/var/lib/gems/2.3.0/gems/activerecord-4.2.8/lib/active_record/migration.rb:590:in `migrate'
/var/lib/gems/2.3.0/gems/activerecord-4.2.8/lib/active_record/migration.rb:768:in `migrate'
/var/lib/gems/2.3.0/gems/activerecord-4.2.8/lib/active_record/migration.rb:998:in `block in execute_migration_in_transaction'
/var/lib/gems/2.3.0/gems/activerecord-4.2.8/lib/active_record/migration.rb:1046:in `ddl_transaction'
/var/lib/gems/2.3.0/gems/activerecord-4.2.8/lib/active_record/migration.rb:997:in `execute_migration_in_transaction'
/var/lib/gems/2.3.0/gems/activerecord-4.2.8/lib/active_record/migration.rb:959:in `block in migrate'
/var/lib/gems/2.3.0/gems/activerecord-4.2.8/lib/active_record/migration.rb:955:in `each'
/var/lib/gems/2.3.0/gems/activerecord-4.2.8/lib/active_record/migration.rb:955:in `migrate'
/var/lib/gems/2.3.0/gems/activerecord-4.2.8/lib/active_record/migration.rb:823:in `up'
/var/lib/gems/2.3.0/gems/activerecord-4.2.8/lib/active_record/migration.rb:801:in `migrate'
/var/lib/gems/2.3.0/gems/activerecord-4.2.8/lib/active_record/tasks/database_tasks.rb:137:in `migrate'
/var/lib/gems/2.3.0/gems/activerecord-4.2.8/lib/active_record/railties/databases.rake:44:in `block (2 levels) in <top (required)>'
/var/lib/gems/2.3.0/gems/rake-12.2.1/exe/rake:27:in `<top (required)>'

Caused by:
Mysql2::Error: Table 'wiki_pages' already exists
/var/lib/gems/2.3.0/gems/mysql2-0.4.9/lib/mysql2/client.rb:120:in `_query'
/var/lib/gems/2.3.0/gems/mysql2-0.4.9/lib/mysql2/client.rb:120:in `block in query'
/var/lib/gems/2.3.0/gems/mysql2-0.4.9/lib/mysql2/client.rb:119:in `handle_interrupt'
/var/lib/gems/2.3.0/gems/mysql2-0.4.9/lib/mysql2/client.rb:119:in `query'
/var/lib/gems/2.3.0/gems/activerecord-4.2.8/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:309:in `block in execute'
/var/lib/gems/2.3.0/gems/activerecord-4.2.8/lib/active_record/connection_adapters/abstract_adapter.rb:484:in `block in log'
/var/lib/gems/2.3.0/gems/activesupport-4.2.8/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
/var/lib/gems/2.3.0/gems/activerecord-4.2.8/lib/active_record/connection_adapters/abstract_adapter.rb:478:in `log'
/var/lib/gems/2.3.0/gems/activerecord-4.2.8/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:309:in `execute'
/var/lib/gems/2.3.0/gems/activerecord-4.2.8/lib/active_record/connection_adapters/mysql2_adapter.rb:225:in `execute'
/var/lib/gems/2.3.0/gems/activerecord-4.2.8/lib/active_record/connection_adapters/abstract/schema_statements.rb:222:in `create_table'
/var/lib/gems/2.3.0/gems/activerecord-4.2.8/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:474:in `create_table'
/var/lib/gems/2.3.0/gems/activerecord-4.2.8/lib/active_record/migration.rb:665:in `block in method_missing'
/var/lib/gems/2.3.0/gems/activerecord-4.2.8/lib/active_record/migration.rb:634:in `block in say_with_time'
/var/lib/gems/2.3.0/gems/activerecord-4.2.8/lib/active_record/migration.rb:634:in `say_with_time'
/var/lib/gems/2.3.0/gems/activerecord-4.2.8/lib/active_record/migration.rb:654:in `method_missing'
/var/lib/gems/2.3.0/gems/activerecord-4.2.8/lib/active_record/migration.rb:416:in `method_missing'
/opt/redmine-3.4.3/db/migrate/028_create_wiki_pages.rb:3:in `up'
/var/lib/gems/2.3.0/gems/activerecord-4.2.8/lib/active_record/migration.rb:571:in `up'
/var/lib/gems/2.3.0/gems/activerecord-4.2.8/lib/active_record/migration.rb:611:in `exec_migration'
/var/lib/gems/2.3.0/gems/activerecord-4.2.8/lib/active_record/migration.rb:592:in `block (2 levels) in migrate'
/var/lib/gems/2.3.0/gems/activerecord-4.2.8/lib/active_record/migration.rb:591:in `block in migrate'
/var/lib/gems/2.3.0/gems/activerecord-4.2.8/lib/active_record/connection_adapters/abstract/connection_pool.rb:292:in `with_connection'
/var/lib/gems/2.3.0/gems/activerecord-4.2.8/lib/active_record/migration.rb:590:in `migrate'
/var/lib/gems/2.3.0/gems/activerecord-4.2.8/lib/active_record/migration.rb:768:in `migrate'
/var/lib/gems/2.3.0/gems/activerecord-4.2.8/lib/active_record/migration.rb:998:in `block in execute_migration_in_transaction'
/var/lib/gems/2.3.0/gems/activerecord-4.2.8/lib/active_record/migration.rb:1046:in `ddl_transaction'
/var/lib/gems/2.3.0/gems/activerecord-4.2.8/lib/active_record/migration.rb:997:in `execute_migration_in_transaction'
/var/lib/gems/2.3.0/gems/activerecord-4.2.8/lib/active_record/migration.rb:959:in `block in migrate'
/var/lib/gems/2.3.0/gems/activerecord-4.2.8/lib/active_record/migration.rb:955:in `each'
/var/lib/gems/2.3.0/gems/activerecord-4.2.8/lib/active_record/migration.rb:955:in `migrate'
/var/lib/gems/2.3.0/gems/activerecord-4.2.8/lib/active_record/migration.rb:823:in `up'
/var/lib/gems/2.3.0/gems/activerecord-4.2.8/lib/active_record/migration.rb:801:in `migrate'
/var/lib/gems/2.3.0/gems/activerecord-4.2.8/lib/active_record/tasks/database_tasks.rb:137:in `migrate'
/var/lib/gems/2.3.0/gems/activerecord-4.2.8/lib/active_record/railties/databases.rake:44:in `block (2 levels) in <top (required)>'
/var/lib/gems/2.3.0/gems/rake-12.2.1/exe/rake:27:in `<top (required)>'
Tasks: TOP => db:migrate
(See full trace by running task with --trace)

1 answer

0

Mysql2::Error: Table 'wiki_pages' already exists:

The error message informs that the "wiki_pages" table already exists.

  • Even deleting the table, the problem persists.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.