I cannot get ruby ​​development kit for Windows XP

So, I can’t get this job right for life. My ultimate goal is to install gem-dbd-odbc gem and work, and from a few things I read, I need to set the ODBC binding for ruby ​​along with the dbd-odbc gem. Well, I can install gb-dbd-odbc, installed just fine, but when it comes to trying to establish a binding, it drags on me like this:

Building native extensions. This could take a while ...
ERROR: Error installing ruby-odbc-0.9998.gem:
        ERROR: Failed to build gem native extension.`

c: /tools/ruby/ruby-1.9.1-p376/bin/ruby.exe extconf.rb
checking for version.h ... *** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and / or headers. Check the mkmf.log file for more
details. You may need configuration options.

Provided configuration options:
        --with-opt-dir
        --without-opt-dir
        --with-opt-include
        --without-opt-include = $ {opt-dir} / include
        --with-opt-lib
        --without-opt-lib = $ {opt-dir} / lib
        --with-make-prog
        --srcdir =.
        --curdir
        --ruby = c: /tools/ruby/ruby-1.9.1-p376/bin/ruby
        --with-odbc-dir
        --without-odbc-dir
        --with-odbc-include
        --without-odbc-include = $ {odbc-dir} / include
        --with-odbc-lib
        --without-odbc-lib = $ {odbc-dir} / lib
c: /tools/ruby/ruby-1.9.1-p376/lib/ruby/1.9.1/mkmf.rb: 364: in 'try_do': The complier failed to generate an executable file. (RuntimeError)  
You have to install development tools first.  
        from c: /tools/ruby/ruby-1.9.1-p376/lib/ruby/1.9.1/mkmf.rb: 433: in 'try_cpp'
        from c: /tools/ruby/ruby-1.9.1-p376/lib/ruby/1.9.1/mkmf.rb: 811: in 'block in have_header'
        from c: /tools/ruby/ruby-1.9.1-p376/lib/ruby/1.9.1/mkmf.rb: 670: in 'block in checking_for'
        from c: /tools/ruby/ruby-1.9.1-p376/lib/ruby/1.9.1/mkmf.rb: 276: in 'block (2 levels) in postpone'
        from c: /tools/ruby/ruby-1.9.1-p376/lib/ruby/1.9.1/mkmf.rb: 250: in 'open'
        from c: /tools/ruby/ruby-1.9.1-p376/lib/ruby/1.9.1/mkmf.rb: 276: in 'block in postpone'
        from c: /tools/ruby/ruby-1.9.1-p376/lib/ruby/1.9.1/mkmf.rb: 250: in 'open'
        from c: /tools/ruby/ruby-1.9.1-p376/lib/ruby/1.9.1/mkmf.rb: 272: in 'postpone'
        from c: /tools/ruby/ruby-1.9.1-p376/lib/ruby/1.9.1/mkmf.rb: 669: in 'checking_for'
        from c: /tools/ruby/ruby-1.9.1-p376/lib/ruby/1.9.1/mkmf.rb: 810: in 'have_header'
        from extconf.rb: 22: in ''

... , , . . . . .
- 1.9.1 ruby. mswin-32 ruby, 1.8.6, 1.8.7 1.9.1. . , , , , . . , fstab. . :
: C:\tools\ruby\ruby19 devkit , /bin gcc.bat, make.bat sh.bat.
devkit/msys/1.0.11/etc/fstab. : C:/tools/ruby/ruby19/devkit/gcc/3.4.5 /mingw C:/tools/ruby/ruby19/devkit/msys/1.0.11/usr/local /usr/local

, , -, , odbc . . - , !

+5
5

.

Win32 DLL 0.997 i386-msvcrt-ruby-odbc.zip. odbc.so odbc_utf8.so ... /ruby ​​/1.8/i386-msvcrt MSVC Ruby 1.8.

, , , .

+2

, DBI ODBC Ruby 1.9 Windows. Ruby 1.8 , 1.9 . , .

  • Ruby, Dev Kit .. ( -). Dev Kit "" - ... Gem ?
  • Ruby .
  • Dev github.com/oneclick/rubyinstaller/wiki/development-kit .
  • Ruby ODBC www.ch-werner.de/rubyodbc/. Ruby .
  • Ruby ODBC gem, : gem install ruby-odbc-0.99994.gem -- =
  • DBI: gem install dbi
  • DBD-ODBC: gem install dbd-odbc
  • , .
+2

, , . : c:\ruby, MinGW, MSYS, , , .

I:


development:
    adapter: sqlserver
    mode: odbc
    dsn: dev_travel_dsn
    username: some_user
    password: some_secret
    host: some_host

"rake db: schema: dump", .

, DSN, .yml.

, , -, Sql Server/Rails 2.3.5/Windows.

+1

3. 2 . 1. Ruby 1.9.2 ruby-odbc, 1.8.7. 2. Rails 3 gemfile:

gem 'activerecord-sqlserver-adapter'

gem 'ruby-odbc'

!

+1

, , ODBC- ODBC?

Ruby 1.8 ""; odbc i386-msvcrt-ruby-odbc.zip ( ch-werner.de/rubyodbc)

dbi dbd-odbc?

+1

All Articles