redmine_importer
redmine_importer copied to clipboard
Redmine Importer installation failure
I'm attempting to install
/usr/share/redmine/vendor/plugins/redmine_importer# git log | grep commit | head -n1
commit f7982e9d6ddad7cee4c2b9e6dc264eb5831894be
for Redmine 1.1.2 and have this occur:
root@redmine:/usr/share/redmine# rake --trace db:migrate_plugins RAILS_ENV=production
(in /usr/share/redmine)
** Invoke db:migrate_plugins (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute db:migrate_plugins
Migrating engines...
Migrating action_mailer_optional_tls...
Migrating acts_as_activity_provider...
Migrating acts_as_attachable...
Migrating acts_as_customizable...
Migrating acts_as_event...
Migrating acts_as_list...
Migrating acts_as_searchable...
Migrating acts_as_tree...
Migrating acts_as_versioned...
Migrating acts_as_watchable...
Migrating awesome_nested_set...
Migrating classic_pagination...
Migrating gravatar...
Migrating open_id_authentication...
Migrating prepend_engine_views...
Migrating redmine_importer...
== CreateImportInProgresses: migrating =======================================
-- create_table(:import_in_progresses)
NOTICE: CREATE TABLE will create implicit sequence "import_in_progresses_id_seq" for serial column "import_in_progresses.id"
rake aborted!
An error has occurred, this and all later migrations canceled:
PGError: ERROR: type modifier is not allowed for type "bytea"
LINE 1: ...cter varying(64), "created" timestamp, "csv_data" bytea(4194...
^
: CREATE TABLE "import_in_progresses" ("id" serial primary key, "user_id" integer NOT NULL, "quote_char" character varying(8), "col_sep" character varying(8), "encoding" character varying(64), "created" timestamp, "csv_data" bytea(4194304))
/usr/lib/ruby/1.8/active_record/connection_adapters/abstract_adapter.rb:219:in `log'
/usr/lib/ruby/1.8/active_record/connection_adapters/postgresql_adapter.rb:550:in `execute'
/usr/lib/ruby/1.8/active_record/connection_adapters/abstract/schema_statements.rb:114:in `create_table'
/usr/lib/ruby/1.8/active_record/migration.rb:352:in `send'
/usr/lib/ruby/1.8/active_record/migration.rb:352:in `method_missing'
/usr/lib/ruby/1.8/active_record/migration.rb:328:in `say_with_time'
/usr/lib/ruby/1.8/benchmark.rb:293:in `measure'
/usr/lib/ruby/1.8/active_record/migration.rb:328:in `say_with_time'
/usr/lib/ruby/1.8/active_record/migration.rb:348:in `method_missing'
/usr/share/redmine/vendor/plugins/redmine_importer/db/migrate/001_create_import_in_progresses.rb:3:in `up_without_benchmarks'
/usr/lib/ruby/1.8/active_record/migration.rb:282:in `send'
/usr/lib/ruby/1.8/active_record/migration.rb:282:in `migrate'
/usr/lib/ruby/1.8/benchmark.rb:293:in `measure'
/usr/lib/ruby/1.8/active_record/migration.rb:282:in `migrate'
/usr/lib/ruby/1.8/active_record/migration.rb:365:in `__send__'
/usr/lib/ruby/1.8/active_record/migration.rb:365:in `migrate'
/usr/lib/ruby/1.8/active_record/migration.rb:486:in `migrate'
/usr/lib/ruby/1.8/active_record/migration.rb:560:in `call'
/usr/lib/ruby/1.8/active_record/migration.rb:560:in `ddl_transaction'
/usr/lib/ruby/1.8/active_record/connection_adapters/abstract/database_statements.rb:136:in `transaction'
/usr/lib/ruby/1.8/active_record/transactions.rb:182:in `transaction'
/usr/lib/ruby/1.8/active_record/migration.rb:560:in `ddl_transaction'
/usr/lib/ruby/1.8/active_record/migration.rb:485:in `migrate'
/usr/lib/ruby/1.8/active_record/migration.rb:472:in `each'
/usr/lib/ruby/1.8/active_record/migration.rb:472:in `migrate'
/usr/lib/ruby/1.8/active_record/migration.rb:400:in `up'
/usr/lib/ruby/1.8/active_record/migration.rb:383:in `migrate'
/usr/share/redmine/vendor/plugins/engines/lib/engines/plugin/migrator.rb:20:in `migrate_plugin'
/usr/share/redmine/config/../vendor/plugins/engines/lib/engines/plugin.rb:93:in `migrate'
/usr/share/redmine/lib/tasks/migrate_plugins.rake:8
/usr/share/redmine/lib/tasks/migrate_plugins.rake:5:in `each'
/usr/share/redmine/lib/tasks/migrate_plugins.rake:5
/usr/lib/ruby/1.8/rake.rb:636:in `call'
/usr/lib/ruby/1.8/rake.rb:636:in `execute'
/usr/lib/ruby/1.8/rake.rb:631:in `each'
/usr/lib/ruby/1.8/rake.rb:631:in `execute'
/usr/lib/ruby/1.8/rake.rb:597:in `invoke_with_call_chain'
/usr/lib/ruby/1.8/monitor.rb:242:in `synchronize'
/usr/lib/ruby/1.8/rake.rb:590:in `invoke_with_call_chain'
/usr/lib/ruby/1.8/rake.rb:583:in `invoke'
/usr/lib/ruby/1.8/rake.rb:2051:in `invoke_task'
/usr/lib/ruby/1.8/rake.rb:2029:in `top_level'
/usr/lib/ruby/1.8/rake.rb:2029:in `each'
/usr/lib/ruby/1.8/rake.rb:2029:in `top_level'
/usr/lib/ruby/1.8/rake.rb:2068:in `standard_exception_handling'
/usr/lib/ruby/1.8/rake.rb:2023:in `top_level'
/usr/lib/ruby/1.8/rake.rb:2001:in `run'
/usr/lib/ruby/1.8/rake.rb:2068:in `standard_exception_handling'
/usr/lib/ruby/1.8/rake.rb:1998:in `run'
/usr/bin/rake:28
The Postgresql database on the other end is 9.0.4.
Hi Brian,
Thanks for the report. I don't have time to try a Postgres install this week (I'm finishing up a job), but at first glance it seems like this would have to represent a problem with the Postgres adapter. What version of Rails do you have installed (from the stack trace it looks like you're not using a packaged Redmine version)?
The column it's complaining about is simply declared as :binary, :limit => XXXX column, which is in fact the same as one of the examples shown at http://api.rubyonrails.org/classes/ActiveRecord/ConnectionAdapters/TableDefinition.html, so I would expect it to work on all databases (I understand it has performance implications on Postgres).
For a local workaround if you need the functionality immediately, you might try removing the :limit parameter (i.e., everything after the :binary) on line 9 of the file vendor/plugins/redmine_importer/db/migrate/001_create_import_in_progresses.rb. However, I don't think that's a good long-term fix, since it leaves the size indeterminate.
Good evening, leovitch.
I am using exactly this redmine package with this version of rails. All of the postgresql libraries come through here.
I'll hold off a bit on the workaround.
HI I stepped on the same issue. Will try your workaround.
Nelson.
Postgres will not allow a limit on binary, as you said. Fix is not too bad and its working ;-)