数据库 resque 配合 postgresql 使用出现 ssl 错误

zhulinpinyu · February 18, 2013 · 3028 hits

ActiveRecord::StatementInvalid Error PG::Error: SSL error: decryption failed or bad record mac : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum

解决方法:

task "resque:setup" => :environment do ENV['QUEUE'] = '*' Resque.after_fork = Proc.new { ActiveRecord::Base.establish_connection } end

http://stackoverflow.com/questions/9915146/resque-with-rails-3-heroku-redistogo-giving-postgresql-error

No Reply at the moment.
You need to Sign in before reply, if you don't have an account, please Sign up first.