Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Errors building from source #78

Closed
guy-adams opened this issue Mar 9, 2020 · 4 comments
Closed

Errors building from source #78

guy-adams opened this issue Mar 9, 2020 · 4 comments
Labels

Comments

@guy-adams
Copy link

When trying to build from source on a stock Ubuntu 18.04 system, a few dependencies are missing .e.g. ruby-dev. Also, several of the commands, as written, need to be run with sudo. Happy to prepare a PR for these simple changes. However, when running jekyll build

I get

Configuration file: /home/ubuntu/dbt-docs/styles/_config.yml
            Source: /home/ubuntu/dbt-docs/styles
       Destination: /home/ubuntu/dbt-docs/styles/_site
 Incremental build: disabled. Enable with --incremental
      Generating...
  Conversion error: Jekyll::Converters::Scss encountered an error while converting 'ui/css/styles.scss':
                    Error: unclosed parenthesis in media query expression on line 1:33 of _includes/sass/mixins/_mixin-queries.scss from line 2:1 of _includes/sass/mixins/mixins.scss from line 4:1 of styles.scss >> @mixin small(){ @media ( "max-width: " ($tablet) ) { @content; } } --------------------------------^
                    ------------------------------------------------
      Jekyll 4.0.0   Please append `--trace` to the `build` command
                     for any additional information or backtrace.
                    ------------------------------------------------

With --trace

Configuration file: /home/ubuntu/dbt-docs/styles/_config.yml
            Source: /home/ubuntu/dbt-docs/styles
       Destination: /home/ubuntu/dbt-docs/styles/_site
 Incremental build: disabled. Enable with --incremental
      Generating...
  Conversion error: Jekyll::Converters::Scss encountered an error while converting 'ui/css/styles.scss':
                    Error: unclosed parenthesis in media query expression on line 1:33 of _includes/sass/mixins/_mixin-queries.scss from line 2:1 of _includes/sass/mixins/mixins.scss from line 4:1 of styles.scss >> @mixin small(){ @media ( "max-width: " ($tablet) ) { @content; } } --------------------------------^
Traceback (most recent call last):
        28: from /usr/local/bin/jekyll:23:in `<main>'
        27: from /usr/local/bin/jekyll:23:in `load'
        26: from /var/lib/gems/2.5.0/gems/jekyll-4.0.0/exe/jekyll:15:in `<top (required)>'
        25: from /var/lib/gems/2.5.0/gems/mercenary-0.3.6/lib/mercenary.rb:19:in `program'
        24: from /var/lib/gems/2.5.0/gems/mercenary-0.3.6/lib/mercenary/program.rb:42:in `go'
        23: from /var/lib/gems/2.5.0/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `execute'
        22: from /var/lib/gems/2.5.0/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `each'
        21: from /var/lib/gems/2.5.0/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `block in execute'
        20: from /var/lib/gems/2.5.0/gems/jekyll-4.0.0/lib/jekyll/commands/build.rb:18:in `block (2 levels) in init_with_program'
        19: from /var/lib/gems/2.5.0/gems/jekyll-4.0.0/lib/jekyll/command.rb:89:in `process_with_graceful_fail'
        18: from /var/lib/gems/2.5.0/gems/jekyll-4.0.0/lib/jekyll/command.rb:89:in `each'
        17: from /var/lib/gems/2.5.0/gems/jekyll-4.0.0/lib/jekyll/command.rb:89:in `block in process_with_graceful_fail'
        16: from /var/lib/gems/2.5.0/gems/jekyll-4.0.0/lib/jekyll/commands/build.rb:36:in `process'
        15: from /var/lib/gems/2.5.0/gems/jekyll-4.0.0/lib/jekyll/commands/build.rb:65:in `build'
        14: from /var/lib/gems/2.5.0/gems/jekyll-4.0.0/lib/jekyll/command.rb:28:in `process_site'
        13: from /var/lib/gems/2.5.0/gems/jekyll-4.0.0/lib/jekyll/site.rb:76:in `process'
        12: from /var/lib/gems/2.5.0/gems/jekyll-4.0.0/lib/jekyll/site.rb:202:in `render'
        11: from /var/lib/gems/2.5.0/gems/jekyll-4.0.0/lib/jekyll/site.rb:515:in `render_pages'
        10: from /var/lib/gems/2.5.0/gems/jekyll-4.0.0/lib/jekyll/site.rb:515:in `each'
         9: from /var/lib/gems/2.5.0/gems/jekyll-4.0.0/lib/jekyll/site.rb:516:in `block in render_pages'
         8: from /var/lib/gems/2.5.0/gems/jekyll-4.0.0/lib/jekyll/site.rb:523:in `render_regenerated'
         7: from /var/lib/gems/2.5.0/gems/jekyll-4.0.0/lib/jekyll/renderer.rb:63:in `run'
         6: from /var/lib/gems/2.5.0/gems/jekyll-4.0.0/lib/jekyll/renderer.rb:84:in `render_document'
         5: from /var/lib/gems/2.5.0/gems/jekyll-4.0.0/lib/jekyll/renderer.rb:100:in `convert'
         4: from /var/lib/gems/2.5.0/gems/jekyll-4.0.0/lib/jekyll/renderer.rb:100:in `reduce'
         3: from /var/lib/gems/2.5.0/gems/jekyll-4.0.0/lib/jekyll/renderer.rb:100:in `each'
         2: from /var/lib/gems/2.5.0/gems/jekyll-4.0.0/lib/jekyll/renderer.rb:102:in `block in convert'
         1: from /var/lib/gems/2.5.0/gems/jekyll-sass-converter-2.1.0/lib/jekyll/converters/scss.rb:182:in `convert'
/var/lib/gems/2.5.0/gems/jekyll-sass-converter-2.1.0/lib/jekyll/converters/scss.rb:190:in `rescue in convert': Error: unclosed parenthesis in media query expression (Jekyll::Converters::Scss::SyntaxError)
        on line 1:33 of _includes/sass/mixins/_mixin-queries.scss
        from line 2:1 of _includes/sass/mixins/mixins.scss
        from line 4:1 of styles.scss
>> @mixin small(){        @media ( "max-width: " ($tablet) ) { @content; } }

   --------------------------------^

Any ideas?

@drewbanin
Copy link
Contributor

Hey @guy-adams - that's a weird one!

Re: sudo: can you try using something like bundle exec jekyll build instead? I'm not a ruby expert anymore so I'd need to do some digging on the details, but I typically just prefix ruby commands with bundle exec ... whenever I get permission errors :)

Re: that error message. I'm not sure where that's coming from, as I don't see it happening on my machine. This is my Gemfile.lock file - do you see any noteworthy differences from your around the jekyll/scss/sass versions?

Gemfile.lock

GEM
  remote: https://rubygems.org/
  specs:
    addressable (2.6.0)
      public_suffix (>= 2.0.2, < 4.0)
    colorator (1.1.0)
    concurrent-ruby (1.1.5)
    em-websocket (0.5.1)
      eventmachine (>= 0.12.9)
      http_parser.rb (~> 0.6.0)
    eventmachine (1.2.7)
    ffi (1.10.0)
    forwardable-extended (2.6.0)
    http_parser.rb (0.6.0)
    i18n (0.9.5)
      concurrent-ruby (~> 1.0)
    jekyll (3.8.6)
      addressable (~> 2.4)
      colorator (~> 1.0)
      em-websocket (~> 0.5)
      i18n (~> 0.7)
      jekyll-sass-converter (~> 1.0)
      jekyll-watch (~> 2.0)
      kramdown (~> 1.14)
      liquid (~> 4.0)
      mercenary (~> 0.3.3)
      pathutil (~> 0.9)
      rouge (>= 1.7, < 4)
      safe_yaml (~> 1.0)
    jekyll-sass-converter (1.5.2)
      sass (~> 3.4)
    jekyll-watch (2.2.1)
      listen (~> 3.0)
    kramdown (1.17.0)
    liquid (4.0.3)
    listen (3.1.5)
      rb-fsevent (~> 0.9, >= 0.9.4)
      rb-inotify (~> 0.9, >= 0.9.7)
      ruby_dep (~> 1.2)
    mercenary (0.3.6)
    pathutil (0.16.2)
      forwardable-extended (~> 2.6)
    public_suffix (3.0.3)
    rb-fsevent (0.10.3)
    rb-inotify (0.10.0)
      ffi (~> 1.0)
    rouge (3.3.0)
    ruby_dep (1.5.0)
    safe_yaml (1.0.5)
    sass (3.7.3)
      sass-listen (~> 4.0.0)
    sass-listen (4.0.0)
      rb-fsevent (~> 0.9, >= 0.9.4)
      rb-inotify (~> 0.9, >= 0.9.7)

PLATFORMS
  ruby

DEPENDENCIES
  jekyll (~> 3.8)

BUNDLED WITH
   2.0.1

@guy-adams
Copy link
Author

@drewbanin - that's very weird - although the final error I was getting was nothing to do with permissions, when I ran:

cd styles
bundle install
bundle exec jekyll build
cd -

instead of

cd styles
jekyll build
cd -

It ran fine. Wierd that this resolves an error related to "unclosed parenthesis".

My Gemfile.lock is slight different to yours

GEM
  remote: https://rubygems.org/
  specs:
    addressable (2.7.0)
      public_suffix (>= 2.0.2, < 5.0)
    colorator (1.1.0)
    concurrent-ruby (1.1.6)
    em-websocket (0.5.1)
      eventmachine (>= 0.12.9)
      http_parser.rb (~> 0.6.0)
    eventmachine (1.2.7)
    ffi (1.12.2)
    forwardable-extended (2.6.0)
    http_parser.rb (0.6.0)
    i18n (0.9.5)
      concurrent-ruby (~> 1.0)
    jekyll (3.8.6)
      addressable (~> 2.4)
      colorator (~> 1.0)
      em-websocket (~> 0.5)
      i18n (~> 0.7)
      jekyll-sass-converter (~> 1.0)
      jekyll-watch (~> 2.0)
      kramdown (~> 1.14)
      liquid (~> 4.0)
      mercenary (~> 0.3.3)
      pathutil (~> 0.9)
      rouge (>= 1.7, < 4)
      safe_yaml (~> 1.0)
    jekyll-sass-converter (1.5.2)
      sass (~> 3.4)
    jekyll-watch (2.2.1)
      listen (~> 3.0)
    kramdown (1.17.0)
    liquid (4.0.3)
    listen (3.2.1)
      rb-fsevent (~> 0.10, >= 0.10.3)
      rb-inotify (~> 0.9, >= 0.9.10)
    mercenary (0.3.6)
    pathutil (0.16.2)
      forwardable-extended (~> 2.6)
    public_suffix (4.0.3)
    rb-fsevent (0.10.3)
    rb-inotify (0.10.1)
      ffi (~> 1.0)
    rouge (3.16.0)
    safe_yaml (1.0.5)
    sass (3.7.4)
      sass-listen (~> 4.0.0)
    sass-listen (4.0.0)
      rb-fsevent (~> 0.9, >= 0.9.4)
      rb-inotify (~> 0.9, >= 0.9.7)

PLATFORMS
  ruby

DEPENDENCIES
  jekyll (~> 3.8)

BUNDLED WITH
   2.1.4

Minor version differences but I notice I don't have ruby_dep - still, it's working fine now!

Would you like a PR for the instructions that work for me?

@alf-mindshift
Copy link
Contributor

This issue seems to be related to sass/libsass#2223

The compilation fails when using a jekyll that's using libsass instead of ruby sass.

@github-actions
Copy link
Contributor

This issue has been marked as Stale because it has been open for 180 days with no activity. If you would like the issue to remain open, please remove the stale label or comment on the issue, or it will be closed in 7 days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants