Failing to bundle install tiny_tds on Mac OS X 10.8 with Homebrew FreeTds

前端 未结 6 1322
野的像风
野的像风 2021-02-13 19:32

MY QUESTION
What are some surefire steps I can take to 100% get this working? I would need real instructions, not one liner answers or vague conceptual desc

相关标签:
6条回答
  • 2021-02-13 20:14

    This did work for me (2 Oct 2014 / OSX 10.9.5):

    brew install freetds
    

    and in rails:

    gem 'tiny_tds'
    bundle install
    
    0 讨论(0)
  • 2021-02-13 20:14

    I don't know much about Ruby. Just dabbled a bit. You can always install vertx directly than I think you have more control with directory location and it makes it easier to upgrade. I wrote up a guide for Ops team for production (a work in progress really). It might help you. It might not.

    I wrote a little install guide. I plan on adding some tweaks to it on how to configure TCP/IP stack and Vertx to scale (ephemeral port settings, file descriptor limits, load testing, tuning recycle buffers, etc.)

    http://rick-hightower.blogspot.com/2013/11/installing-vertx-on-ubuntu-13.html

    Installing Vertx on Ubuntu 13

    Environment details

    Instance type: EC2 hi1.4xlarge

    • OS: Ubuntu 13.10 (64 bit) Java VM:

    • java version "1.7.0_25" (IcedTea 2.3.12) (build 23.7-b01)

    • vertx: 2.1M1 (built 2013-10-29 11:11:22)

    Installing Software

    Java 7 JDK:

     $ sudo apt-get install openjdk-7-jdk
    

    Vertx:

    Download Vertx

    $ wget http://dl.bintray.com/vertx/downloads/vert.x-2.1M1.tar.gz
    $ tar -zxf vert.x-2.1M1.tar.gz 
    $ ls
    vert.x-2.1M1  vert.x-2.1M1.tar.gz
    

    Move into standard Unix structure:

    $ sudo mv vert.x-2.1M1 /usr/local/share/
    $ ls /usr/local/share/
      ...  vert.x-2.1M1  xml
    

    Create symbolic link to /usr/local/share/vertx so upgrading is easier.

    $ sudo ln -s /usr/local/share/vert.x-2.1M1/ /usr/local/share/vertx
    $ ls /usr/local/share/vertx
    api-docs  bin  client  conf  lib
    

    Add vertx symbolic link to your /usr/bin/ directory.

    $ sudo ln -s /usr/local/share/vertx/bin/vertx /usr/bin/vertx
    

    Install a real damn editor:

    $ sudo apt-get install emacs
    

    Create test script to test vertx is installed properly:

    var vertx = require('vertx');
    vertx.createHttpServer().requestHandler(function(r) {
    r.response.end("test 1\n");}).listen(8080);
    

    Now run vertx against test script:

    $ vertx run test.js &
    [1] 11493
    $ Succeeded in deploying verticle 
    

    Now test that the install all worked:

    $ curl 127.0.0.1:8080
    test 1
    

    If you get "test 1", this means vertx is install and able to server verticles.

    Later I plan on adding init.d scripts to start vertx and perhaps a process that wakes up and makes sure everything is running every minute or so. I also plan on fronting a few vertx instances with NGINX reverse proxy so each box can handle close to 1,000,000 requests and have a bit more DOS protection. Anyway... a work in progress...

    0 讨论(0)
  • 2021-02-13 20:25

    What worked for me was mr.ruh.roh's gem building options above, reproduced here:

    gem install tiny_tds -- --with-freetds-include=/usr/local/include   
        --with-freetds-lib=/usr/local/lib
        --with-iconv-include=/usr/local/Cellar/libiconv/1.14/include
        --with-iconv-lib=/usr/local/Cellar/libiconv/1.14/lib
    

    in one line. That gem install installs the gem, but the bundle still failed, even though the gem had been built and installed. Adding those options for bundler, however, worked.

    bundle config build.tiny_tds -- --with-freetds-include=/usr/local/include 
      --with-freetds-lib=/usr/local/lib 
      --with-iconv-include=/usr/local/Cellar/libiconv/1.14/include 
      --with-iconv-lib=/usr/local/Cellar/libiconv/1.14/lib
    

    Again, in one line. With that bundler config set, bundle install worked.

    Note that I had already run:

    brew install freetds
    brew install libiconv
    

    This worked for me on Feb 20, 2015 on OS X 10.9.5 with Xcode 6.1.1 installed

    0 讨论(0)
  • 2021-02-13 20:29

    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.

    0 讨论(0)
  • 2021-02-13 20:29

    I have solved it with:

    brew install freetds
    

    and then

    bundle install
    
    0 讨论(0)
  • 2021-02-13 20:37

    First install free_tds and required dependencies.

    This worked for me, your paths may be different

    gem install tiny_tds -- --with-freetds-include=/usr/local/include
    --with-freetds-lib=/usr/local/lib
    --with-iconv-include=/usr/local/Cellar/libiconv/1.14/include
    --with-iconv-lib=/usr/local/Cellar/libiconv/1.14/lib
    
    0 讨论(0)
提交回复
热议问题