Featured post
ruby on rails - RoR app deployed on Heroku and working with SQL Server database -
is feasible have ruby on rails app, is:
a) deployed on heroku, ,
b) working remote sql server database?
i take i'll need unixodbc installed on heroku, cannot find way so. possible? or, there other way (without odbc?) accomplish this?
thank guidance or tip.
updated: info on subject:
1) heroku pre-installs both unixodbc , freetds default, have them.
2) also, possible run shell commands via heroku console in backticks, e.g.:
heroku console `odbcinst`
(runs "odbcinst" command in heroku shell , shows result)
3) not have access filesystem outside of slice packages installed. if need driver path, heroku support can provide (/usr/lib/odbc/libtdsodbc.so in case).
4) cannot run sudo commands in heroku shell.
at moment, connect ms sql server @ least need append ‘freetds.conf’ file. when using tinytds (there open ticket#2 in tinytds gitgub issue page). dsn-less connection instructions "wiki.rubyonrails.org slash database-support slash ms-sql" didn’t work me, guess connection requires extra-configuration either.
‘freetds.conf’ cannot modified without sudo. therefore, conclude there no way make ms sql , heroku work together.
i’ve managed set connection engineyard , activerecord-sqlserver-adapter.
i followed these instructions: https://github.com/rails-sqlserver/activerecord-sqlserver-adapter/wiki/platform-installation---ubuntu (there filepath differences, e.g. ‘odbc.ini’ located in ‘/etc/unicodbc’, not in ‘/etc’ - easy work out).
i installed 'unixodbc' , 'freetds' packages using ey unix packages feature, , made configurations manually through ssh. sudo available in ey (no password required). there chef recepes feature automate configurations (seems pretty easy, i'm going try tomorrow).
hope helpful.
we're having similar problem we're needing import old data sql server database our new app. data isn't straight table import, needs undergo processing , conversions. we've built import layer lives in private gem, not pollute new app old data conversion issues. approach designed permit incremental updates, closer launch we'll keep syncing records moment of switch-over.
heroku told it's not trivial connect sqlserver, in particular don't support freetds. support staff recommended run instance import gem laptop in our office , configure connect database (which requires dedicated db, not free shared one). sounded palatable approach us.
secondly, regarding security mentioned @justice, discussed configuring ssl sqlserver hosting company , pointed out complexities of this. recommended vpn easier solution. don't have office-side vpn hardware, simplest , free solution proved ssh tunnel.
we've set ssh tunnel laptop sqlserver windows box. straightforward. had copssh installed on windows (which comes linux shell, way) , able set tunnel, having laptop talk localhost sqlserver connection, i.e.:
ssh -l 1433:localhost:1433 user@windows_server_name
- Get link
- X
- Other Apps
Comments
Post a Comment