ROR + Unable to install tiny_tds
Did you install freeTDS prior to install the gem?
sudo apt-get install freetds-dev
Then
gem install tiny_tds
Can´t install tiny_tds in Windows 10
Well, thanks to Jared Beck, I finally was able to precompile the FreeTDS binaries. I used Ruby on Rails in the past, but never needed to do such thing, so I didn´t know the syntax. I thought that running the command gem install tiny_tds
included the FreeTDS installation. Then I noticed the configuration options and tried running gem install tiny_tds -- --with-freetds-dir
, but didn´t know that the command required the directory as an argument.
Finally, I downloaded the FreeTDS Windows binary from https://sourceforge.net/projects/freetdswindows/, extracted it in C:, and ran the following command:
gem install tiny_tds -- --with-freetds-dir=C:\freetds-1.00
Unable to `gem install tiny_tds` OS X Mavericks
I solved this problem by explicitly specifying the 64 bit architecture:
$ brew install freetds
$ sudo ARCHFLAGS="-arch x86_64" gem install tiny_tds
The reason is that during the gem building process, mkmf will try to look for 32 bit version of freetds, which is not available. The error message in mkmf.log
said:
ld: warning: ignoring file /usr/local/lib/libsybdb.dylib, file was built for x86_64 which is not the architecture being linked (i386): /usr/local/lib/libsybdb.dylib
Undefined symbols for architecture i386:
"_tdsdbopen", referenced from:
_t in conftest-a13287.o
ld: symbol(s) not found for architecture i386
Installing tiny_tds gem on Ubuntu 20.04 fails
I had a similar problem installing gems on Ubuntu 20.04. with RVM und Ruby 2.7.
As stated, the make process could not find the mkdir
command.
$ which mkdir
/bin/mkdir
Since the process is searching for the command in /usr/bin/mkdir
it cannot be found. I could fix this by creating a symbolic link to the correct path:
sudo ln -s /bin/mkdir /usr/bin/mkdir
Failing to bundle install tiny_tds on Mac OS X 10.8 with Homebrew FreeTds
Well, unfortunately I've now got it working and have NO CLUE how I've done it but I will list all of the things I've done so far in this answer to solve it.
In the end, bundle install
with standard gem 'tiny_tds', '0.5.1'
ended up working fine.
It's running Ruby version 1.9.3-p194 via RVM.
This is where the gold is I'm fairly sure...
I used rvm pkg install iconv
and rvm reinstall 1.9.3 --with-iconv-dir=$rvm_path/usr
Once this completed, I deleted all old gem folders...
I switched bundle config path to match the new ruby path...
Then did bundle install, and boom.
It's also using iconv 1.13 instead of 1.14 not sure if that matters.
I hope this helps anyone... it's definitely been a huge learning experience for me.
Rails 4: Error when installing tiny_tds gem?
Looks like you don't have freetds installed on this machine:
sudo apt-get install freetds-dev
If you see the details of the freetds-dev package you will see it has the missing file sybfront.h
There is no gem that I know for freetds
and building the tiny_tds
gem requires it to compile. However it should be possible for you build your own version of the gem using MiniPortile
.
Rather than using the normal gem install
mechanism you need to clone the tiny_tds
from GitHub and then build a native gem for your environment. This process will include downloading a specific version of freetds
which is used to compile the gem against.
This should get you round the problem of not being able to install freetds-dev
package, but does have the disadvantage that if tiny_tds
gem is updated in the future you will need to repeat this process each time - you can't simply take advantage of bundle update
.
The steps you need to follow are detailed here.
installing tiny_tds gives error on on mac os 10.10.5
This is what fixed it for me:
brew install freetds
sudo ARCHFLAGS="-arch x86_64" gem install tiny_tds
Unable to install tiny_tds on mac
So in the end, it turned out that the machine I received was not wiped clean from a previous user and all of my problems are due to there being another gcc as well as ancient tds libraries in /usr/local. Blowing away all that stuff has resolved my issues.
Homebrew, FreeTDS, tiny_tds. Why can't I install tiny_tds after successfully installing FreeTDS?
Hallelujah!
After trying absolutely everything I could think of, including reading the mkmf.log file and a plethora of different installation parameters, I've arrived at a solution that worked for me.
In the end, the solution was relatively straight-forward, though difficult to figure out. The issue was that it was trying to build with the wrong architecture in mind (32-bit). Using the flag ARCHFLAGS
to explicitly specify 64-bit, the installation worked immediately, as follows:
sudo ARCHFLAGS="-arch x86_64" gem install tiny_tds
I hope somebody finds this useful--I didn't find anything anywhere saying this was a solution.
Related Topics
What's the Best Way to Talk to a Database While Using Sinatra
Is There a Literal Notation for an Array of Symbols
Homebrew Install: Failed During: Git Fetch Origin Master:Refs/Remotes/Origin/Master -N --Depth=1
Transforming Datetime into Month, Day and Year
Nested Object Creation with JSON in Rails
How to Set Up Cascade Deleting in Rails
Skip Over Iteration in Enumerable#Collect
Difference Between Plugins and Ruby Gems
Getting Only New Mail from an Imap Server
Count Number of Days Between Two Dates
How to Return Something Early from a Block
How to Check If a Class Is Defined
How to Sort a String's Characters Alphabetically
How to Add a New Action to the Existing Controller
Ruby To_JSON Issue with Error "Illegal/Malformed Utf-8"
How to Compare a String Against Multiple Other Strings