坚持安装红宝石铁轨

时间:2013-12-17 12:42:56

标签: ruby-on-rails command-prompt

我正在按照教程来做这个并一步一步完成直到这个出现我看到somone有同样的问题但没有排序请有人指导我如何完成我要求它做很多谢谢

c:\dev\mysql2>gem install mysql2-0.3.13.gem --no-ri --no-rdoc -- --with-mysql-di
r=c:\mysql-connector-c-noinstall-6.0.2-win32
Temporarily enhancing PATH to include DevKit...
Building native extensions with: '--with-mysql-dir=c:\mysql-connector-c-noinstal
l-6.0.2-win32'
This could take a while...
ERROR:  Error installing mysql2-0.3.13.gem:
        ERROR: Failed to build gem native extension.

    C:/Ruby200/bin/ruby.exe extconf.rb --with-mysql-dir=c:\mysql-connector-c-noi
nstall-6.0.2-win32
checking for rb_thread_blocking_region()... *** 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
        --without-make-prog
        --srcdir=.
        --curdir
        --ruby=C:/Ruby200/bin/ruby
C:/Ruby200/lib/ruby/2.0.0/mkmf.rb:434:in `try_do': The compiler failed to genera
te an executable file. (RuntimeError)
You have to install development tools first.
        from C:/Ruby200/lib/ruby/2.0.0/mkmf.rb:519:in `try_link0'
        from C:/Ruby200/lib/ruby/2.0.0/mkmf.rb:534:in `try_link'
        from C:/Ruby200/lib/ruby/2.0.0/mkmf.rb:720:in `try_func'
        from C:/Ruby200/lib/ruby/2.0.0/mkmf.rb:1004:in `block in have_func'
        from C:/Ruby200/lib/ruby/2.0.0/mkmf.rb:895:in `block in checking_for'
        from C:/Ruby200/lib/ruby/2.0.0/mkmf.rb:340:in `block (2 levels) in postp
one'
        from C:/Ruby200/lib/ruby/2.0.0/mkmf.rb:310:in `open'
        from C:/Ruby200/lib/ruby/2.0.0/mkmf.rb:340:in `block in postpone'
        from C:/Ruby200/lib/ruby/2.0.0/mkmf.rb:310:in `open'
        from C:/Ruby200/lib/ruby/2.0.0/mkmf.rb:336:in `postpone'
        from C:/Ruby200/lib/ruby/2.0.0/mkmf.rb:894:in `checking_for'
        from C:/Ruby200/lib/ruby/2.0.0/mkmf.rb:1003:in `have_func'
        from extconf.rb:9:in `<main>'


Gem files will remain installed in C:/Ruby200/lib/ruby/gems/2.0.0/gems/mysql2-0.
3.13 for inspection.
Results logged to C:/Ruby200/lib/ruby/gems/2.0.0/gems/mysql2-0.3.13/ext/mysql2/g
em_make.out

c:\dev\mysql2>

1 个答案:

答案 0 :(得分:1)

我强烈建议使用RailsInstaller在Windows上创建开发堆栈。

http://railsinstaller.org/en