TinyTDS is a Ruby library to access Microsoft SQL Server databases using FreeTDS.
Questions tagged [tiny-tds]
149 questions
1
vote
0 answers
Accessing Azure SQL database using Ruby (TinyTds)
I am trying migrate data
from an old database, that I can access through the Azure Interface,
to a new postgres db, in a Ruby on Rails app
To try and access the Azure database, using SQL server authentication, I'm calling a service, following…

pinch
- 11
- 3
1
vote
1 answer
Rails 5.2.3 schema load failing for Microsoft SQL Server
I have a Rails application that is normally deployed on PostgreSQL databases, but now we have a customer that wishes to use it with a Microsoft SQL Server database. The schema.rb file referenced below was generated while the application was set up…

Kevin Turner
- 11
- 2
1
vote
2 answers
Installing tiny_tds gem on Ubuntu 20.04 fails
I want to insall tiny_tds on Ubuntu 20.04, so I do
apt install freetds-dev
and the install the gem
gem install tiny_tds
Works like a charm on Ubuntu 18.04, but 20.04 fails. the last lines of the output are:
current directory:…

Ymox
- 179
- 12
1
vote
1 answer
Rails MSSQL connetion - TinyTds::Error: closed connection
I'm currently trying to setup a Redmine installation for our team. I can't seem to establish a connection to our MSSQL server from within rails.
$ RAILS_ENV=production bundle exec rake db:migrate
rake aborted!
TinyTds::Error: closed…

SnotMcBooger
- 31
- 3
1
vote
1 answer
Rails, ActiveRecord: has_one where column names match
I have an association where a project has_many steps and I want to find the "current" step for the project. The project table stores a current_step value, which is the step.name for the current step.
class Project < ApplicationRecord
#…

Dan L
- 4,319
- 5
- 41
- 74
1
vote
1 answer
Rspec fails because too few arguments when rescuing error
In a system spec, I'm trying to test the correct handling of a database timeout. When that happens a new TinyTds::Error is raised.
Here my controller (EMData handles the DB connection)
class Json::ChartController < ApplicationController
…

Sig
- 5,476
- 10
- 49
- 89
1
vote
1 answer
How to install FREETDS on Windows 10 using Ruby
I've tried to find a way to install freetds on windows, but i just cannot find that.
I'm trying to install tiny_tds but i got the error:
gem install tiny_tds
ERROR: Error installing tiny_tds:
The last version of tiny_tds (>= 0) to support your…

Roger Fernandes
- 11
- 2
1
vote
0 answers
LoadError: cannot load such file -- tiny_tds
I have been troubleshooting a problem in my Ruby on Rails application on windows system. when i try to run server rails s i got error..
Rails log
bundle exec rails…

Santosh Kumbhar
- 183
- 3
- 15
1
vote
1 answer
How do I pull data from a dual database in Rails (Postgresql and SQL Server)
I was working with just one database initially but I needed to add the clients other database which is a SQL Server database. I was able to connect but I am running into a few problems.
Original full database.yml
development:
adapter: postgresql
…

Jermaine Subia
- 776
- 1
- 7
- 31
1
vote
0 answers
Connect to SQL Server through SSH tunnel using tiny_tds in Ruby
I try to connect to the remote SQL Server 2008 R2 using tiny_tds Ruby gem through SSH tunnel, like this:
require 'tiny_tds'
require 'net/ssh/gateway'
gateway = Net::SSH::Gateway.new(
'host',
'username',
port: 'port',
password:…

Max Filippov
- 2,024
- 18
- 37
1
vote
1 answer
TinyTds - Adaptive server is unavailable or does not exist
Machine 1:
>tsql -C
Compile-time settings (established with the "configure" script)
Version: freetds v0.91.90
freetds.conf directory: /etc
MS db-lib source compatibility: no
Sybase binary…

Vignesh Paramasivam
- 2,360
- 5
- 26
- 57
1
vote
1 answer
rails 4.2 + mssql 2012+ tiny_tds + freetds + activerecord-sqlserver-adapter at windows
The problem is my app and my sql server instance are both on windows.
I used ruby-odbc and that works fine, but I have some trouble with dates and utf-8 values. I realized I have to use tiny_tds with activerecord-sqlserver-adapter, but tiny_tds…

elmoaaron
- 11
- 1
1
vote
2 answers
Connect to Windows SQL Server 2008 R2 from Rails app
My Rails 4.2.1 app has to connect to a Microsoft SQL 2008 R2 database. I am using the tiny_tds gem version 1.0.4. FreeTDS v1.00.15 is installed on the production server running Ubuntu 14.04.
I run queries inside an each loop and I can't get the loop…

fkoessler
- 6,932
- 11
- 60
- 92
1
vote
1 answer
Ruby, tiny_tds segmentation fault (build tree)
require 'tiny_tds'
def client
client = TinyTds::Client.new username: 'user', password: 'pass', host: '192.168.4.4'
client.execute('use database').do
client
end
def services(id)
out = []
client.execute('exec GetServiceByServiceGroup…

Vladimir Kovalev
- 11
- 2
1
vote
1 answer
Connect Sql server in Ruby on rails
I need to connect to a SQL Server database, I installed gem 'tiny_tds' gem 'activerecord-sqlserver-adapter' gem 'deprecated'
my yml file:
default: &default
adapter: sqlserver
host: basddatos.dyndns.org
username: zu
password: pass
pool: 5
…

Alexander Marcano
- 33
- 6