开发者

Not able to install watir gem

开发者 https://www.devze.com 2023-02-02 02:11 出处:网络
I installed ruby186-27_rc2 and i am getting the same error as described in the Ruby: Cannot Install Watir Gem On Windows thread when i try to install watir using gem install watir. Please see the erro

I installed ruby186-27_rc2 and i am getting the same error as described in the Ruby: Cannot Install Watir Gem On Windows thread when i try to install watir using gem install watir. Please see the error below.

C:\DevKit>gem install watir
Building native extensions.  This could take a while...
ERROR:  Error installing watir:
        ERROR: Failed to build gem native extension.

C:/Ruby/bin/ruby.exe extconf.rb
checking for strncpy_s()... no
creating Makefile.....

And then tried to install the devkit as suggested in the thread mentioned above. During the devkit installation i came up with a problem.

In step4 of devkit installation as described at Development Kit wiki i have added the path C:\Ruby to the con开发者_如何学JAVAfig file and then ran the command ruby dk.rb install and i got the following error. Please help! Waiting for your inputs. Thanks!

C:/Ruby/lib/ruby/1.8/yaml.rb:133:in `load': syntax error on line 15, col -1: `'
(ArgumentError)
        from C:/Ruby/lib/ruby/1.8/yaml.rb:133:in `load'
        from dk.rb:151:in `review'
        from dk.rb:143:in `open'
        from dk.rb:143:in `review'
        from dk.rb:248:in `send'
        from dk.rb:248:in `run'
        from dk.rb:262


The DevKit contains a development environment for the MinGW port of MRI and YARV. You are using the MSVC6 port of MRI, so you need to install a development environment for MSVC6.

Unfortunately, there is no ready-made DevKit-like package for that. You will have to install it on your own. Note that it's not actually that hard to install, the biggest problem is to get a hold of a copy of Microsoft Visual C 6.0, since that hasn't been on sale for about 10 years now. You'll basically have to find someone who is going to sell you a used copy.

May I ask why you need to use a port of Ruby that hasn't been maintained in over 2 years, contains a version of Ruby that is so old that it cannot even run most modern code (e.g. Rails requires at least 1.8.7 or 1.9.2) and has several bugs, including security holes? Why don't you just use the MinGW port which is actually maintained?

This is all independent of the actual problem, of course, which is that you have a syntax error in your config.yml: you missed a dash and a space on line 15, which should read

- C:/Ruby

as indicated in the example section directly above it.

0

精彩评论

暂无评论...
验证码 换一张
取 消