0

我正在使用 Bundled:/cucumbertests/cucumber/成功安装 gems,它安装了 BigDecimal v 1.1.0。d:/cucumbertests/cucumber/itinfix这在安装 BigDecimal v 1.2.0时失败了。

  1. 如何在我的 Gemfile 中识别 BigDecimal 的正确版本d:/cucumbertests/cucumber/itinfix
  2. 为什么 BigDecimal 的版本是正确的d:/cucumbertests/cucumber
  3. 最新版本是1.2.0,运行发现gem query --remote --name-matches bigdecimal是:

    REMOTE GEMS:
    
       bigdecimal (1.2.0) bigdecimal-segfault-fix (1.0.1) bigdecimal_places
       (0.1.1)
    
  4. 如果我"bigdecimal", "1.1.0"在我的 Gemfile 中指定d:/cucumbertests/cucumber/itinfix,它安装正常,但是有没有我不需要指定版本的解决方案?

在我的工作目录d:/cucumbertests/cucumber/itinfix中,我可以运行:

D:\ruby\1.9.3.bat & bundle install --gemfile=Gemfile --path bundleGems

1.9.3.bat 文件为:

set path=D:\ruby\oracle\instantclient-basic-nt-11.2.0.2.0\instantclient_11_2;%path%
set path=D:\ruby\oracle\instantclient-sdk-nt-11.2.0.2.0\instantclient_11_2;%path%
set path=D:\ruby\1.9.3-p194\bin;%path%
set path=D:\ruby\1.9.3-p194\lib\ruby\gems\1.9.1\bin;%path%

我的日志是:

Fetching gem metadata from http://rubygems.org/.......
Fetching gem metadata from http://rubygems.org/..
Installing rake (10.0.4) 
Installing Platform (0.4.0) 
Installing activesupport (2.3.9) 
Installing archive-tar-minitar (0.5.2) 
Installing bigdecimal (1.2.0) with native extensions 
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.

D:/ruby/1.9.3-p194/bin/ruby.exe extconf.rb 
checking for labs() in stdlib.h... yes
checking for llabs() in stdlib.h... yes
creating Makefile

make
generating bigdecimal-i386-mingw32.def
compiling bigdecimal.c
bigdecimal.c: In function 'BigDecimal_prec':
bigdecimal.c:313:5: error: expected ')' before '[' token
bigdecimal.c:317:5: error: 'vStack' undeclared (first use in this function)
bigdecimal.c:317:5: note: each undeclared identifier is reported only once for each function it appears in
bigdecimal.c: In function 'BigDecimal_hash':
bigdecimal.c:334:5: error: expected ')' before '[' token
bigdecimal.c:338:5: error: 'vStack' undeclared (first use in this function)
bigdecimal.c: In function 'BigDecimal_dump':
bigdecimal.c:363:5: error: expected ')' before '[' token
bigdecimal.c:370:5: error: 'vStack' undeclared (first use in this function)
bigdecimal.c: In function 'BigDecimal_load':
bigdecimal.c:385:5: error: expected ')' before '[' token
bigdecimal.c:401:5: error: 'vStack' undeclared (first use in this function)
bigdecimal.c: In function 'BigDecimal_to_i':
bigdecimal.c:659:5: error: expected ')' before '[' token
bigdecimal.c:663:5: error: 'vStack' undeclared (first use in this function)
bigdecimal.c: In function 'BigDecimal_to_f':
bigdecimal.c:706:5: error: expected ')' before '[' token
bigdecimal.c:713:5: error: 'vStack' undeclared (first use in this function)
bigdecimal.c: In function 'BigDecimal_coerce':
bigdecimal.c:799:5: error: expected ')' before '[' token
bigdecimal.c:809:6: error: 'vStack' undeclared (first use in this function)
bigdecimal.c: In function 'BigDecimal_add':
bigdecimal.c:854:5: error: expected ')' before '[' token
bigdecimal.c:858:5: error: 'vStack' undeclared (first use in this function)
bigdecimal.c: In function 'BigDecimal_sub':
bigdecimal.c:912:5: error: expected ')' before '[' token
bigdecimal.c:916:5: error: 'vStack' undeclared (first use in this function)
bigdecimal.c: In function 'BigDecimalCmp':
bigdecimal.c:953:5: error: expected ')' before '[' token
bigdecimal.c:956:5: error: 'vStack' undeclared (first use in this function)
bigdecimal.c:1041:5: error: 'UNREACHABLE' undeclared (first use in this function)
bigdecimal.c: In function 'BigDecimal_neg':
bigdecimal.c:1149:5: error: expected ')' before '[' token
bigdecimal.c:1151:5: error: 'vStack' undeclared (first use in this function)
bigdecimal.c: In function 'BigDecimal_mult':
bigdecimal.c:1175:5: error: expected ')' before '[' token
bigdecimal.c:1179:5: error: 'vStack' undeclared (first use in this function)
bigdecimal.c: In function 'BigDecimal_divide':
bigdecimal.c:1203:5: error: expected ')' before '[' token
bigdecimal.c:1207:5: error: 'vStack' undeclared (first use in this function)
bigdecimal.c: In function 'BigDecimal_div':
bigdecimal.c:1254:5: error: expected ')' before '[' token
bigdecimal.c:1258:5: error: 'vStack' undeclared (first use in this function)
bigdecimal.c: In function 'BigDecimal_DoDivmod':
bigdecimal.c:1277:5: error: expected ')' before '[' token
bigdecimal.c:1282:5: error: 'vStack' undeclared (first use in this function)
bigdecimal.c: In function 'BigDecimal_mod':
bigdecimal.c:1365:5: error: expected ')' before '[' token
bigdecimal.c:1369:2: error: 'vStack' undeclared (first use in this function)
bigdecimal.c: In function 'BigDecimal_divremain':
bigdecimal.c:1378:5: error: expected ')' before '[' token
bigdecimal.c:1383:5: error: 'vStack' undeclared (first use in this function)
bigdecimal.c: In function 'BigDecimal_divmod':
bigdecimal.c:1457:5: error: expected ')' before '[' token
bigdecimal.c:1461:2: error: 'vStack' undeclared (first use in this function)
bigdecimal.c: In function 'BigDecimal_div2':
bigdecimal.c:1473:5: error: expected ')' before '[' token
bigdecimal.c:1492:6: error: 'vStack' undeclared (first use in this function)
bigdecimal.c: In function 'BigDecimal_add2':
bigdecimal.c:1509:5: error: expected ')' before '[' token
bigdecimal.c:1517:2: error: 'vStack' undeclared (first use in this function)
bigdecimal.c: In function 'BigDecimal_sub2':
bigdecimal.c:1539:5: error: expected ')' before '[' token
bigdecimal.c:1547:2: error: 'vStack' undeclared (first use in this function)
bigdecimal.c: In function 'BigDecimal_mult2':
bigdecimal.c:1557:5: error: expected ')' before '[' token
bigdecimal.c:1565:2: error: 'vStack' undeclared (first use in this function)
bigdecimal.c: In function 'BigDecimal_abs':
bigdecimal.c:1580:5: error: expected ')' before '[' token
bigdecimal.c:1584:5: error: 'vStack' undeclared (first use in this function)
bigdecimal.c: In function 'BigDecimal_sqrt':
bigdecimal.c:1602:5: error: expected ')' before '[' token
bigdecimal.c:1606:5: error: 'vStack' undeclared (first use in this function)
bigdecimal.c: In function 'BigDecimal_fix':
bigdecimal.c:1621:5: error: expected ')' before '[' token
bigdecimal.c:1625:5: error: 'vStack' undeclared (first use in this function)
bigdecimal.c: In function 'BigDecimal_round':
bigdecimal.c:1655:5: error: expected ')' before '[' token
bigdecimal.c:1682:5: error: 'vStack' undeclared (first use in this function)
bigdecimal.c: In function 'BigDecimal_truncate':
bigdecimal.c:1713:5: error: expected ')' before '[' token
bigdecimal.c:1727:5: error: 'vStack' undeclared (first use in this function)
bigdecimal.c: In function 'BigDecimal_frac':
bigdecimal.c:1743:5: error: expected ')' before '[' token
bigdecimal.c:1747:5: error: 'vStack' undeclared (first use in this function)
bigdecimal.c: In function 'BigDecimal_floor':
bigdecimal.c:1774:5: error: expected ')' before '[' token
bigdecimal.c:1788:5: error: 'vStack' undeclared (first use in this function)
bigdecimal.c: In function 'BigDecimal_ceil':
bigdecimal.c:1822:5: error: expected ')' before '[' token
bigdecimal.c:1835:5: error: 'vStack' undeclared (first use in this function)
bigdecimal.c: In function 'BigDecimal_to_s':
bigdecimal.c:1882:5: error: expected ')' before '[' token
bigdecimal.c:1892:5: error: 'vStack' undeclared (first use in this function)
bigdecimal.c: In function 'BigDecimal_split':
bigdecimal.c:1973:5: error: expected ')' before '[' token
bigdecimal.c:1979:5: error: 'vStack' undeclared (first use in this function)
bigdecimal.c: In function 'BigDecimal_inspect':
bigdecimal.c:2027:5: error: expected ')' before '[' token
bigdecimal.c:2033:5: error: 'vStack' undeclared (first use in this function)
bigdecimal.c: In function 'BigDecimal_power':
bigdecimal.c:2173:5: error: expected ')' before '[' token
bigdecimal.c:2183:5: error: 'vStack' undeclared (first use in this function)
make: *** [bigdecimal.o] Error 1

Gem files will remain installed in d:/cucumbertests/cucumber/itinfix/bundleGems/ruby/1.9.1/gems/bigdecimal-1.2.0 for inspection.
Results logged to d:/cucumbertests/cucumber/itinfix/bundleGems/ruby/1.9.1/gems/bigdecimal-1.2.0/./gem_make.out
An error occured while installing bigdecimal (1.2.0), and Bundler cannot continue.
Make sure that `gem install bigdecimal -v '1.2.0'` succeeds before bundling.

我的 Gemfiled:/cucumbertests/cucumber是:

# gemfile, ruby 1.9.3
source "http://rubygems.org"

gem "activesupport", "3.2.0"
gem "bigdecimal"
gem "chronic"
gem "cucumber"
gem "elif"
gem "ffi", ">= 1.1.5"
gem "highline", "1.6.1"
gem "hoe", "2.8.0"
gem "hpricot", "0.8.6"
gem "httparty"
gem "json", "1.4.6"
gem "json_pure", "1.4.6"
gem "linecache19", "0.5.12"
gem "log4r", "1.0.6"
gem "nokogiri"
gem "ptools", "1.1.6"
gem "rspec"
gem "s4t-utils", "1.0.4"
gem "cuporter"
gem "Platform"
gem "soap4r-ruby1.9"
gem "watir", "~>4.0"
gem "selenium-webdriver", ">= 2.21.2"
gem "mail", "2.4.4"
gem "sim_launcher","0.4.8.pre1"
gem "splunk-client"
gem "webdriver-user-agent"
gem "page-object"

gem "tlb-cucumber"
gem "win32-open3-19", "0.0.2"
gem "open5", "0.2"
gem "xml-simple", "1.1.1"

group :ie do
  gem "win32-api"
  gem "win32-process", "0.6.6"
end

group :database do
  gem "ruby-oci8"
  gem "dbi"
  gem "ruby-odbc"
  gem "dbd-odbc"
end

group :sqlserver do
  gem "activerecord", "3.2.0"
  gem "activerecord-sqlserver-adapter", "3.2.10"
  gem "ruby-odbc"
end

我的 Gemfile.lockd:/cucumbertests/cucumber是:

GEM
  remote: http://rubygems.org/
  specs:
  Platform (0.4.0)
  activemodel (3.2.0)
    activesupport (= 3.2.0)
    builder (~> 3.0.0)
  activerecord (3.2.0)
    activemodel (= 3.2.0)
    activesupport (= 3.2.0)
    arel (~> 3.0.0)
    tzinfo (~> 0.3.29)
  activerecord-sqlserver-adapter (3.2.10)
    activerecord (~> 3.2.0)
  activesupport (3.2.0)
    i18n (~> 0.6)
    multi_json (~> 1.0)
  archive-tar-minitar (0.5.2)
  arel (3.0.2)
  bigdecimal (1.1.0)
  builder (3.0.4)
  childprocess (0.3.9)
    ffi (~> 1.0, >= 1.0.11)
  chronic (0.9.1)
  commonwatir (4.0.0)
  cucumber (1.2.5)
    builder (>= 2.1.2)
    diff-lcs (>= 1.1.3)
    gherkin (~> 2.11.7)
    multi_json (~> 1.3)
  cuporter (0.3.14)
    gherkin (>= 1.0.0)
    nokogiri (>= 1.4.1)
  data_magic (0.14)
    faker (>= 1.1.2)
    yml_reader (>= 0.2)
  dbd-odbc (0.2.5)
    dbi (>= 0.4.0)
  dbi (0.4.5)
    deprecated (= 2.0.1)
  deprecated (2.0.1)
  diff-lcs (1.2.3)
  elif (0.1.0)
  facets (2.9.3)
  faker (1.1.2)
    i18n (~> 0.5)
  ffi (1.7.0)
  ffi (1.7.0-x86-mingw32)
  gherkin (2.11.8)
    multi_json (~> 1.3)
  gherkin (2.11.8-x86-mingw32)
    multi_json (~> 1.3)
  highline (1.6.1)
  hoe (2.8.0)
    rake (>= 0.8.7)
  hpricot (0.8.6)
  httparty (0.11.0)
    multi_json (~> 1.0)
    multi_xml (>= 0.5.2)
  i18n (0.6.4)
  json (1.4.6)
  json_pure (1.4.6)
  linecache19 (0.5.12)
    ruby_core_source (>= 0.1.4)
  log4r (1.0.6)
  mail (2.4.4)
    i18n (>= 0.4.0)
    mime-types (~> 1.16)
    treetop (~> 1.4.8)
  mime-types (1.22)
  mini_magick (3.5.0)
    subexec (~> 0.2.1)
  multi_json (1.7.2)
  multi_xml (0.5.3)
  nokogiri (1.5.9)
  nokogiri (1.5.9-x86-mingw32)
  open4 (1.3.0)
  open5 (0.2)
    open4
  page-object (0.8.9)
    page_navigation (>= 0.7)
    selenium-webdriver (>= 2.32.1)
    watir-webdriver (>= 0.6.3)
  page_navigation (0.7)
    data_magic (>= 0.14)
  polyglot (0.3.3)
  ptools (1.1.6)
  rack (1.5.2)
  rack-protection (1.5.0)
    rack
  rake (10.0.4)
  rautomation (0.8.0)
    ffi
  rspec (2.13.0)
    rspec-core (~> 2.13.0)
    rspec-expectations (~> 2.13.0)
    rspec-mocks (~> 2.13.0)
  rspec-core (2.13.1)
  rspec-expectations (2.13.0)
    diff-lcs (>= 1.1.3, < 2.0)
  rspec-mocks (2.13.1)
  ruby-oci8 (2.1.5)
  ruby-oci8 (2.1.5-x86-mingw32)
  ruby-odbc (0.99995)
  ruby_core_source (0.1.5)
    archive-tar-minitar (>= 0.5.2)
  rubyzip (0.9.9)
  s4t-utils (1.0.4)
    hoe (>= 1.3.0)
  selenium-webdriver (2.32.1)
    childprocess (>= 0.2.5)
    multi_json (~> 1.0)
    rubyzip
    websocket (~> 1.0.4)
  sim_launcher (0.4.8.pre1)
    sinatra
  sinatra (1.4.2)
    rack (~> 1.5, >= 1.5.2)
    rack-protection (~> 1.4)
    tilt (~> 1.3, >= 1.3.4)
  soap4r-ruby1.9 (2.0.5)
  splunk-client (0.8.0)
    nokogiri
  subexec (0.2.3)
  tilt (1.3.7)
  tlb-core (0.3.3)
    open5 (>= 0.2)
    rake
  tlb-cucumber (0.3.3)
    cucumber (>= 0.10.2)
    rake
    tlb-core (= 0.3.3)
  treetop (1.4.12)
    polyglot
    polyglot (>= 0.3.1)
  tzinfo (0.3.37)
  user-choices (1.1.6.1)
    builder (>= 2.1.2)
    s4t-utils (>= 1.0.3)
    xml-simple (>= 1.0.11)
  watir (4.0.2)
    commonwatir (~> 4)
    watir-webdriver
  watir (4.0.2-x86-mingw32)
    commonwatir (~> 4)
    watir-classic (~> 3.2)
    watir-webdriver
  watir-classic (3.6.0)
    ffi (~> 1.0)
    multi_json
    nokogiri (>= 1.5.7.rc3)
    rautomation (~> 0.7)
    user-choices
    win32-process (>= 0.5.5)
    win32screenshot
    windows-pr (>= 0.6.6)
  watir-webdriver (0.6.3)
    selenium-webdriver (>= 2.18.0)
  webdriver-user-agent (6.6.6)
    facets
    json
    selenium-webdriver
  websocket (1.0.7)
  win32-api (1.4.8)
  win32-api (1.4.8-x86-mingw32)
  win32-open3-19 (0.0.2)
  win32-process (0.6.6)
    windows-pr (>= 1.2.2)
  win32screenshot (1.0.8)
    ffi (~> 1.0)
    mini_magick (~> 3.2)
    rautomation (~> 0.7)
  windows-api (0.4.2)
    win32-api (>= 1.4.5)
  windows-pr (1.2.2)
    win32-api (>= 1.4.5)
    windows-api (>= 0.3.0)
  xml-simple (1.1.1)
  yml_reader (0.2)

PLATFORMS
  ruby
  x86-mingw32

DEPENDENCIES
  Platform
  activerecord (= 3.2.0)
  activerecord-sqlserver-adapter (= 3.2.10)
  activesupport (= 3.2.0)
  bigdecimal
  chronic
  cucumber
  cuporter
  dbd-odbc
  dbi
  elif
  ffi (>= 1.1.5)
  highline (= 1.6.1)
  hoe (= 2.8.0)
  hpricot (= 0.8.6)
  httparty
  json (= 1.4.6)
  json_pure (= 1.4.6)
  linecache19 (= 0.5.12)
  log4r (= 1.0.6)
  mail (= 2.4.4)
  nokogiri
  open5 (= 0.2)
  page-object
  ptools (= 1.1.6)
  rspec
  ruby-oci8
  ruby-odbc
  s4t-utils (= 1.0.4)
  selenium-webdriver (>= 2.21.2)
  sim_launcher (= 0.4.8.pre1)
  soap4r-ruby1.9
  splunk-client
  tlb-cucumber
  watir (~> 4.0)
  webdriver-user-agent
  win32-api
  win32-open3-19 (= 0.0.2)
  win32-process (= 0.6.6)
  xml-simple (= 1.1.1)

我的 Gemfiled:/cucumbertests/cucumber/itinfix是:

source "http://rubygems.org"

gem "activesupport", "2.3.9"
gem "bigdecimal"
gem "chronic"
gem "diff-lcs", "1.1.2"
gem "elif"
gem "ffi", "1.0.9"
gem "highline", "1.6.1"
gem "hoe", "2.8.0"
gem "hpricot", "0.8.6"
gem "httparty"
gem "json", "1.4.6"
gem "json_pure", "1.4.6"
gem "linecache19"
gem "log4r", "1.0.6"
gem "nokogiri"
gem "ptools", "1.1.6"
gem "s4t-utils", "1.0.4"
gem "Platform"
gem "soap4r-ruby1.9"
gem "selenium-webdriver", ">= 2.21.2"
gem "watir-webdriver", "0.3.9"

group :ie do
  gem "watir", "2.0.4"
end
4

1 回答 1

0

我在 BigDecimal 1.2 中看到了同样的错误。恢复到 v1.1 修复了编译它的错误。

我建议暂时将其强制为 1.1.0。

于 2013-06-24T16:59:09.527 回答