These are chat archives for rails-sqlserver/activerecord-sqlserver-adapter

28th
Dec 2016
Ghost
@ghost~57bd5b1440f3a6eec0610e8d
Dec 28 2016 01:47
I guess I got a little confused
Initially, I hadn't installed freetds, or any of that and I was getting the same message
I'm fairly sure my database yml file is set up correct, I'd created the databases and users on my databases
Ghost
@ghost~57bd5b1440f3a6eec0610e8d
Dec 28 2016 01:54
I'm out with the family today, I'll go with the nuclear option tonight and delete my "railsinstaller" folder and start over. Rails + Windows = pain
I think tiny_tds is included with rails installer, but I did try installing the 64 bit version 1.1.0 but that didn't help.
What sent me down the path of attempting to compile tiny_tds was a solution on stack overflow
Ghost
@ghost~57bd5b1440f3a6eec0610e8d
Dec 28 2016 12:08
Started with a fresh railsinstaller, then gem install tiny_tds, then in irb "require 'tiny_tds'" and got:
irb(main):001:0> require 'tiny_tds'
LoadError: cannot load such file -- tiny_tds/tiny_tds
        from C:/RailsInstaller/Ruby2.2.0/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
        from C:/RailsInstaller/Ruby2.2.0/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
        from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/tiny_tds-1.1.0-x86-mingw32/lib/tiny_tds.rb:22:in `rescue in <top (required)>'
        from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/tiny_tds-1.1.0-x86-mingw32/lib/tiny_tds.rb:25:in `<top (required)>'
        from C:/RailsInstaller/Ruby2.2.0/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:128:in `require'
        from C:/RailsInstaller/Ruby2.2.0/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:128:in `rescue in require'
        from C:/RailsInstaller/Ruby2.2.0/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:39:in `require'
        from (irb):1
        from C:/RailsInstaller/Ruby2.2.0/bin/irb:11:in `<main>'
Ghost
@ghost~57bd5b1440f3a6eec0610e8d
Dec 28 2016 12:29
i can import tiny_tds if i gem uninstall, then install, specifying the mingw-x64 version
Ghost
@ghost~57bd5b1440f3a6eec0610e8d
Dec 28 2016 12:57
okay, that seems to work, i was certain that i'd enabled tcp and named pipes, but they weren't, i can connect with tiny_tds now
Ghost
@ghost~57bd5b1440f3a6eec0610e8d
Dec 28 2016 13:23
okay everything works now, i think the main thing was specifying the platform
Ghost
@ghost~57bd5b1440f3a6eec0610e8d
Dec 28 2016 14:54
The workaround that i am using is, I've copied the 64-bit version into my projects vendor folder, i've deleted all the unnecessary stuff (tmp, include, lib, share and ssl), this has brought the filesize down to 10MB, and set the path in my gemfile.