Closed bramswenson closed 10 years ago
I couldn't reproduce this issue querying against a character varying column. I'll have to dig into the code later to see what is actually happening.
Just curious, what OS and ruby version are you using?
$ ruby -v
ruby 2.1.2p95 (2014-05-08 revision 45877) [x86_64-linux]
$ uname -a
Linux bram 3.13.0-37-generic #64-Ubuntu SMP Mon Sep 22 21:28:38 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
$ cat Gemfile
source 'https://rubygems.org'
gem 'dotenv'
gem 'pg'
gem 's3'
gem 'pry'
gem 'rake', '~> 10.3.2'
gem 'whenever', '~> 0.9.3', require: false
gem 'activerecord', '4.2.0.beta.2'
gem 'activerecord4-redshift-adapter',
github: 'khwangster/activerecord4-redshift-adapter',
ref: '4.0'
group :development do
gem 'capistrano', '~> 3.2.1'
gem 'capistrano-bundler', '~> 1.1.3'
gem 'capistrano-rbenv', '~> 2.0.2'
gem 'capistrano-rbenv-install', '~> 1.0.0'
end
Ah, it seems like you're referencing the 4.0
tag. That reference is for compatibility with ActiveRecord 4.0. I created a 4.2
tag for ActiveRecord 4.2 support (or just use master
). Let me know if that solves your problem.
Perfect. That works. Thanks @khwangster!
Hi, thanks for all your work on this adapter. :+1: With it I am able to connect to redshift and run some simple queries. However, other simple queries fail. I have a table with nothing but varchar columns:
If I try to query these columns I get an error that seems to indicate that the column type isn't recognized properly:
Any ideas? I'm not familiar with AR internals regarding type casting. I'm going to dig in the next chance I get, but maybe you have some idea since you wrote it.
And here is the full stack trace: