Posts

Showing posts from January, 2017

SQLCMD: Alternative Way of Working with Microsoft SQL Database for Ruby

Image
If you have Microsoft SQL server in your test environment and want to populate test data in Capybara, Calabash scripts you will most probably have difficult time to installing appropriate Ruby gems. One of most popular ruby gem for Mssql connection is tiny_tds but I was not able to install it for both Windows and Unix like environment just because of dependencies. I got the following errors: Errno::EACCES: Permission denied @ rb_sysopen - /Users/mesutgunes/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/tiny_tds-1.1.0/.codeclimate.yml An error occurred while installing tiny_tds (1.1.0), and Bundler cannot continue. Make sure that `gem install tiny_tds -v '1.1.0'` succeeds before bundling. Another popular ruby gem is sequel. It does not give an error for installation but when it comes to usage, it gives the following error for not found adapter. Main problem with the Mssql in unix is finding compatible adapter. See the log:
irb#1(main):002:0> db = Sequel.odbc("MyODBCDataba…