rake - rake build不在tripit / slate docs上工作

时间:2014-09-05 09:55:33

标签: ruby-on-rails ruby gem rake

我已经从github克隆了tripit / slate。已安装ruby 1.9.3-p545和devkit。 gem install bundler也已安装。请在下面找到平板中Gem文件的内容。

# If you have OpenSSL installed, we recommend updating
# the following line to use "https"
source 'http://rubygems.org'

gem "middleman", "~>3.3.2"

# For syntax highlighting
gem "middleman-syntax"

# Plugin for middleman to generate Github pages
gem 'middleman-gh-pages'

# Live-reloading plugin
gem "middleman-livereload", "~> 3.3.0"

gem 'redcarpet', '~> 3.1.1'

# For faster file watcher updates on Windows:
gem "wdm", "~> 0.1.0", :platforms => [:mswin, :mingw]

# Cross-templating language block fix for Ruby 1.8
platforms :mri_18 do
  gem "ruby18_source_location"
end

gem "rake", "~> 10.3.1"

gem 'therubyracer', :platforms => :ruby

Gemfile.lock如下

GEM
  remote: http://rubygems.org/
  specs:
    activesupport (4.0.4)
      i18n (~> 0.6, >= 0.6.9)
      minitest (~> 4.2)
      multi_json (~> 1.3)
      thread_safe (~> 0.1)
      tzinfo (~> 0.3.37)
    chunky_png (1.3.0)
    coffee-script (2.2.0)
      coffee-script-source
      execjs
    coffee-script-source (1.7.0)
    compass (0.12.6)
      chunky_png (~> 1.2)
      fssm (>= 0.2.7)
      sass (~> 3.2.19)
    compass-import-once (1.0.4)
      sass (>= 3.2, < 3.5)
    em-websocket (0.5.0)
      eventmachine (>= 0.12.9)
      http_parser.rb (~> 0.5.3)
    erubis (2.7.0)
    eventmachine (1.0.3)
    eventmachine (1.0.3-x86-mingw32)
    execjs (2.0.2)
    ffi (1.9.3)
    ffi (1.9.3-x86-mingw32)
    fssm (0.2.10)
    haml (4.0.5)
      tilt
    hike (1.2.3)
    hooks (0.4.0)
      uber (~> 0.0.4)
    http_parser.rb (0.5.3)
    http_parser.rb (0.5.3-x86-mingw32)
    i18n (0.6.9)
    json (1.8.1)
    kramdown (1.3.3)
    libv8 (3.16.14.3)
    listen (1.3.1)
      rb-fsevent (>= 0.9.3)
      rb-inotify (>= 0.9)
      rb-kqueue (>= 0.2)
    middleman (3.3.2)
      coffee-script (~> 2.2.0)
      compass (>= 0.12.4)
      compass-import-once (~> 1.0.4)
      execjs (~> 2.0)
      haml (>= 4.0.5)
      kramdown (~> 1.2)
      middleman-core (= 3.3.2)
      middleman-sprockets (>= 3.1.2)
      sass (>= 3.2.17, < 4.0)
      uglifier (~> 2.5)
    middleman-core (3.3.2)
      activesupport (~> 4.0.1)
      bundler (~> 1.1)
      erubis
      hooks (~> 0.3)
      i18n (~> 0.6.9)
      listen (~> 1.1)
      padrino-helpers (~> 0.12.1)
      rack (>= 1.4.5, < 2.0)
      rack-test (~> 0.6.2)
      thor (>= 0.15.2, < 2.0)
      tilt (~> 1.4.1, < 2.0)
    middleman-gh-pages (0.0.3)
      rake (> 0.9.3)
    middleman-livereload (3.3.2)
      em-websocket (~> 0.5.0)
      middleman-core (~> 3.2)
      rack-livereload (~> 0.3.15)
    middleman-sprockets (3.3.3)
      middleman-core (>= 3.2)
      sprockets (~> 2.2)
      sprockets-helpers (~> 1.1.0)
      sprockets-sass (~> 1.1.0)
    middleman-syntax (2.0.0)
      middleman-core (~> 3.2)
      rouge (~> 1.0)
    minitest (4.7.5)
    multi_json (1.9.2)
    padrino-helpers (0.12.1)
      i18n (~> 0.6, >= 0.6.7)
      padrino-support (= 0.12.1)
      tilt (~> 1.4.1)
    padrino-support (0.12.1)
      activesupport (>= 3.1)
    rack (1.5.2)
    rack-livereload (0.3.15)
      rack
    rack-test (0.6.2)
      rack (>= 1.0)
    rake (10.3.1)
    rb-fsevent (0.9.4)
    rb-inotify (0.9.3)
      ffi (>= 0.5.0)
    rb-kqueue (0.2.2)
      ffi (>= 0.5.0)
    redcarpet (3.1.2)
    ref (1.0.5)
    rouge (1.3.3)
    ruby18_source_location (0.2)
    sass (3.2.19)
    sprockets (2.12.1)
      hike (~> 1.2)
      multi_json (~> 1.0)
      rack (~> 1.0)
      tilt (~> 1.1, != 1.3.0)
    sprockets-helpers (1.1.0)
      sprockets (~> 2.0)
    sprockets-sass (1.1.0)
      sprockets (~> 2.0)
      tilt (~> 1.1)
    therubyracer (0.12.1)
      libv8 (~> 3.16.14.0)
      ref
    thor (0.19.1)
    thread_safe (0.3.3)
    tilt (1.4.1)
    tzinfo (0.3.39)
    uber (0.0.4)
    uglifier (2.5.0)
      execjs (>= 0.3.0)
      json (>= 1.8.0)
    wdm (0.1.0)

PLATFORMS
  ruby
  x86-mingw32

DEPENDENCIES
  middleman (~> 3.3.0)
  middleman-gh-pages
  middleman-livereload (~> 3.3.0)
  middleman-syntax
  rake (~> 10.3.0)
  redcarpet (~> 3.1.1)
  ruby18_source_location
  therubyracer
  wdm (~> 0.1.0)
在宝石上安装的平板上的

bundle install

Gems included by the bundle:
  * activesupport (4.0.4)
  * bundler (1.7.2)
  * chunky_png (1.3.0)
  * coffee-script (2.2.0)
  * coffee-script-source (1.7.0)
  * compass (0.12.6)
  * compass-import-once (1.0.4)
  * em-websocket (0.5.0)
  * erubis (2.7.0)
  * eventmachine (1.0.3)
  * execjs (2.0.2)
  * ffi (1.9.3)
  * fssm (0.2.10)
  * haml (4.0.5)
  * hike (1.2.3)
  * hooks (0.4.0)
  * http_parser.rb (0.5.3)
  * i18n (0.6.9)
  * json (1.8.1)
  * kramdown (1.3.3)
  * listen (1.3.1)
  * middleman (3.3.2)
  * middleman-core (3.3.2)
  * middleman-gh-pages (0.0.3)
  * middleman-livereload (3.3.2)
  * middleman-sprockets (3.3.3)
  * middleman-syntax (2.0.0)
  * minitest (4.7.5)
  * multi_json (1.9.2)
  * padrino-helpers (0.12.1)
  * padrino-support (0.12.1)
  * rack (1.5.2)
  * rack-livereload (0.3.15)
  * rack-test (0.6.2)
  * rake (10.3.1)
  * rb-fsevent (0.9.4)
  * rb-inotify (0.9.3)
  * rb-kqueue (0.2.2)
  * redcarpet (3.1.2)
  * rouge (1.3.3)
  * sass (3.2.19)
  * sprockets (2.12.1)
  * sprockets-helpers (1.1.0)
  * sprockets-sass (1.1.0)
  * thor (0.19.1)
  * thread_safe (0.3.3)
  * tilt (1.4.1)
  * tzinfo (0.3.39)
  * uber (0.0.4)
  * uglifier (2.5.0)
  * wdm (0.1.0)

现在当我middleman运行bundle exec middleman时,它运行正常。源目录中的index.md文件的更改立即反映出来。

但是当我在slate目录上触发rake build时,它会抛出我的错误。

rake aborted!
Errno::ENOENT: No such file or directory - git rev-parse --show-toplevel

(See full trace by running task with --trace)

完整跟踪如下:

rake aborted!
Errno::ENOENT: No such file or directory - git rev-parse --show-toplevel
C:/Ruby193/lib/ruby/gems/1.9.1/gems/middleman-gh-pages-0.0.3/lib/middleman-gh-pa
ges/tasks/gh-pages.rake:7:in ``'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/middleman-gh-pages-0.0.3/lib/middleman-gh-pa
ges/tasks/gh-pages.rake:7:in `<top (required)>'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.3.1/lib/rake/rake_module.rb:28:in `l
oad'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.3.1/lib/rake/rake_module.rb:28:in `l
oad_rakefile'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.3.1/lib/rake/default_loader.rb:10:in
 `load'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.3.1/lib/rake/application.rb:756:in `
load_imports'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.3.1/lib/rake/application.rb:691:in `
raw_load_rakefile'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.3.1/lib/rake/application.rb:94:in `b
lock in load_rakefile'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.3.1/lib/rake/application.rb:176:in `
standard_exception_handling'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.3.1/lib/rake/application.rb:93:in `l
oad_rakefile'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.3.1/lib/rake/application.rb:77:in `b
lock in run'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.3.1/lib/rake/application.rb:176:in `
standard_exception_handling'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.3.1/lib/rake/application.rb:75:in `r
un'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.3.1/bin/rake:33:in `<top (required)>
'
C:/Ruby193/bin/rake:23:in `load'
C:/Ruby193/bin/rake:23:in `<main>'

我无法弄清rake的问题。在google和stackoverflow上搜索,并尝试更改rakeGemfileGemfile.lock的版本。但它不起作用。 rake build在3天之前工作正常,突然间它已停止工作。

如何解决rake build问题并构建我的平板文档???

1 个答案:

答案 0 :(得分:5)

我使用rake进行构建。 middleman本身提供了构建功能,因此对于我的tripit/slate文档案例,问题由bundle exec middleman build命令解决。