riboseinc / jekyll-theme-open-project

Jekyll theme for site suite presenting your open software and specifications.
MIT License
30 stars 3 forks source link

Trouble setting up new site #75

Closed derchr closed 3 years ago

derchr commented 3 years ago

Hello, I have a problem following the instructions to set up the theme.

After running bundle exec jekyll serve, I get an error:


Configuration file: /home/***/test-site/_config.yml
Configuration file: /home/***/test-site/_config.yml
 Theme Config file: /home/***/test-site/vendor/bundle/ruby/2.7.0/gems/jekyll-theme-open-project-2.1.4/_config.yml
            Source: /home/***/test-site
       Destination: /home/***/test-site/_site
 Incremental build: disabled. Enable with --incremental
      Generating... 
bundler: failed to load command: jekyll.ruby2.7 (/home/***/.gem/ruby/2.7.0/bin/jekyll.ruby2.7)                                                            
Traceback (most recent call last):
        40: from /usr/bin/bundle:23:in `<main>'
        39: from /usr/bin/bundle:23:in `load'
        38: from /home/***/.gem/ruby/2.7.0/gems/bundler-2.2.3/exe/bundle:37:in `<top (required)>'
        37: from /home/***/.gem/ruby/2.7.0/gems/bundler-2.2.3/lib/bundler/friendly_errors.rb:130:in `with_friendly_errors'
        36: from /home/***/.gem/ruby/2.7.0/gems/bundler-2.2.3/exe/bundle:49:in `block in <top (required)>'
        35: from /home/***/.gem/ruby/2.7.0/gems/bundler-2.2.3/lib/bundler/cli.rb:24:in `start'
        34: from /home/***/.gem/ruby/2.7.0/gems/bundler-2.2.3/lib/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
        33: from /home/***/.gem/ruby/2.7.0/gems/bundler-2.2.3/lib/bundler/cli.rb:30:in `dispatch'
        32: from /home/***/.gem/ruby/2.7.0/gems/bundler-2.2.3/lib/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
        31: from /home/***/.gem/ruby/2.7.0/gems/bundler-2.2.3/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
        30: from /home/***/.gem/ruby/2.7.0/gems/bundler-2.2.3/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
        29: from /home/***/.gem/ruby/2.7.0/gems/bundler-2.2.3/lib/bundler/cli.rb:497:in `exec'
        28: from /home/***/.gem/ruby/2.7.0/gems/bundler-2.2.3/lib/bundler/cli/exec.rb:28:in `run'
        27: from /home/***/.gem/ruby/2.7.0/gems/bundler-2.2.3/lib/bundler/cli/exec.rb:63:in `kernel_load'
        26: from /home/***/.gem/ruby/2.7.0/gems/bundler-2.2.3/lib/bundler/cli/exec.rb:63:in `load'
        25: from /home/***/.gem/ruby/2.7.0/bin/jekyll.ruby2.7:23:in `<top (required)>'
        24: from /home/***/.gem/ruby/2.7.0/bin/jekyll.ruby2.7:23:in `load'
        23: from /home/***/test-site/vendor/bundle/ruby/2.7.0/gems/jekyll-4.2.0/exe/jekyll:15:in `<top (required)>'
        22: from /home/***/test-site/vendor/bundle/ruby/2.7.0/gems/mercenary-0.4.0/lib/mercenary.rb:21:in `program'
        21: from /home/***/test-site/vendor/bundle/ruby/2.7.0/gems/mercenary-0.4.0/lib/mercenary/program.rb:44:in `go'
        20: from /home/***/test-site/vendor/bundle/ruby/2.7.0/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `execute'
        19: from /home/***/test-site/vendor/bundle/ruby/2.7.0/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `each'
        18: from /home/***/test-site/vendor/bundle/ruby/2.7.0/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `block in execute'
        17: from /home/***/test-site/vendor/bundle/ruby/2.7.0/gems/jekyll-4.2.0/lib/jekyll/commands/serve.rb:86:in `block (2 levels) in init_with_program'
        16: from /home/***/test-site/vendor/bundle/ruby/2.7.0/gems/jekyll-4.2.0/lib/jekyll/command.rb:91:in `process_with_graceful_fail'
        15: from /home/***/test-site/vendor/bundle/ruby/2.7.0/gems/jekyll-4.2.0/lib/jekyll/command.rb:91:in `each'
        14: from /home/***/test-site/vendor/bundle/ruby/2.7.0/gems/jekyll-4.2.0/lib/jekyll/command.rb:91:in `block in process_with_graceful_fail'
        13: from /home/***/test-site/vendor/bundle/ruby/2.7.0/gems/jekyll-4.2.0/lib/jekyll/commands/build.rb:36:in `process'
        12: from /home/***/test-site/vendor/bundle/ruby/2.7.0/gems/jekyll-4.2.0/lib/jekyll/commands/build.rb:65:in `build'
        11: from /home/***/test-site/vendor/bundle/ruby/2.7.0/gems/jekyll-4.2.0/lib/jekyll/command.rb:28:in `process_site'
        10: from /home/***/test-site/vendor/bundle/ruby/2.7.0/gems/jekyll-4.2.0/lib/jekyll/site.rb:78:in `process'
         9: from /home/***/test-site/vendor/bundle/ruby/2.7.0/gems/jekyll-4.2.0/lib/jekyll/site.rb:181:in `read'
         8: from /home/***/test-site/vendor/bundle/ruby/2.7.0/gems/jekyll-theme-open-project-helpers-2.1.4/lib/jekyll-theme-open-project-helpers/project_data_reader.rb:79:in `read'
         7: from /home/***/test-site/vendor/bundle/ruby/2.7.0/gems/jekyll-data-1.1.0/lib/jekyll-data/reader.rb:18:in `read'
         6: from /home/***/test-site/vendor/bundle/ruby/2.7.0/gems/jekyll-data-1.1.0/lib/jekyll-data/reader.rb:29:in `read_theme_data'
         5: from /home/***/test-site/vendor/bundle/ruby/2.7.0/gems/jekyll-data-1.1.0/lib/jekyll-data/theme_data_reader.rb:17:in `read'
         4: from /home/***/test-site/vendor/bundle/ruby/2.7.0/gems/jekyll-data-1.1.0/lib/jekyll-data/theme_data_reader.rb:28:in `read_data_to'
         3: from /home/***/test-site/vendor/bundle/ruby/2.7.0/gems/jekyll-data-1.1.0/lib/jekyll-data/theme_data_reader.rb:28:in `each'
         2: from /home/***/test-site/vendor/bundle/ruby/2.7.0/gems/jekyll-data-1.1.0/lib/jekyll-data/theme_data_reader.rb:36:in `block in read_data_to'
         1: from /home/***/test-site/vendor/bundle/ruby/2.7.0/gems/jekyll-4.2.0/lib/jekyll/readers/data_reader.rb:57:in `read_data_file'
/home/***/test-site/vendor/bundle/ruby/2.7.0/gems/jekyll-4.2.0/lib/jekyll/readers/data_reader.rb:57:in `sub': wrong argument type nil (expected Regexp) (TypeError)```
What could be causing this?
Thank you for your help!
ronaldtse commented 3 years ago

Thanks @4VRDriver for the report! Currently the jekyll-data gem which we depend on only supports jekyll ~4.1. Using it with Jekyll 4.2 will fail as you have seen.

The current workaround is to lock Jekyll at 4.1.x like this: https://github.com/metanorma/metanorma.com/blob/0595c9fa05ef127242c38c413e8e6d1b0d64cefe/Gemfile#L11

@strogonoff this problem is reported now at #76 . Thanks!

derchr commented 3 years ago

Thank you! With gem "jekyll", "~> 4.1.1" it now works.

But I had to create new folders like assets and parent-hub because of errors like this /home/***/test-site/vendor/bundle/ruby/2.7.0/gems/jekyll-4.1.1/lib/jekyll/tags/include.rb:223:in `locate_include_file': Could not locate the included file 'assets/symbol.svg' in any of ["/home/***/test-site/", "/home/***/test-site/vendor/bundle/ruby/2.7.0/gems/jekyll-theme-open-project-2.1.4/_includes"]. Ensure it exists in one of those directories and, if it is a symlink, does not point outside your site source. (IOError)

ronaldtse commented 3 years ago

Yes you're right. This should be stated in the README and something to improve on. Thanks.

strogonoff commented 3 years ago

README states to drop symbol.svg. Not sure about parent-hub folder, if it is reproducible, an issue should probably be created for that specifically.

ronaldtse commented 3 years ago

To be clear to @4VRDriver "drop symbol.svg" means to "provide symbol.svg". I will update the README to state that.

strogonoff commented 3 years ago

To be clear to @4VRDriver "drop symbol.svg" means to "provide symbol.svg". I will update the README to state that.

Thank you. I can see now that the phrasing may not be clear.

ronaldtse commented 3 years ago

Version 2.1.5 has been released that resolve this issue. The version constraints of Gemfile can now be relaxed, just as in 61a4fe4 . Thanks @4VRDriver !