Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error using this plugin with a postgres DB. #8

Open
thafreak opened this issue Jun 15, 2010 · 1 comment
Open

Error using this plugin with a postgres DB. #8

thafreak opened this issue Jun 15, 2010 · 1 comment

Comments

@thafreak
Copy link

It seems you're using integers for boolean values, which is ok with mysql, but it makes postgres angry. Here's the output from my production logs:

Processing GitosisPublicKeysController#index (for 10.96.2.8 at 2010-06-15 17:14:47) [GET]
Parameters: {"action"=>"index", "controller"=>"gitosis_public_keys"}

ActiveRecord::StatementInvalid (PGError: ERROR: operator does not exist: boolean = integer
LINE 1: ... FROM "gitosis_public_keys" WHERE (1=1 AND (active=1)) AND (...
^
HINT: No operator matches the given name and argument type(s). You might need to add explicit type casts.
: SELECT * FROM "gitosis_public_keys" WHERE (1=1 AND (active=1)) AND ("gitosis_public_keys".user_id = 4) ORDER BY active DESC, created_at DESC):
/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb:188:in log' /vendor/rails/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb:503:inexecute'
/vendor/rails/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb:1000:in select_raw' /vendor/rails/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb:987:inselect'
/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb:7:in select_all_without_query_cache' /vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb:62:inselect_all'
/vendor/rails/activerecord/lib/active_record/base.rb:635:in find_by_sql' /vendor/rails/activerecord/lib/active_record/base.rb:1490:infind_every'
/vendor/rails/activerecord/lib/active_record/base.rb:589:in find' /vendor/rails/activerecord/lib/active_record/base.rb:609:inall'
/vendor/rails/activerecord/lib/active_record/associations/association_collection.rb:370:in send' /vendor/rails/activerecord/lib/active_record/associations/association_collection.rb:370:inmethod_missing'
/vendor/rails/activerecord/lib/active_record/base.rb:2005:in with_scope' /vendor/rails/activerecord/lib/active_record/associations/association_proxy.rb:202:insend'
/vendor/rails/activerecord/lib/active_record/associations/association_proxy.rb:202:in with_scope' /vendor/rails/activerecord/lib/active_record/associations/association_collection.rb:366:inmethod_missing'
/vendor/plugins/redmine_gitosis/app/controllers/gitosis_public_keys_controller.rb:17:in index' /vendor/rails/actionpack/lib/action_controller/base.rb:1256:insend'
/vendor/rails/actionpack/lib/action_controller/base.rb:1256:in perform_action_without_filters' /vendor/rails/actionpack/lib/action_controller/filters.rb:617:incall_filters'
/vendor/rails/actionpack/lib/action_controller/filters.rb:610:in perform_action_without_benchmark' /vendor/rails/actionpack/lib/action_controller/benchmarking.rb:68:inperform_action_without_rescue'
/usr/lib/ruby/1.8/benchmark.rb:293:in measure' /vendor/rails/actionpack/lib/action_controller/benchmarking.rb:68:inperform_action_without_rescue'
/vendor/rails/actionpack/lib/action_controller/rescue.rb:136:in perform_action' /vendor/rails/actionpack/lib/action_controller/base.rb:524:insend'
/vendor/rails/actionpack/lib/action_controller/base.rb:524:in process_without_filters' /vendor/rails/actionpack/lib/action_controller/filters.rb:606:inprocess_without_session_management_support'
/vendor/rails/actionpack/lib/action_controller/session_management.rb:134:in process_without_test' /vendor/rails/actionpack/lib/action_controller/test_process.rb:18:inprocess'
/vendor/rails/actionpack/lib/action_controller/base.rb:392:in process' /vendor/rails/actionpack/lib/action_controller/dispatcher.rb:184:inhandle_request'
/vendor/rails/actionpack/lib/action_controller/dispatcher.rb:112:in dispatch_unlocked' /vendor/rails/actionpack/lib/action_controller/dispatcher.rb:125:indispatch'
/vendor/rails/actionpack/lib/action_controller/dispatcher.rb:124:in synchronize' /vendor/rails/actionpack/lib/action_controller/dispatcher.rb:124:indispatch'
/vendor/rails/actionpack/lib/action_controller/dispatcher.rb:134:in dispatch_cgi' /vendor/rails/actionpack/lib/action_controller/dispatcher.rb:41:indispatch'
/usr/lib/ruby/1.8/mongrel/rails.rb:76:in process' /usr/lib/ruby/1.8/mongrel/rails.rb:74:insynchronize'
/usr/lib/ruby/1.8/mongrel/rails.rb:74:in process' /usr/lib/ruby/1.8/mongrel.rb:159:inprocess_client'
/usr/lib/ruby/1.8/mongrel.rb:158:in each' /usr/lib/ruby/1.8/mongrel.rb:158:inprocess_client'
/usr/lib/ruby/1.8/mongrel.rb:285:in run' /usr/lib/ruby/1.8/mongrel.rb:285:ininitialize'
/usr/lib/ruby/1.8/mongrel.rb:285:in new' /usr/lib/ruby/1.8/mongrel.rb:285:inrun'
/usr/lib/ruby/1.8/mongrel.rb:268:in initialize' /usr/lib/ruby/1.8/mongrel.rb:268:innew'
/usr/lib/ruby/1.8/mongrel.rb:268:in run' /usr/lib/ruby/1.8/mongrel/configurator.rb:282:inrun'
/usr/lib/ruby/1.8/mongrel/configurator.rb:281:in each' /usr/lib/ruby/1.8/mongrel/configurator.rb:281:inrun'
/usr/bin/mongrel_rails:129:in run' /usr/lib/ruby/1.8/mongrel/command.rb:212:inrun'
/usr/bin/mongrel_rails:282

Rendering /usr/share/redmine/public/500.html (500 Internal Server Error)

@takahashim
Copy link

I'm using this plugin on PostgreSQL with the patch:
http://github.com/takahashim/redmine-gitosis/commit/7aae5d14210720f07b429adf41857bffe65fb86a

It seems to work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants