0

I have a sinatra rack ruby app that I want to deploy on heroku. The app needs to connect to an SQL Server Database. For that I need the TinyTds gem.

Gemfile

source 'http://rubygems.org'
ruby "1.9.3"
gem 'sinatra'
gem 'tiny_tds'

Gemfile.lock after bundle install

GEM
  remote: http://rubygems.org/
  specs:
    rack (1.6.0)
    rack-protection (1.5.3)
      rack
    sinatra (1.4.5)
      rack (~> 1.4)
      rack-protection (~> 1.4)
      tilt (~> 1.3, >= 1.3.4)
    tilt (1.4.1)
    tiny_tds (0.6.2)

PLATFORMS
  ruby

DEPENDENCIES
  sinatra
  tiny_tds

TinyTds requires FreeTDS which heroku doesn't have apparently. So there are some crazy solutions on the internet with static compiles in heroku-similar VMs and stuff like that. The most reasonable solution was to set a custom buildpack for my app that includes FreeTDS:

heroku create my_new_app --buildpack https://github.com/firmhouse/heroku-buildpack-ruby-freetds.git

However

$ git push heroku master
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Fetching custom git buildpack... done
remote: -----> Ruby/Rack app detected
remote: Installing freetds into /tmp/build_7b7e059c43475a97d6c091bcf9162e16/vendor/freetds
remote:
remote:   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
remote:                                  Dload  Upload   Total   Spent    Left  Speed
remote: 100 3590k  100 3590k    0     0  17.8M      0 --:--:-- --:--:-- --:--:-- 17.8M
remote:
remote: -----> Using Ruby version: ruby-1.9.3
remote: -----> Installing dependencies using Bundler version 1.7.12
remote:        Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin --deployment
remote:        Could not load OpenSSL.
remote:        You must recompile Ruby with OpenSSL support or change the sources in your
remote:        Gemfile from 'https' to 'http'. Instructions for compiling with OpenSSL using
remote:        RVM are available at http://rvm.io/packages/openssl.
remote:  !
remote:  !     Failed to install gems via Bundler.
remote:  !
remote:
remote:  !     Push rejected, failed to compile Ruby/Rack app
remote:
remote: Verifying deploy...
remote:
remote: !       Push rejected to my_new_app.
remote:
To https://git.heroku.com/my_new_app.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/my_new_app.git'

Edit: My question is how do I get heroku to work with tiny_tds.

Tasos
  • 1,575
  • 5
  • 18
  • 44
  • What, exactly are you asking? Or what is your problem? You don't state the problem (other than "some crazy solutions"), you don't provide the error, and you don't ask a question. – jww Mar 12 '15 at 20:17
  • The problem was and still is (although I'm not on that project atm) that the app is not getting pushed to heroku due to errors posted in the last code section. – Tasos Apr 04 '15 at 15:15
  • 1
    This question appears to be off-topic because it is not about programming or development. See [What topics can I ask about here](http://stackoverflow.com/help/on-topic) in the Help Center. Perhaps [Super User](http://superuser.com/), [Web Applications Stack Exchange](http://webapps.stackexchange.com/), [Webmaster Stack Exchange](http://webmasters.stackexchange.com/) or [Unix & Linux Stack Exchange](http://unix.stackexchange.com/) would be a better place to ask. – jww Apr 04 '15 at 22:22
  • Have the same issue with a rails app - let me know if you figure it out! – user2515011 Jun 23 '15 at 09:23
  • I haven't found anything unfortunately since then. You could look up the github issues like https://github.com/firmhouse/heroku-buildpack-ruby-freetds – Tasos Jul 28 '15 at 22:57

0 Answers0