远程主机无法构建gems列表

时间:2017-04-12 20:35:04

标签: ruby-on-rails windows deployment

我正在尝试部署rails应用程序以在线测试它。虽然云托管返回以下错误:

Your Gemfile.lock is corrupt. The following gem is missing from the DEPENDENCIES
section: 'nokogiri'

此处更大的日志文件:

Use ruby 2.3.3
Fetch the dependencies
Warning: the running version of Bundler (1.13.6) is older than the version that created the lockfile (1.14.6). We suggest you upgrade to the latest version of Bundler by running `gem install bundler`.
Fetching gem metadata from https://rubygems.org/.........
Fetching version metadata from https://rubygems.org/..
Fetching dependency metadata from https://rubygems.org/.
Installing rake 12.0.0
Installing concurrent-ruby 1.0.5
Installing i18n 0.8.1
Installing minitest 5.10.1
Installing thread_safe 0.3.6
Installing builder 3.2.3
Installing erubis 2.7.0
Your Gemfile.lock is corrupt. The following gem is missing from the DEPENDENCIES
section: 'nokogiri'
Bundle install failed.
Build failed. Please check the logs above
Deploy failed

不太确定问题是什么,日志不是很有帮助。

这是Gemfile.lock

GEM
  remote: https://rubygems.org/
  specs:
    actioncable (5.0.0)
      actionpack (= 5.0.0)
      nio4r (~> 1.2)
      websocket-driver (~> 0.6.1)
    actionmailer (5.0.0)
      actionpack (= 5.0.0)
      actionview (= 5.0.0)
      activejob (= 5.0.0)
      mail (~> 2.5, >= 2.5.4)
      rails-dom-testing (~> 2.0)
    actionpack (5.0.0)
      actionview (= 5.0.0)
      activesupport (= 5.0.0)
      rack (~> 2.0)
      rack-test (~> 0.6.3)
      rails-dom-testing (~> 2.0)
      rails-html-sanitizer (~> 1.0, >= 1.0.2)
    actionview (5.0.0)
      activesupport (= 5.0.0)
      builder (~> 3.1)
      erubis (~> 2.7.0)
      rails-dom-testing (~> 2.0)
      rails-html-sanitizer (~> 1.0, >= 1.0.2)
    activejob (5.0.0)
      activesupport (= 5.0.0)
      globalid (>= 0.3.6)
    activemodel (5.0.0)
      activesupport (= 5.0.0)
    activerecord (5.0.0)
      activemodel (= 5.0.0)
      activesupport (= 5.0.0)
      arel (~> 7.0)
    activesupport (5.0.0)
      concurrent-ruby (~> 1.0, >= 1.0.2)
      i18n (~> 0.7)
      minitest (~> 5.1)
      tzinfo (~> 1.1)
    arel (7.1.4)
    autoprefixer-rails (6.7.7.1)
      execjs
    bcrypt (3.1.11-x86-mingw32)
    bindex (0.5.0)
    bootstrap-sass (3.3.7)
      autoprefixer-rails (>= 5.2.1)
      sass (>= 3.3.4)
    builder (3.2.3)
    byebug (9.0.6)
    climate_control (0.1.0)
    cocaine (0.5.8)
      climate_control (>= 0.0.3, < 1.0)
    coffee-rails (4.1.1)
      coffee-script (>= 2.2.0)
      railties (>= 4.0.0, < 5.1.x)
    coffee-script (2.4.1)
      coffee-script-source
      execjs
    coffee-script-source (1.12.2)
    concurrent-ruby (1.0.5)
    delayed_job (4.1.2)
      activesupport (>= 3.0, < 5.1)
    delayed_job_active_record (4.1.1)
      activerecord (>= 3.0, < 5.1)
      delayed_job (>= 3.0, < 5)
    devise (4.2.1)
      bcrypt (~> 3.0)
      orm_adapter (~> 0.1)
      railties (>= 4.1.0, < 5.1)
      responders
      warden (~> 1.2.3)
    erubis (2.7.0)
    execjs (2.7.0)
    globalid (0.3.7)
      activesupport (>= 4.1.0)
    i18n (0.8.1)
    jbuilder (2.6.3)
      activesupport (>= 3.0.0, < 5.2)
      multi_json (~> 1.2)
    jquery-rails (4.3.1)
      rails-dom-testing (>= 1, < 3)
      railties (>= 4.2.0)
      thor (>= 0.14, < 2.0)
    jquery-turbolinks (2.1.0)
      railties (>= 3.1.0)
      turbolinks
    json (1.8.6)
    loofah (2.0.3)
      nokogiri (>= 1.5.9)
    mail (2.6.4)
      mime-types (>= 1.16, < 4)
    method_source (0.8.2)
    mime-types (3.1)
      mime-types-data (~> 3.2015)
    mime-types-data (3.2016.0521)
    mimemagic (0.3.2)
    mini_portile2 (2.1.0)
    minitest (5.10.1)
    multi_json (1.12.1)
    nio4r (1.2.1)
    nokogiri (1.7.1-x86-mingw32)
      mini_portile2 (~> 2.1.0)
    orm_adapter (0.5.0)
    paperclip (5.1.0)
      activemodel (>= 4.2.0)
      activesupport (>= 4.2.0)
      cocaine (~> 0.5.5)
      mime-types
      mimemagic (~> 0.3.0)
    pg (0.20.0-x86-mingw32)
    rack (2.0.1)
    rack-test (0.6.3)
      rack (>= 1.0)
    rails (5.0.0)
      actioncable (= 5.0.0)
      actionmailer (= 5.0.0)
      actionpack (= 5.0.0)
      actionview (= 5.0.0)
      activejob (= 5.0.0)
      activemodel (= 5.0.0)
      activerecord (= 5.0.0)
      activesupport (= 5.0.0)
      bundler (>= 1.3.0, < 2.0)
      railties (= 5.0.0)
      sprockets-rails (>= 2.0.0)
    rails-dom-testing (2.0.2)
      activesupport (>= 4.2.0, < 6.0)
      nokogiri (~> 1.6)
    rails-html-sanitizer (1.0.3)
      loofah (~> 2.0)
    railties (5.0.0)
      actionpack (= 5.0.0)
      activesupport (= 5.0.0)
      method_source
      rake (>= 0.8.7)
      thor (>= 0.18.1, < 2.0)
    rake (12.0.0)
    rdoc (4.3.0)
    responders (2.3.0)
      railties (>= 4.2.0, < 5.1)
    sass (3.4.23)
    sass-rails (5.0.6)
      railties (>= 4.0.0, < 6)
      sass (~> 3.1)
      sprockets (>= 2.8, < 4.0)
      sprockets-rails (>= 2.0, < 4.0)
      tilt (>= 1.1, < 3)
    sdoc (0.4.2)
      json (~> 1.7, >= 1.7.7)
      rdoc (~> 4.0)
    sprockets (3.7.1)
      concurrent-ruby (~> 1.0)
      rack (> 1, < 3)
    sprockets-rails (3.2.0)
      actionpack (>= 4.0)
      activesupport (>= 4.0)
      sprockets (>= 3.0.0)
    sqlite3 (1.3.13-x86-mingw32)
    thor (0.19.4)
    thread_safe (0.3.6)
    tilt (2.0.7)
    turbolinks (5.0.1)
      turbolinks-source (~> 5)
    turbolinks-source (5.0.0)
    tzinfo (1.2.3)
      thread_safe (~> 0.1)
    tzinfo-data (1.2017.2)
      tzinfo (>= 1.0.0)
    uglifier (3.2.0)
      execjs (>= 0.3.0, < 3)
    warden (1.2.7)
      rack (>= 1.0)
    web-console (3.5.0)
      actionview (>= 5.0)
      activemodel (>= 5.0)
      bindex (>= 0.4.0)
      railties (>= 5.0)
    websocket-driver (0.6.5)
      websocket-extensions (>= 0.1.0)
    websocket-extensions (0.1.2)

PLATFORMS
  x86-mingw32

DEPENDENCIES
  bootstrap-sass
  byebug
  coffee-rails (~> 4.1.0)
  delayed_job_active_record
  devise
  execjs
  jbuilder (~> 2.0)
  jquery-rails
  jquery-turbolinks
  paperclip (~> 5.0)
  pg
  rails (= 5.0.0)
  sass-rails (~> 5.0)
  sdoc (~> 0.4.0)
  sqlite3
  turbolinks
  tzinfo-data
  uglifier (>= 1.3.0)
  web-console (~> 3.0)

RUBY VERSION
   ruby 2.3.3p222

BUNDLED WITH
   1.14.6

可能是因为我在Windows下开发,而服务器(Python版本2)无法从gemfile.lock安装mingw32 gems? :

bcrypt (3.1.11-x86-mingw32)
nokogiri (1.7.1-x86-mingw32)
pg (0.20.0-x86-mingw32)
....

1 个答案:

答案 0 :(得分:0)

好的发现错误。确实是我的云服务从Gemfile.lock建立了宝石堆栈,尽管我在Windows上开发并且一些宝石被标记为Windows&#34;。 我尝试过Heroku,当在Windows平台上开发Rails应用程序时Heroku使用Gemfile而不是Gemfile.lock时,这个问题不再发生了......