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

bundler: failed to load command: jekyll #15

Closed
kinoute opened this issue Mar 29, 2021 · 8 comments
Closed

bundler: failed to load command: jekyll #15

kinoute opened this issue Mar 29, 2021 · 8 comments
Assignees
Labels
enhancement New feature or request

Comments

@kinoute
Copy link

kinoute commented Mar 29, 2021

Hello,

Using master, I'm getting this error:

2021-03-29T00:01:00.2545035Z Bundle complete! 13 Gemfile dependencies, 46 gems now installed.
2021-03-29T00:01:00.2545821Z Bundled gems are installed into `./vendor/bundle`
2021-03-29T00:01:00.2845110Z Starting jekyll build
2021-03-29T00:01:00.9374042Z bundler: failed to load command: jekyll (/github/workspace/vendor/bundle/ruby/2.7.0/bin/jekyll)
2021-03-29T00:01:00.9379509Z /github/workspace/vendor/bundle/ruby/2.7.0/gems/execjs-2.7.0/lib/execjs/runtimes.rb:58:in `autodetect': Could not find a JavaScript runtime. See https://github.com/rails/execjs for a list of available runtimes. (ExecJS::RuntimeUnavailable)
2021-03-29T00:01:00.9381625Z 	from /github/workspace/vendor/bundle/ruby/2.7.0/gems/execjs-2.7.0/lib/execjs.rb:5:in `<module:ExecJS>'
2021-03-29T00:01:00.9382903Z 	from /github/workspace/vendor/bundle/ruby/2.7.0/gems/execjs-2.7.0/lib/execjs.rb:4:in `<top (required)>'
2021-03-29T00:01:00.9384170Z 	from /github/workspace/vendor/bundle/ruby/2.7.0/gems/uglifier-4.2.0/lib/uglifier.rb:5:in `require'
2021-03-29T00:01:00.9385467Z 	from /github/workspace/vendor/bundle/ruby/2.7.0/gems/uglifier-4.2.0/lib/uglifier.rb:5:in `<top (required)>'
2021-03-29T00:01:00.9386913Z 	from /github/workspace/vendor/bundle/ruby/2.7.0/gems/jekyll-minifier-0.1.10/lib/jekyll-minifier.rb:1:in `require'
2021-03-29T00:01:00.9388516Z 	from /github/workspace/vendor/bundle/ruby/2.7.0/gems/jekyll-minifier-0.1.10/lib/jekyll-minifier.rb:1:in `<top (required)>'
2021-03-29T00:01:00.9389971Z 	from /usr/local/bundle/gems/bundler-2.2.15/lib/bundler/runtime.rb:66:in `require'
2021-03-29T00:01:00.9391194Z 	from /usr/local/bundle/gems/bundler-2.2.15/lib/bundler/runtime.rb:66:in `block (2 levels) in require'
2021-03-29T00:01:00.9392342Z 	from /usr/local/bundle/gems/bundler-2.2.15/lib/bundler/runtime.rb:61:in `each'
2021-03-29T00:01:00.9393627Z 	from /usr/local/bundle/gems/bundler-2.2.15/lib/bundler/runtime.rb:61:in `block in require'
2021-03-29T00:01:00.9394750Z 	from /usr/local/bundle/gems/bundler-2.2.15/lib/bundler/runtime.rb:50:in `each'
2021-03-29T00:01:00.9395854Z 	from /usr/local/bundle/gems/bundler-2.2.15/lib/bundler/runtime.rb:50:in `require'
2021-03-29T00:01:00.9396922Z 	from /usr/local/bundle/gems/bundler-2.2.15/lib/bundler.rb:173:in `require'
2021-03-29T00:01:00.9398206Z 	from /github/workspace/vendor/bundle/ruby/2.7.0/gems/jekyll-4.2.0/lib/jekyll/plugin_manager.rb:53:in `require_from_bundler'
2021-03-29T00:01:00.9399556Z 	from /github/workspace/vendor/bundle/ruby/2.7.0/gems/jekyll-4.2.0/exe/jekyll:11:in `<top (required)>'
2021-03-29T00:01:00.9400650Z 	from /github/workspace/vendor/bundle/ruby/2.7.0/bin/jekyll:23:in `load'
2021-03-29T00:01:00.9401665Z 	from /github/workspace/vendor/bundle/ruby/2.7.0/bin/jekyll:23:in `<top (required)>'
2021-03-29T00:01:00.9402707Z 	from /usr/local/bundle/gems/bundler-2.2.15/lib/bundler/cli/exec.rb:63:in `load'
2021-03-29T00:01:00.9403805Z 	from /usr/local/bundle/gems/bundler-2.2.15/lib/bundler/cli/exec.rb:63:in `kernel_load'
2021-03-29T00:01:00.9405131Z 	from /usr/local/bundle/gems/bundler-2.2.15/lib/bundler/cli/exec.rb:28:in `run'
2021-03-29T00:01:00.9406176Z 	from /usr/local/bundle/gems/bundler-2.2.15/lib/bundler/cli.rb:494:in `exec'
2021-03-29T00:01:00.9407305Z 	from /usr/local/bundle/gems/bundler-2.2.15/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
2021-03-29T00:01:00.9408617Z 	from /usr/local/bundle/gems/bundler-2.2.15/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
2021-03-29T00:01:00.9409893Z 	from /usr/local/bundle/gems/bundler-2.2.15/lib/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
2021-03-29T00:01:00.9411044Z 	from /usr/local/bundle/gems/bundler-2.2.15/lib/bundler/cli.rb:30:in `dispatch'
2021-03-29T00:01:00.9412175Z 	from /usr/local/bundle/gems/bundler-2.2.15/lib/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
2021-03-29T00:01:00.9413279Z 	from /usr/local/bundle/gems/bundler-2.2.15/lib/bundler/cli.rb:24:in `start'
2021-03-29T00:01:00.9414338Z 	from /usr/local/bundle/gems/bundler-2.2.15/exe/bundle:49:in `block in <top (required)>'
2021-03-29T00:01:00.9415895Z 	from /usr/local/bundle/gems/bundler-2.2.15/lib/bundler/friendly_errors.rb:130:in `with_friendly_errors'
2021-03-29T00:01:00.9417535Z 	from /usr/local/bundle/gems/bundler-2.2.15/exe/bundle:37:in `<top (required)>'
2021-03-29T00:01:00.9418458Z 	from /usr/local/bundle/bin/bundle:23:in `load'
2021-03-29T00:01:00.9419216Z 	from /usr/local/bundle/bin/bundle:23:in `<main>'
@jeffreytse
Copy link
Owner

Hi @kinoute

Could you show me your Gemfile content?

Thanks and regards

@kinoute
Copy link
Author

kinoute commented Mar 31, 2021

It seems related to the lack of a Javascript engine. I had the same error on another action for Jekyll. Adding the nodejs package before bundle make the error disappear.

@jeffreytse
Copy link
Owner

jeffreytse commented Mar 31, 2021

Hi @kinoute

Could you provide me the project's repository to me? So that I can help to investigage this issue.

Thanks and regards

@kinoute
Copy link
Author

kinoute commented Mar 31, 2021

My project's repository is private, sorry. But just adding nodejs to your Dockerfile should fix the issue for many users.

I'm now using this action: https://github.com/helaili/jekyll-action

Without nodejs, I had the same error as here. So I made use of the pre_build_commands argument this action offer to install nodejs with apk:

name: Build and deploy jekyll site

on:
  push:
    branches:
      - master
      # - source
      # It is highly recommended that you only run this action on push to a
      # specific branch, eg. master or source (if on *.github.io repo)

jobs:
  jekyll:
    runs-on: ubuntu-16.04
    steps:
    - uses: actions/checkout@v2

    # Use GitHub Actions' cache to shorten build times and decrease load on servers
    - uses: actions/cache@v2
      with:
        path: vendor/bundle
        key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile') }}
        restore-keys: |
          ${{ runner.os }}-gems-
    # Standard usage
    - uses:  helaili/jekyll-action@master
      with:
        token: ${{ secrets.GH_TOKEN }}
        target_branch: 'gh-pages'
        pre_build_commands: apk --update add imagemagick nodejs

Works like a charm now!

@jeffreytse jeffreytse self-assigned this Apr 5, 2021
@jeffreytse jeffreytse added the enhancement New feature or request label Apr 5, 2021
@sid-r-singh
Copy link

My project's repository is private, sorry. But just adding nodejs to your Dockerfile should fix the issue for many users.

I'm now using this action: https://github.com/helaili/jekyll-action

Without nodejs, I had the same error as here. So I made use of the pre_build_commands argument this action offer to install nodejs with apk:

name: Build and deploy jekyll site

on:
  push:
    branches:
      - master
      # - source
      # It is highly recommended that you only run this action on push to a
      # specific branch, eg. master or source (if on *.github.io repo)

jobs:
  jekyll:
    runs-on: ubuntu-16.04
    steps:
    - uses: actions/checkout@v2

    # Use GitHub Actions' cache to shorten build times and decrease load on servers
    - uses: actions/cache@v2
      with:
        path: vendor/bundle
        key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile') }}
        restore-keys: |
          ${{ runner.os }}-gems-
    # Standard usage
    - uses:  helaili/jekyll-action@master
      with:
        token: ${{ secrets.GH_TOKEN }}
        target_branch: 'gh-pages'
        pre_build_commands: apk --update add imagemagick nodejs

Works like a charm now!

Thanks for your solution @kinoute . I had exactly the same problem & after using pre_build_commands to install nodejs in https://github.com/helaili/jekyll-action solved the problem.

@jeffreytse
Copy link
Owner

jeffreytse commented Aug 20, 2021

Hi @kinoute

Thanks for the patience, now I need to tell you the news, the latest release v0.3.0 has supported the pre-build commands to install additional dependencies. Beyond that, it also improved the building speed over almost 75%!

Hope you have a good day! : )

Thanks and Regards

@MatheusRich
Copy link

Can we close this issue?

@jeffreytse
Copy link
Owner

@MatheusRich Sure, if you have any issue, don't hesitate to reach out me. : )

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

No branches or pull requests

4 participants