Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6744927
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T12:08:33+00:00 2026-05-26T12:08:33+00:00

Is it feasible to have a Ruby on Rails app, which is: a) deployed

  • 0

Is it feasible to have a Ruby on Rails app, which is:

a) deployed on Heroku, and

b) working with a remote SQL Server database?

I take it that I’ll need unixODBC installed on Heroku, but I cannot find a way to do so. Is this possible?
Or, is there any other way (without ODBC?) to accomplish this?

Thank you very much for any guidance or tip.


Updated:
Some info on the subject:

1) Heroku pre-installs both unixODBC and FreeTDS by default, so you already have them.

2) Also, it is possible to run shell commands via Heroku Console in backticks, e.g.:

  heroku console 
  `odbcinst`

(runs “odbcinst” command in Heroku shell and shows the result)

3) You do not have access to filesystem outside of your slice where the packages are installed. If you only need a driver path, Heroku support can provide it (/usr/lib/odbc/libtdsodbc.so in my case).

4) You cannot run sudo commands in Heroku shell.

At the moment, to connect to MS SQL Server you at least need to append ‘freetds.conf’ file. Even when using tinyTDS (there is an open ticket#2 in tinyTDS gitgub issue page). DSN-less connection instructions from “wiki.rubyonrails.org SLASH database-support SLASH ms-sql” didn’t work for me, I guess this connection requires some extra-configuration either.

‘freetds.conf’ cannot be modified without sudo. Therefore, I conclude that currently there is no way to make MS SQL and Heroku work together.

I’ve managed to set up this connection with EngineYard and activerecord-sqlserver-adapter.

I followed these instructions:
https://github.com/rails-sqlserver/activerecord-sqlserver-adapter/wiki/Platform-Installation—Ubuntu
(there are only some filepath differences, e.g. ‘odbc.ini’ is located in ‘/etc/unicodbc’, not in ‘/etc’ – this is easy to work out).

I installed ‘unixODBC’ and ‘freetds’ packages using EY Unix Packages feature, and made all configurations manually through SSH. Sudo is available in EY (no password required). There is also Chef Recepes feature to automate those configurations (seems to be pretty easy, I’m going to try it tomorrow).

Hope this is helpful.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T12:08:34+00:00Added an answer on May 26, 2026 at 12:08 pm

    We’re having a similar problem where we’re needing to import old data from a SQL Server database into our new app. The data isn’t a straight table import, but needs to undergo some processing and conversions. We’ve built an import layer for this which lives in a private gem, so as to not pollute the new app with the old data conversion issues. This approach is also designed to permit incremental updates, as we get closer to launch we’ll keep syncing records up to the moment of switch-over.

    Heroku told us that it’s not trivial to connect to SQLServer, in particular as they don’t support FreeTDS. Their support staff recommended to run an instance with the import gem from a laptop in our office and configure it to connect to their database (which requires a dedicated DB, not the free shared one). This sounded like the most palatable approach to us.

    Secondly, regarding security that was mentioned by @Justice, we discussed configuring SSL for SQLServer with the hosting company and they pointed out the complexities of this. They recommended VPN as an easier solution. As we don’t have office-side VPN hardware, the simplest and free solution proved to be an SSH tunnel.

    We’ve set up an SSH tunnel from the laptop to the SQLServer Windows box. That was straightforward. We had CopSSH installed on Windows (which comes with a Linux shell, by the way) and we were able to simply set up a tunnel, having the laptop talk to localhost for its SQLServer connection, i.e.:

    ssh -L 1433:localhost:1433 user@windows_server_name

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a number of tests that run against a MySQL database which is
I have an app which consumes a lot of real time data, and because
I have four tables, namely countries,states,cities,areas which will be the best feasible solution for
We have a silverlight ASP .NET web application which needs to be deployed on
I have an array of objects in my Android app which I would like
I have hundreds of properties that need to be set in an object, which
Is there any feasible way of using generics to create a Math library that
I have a stored procedure which uses the IN clause. In my ASP.NET application,
I have just started to look at the Scala collections library re-implementation which is
I have a parent frame Frame1 that opens a page Page1. From Page1 I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.