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

ODBC::Error: S1090 (0) [unixODBC][Driver Manager]Invalid string or buffer length #39

Closed
jmcervera opened this issue Jun 17, 2010 · 3 comments

Comments

@jmcervera
Copy link

Hello Ken,

I am getting trying to use the adapter with Rails 3 and I am getting this error
"ODBC::Error: S1090 (0) [unixODBC][Driver Manager]Invalid string or buffer length" in rails console, as soon as I try to make my first query.

You can see the console log here
http://gist.github.com/442285

I am on Ubuntu 10.04, using rvm and using ruby-odbc bindings from a gem.
This is the Gemfile

gem 'rails', '3.0.0.beta4'
gem 'ruby-odbc', '0.99991'
gem 'dbi', '0.4.5'
gem 'dbd-odbc', '0.2.5', :require => "dbd/ODBC"
gem 'activerecord-sqlserver-adapter', :git => 'git://github.com/rails-sqlserver/2000-2005-adapter.git', :branch => '3.0.0.beta1'

When I use my system version of ruby (not with RVM), I have ruby-odbc 0.9997 installed from repository and I have no problem with Rails 2.3.8, but this library is not found when I use RVM.
Any idea?
Thank you very much

Juanma

@jmcervera
Copy link
Author

I have been fighting with the problem. With no luck.
It seems that the problem has nothing to do with RVM.
The problem is with the gem (ruby-odbc 0.99991, and the same with the package for ubuntu/debian ruby-odbc 0.99991-1, a new one patched for Ubuntu 10.04, (http://packages.debian.org/squeeze/libodbc-ruby1.8).
This works with rails 2.3.8, but fails with the stated error with Rails3 beta4.
I will leave a link to the console log:
http://www.pastie.org/1010213

@metaskills
Copy link
Contributor

The adapter is not rails 3 ready yet. More to come soon on that topic. Also, the DBI/DBD-ODBC is not needed anymore, we do not use them.

@jmcervera
Copy link
Author

Thank you very much Ken.
We'll wait for the news.

This issue was closed.
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