magento / merchdocs

[Deprecated] Magento User Guide
Open Software License 3.0
33 stars 278 forks source link

Instructions on speeding up build do not compile / fail #61

Closed filmaj closed 5 years ago

filmaj commented 5 years ago

Bug report

Description

The instructions on speeding up the build by creating a _config.local.yml do not work for me and fail the build.

Steps to reproduce

  1. Add a _config.local.yml file to the root of the repo. My local contents (I want to just build the latest):

     exclude:
      - /community/
      - /swagger/
      - /vagrant/
      - /guides/m1x/
      - /guides/v2.0/
      - /guides/v2.1/
      - /guides/v2.2/
      #- /guides/v2.3/
    
     # Excluded in config.yml
      - /scss/
      - /bin/
      - /node_modules/
      - /vendor/
      - /.*
      - /Rakefile
  2. Run rake preview. The output I see:
➜ rake preview
Install gems listed in the Gemfile: $ bundle install
Using public_suffix 4.0.1
Using addressable 2.7.0
Using json 2.2.0
Using mini_portile2 2.4.0
Using nokogiri 1.10.4
Using algolia_html_extractor 2.6.2
Using httpclient 2.8.3
Using algoliasearch 1.26.1
Using bundler 1.17.3
Using colorator 1.1.0
Using concurrent-ruby 1.1.5
Using eventmachine 1.2.7
Using http_parser.rb 0.6.0
Using em-websocket 0.5.1
Using i18n 0.9.5
Using rb-fsevent 0.10.3
Using ffi 1.11.1
Using rb-inotify 0.10.0
Using sass-listen 4.0.0
Using sass 3.7.4
Using jekyll-sass-converter 1.5.2
Using ruby_dep 1.5.0
Using listen 3.1.5
Using jekyll-watch 2.2.1
Using kramdown 1.17.0
Using liquid 4.0.3
Using mercenary 0.3.6
Using forwardable-extended 2.6.0
Using pathutil 0.16.2
Using rouge 3.10.0
Using safe_yaml 1.0.5
Using jekyll 3.8.6
Using devdocs 3 from https://github.com/magento-devdocs/devdocs-theme.git (at master@d2a43ee)
Using ethon 0.12.0
Using exifr 1.3.6
Using filesize 0.2.0
Using fspath 3.1.2
Using parallel 1.17.0
Using rainbow 3.0.0
Using typhoeus 1.3.1
Using yell 2.2.0
Using html-proofer 3.12.2
Using image_size 2.0.2
Using in_threads 1.5.3
Using progress 3.5.2
Using image_optim 0.26.5
Using image_optim_pack 0.6.0 (x86_64-darwin)
Using progressbar 1.10.1
Using verbal_expressions 0.1.5
Using jekyll-algolia 1.4.11
Using jekyll-redirect-from 0.15.0
Using jekyll-sitemap 1.3.1
Using launchy 2.4.3
Using mixlib-cli 1.7.0
Using tomlrb 1.2.8
Using mixlib-config 2.2.18
Using mdl 0.5.0
Bundle complete! 10 Gemfile dependencies, 57 gems now installed.
Use `bundle info [gemname]` to see where a bundled gem is installed.
Installed!
Cleaning after the last site generation: $ bundle exec jekyll clean
Configuration file: /Users/maj/src/merchdocs/_config.yml
           Cleaner: Nothing to do for /Users/maj/src/merchdocs/_site.
           Cleaner: Nothing to do for src/.jekyll-metadata.
           Cleaner: Nothing to do for .sass-cache.
Clean!
Generating devdocs locally ...
enabled the additional configuration parameters from _config.local.yml: $ bundle exec jekyll serve --incremental \
                                 --open-url \
                                 --livereload \
                                 --trace \
                                 --config _config.yml,_config.local.yml \
                                 --plugins _plugins,_checks
Configuration file: _config.yml
Configuration file: _config.local.yml
            Source: src
       Destination: /Users/maj/src/merchdocs/_site
 Incremental build: enabled
      Generating...
bundler: failed to load command: jekyll (/usr/local/bin/jekyll)
TypeError: no implicit conversion of nil into String
  /Users/maj/src/merchdocs/_plugins/edition.rb:9:in `include?'
  /Users/maj/src/merchdocs/_plugins/edition.rb:9:in `block in <top (required)>'
  /usr/local/lib/ruby/gems/2.5.0/gems/jekyll-3.8.6/lib/jekyll/hooks.rb:103:in `block in trigger'
  /usr/local/lib/ruby/gems/2.5.0/gems/jekyll-3.8.6/lib/jekyll/hooks.rb:102:in `each'
  /usr/local/lib/ruby/gems/2.5.0/gems/jekyll-3.8.6/lib/jekyll/hooks.rb:102:in `trigger'
  /usr/local/lib/ruby/gems/2.5.0/gems/jekyll-3.8.6/lib/jekyll/page.rb:58:in `initialize'
  /usr/local/lib/ruby/gems/2.5.0/gems/jekyll-3.8.6/lib/jekyll/readers/page_reader.rb:20:in `new'
  /usr/local/lib/ruby/gems/2.5.0/gems/jekyll-3.8.6/lib/jekyll/readers/page_reader.rb:20:in `block in read'
  /usr/local/lib/ruby/gems/2.5.0/gems/jekyll-3.8.6/lib/jekyll/readers/page_reader.rb:19:in `map'
  /usr/local/lib/ruby/gems/2.5.0/gems/jekyll-3.8.6/lib/jekyll/readers/page_reader.rb:19:in `read'
  /usr/local/lib/ruby/gems/2.5.0/gems/jekyll-3.8.6/lib/jekyll/reader.rb:93:in `retrieve_pages'
  /usr/local/lib/ruby/gems/2.5.0/gems/jekyll-3.8.6/lib/jekyll/reader.rb:52:in `read_directories'
  /usr/local/lib/ruby/gems/2.5.0/gems/jekyll-3.8.6/lib/jekyll/reader.rb:80:in `block in retrieve_dirs'
  /usr/local/lib/ruby/gems/2.5.0/gems/jekyll-3.8.6/lib/jekyll/reader.rb:76:in `each'
  /usr/local/lib/ruby/gems/2.5.0/gems/jekyll-3.8.6/lib/jekyll/reader.rb:76:in `retrieve_dirs'
  /usr/local/lib/ruby/gems/2.5.0/gems/jekyll-3.8.6/lib/jekyll/reader.rb:51:in `read_directories'
  /usr/local/lib/ruby/gems/2.5.0/gems/jekyll-3.8.6/lib/jekyll/reader.rb:16:in `read'
  /usr/local/lib/ruby/gems/2.5.0/gems/jekyll-3.8.6/lib/jekyll/site.rb:164:in `read'
  /usr/local/lib/ruby/gems/2.5.0/gems/jekyll-3.8.6/lib/jekyll/site.rb:69:in `process'
  /usr/local/lib/ruby/gems/2.5.0/gems/jekyll-3.8.6/lib/jekyll/command.rb:28:in `process_site'
  /usr/local/lib/ruby/gems/2.5.0/gems/jekyll-3.8.6/lib/jekyll/commands/build.rb:65:in `build'
  /usr/local/lib/ruby/gems/2.5.0/gems/jekyll-3.8.6/lib/jekyll/commands/build.rb:36:in `process'
  /usr/local/lib/ruby/gems/2.5.0/gems/jekyll-3.8.6/lib/jekyll/commands/serve.rb:93:in `block in start'
  /usr/local/lib/ruby/gems/2.5.0/gems/jekyll-3.8.6/lib/jekyll/commands/serve.rb:93:in `each'
  /usr/local/lib/ruby/gems/2.5.0/gems/jekyll-3.8.6/lib/jekyll/commands/serve.rb:93:in `start'
  /usr/local/lib/ruby/gems/2.5.0/gems/jekyll-3.8.6/lib/jekyll/commands/serve.rb:75:in `block (2 levels) in init_with_program'
  /usr/local/lib/ruby/gems/2.5.0/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `block in execute'
  /usr/local/lib/ruby/gems/2.5.0/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `each'
  /usr/local/lib/ruby/gems/2.5.0/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `execute'
  /usr/local/lib/ruby/gems/2.5.0/gems/mercenary-0.3.6/lib/mercenary/program.rb:42:in `go'
  /usr/local/lib/ruby/gems/2.5.0/gems/mercenary-0.3.6/lib/mercenary.rb:19:in `program'
  /usr/local/lib/ruby/gems/2.5.0/gems/jekyll-3.8.6/exe/jekyll:15:in `<top (required)>'
  /usr/local/bin/jekyll:23:in `load'
  /usr/local/bin/jekyll:23:in `<top (required)>'
rake aborted!
Command failed with status (1): [bundle exec jekyll serve --incremental \
 ...]
/Users/maj/src/merchdocs/Rakefile:28:in `block in <top (required)>'
Tasks: TOP => preview
(See full trace by running task with --trace)

Expected result

A successful local build of the site.

Possible solutions

Not sure...

leslietilling commented 5 years ago

@dshevtsov Can you please help Fil with this build issue? We should document to resolution.

dshevtsov commented 5 years ago

@leslietilling the config.local.yml approach does not work in the merchdocs project. The corresponding section should be removed from README. In fact, the entire README must be reviewed.

dshevtsov commented 5 years ago

@filmaj to speed up building, you can generate only one edition instead of all three:

rake preview:ce Preview the Open Source edition locally

rake preview:b2b Preview the B2B edition locally

rake preview:ee Preview the Commerce edition locally

filmaj commented 5 years ago

Thanks for the tips!

I could send a pull request to update the readme and at least remove/revise the section around speeding up the build? Let me know what you think.

dshevtsov commented 5 years ago

@filmaj sounds great, thank you!