ruby on rails - Failing to bundle install tiny_tds on Mac OS X 10.8 with Homebrew FreeTds -
ruby on rails - Failing to bundle install tiny_tds on Mac OS X 10.8 with Homebrew FreeTds -
my question surefire steps can take 100% working? need real instructions, not 1 liner answers or vague conceptual descriptions of process.
let's bottom of this. appear there conflicts somewhere , i've had subpar assistance gem developer on github in relation experience ruby / rails / bundler / homebrew it's not fault :p need figure out how working asap here goes current state of problem.
update: 2/25/2013 updated gcc / xcode version 4.6 (4h127) , downloaded latest version of xcode command-line tools , iconv_open() showing in extconf checker. i'm getting these errors:
i believe issues tiny_tds , compatibility latest xcode paths.
gem::installer::extensionbuilderror: error: failed build gem native extension. /system/library/frameworks/ruby.framework/versions/1.8/usr/bin/ruby extconf.rb checking iconv_open() in iconv.h... yes checking sybfront.h... yes checking sybdb.h... yes checking tdsdbopen() in -lsybdb... yes checking ct_bind() in -lct... yes creating makefile create xcrun cc -i. -i. -i/system/library/frameworks/ruby.framework/versions/1.8/usr/lib/ruby/1.8/universal-darwin12.0 -i. -dhave_iconv_open -dhave_sybfront_h -dhave_sybdb_h -i-i/usr/local/php5/include -i-i/usr/include -i-i/usr/local/include -i-i/opt/local/include -i-i/usr/local/macgpg2/include -i-i/opt/sm/pkg/active/include -i/usr/local/php5/include -i/usr/include -i/usr/local/include -i/opt/local/include -i/usr/local/macgpg2/include -i/opt/sm/pkg/active/include -d_xopen_source -d_darwin_c_source -fno-common -g -os -pipe -fno-common -denable_dtrace -fno-common -pipe -fno-common -c client.c xcrun: error: not stat active xcode path '/developer'. (no such file or directory) xcrun cc -i. -i. -i/system/library/frameworks/ruby.framework/versions/1.8/usr/lib/ruby/1.8/universal-darwin12.0 -i. -dhave_iconv_open -dhave_sybfront_h -dhave_sybdb_h -i-i/usr/local/php5/include -i-i/usr/include -i-i/usr/local/include -i-i/opt/local/include -i-i/usr/local/macgpg2/include -i-i/opt/sm/pkg/active/include -i/usr/local/php5/include -i/usr/include -i/usr/local/include -i/opt/local/include -i/usr/local/macgpg2/include -i/opt/sm/pkg/active/include -d_xopen_source -d_darwin_c_source -fno-common -g -os -pipe -fno-common -denable_dtrace -fno-common -pipe -fno-common -c result.c xcrun: error: not stat active xcode path '/developer'. (no such file or directory) xcrun cc -i. -i. -i/system/library/frameworks/ruby.framework/versions/1.8/usr/lib/ruby/1.8/universal-darwin12.0 -i. -dhave_iconv_open -dhave_sybfront_h -dhave_sybdb_h -i-i/usr/local/php5/include -i-i/usr/include -i-i/usr/local/include -i-i/opt/local/include -i-i/usr/local/macgpg2/include -i-i/opt/sm/pkg/active/include -i/usr/local/php5/include -i/usr/include -i/usr/local/include -i/opt/local/include -i/usr/local/macgpg2/include -i/opt/sm/pkg/active/include -d_xopen_source -d_darwin_c_source -fno-common -g -os -pipe -fno-common -denable_dtrace -fno-common -pipe -fno-common -c tiny_tds_ext.c xcrun: error: not stat active xcode path '/developer'. (no such file or directory) cc -pipe -bundle -undefined dynamic_lookup -o tiny_tds.bundle client.o result.o tiny_tds_ext.o -l. -l/system/library/frameworks/ruby.framework/versions/1.8/usr/lib -l/usr/local/heroku/lib -l/usr/local/php5/lib -l/usr/local/cellar/ruby/1.9.3-p194/lib -l/usr/lib -l/usr/local/lib -l/opt/local/lib -l/usr/local/macgpg2/lib -l/opt/sm/pkg/active/lib -l/users/rountrjf/.rvm/lib -l/usr/local/cellar/vertx/lib -l/usr/local/cellar/vertx/mods/node.vert.x/lib -l/system/library/frameworks/ruby.framework/versions/1.8/usr/lib -l. -lruby -lct -lsybdb -lpthread -ldl -lobjc i686-apple-darwin11-llvm-gcc-4.2: client.o: no such file or directory i686-apple-darwin11-llvm-gcc-4.2: result.o: no such file or directory i686-apple-darwin11-llvm-gcc-4.2: tiny_tds_ext.o: no such file or directory make: *** [tiny_tds.bundle] error 1 alright, since /developer doesn't exist. used `sudo xcode-select -switch /applications/xcode.app/contents/developer` thinking prepare it. i'm square one... iconv_open() not found when checked `extconf.rb`
update 2: 2/25/2013 okay, reinstalled everything, ruby / rails / etc. , used advice commenter utilize ":path =>" , here output when run rails s
/users/rountrjf/.rvm/gems/ruby-1.9.3-p392/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:251:in `require': cannot load such file -- tiny_tds (loaderror) /users/rountrjf/.rvm/gems/ruby-1.9.3-p392/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:251:in `block in require' /users/rountrjf/.rvm/gems/ruby-1.9.3-p392/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:236:in `load_dependency' /users/rountrjf/.rvm/gems/ruby-1.9.3-p392/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:251:in `require' /users/rountrjf/.rvm/gems/ruby-1.9.3-p392/gems/activerecord-sqlserver-adapter-3.2.10/lib/active_record/connection_adapters/sqlserver_adapter.rb:31:in `sqlserver_connection' /users/rountrjf/.rvm/gems/ruby-1.9.3-p392/gems/activerecord-3.2.12/lib/active_record/connection_adapters/abstract/connection_pool.rb:315:in `new_connection'
things i've tried
1.) initial easy setup instructions other...
$ rails new test_app $ cd test_app
now add together these lines gemfile
gem 'tiny_tds' gem 'activerecord-sqlserver-adapter'
now go on commands...
$ bundle install fetching gem metadata https://rubygems.org/........... fetching gem metadata https://rubygems.org/.. resolving dependencies... using rake (10.0.3) using i18n (0.6.1) using multi_json (1.6.1) using activesupport (3.2.12) using builder (3.0.4) using activemodel (3.2.12) using erubis (2.7.0) using journey (1.0.4) using rack (1.4.5) using rack-cache (1.2) using rack-test (0.6.2) using hike (1.2.1) using tilt (1.3.3) using sprockets (2.2.2) using actionpack (3.2.12) using mime-types (1.21) using polyglot (0.3.3) using treetop (1.4.12) using mail service (2.4.4) using actionmailer (3.2.12) using arel (3.0.2) using tzinfo (0.3.35) using activerecord (3.2.12) using activerecord-sqlserver-adapter (3.2.10) using activeresource (3.2.12) using bundler (1.2.4) using coffee-script-source (1.4.0) using execjs (1.4.0) using coffee-script (2.2.0) using rack-ssl (1.3.3) using json (1.7.7) using rdoc (3.12.1) using thor (0.17.0) using railties (3.2.12) using coffee-rails (3.2.2) using jquery-rails (2.2.1) using rails (3.2.12) using sass (3.2.5) using sass-rails (3.2.6) installing tiny_tds (0.5.1) native extensions gem::installer::extensionbuilderror: error: failed build gem native extension. /usr/local/cellar/ruby/1.9.3-p194/bin/ruby extconf.rb checking iconv_open() in iconv.h... no checking iconv_open() in -liconv... no ----- libiconv missing. ----- *** extconf.rb failed *** not create makefile due reason, lack of necessary libraries and/or headers. check mkmf.log file more details. may need configuration options. provided configuration options: --with-opt-dir --without-opt-dir --with-opt-include --without-opt-include=${opt-dir}/include --with-opt-lib --without-opt-lib=${opt-dir}/lib --with-make-prog --without-make-prog --srcdir=. --curdir --ruby=/usr/local/cellar/ruby/1.9.3-p194/bin/ruby --enable-lookup --disable-lookup --with-iconv-dir --without-iconv-dir --with-iconv-include --without-iconv-include=${iconv-dir}/include --with-iconv-lib --without-iconv-lib=${iconv-dir}/lib --with-freetds-dir --without-freetds-dir --with-freetds-include --without-freetds-include=${freetds-dir}/include --with-freetds-lib --without-freetds-lib=${freetds-dir}/lib --with-iconvlib --without-iconvlib gem files remain installed in /usr/local/cellar/ruby/1.9.3-p194/lib/ruby/gems/1.9.1/gems/gems/tiny_tds-0.5.1 inspection. results logged /usr/local/cellar/ruby/1.9.3-p194/lib/ruby/gems/1.9.1/gems/gems/tiny_tds-0.5.1/ext/tiny_tds/gem_make.out error occurred while installing tiny_tds (0.5.1), , bundler cannot continue. create sure `gem install tiny_tds -v '0.5.1'` succeeds before bundling.
output of tsql -c
$ tsql -c compile-time settings (established "configure" script) version: freetds v0.91 freetds.conf directory: /usr/local/cellar/freetds/0.91/etc ms db-lib source compatibility: no sybase binary compatibility: no thread safety: yes iconv library: yes tds version: 7.1 iodbc: yes unixodbc: no sspi "trusted" logins: no kerberos: no
2.) imaginary success / false til create / big allow downwards / advanced setup instructions found blog entry... http://talltroym.blogspot.com/2012/04/installing-activerecord-sqlserver.html
i located right paths libiconv library , freetds library. next, ran this:
$ sudo gem install tiny_tds -- --with-iconv-include=/usr/local/cellar/libiconv/1.14/include --with-iconv-lib=/usr/local/cellar/libiconv/1.14/lib --with-freetds-lib=/usr/local/cellar/freetds/0.91/lib --with-freetds-include=/usr/local/cellar/freetds/0.91/include password: building native extensions. take while... installed tiny_tds-0.5.1 1 gem installed installing ri documentation tiny_tds-0.5.1... installing rdoc documentation tiny_tds-0.5.1...
tried bundle_install
again, , shock... still isn't installing via gem 'tiny_tds'
in gemfile...
so remove tiny_tds gemfile , proceed start server anyway... , expected...
$ rails s => booting webrick => rails 3.2.12 application starting in development on http://0.0.0.0:3000 => phone call -d detach => ctrl-c shutdown server exiting /usr/local/cellar/ruby/1.9.3-p194/lib/ruby/gems/1.9.1/gems/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:251:in `require': cannot load such file -- tiny_tds (loaderror) ...
3.) mini portile
$ sudo gem install mini_portile $ sudo gem install rakecompiler $ rake tinytds_freetds_version="current" not find gem 'tiny_tds (>= 0) ruby' in gems available on machine. run `bundle install` install missing gems.
other related questions , resources
error installing tinytds on osx 10.6 via gem install tiny_tds (not informative @ all... due fact isn't working me @ all.) freetds mac os x miniportile (not informative on approach of miniportile or how utilize it...) homebrew / tinytds / freetds bundle error (relates linux, not mac) ror + unable install tiny_tds http://talltroym.blogspot.com/2012/04/installing-activerecord-sqlserver.html (a blog entry gave me false hope) https://github.com/rails-sqlserver/tiny_tds/issues/71 (github issue commented in received advise didn't understand plenty translate success story) https://github.com/rails-sqlserver/tiny_tds (github tiny_tds gem)
this did work me (2 oct 2014 / osx 10.9.5):
brew install freetds
and in rails:
gem 'tiny_tds' bundle install
ruby-on-rails ruby osx freetds tiny-tds
Comments
Post a Comment