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.
Homebrew / TinyTDS / FreeTDS bundle error
I run fedora, but the fix for me is
sudo yum install freetds-devel
I am pretty sure that you just need to have the development package of freetds for this to work. After I had the devel package, my
gem install tiny_tds
worked perfectly.
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.
Error installing TinyTDS on OSX 10.6 via gem install tiny_tds
Same problem on Ubuntu 14.04 resolved with:
sudo apt-get install freetds-dev
gem install tiny_tds
Log output:
Building native extensions. This could take a while...
/home/david/.rvm/rubies/ruby-2.1.0/lib/ruby/site_ruby/2.1.0/rubygems/ext/builder.rb:73: warning: Insecure world writable dir /mnt/datapart/david in PATH, mode 040777
Successfully installed tiny_tds-0.6.1
Parsing documentation for tiny_tds-0.6.1
Installing ri documentation for tiny_tds-0.6.1
Done installing documentation for tiny_tds after 0 seconds
1 gem installed
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.
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
Do I need FreeTDS to use TinyTDS under Windows?
There is a binary version of Tiny_TDS that is installed on Windows when you install this gem. This includes FreeTDS, so there's no need to install it separately. Only time you have to worry about FreeTDS on Windows is if you want to work with SQL Database on Windows Azure, which requires you to manually build FreeTDS.
There's a couple things that could go wrong that might cause a connection failure:
- SQL Express doesn't install a default instance, but instead installs a 'sqlexpress' instance. Maybe try connecting to 'servername\sqlexpress'.
- SQL Express may not allow network connections. If you're trying this over the network you may have to enable networking.
- TCP/IP and named pipes may not be enabled. I think Tiny_TDS uses TCP/IP.
- SQL Express might be using a dynamic port rather than the expected 1433, so maybe check ports.
Here's an article that might help:
http://blogs.msdn.com/b/sqlexpress/archive/2005/05/05/415084.aspx.
FreeTDS Mac OS X MiniPortile
You run those commands on the tiny_tds project, not the miniportile one
Related Topics
Why Are My Thread Variables Intermittent in Rails
How to Specify a Minimum Ruby Version in a Gemspec
Escaping the .Each { } Iteration Early in Ruby
E: Unable to Locate Package Heroku-Toolbelt
Using %I and %I Symbol Array Literal
Coping with "String Contains Null Byte" Sent from Users
Truncate a Floating Point Number Without Rounding Up
Error Installing JSON 1.8.3 with Ruby 2.4
What Does It Mean Bundle_Disable_Shared_Gems: '1'
Rubymine Error: Unable to Run Gem 'Rails'. Cannot Find 'Rails'
Sorting an Array of Strings in Ruby
Logger.Debug Not Writing to Log File in Rails
Where Do You Put CSS Files in a Rails App Directory
Thin Doesn't Respond to Sigint or Sigterm
User Theme Switching with SASS - Ruby on Rails
How to Replicate Class_Inheritable_Accessor's Behavior in Rails 3.1