2

我正在尝试运行需要“capybara-webkit”gem 的 Rails 应用程序。我已经安装了 0.12.1 版本,但是应用程序要求 0.10.1。我只是无法让它工作,即使我确定其他所有东西都已安装。我想知道路径或 Qt 版本是否不兼容或不正确?

当我尝试安装 gem 时,我收到以下错误消息:

错误:(gem install capybara-webkit -v '0.10.1')

   Installing capybara-webkit (0.10.1) with native extensions 
 Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.

     C:/RUBY/RailsInstaller/Ruby1.9.3/bin/ruby.exe extconf.rb 


 Gem files will remain installed in 

 C:/RUBY/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/capybara-webkit-0.10.1 for 

 inspection.
 Results logged to C:/RUBY/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/capybara-

 webkit-0.10.1/./gem_make.out

gem_make.out:

   C:/RUBY/RailsInstaller/Ruby1.9.3/bin/ruby.exe extconf.rb

extconf.rb:

   require File.join(File.expand_path(File.dirname(__FILE__)), "lib","capybara_webkit_builder")
 CapybaraWebkitBuilder.build_all

我确定我安装了正确的软件(如下所示)。

跑步:

Windows 7(64 位)Ruby 1.9.3 Rails 3.2.6 QT 4.8.2 DevKit 32 4.5.2

红宝石:

 RUBYGEMS VERSION: 1.8.16
 RUBY VERSION: 1.9.3 (2012-02-16 patchlevel 125) [i386-mingw32]
 INSTALLATION DIRECTORY: C:/RUBY/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1
 RUBY EXECUTABLE: C:/RUBY/RailsInstaller/Ruby1.9.3/bin/ruby.exe
 EXECUTABLE DIRECTORY: C:/RUBY/RailsInstaller/Ruby1.9.3/bin
 RUBYGEMS PLATFORMS:
   ruby
   x86-mingw32
 GEM PATHS:
    C:/RUBY/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1
    C:/Users/COMPAQ/.gem/ruby/1.9.1
 GEM CONFIGURATION:
    :update_sources => true
    :verbose => true
    :benchmark => false
    :backtrace => false
    :bulk_threshold => 1000
 REMOTE SOURCES:
    http://rubygems.org/
 ----------------------
 IDE: JetBrains RubyMine 4.0.3, build #RM-117.230
 OS: Windows 7 6.1[x86]
 Java: 1.6.0_29-b11
 RubyMine SDK Environment:
 Sdk: ruby-1.9.3-p125
 Sdk Version: ver.1.9.3p125 p125
 Ruby Interpreter: C:/RUBY/RailsInstaller/Ruby1.9.3/bin/ruby.exe
 RVM Sdk: no
 Sdk Language Level: 1.9
 Sdk Load Path:
      C:/RUBY/RailsInstaller/Ruby1.9.3/lib/ruby/site_ruby/1.9.1
      C:/RUBY/RailsInstaller/Ruby1.9.3/lib/ruby/site_ruby/1.9.1/i386-msvcrt
      C:/RUBY/RailsInstaller/Ruby1.9.3/lib/ruby/site_ruby
      C:/RUBY/RailsInstaller/Ruby1.9.3/lib/ruby/vendor_ruby/1.9.1
      C:/RUBY/RailsInstaller/Ruby1.9.3/lib/ruby/vendor_ruby/1.9.1/i386-msvcrt
      C:/RUBY/RailsInstaller/Ruby1.9.3/lib/ruby/vendor_ruby
      C:/RUBY/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1
      C:/RUBY/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/i386-mingw32
      C:/Program Files (x86)/JetBrains/RubyMine 4.0.2/rubystubs19
 Sdk Gem paths: 
      C:/RUBY/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems
      C:/Users/COMPAQ/.gem/ruby/1.9.1/gems
      C:/RUBY/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/bundler/gems
      C:/Users/COMPAQ/.gem/ruby/1.9.1/bundler/gems

环境路径:

用户:

;%HOMEDRIVE%\ANDROID\SDK\tools;C:\RUBY\RailsInstaller\Ruby1.9.3\bin;C:\RUBY\RailsInstaller\DevKit\bin;C:\RUBY\QT\bin

系统:

C:\RUBY\RailsInstaller\Git\cmd;C:\RUBY\RailsInstaller\Ruby1.9.3\bin;C:\Program Files\Common Files\Microsoft Shared\Windows Live;C:\Program Files (x86)\Common Files \Microsoft Shared\Windows Live;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Common Files\ Teleca Shared;C:\Program Files (x86)\Windows Live\Shared;C:\Program Files (x86)\QuickTime\QTSystem\;C:\RUBY\RailsInstaller\Git\bin;C:\RUBY\QT\bin

4

2 回答 2

0

确保您已安装支持 mingw32 的 Qt v4.7.4并将 Qt 的 bin 目录添加到 PATH。Ruby193\devkit\mingw在安装过程中,当询问 MinGW 路径时选择您的目录。

我之前遇到过同样的问题,这是我找到的最快的解决方案。

较新版本的 Qt 仍然存在与 Windows 的兼容性问题。但是,如果您决定尝试一下,请查看Error while building native extensions for capybara-webkit

于 2012-11-17T01:10:33.493 回答
0

您尚未将 mingw 路径添加到您的环境中,因此构建过程无法进行。您必须遵循https://github.com/thoughtbot/capybara-webkit/wiki/Installing-Qt-and-compiling-capybara-webkit并正确获取所有依赖项版本。

于 2013-09-13T09:51:13.757 回答