tiny-tds

Installing tiny_tds gem on Ubuntu 20.04 fails

橙三吉。 提交于 2020-07-10 09:03:28
问题 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: /home/myuser/.rvm/gems/ruby-2.7.0/gems/tiny_tds-2.1.2/ext/tiny_tds make "DESTDIR=" install make: /usr/bin/mkdir: Command not found make: *** [Makefile:202: .sitearchdir.-.tiny_tds.time] Error 127 make install failed, exit code 2 Any ideas on how to work around this? I

Error installing TinyTDS on OSX 10.6 via gem install tiny_tds

女生的网名这么多〃 提交于 2020-01-01 09:36:09
问题 I have been trying to install the TinyTDS gem on a Macbook with OSX 10.6. I was successful in installing Free TDS -- confirmed that it works via: tsql -H SERVER -p 1433 -U username. The error I'm getting from gem install tiny_tds is: Building native extensions. This could take a while... ERROR: Error installing tiny_tds: ERROR: Failed to build gem native extension. /Users/jason/.rvm/rubies/ruby-1.9.3-p194/bin/ruby extconf.rb checking for iconv_open() in iconv.h... no checking for iconv_open()

TinyTds::Error: Adaptive Server connection failed

房东的猫 提交于 2019-12-23 13:16:10
问题 This is an odd one. I have some ruby code on my machine which uses the tiny_tds version: 0.6.0.rc1 and everything works fine. When a co-worker attempt to run the same code he gets the following error: TinyTds::Error: Adaptive Server connection failed We are connecting without providing username or password as it's not needed on my machine. Any ideas? could this be a rights thing on the sql database? Thanks in advance It should be noted on the machine with issues we have SQL 2008 R2 and SQL

How can I use SQL Server Table Views as Rails Models (Read Only)?

假如想象 提交于 2019-12-22 11:33:44
问题 I'm using SQL Server as my database for my Rails project. I'm trying to create some models to use for a 3rd party database and only want to read from this database. So I made a view of the table I wanted to create an object for and then I wanted to point my active record model to it. However, in rails console I don't get back expected results. The only example that gives back some correct information is when I do a count on the object as shown in Example 3 below. I'm using the following gems

Homebrew / TinyTDS / FreeTDS bundle error

我怕爱的太早我们不能终老 提交于 2019-12-12 10:46:15
问题 I used homebrew (linux port) to install freeTDS and am trying to deploy /bundle install my app with gem tinytds. I get this error output when doing bundle install Installing tiny_tds (0.5.1) with native extensions Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension. /home/deployer/.rbenv/versions/1.9.2-p290/bin/ruby extconf.rb /usr/bin/ld: /opt/homebrew/lib/libsybdb.a(dblib.o): relocation R_X86_64_32 against `.rodata' can not be used when making a shared object;

ruby key not found using Modulo

别说谁变了你拦得住时间么 提交于 2019-12-12 05:56:51
问题 I am trying to use the string's modulo function % to take a hash and inject it's values into the appropriate places inside of a string but I always receive key{x} not found (KeyError) even though I can confirm that the key is there. What am I doing wrong? s = "Invalid: %{totalInvalid} , OutofThreshold: %{totalOutOfThreshold} " puts row.fetch ('totalInvalid') #<-Just checking to make sure the key is in there ext = s % row I get this output: 0 #<- Key does seem to be in there, returns correct

Cannot install tiny_tds on os.x 10.9.4

耗尽温柔 提交于 2019-12-12 01:57:54
问题 I'm trying to install tiny_tds on a mac running OS.X Mavericks but I receive the following error: ERROR: Error installing tiny_tds: ERROR: Failed to build gem native extension. /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby extconf.rb gem install tiny_tds -- --without-iconvlib --with-freetds-lib=/usr/local/Cellar/freetds/0.91/lib --with-freetds-include=/usr/local/Cellar/freetds/0.91/include checking for iconv_open() in iconv.h... no checking for iconv_open() in -lfalse...

Connecting to SQL-Azure in rails using tiny_TDS: [BUG] Segmentation fault

这一生的挚爱 提交于 2019-12-11 04:48:51
问题 We're trying to get rails to talk to a sqlserver db on Azure, we install freeTDS with openssl and libiconv: ./configure --prefix=/usr/local --with-libiconv-prefix=DIR --with-openssl=DIR make make install We then add tiny_TDS and activerecord-sqlserver-adapter to the gemfile: gem 'tiny_tds' gem 'activerecord-sqlserver-adapter' $ bundle install Configure the database: development: adapter: sqlserver host: xxxxxxx.database.windows.net mode: DBLIB port: 1433 database: xxxxx username: xxxxxxxx

Unable to `gem install tiny_tds` OS X Mavericks

喜欢而已 提交于 2019-12-07 09:03:09
问题 The Error $ sudo gem install tiny_tds Building native extensions. This could take a while... ERROR: Error installing tiny_tds: ERROR: Failed to build gem native extension. /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby extconf.rb checking for iconv_open() in iconv.h... no checking for iconv_open() in -liconv... yes checking for sybfront.h... yes checking for sybdb.h... yes checking for tdsdbopen() in -lsybdb... no HomeBrew The above error occurs even after a $ brew

How can I use SQL Server Table Views as Rails Models (Read Only)?

南笙酒味 提交于 2019-12-06 14:22:22
I'm using SQL Server as my database for my Rails project. I'm trying to create some models to use for a 3rd party database and only want to read from this database. So I made a view of the table I wanted to create an object for and then I wanted to point my active record model to it. However, in rails console I don't get back expected results. The only example that gives back some correct information is when I do a count on the object as shown in Example 3 below. I'm using the following gems to connect to my SQL Server: gem 'tiny_tds' gem 'activerecord-sqlserver-adapter' Also I have installed