Defect #8582
RuntimeError (Your PostgreSQL connection does not support unescape_bytea. Try upgrading to pg 0.9.0 or later.)
Status: | Closed | Start date: | 2011-06-10 | |
---|---|---|---|---|
Priority: | Normal | Due date: | ||
Assignee: | - | % Done: | 0% | |
Category: | - | |||
Target version: | - | |||
Resolution: | Invalid | Affected version: | 1.2.0 |
Description
When i try export wiki to html or txt on redmine 1.2-stable (CentOS release 5.6) and postgresql (8.1.23) this error occurs.
RuntimeError (Your PostgreSQL connection does not support unescape_bytea. Try upgrading to pg 0.9.0 or later.): app/models/wiki_page.rb:97:in `content_for_version' app/controllers/wiki_controller.rb:72:in `show' passenger (3.0.7) lib/phusion_passenger/rack/request_handler.rb:96:in `process_request' passenger (3.0.7) lib/phusion_passenger/abstract_request_handler.rb:513:in `accept_and_process_next_request' passenger (3.0.7) lib/phusion_passenger/abstract_request_handler.rb:274:in `main_loop' passenger (3.0.7) lib/phusion_passenger/classic_rails/application_spawner.rb:321:in `start_request_handler' passenger (3.0.7) lib/phusion_passenger/classic_rails/application_spawner.rb:275:in `send' passenger (3.0.7) lib/phusion_passenger/classic_rails/application_spawner.rb:275:in `handle_spawn_application' passenger (3.0.7) lib/phusion_passenger/utils.rb:479:in `safe_fork' passenger (3.0.7) lib/phusion_passenger/classic_rails/application_spawner.rb:270:in `handle_spawn_application' passenger (3.0.7) lib/phusion_passenger/abstract_server.rb:357:in `__send__' passenger (3.0.7) lib/phusion_passenger/abstract_server.rb:357:in `server_main_loop' passenger (3.0.7) lib/phusion_passenger/abstract_server.rb:206:in `start_synchronously' passenger (3.0.7) lib/phusion_passenger/abstract_server.rb:180:in `start' passenger (3.0.7) lib/phusion_passenger/classic_rails/application_spawner.rb:149:in `start' passenger (3.0.7) lib/phusion_passenger/spawn_manager.rb:219:in `spawn_rails_application' passenger (3.0.7) lib/phusion_passenger/abstract_server_collection.rb:132:in `lookup_or_add' passenger (3.0.7) lib/phusion_passenger/spawn_manager.rb:214:in `spawn_rails_application' passenger (3.0.7) lib/phusion_passenger/abstract_server_collection.rb:82:in `synchronize' passenger (3.0.7) lib/phusion_passenger/abstract_server_collection.rb:79:in `synchronize' passenger (3.0.7) lib/phusion_passenger/spawn_manager.rb:213:in `spawn_rails_application' passenger (3.0.7) lib/phusion_passenger/spawn_manager.rb:132:in `spawn_application' passenger (3.0.7) lib/phusion_passenger/spawn_manager.rb:275:in `handle_spawn_application' passenger (3.0.7) lib/phusion_passenger/abstract_server.rb:357:in `__send__' passenger (3.0.7) lib/phusion_passenger/abstract_server.rb:357:in `server_main_loop' passenger (3.0.7) lib/phusion_passenger/abstract_server.rb:206:in `start_synchronously' passenger (3.0.7) helper-scripts/passenger-spawn-server:99
Gems are:
*** LOCAL GEMS *** abstract (1.0.0) actionmailer (2.3.11, 2.3.5) actionpack (3.0.7, 2.3.11, 2.3.5) activemodel (3.0.7) activerecord (2.3.11, 2.3.5) activeresource (2.3.11, 2.3.5) activesupport (3.0.7, 2.3.11, 2.3.5) acts-as-taggable-on (2.0.6) arel (2.0.9) builder (3.0.0, 2.1.2) bundler (1.0.12) cgi_multipart_eof_fix (2.5.0) coderay (0.9.7) daemon_controller (0.2.6) daemons (1.1.3) diff-lcs (1.1.2) erubis (2.7.0, 2.6.6) fastthread (1.0.7) fcgi (0.8.8) gchart (1.0.0) gem_plugin (0.2.3) git (1.2.5) googlecharts (1.6.2) hoe (2.9.4) i18n (0.5.0, 0.4.2) jeweler (1.6.0) mail (2.3.0, 2.2.19) mime-types (1.16) mini_magick (3.2.1) mongrel (1.1.5) mongrel_cluster (1.0.5) mysql (2.8.1) passenger (3.0.7) pg (0.11.0) polyglot (0.3.1) postgres-pr (0.6.3) rack (1.2.3, 1.1.2, 1.0.1) rack-mount (0.7.2, 0.6.14) rack-test (0.5.7) rails (2.3.11, 2.3.5) railties (3.0.7) rake (0.8.7) rcov (0.9.9) RedCloth (4.2.7, 4.2.3) redmine_plugin_support (0.0.4) rmagick (2.13.1) rspec (2.6.0, 2.5.0) rspec-core (2.6.3, 2.5.1) rspec-expectations (2.6.0, 2.5.0) rspec-mocks (2.6.0, 2.5.0) rspec-rails (2.6.0) ruby-ole (1.2.11.1) rubygems-update (1.7.2) rubytree (0.8.1, 0.5.2) rubyzip (0.9.4) russian (0.2.7) spreadsheet (0.6.5.4) sqlite3 (1.3.3) sqlite3-ruby (1.3.3) subexec (0.0.4) thor (0.14.6) tree (0.2.1) treetop (1.4.9) tzinfo (0.3.27) unicode (0.4.0) xmpp4r (0.5) zipruby (0.3.6)
Rails version
2.3.11
PostgreSQL version
8.1.23
Related issues
History
#1
Updated by Etienne Massip about 11 years ago
Not a Redmine issue but a config one.
Try to remove and gem install pg -- --with-pg-config=<path to pg8.1.23_config>
as specified by https://bitbucket.org/ged/ruby-pg/wiki.
#2
Updated by Alex A about 11 years ago
Etienne Massip wrote:
Not a Redmine issue but a config one.
Try to remove and
gem install pg -- --with-pg-config=<path to pg8.1.23_config>
as specified by https://bitbucket.org/ged/ruby-pg/wiki.
Unfortunately, this reinstalling does not help for me. Any ideas?
#3
Updated by Etienne Massip about 11 years ago
Try using postgres-pr
adapter instead of pg
, it does not work very well with bytea and pg 9.x but maybe better with 8.x.
#4
Updated by Etienne Massip about 11 years ago
- Status changed from New to Closed
- Resolution set to Invalid
Setup issue.
#5
Updated by Gilles Cornu about 11 years ago
- Status changed from Closed to Reopened
- Ubuntu 8.04.4 LTS, with standard packages:
- PostgreSQL 8.3.15
- Gems:
- postgres-pr 0.6.3
As mentionned in RedmineInstall, postgre-pr is unmaintained and 0.6.3 seems to be the last release...
I'll study following changes on my side:- switch to pg instead postgres-pr and test if it works with PostgreSQL 8.3.15
- install a backport of PostgreSQL 8.4 or 9.x for Ubuntu 8.04LTS
But anyway I think that Redmine Release Management should either:
- update RedmineInstall accordingly to new stack requirements for Redmine 1.2.0 (posgtres-pr no more compatible ? Minimum PostgreSQL 8.4 ?).
or - fix Redmine 1.2.1 to be able to integrate with older PostgreSQL 8.x + postgres-pr 0.6.3
#6
Updated by Etienne Massip about 11 years ago
- Status changed from Reopened to Closed
Gilles Cornu wrote:
But anyway I think that Redmine Release Management should either:
- update RedmineInstall accordingly to new stack requirements for Redmine 1.2.0 (posgtres-pr no more compatible ? Minimum PostgreSQL 8.4 ?).
There is already some information in RedmineInstall#Database.
or
- fix Redmine 1.2.1 to be able to integrate with older PostgreSQL 8.x + postgres-pr 0.6.3
This is not a Redmine bug (hence the status).
#7
Updated by Gilles Cornu about 11 years ago
Alex A wrote:
Unfortunately, this reinstalling does not help for me. Any ideas?
For me installing 'pg' instead 'postgres-pr' resolved the problem. What is your status Alex ?
Etienne Massip wrote:
Feedback on my configuration changes after meeting this unescape_bytea problem:Try using
postgres-pr
adapter instead ofpg
, it does not work very well with bytea and pg 9.x but maybe better with 8.x.
- Problem could be fixed by replacing postgres-pr 0.6.3 (gem uninstalled) with gem pg 0.9.0
- Note: I could not test with versions 0.10.x or 0.11.x because they require Ruby >= 1.8.7. Since I'm running with Ruby 1.8.6 (which is standard on Ubuntu 8.04LTS), I had to install version 0.9.0.
- I propose to enhance the Wiki Documentation by stressing out in RedmineInstall#Database that postgres-pr is no more 100% compatible with all the features of Redmine 1.2.0 (and later ?)
#8
Updated by Sudheer Prem L S about 11 years ago
I uninstalled 'pg' and 'postgres-pr' and re-installed 'pg' alone with the following command and it resolved the issue
gem install pg -- --with-pg-lib=<pg_home>/lib --with-pg-config=<pg_home>/bin/pg_config