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

Error Creating New Website #2007

Closed
wise-coders opened this issue Dec 21, 2023 · 5 comments
Closed

Error Creating New Website #2007

wise-coders opened this issue Dec 21, 2023 · 5 comments
Labels

Comments

@wise-coders
Copy link

After creating a website from template, cloning the repository, I got this error:

An error occurred while installing libv8-node (18.16.0.0), and Bundler cannot
continue.

In Gemfile:
mini_racer was resolved to 0.8.0, which depends on
libv8-node


A complete log is here:

C:\work\wise-coders-github\websites>cd wise-coders.github.io

C:\work\wise-coders-github\websites\wise-coders.github.io>bundle exec jekyll serve
Could not find gem 'classifier-reborn' in locally installed gems.
Run bundle install to install missing gems.

C:\work\wise-coders-github\websites\wise-coders.github.io>bundle install
Fetching gem metadata from https://rubygems.org/........
Resolving dependencies...
Fetching base64 0.2.0
Fetching minitest 5.20.0
Fetching mutex_m 0.2.0
Fetching bigdecimal 3.1.5
Fetching connection_pool 2.4.1
Fetching latex-decode 0.4.0
Fetching namae 1.1.1
Fetching fast-stemmer 1.0.2
Fetching deep_merge 1.2.2
Fetching crass 1.0.6
Fetching cssminify2 2.0.1
Fetching execjs 2.9.1
Fetching racc 1.7.3
Fetching sax-machine 1.3.2
Fetching gemoji 4.1.0
Fetching htmlcompressor 0.4.0
Installing fast-stemmer 1.0.2 with native extensions
Installing mutex_m 0.2.0
Installing base64 0.2.0
Installing connection_pool 2.4.1
Installing deep_merge 1.2.2
Installing latex-decode 0.4.0
Installing crass 1.0.6
Installing namae 1.1.1
Installing execjs 2.9.1
Installing htmlcompressor 0.4.0
Installing sax-machine 1.3.2
Installing bigdecimal 3.1.5 with native extensions
Installing minitest 5.20.0
Installing racc 1.7.3 with native extensions
Installing gemoji 4.1.0
Fetching mini_mime 1.1.5
Fetching multi_xml 0.6.0
Fetching jekyll-email-protect 1.1.0
Fetching jekyll-link-attributes 1.0.1
Installing mini_mime 1.1.5
Fetching json 2.7.1
Installing multi_xml 0.6.0
Installing cssminify2 2.0.1
Fetching jekyll-twitter-plugin 2.1.0
Installing jekyll-email-protect 1.1.0
Installing jekyll-link-attributes 1.0.1
Fetching libv8-node 18.16.0.0
Installing json 2.7.1 with native extensions
Fetching unicode_utils 1.4.0
Installing libv8-node 18.16.0.0 with native extensions
Fetching drb 2.2.0
Fetching uglifier 4.2.0
Fetching bibtex-ruby 6.0.0
Fetching jekyll-archives 2.2.1
Fetching jekyll-diagrams 0.10.0
Fetching jekyll-get-json 1.0.0
Fetching jekyll-imagemagick 1.4.0
Installing drb 2.2.0
Installing jekyll-archives 2.2.1
Installing bibtex-ruby 6.0.0
Installing jekyll-get-json 1.0.0
Installing jekyll-imagemagick 1.4.0
Fetching jekyll-jupyter-notebook 0.0.5
Installing uglifier 4.2.0
Installing unicode_utils 1.4.0
Installing jekyll-twitter-plugin 2.1.0
Fetching jekyll-paginate-v2 3.0.0
Fetching jekyll-sitemap 1.4.0
Installing jekyll-jupyter-notebook 0.0.5
Fetching citeproc 1.0.10
Installing jekyll-paginate-v2 3.0.0
Installing jekyll-sitemap 1.4.0
Fetching csl 1.6.0
Installing citeproc 1.0.10
Fetching httparty 0.21.0
Installing csl 1.6.0
Installing httparty 0.21.0
Fetching citeproc-ruby 1.1.14
Fetching csl-styles 1.0.1.11
Installing citeproc-ruby 1.1.14
Installing jekyll-diagrams 0.10.0
Installing csl-styles 1.0.1.11
Fetching classifier-reborn 2.3.0
Fetching nokogiri 1.15.5 (x64-mingw-ucrt)
Installing classifier-reborn 2.3.0
Installing nokogiri 1.15.5 (x64-mingw-ucrt)
Fetching jekyll-toc 0.18.0
Fetching loofah 2.22.0
Installing jekyll-toc 0.18.0
Installing loofah 2.22.0
Fetching feedjira 3.2.2
Installing feedjira 3.2.2
Fetching json-minify 0.0.3
Installing json-minify 0.0.3
Fetching jekyll-minifier 0.1.10
Installing jekyll-minifier 0.1.10
Fetching jekyll-scholar 7.1.3
Installing jekyll-scholar 7.1.3
Fetching activesupport 7.1.2
Installing activesupport 7.1.2
Fetching html-pipeline 2.14.3
Installing html-pipeline 2.14.3
Fetching jemoji 0.13.0
Installing jemoji 0.13.0
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

current directory:
C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/libv8-node-18.16.0.0/ext/libv8-node
C:/Ruby32-x64/bin/ruby.exe extconf.rb
creating Makefile
C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/libv8-node-18.16.0.0/ext/libv8-node/builder.rb:12:in
build_libv8!': failed to download node 18.16.0 (Libv8::Node::BuilderError) from C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/libv8-node-18.16.0.0/ext/libv8-node/location.rb:30:in install!'
from extconf.rb:15:in `

'
==== in
C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/libv8-node-18.16.0.0/ext/libv8-node
==== running
C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/libv8-node-18.16.0.0/libexec/download-node

extconf failed, exit code 1

Gem files will remain installed in
C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/libv8-node-18.16.0.0 for inspection.
Results logged to
C:/Ruby32-x64/lib/ruby/gems/3.2.0/extensions/x64-mingw-ucrt/3.2.0/libv8-node-18.16.0.0/gem_make.out

C:/Ruby32-x64/lib/ruby/3.2.0/rubygems/ext/builder.rb:119:in run' C:/Ruby32-x64/lib/ruby/3.2.0/rubygems/ext/ext_conf_builder.rb:27:in build'
C:/Ruby32-x64/lib/ruby/3.2.0/rubygems/ext/builder.rb:187:in build_extension' C:/Ruby32-x64/lib/ruby/3.2.0/rubygems/ext/builder.rb:221:in block in
build_extensions'
C:/Ruby32-x64/lib/ruby/3.2.0/rubygems/ext/builder.rb:218:in each' C:/Ruby32-x64/lib/ruby/3.2.0/rubygems/ext/builder.rb:218:in build_extensions'
C:/Ruby32-x64/lib/ruby/3.2.0/rubygems/installer.rb:843:in build_extensions' C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/bundler-2.4.22/lib/bundler/rubygems_gem_installer.rb:76:in build_extensions'
C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/bundler-2.4.22/lib/bundler/rubygems_gem_installer.rb:28:in
install' C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/bundler-2.4.22/lib/bundler/source/rubygems.rb:203:in install'
C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/bundler-2.4.22/lib/bundler/installer/gem_installer.rb:54:in
install' C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/bundler-2.4.22/lib/bundler/installer/gem_installer.rb:16:in install_from_spec'
C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/bundler-2.4.22/lib/bundler/installer/parallel_installer.rb:130:in
do_install' C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/bundler-2.4.22/lib/bundler/installer/parallel_installer.rb:121:in block in worker_pool'
C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/bundler-2.4.22/lib/bundler/worker.rb:62:in
apply_func' C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/bundler-2.4.22/lib/bundler/worker.rb:57:in block in process_queue'
C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/bundler-2.4.22/lib/bundler/worker.rb:54:in
loop' C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/bundler-2.4.22/lib/bundler/worker.rb:54:in process_queue'
C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/bundler-2.4.22/lib/bundler/worker.rb:90:in
`block (2 levels) in create_threads'

An error occurred while installing libv8-node (18.16.0.0), and Bundler cannot
continue.

In Gemfile:
mini_racer was resolved to 0.8.0, which depends on
libv8-node

C:\work\wise-coders-github\websites\wise-coders.github.io>bundle exec jekyll serve
Could not find gem 'mini_racer' in locally installed gems.
Run bundle install to install missing gems.

C:\work\wise-coders-github\websites\wise-coders.github.io>

@ToryDeng
Copy link
Contributor

You are using Windows. Actually I also encountered this prolem on my Windows laptop. For some reason I didn't want to use docker and just installed the ruby and gems, but this gem cannot be installed.

I didn't solve it but bypassed it by installing an Ubuntu subsystem. The template works fine in the subsystem although you need to install some tools like gcc first before bundle install.

@george-gca
Copy link
Collaborator

When I tried on Windows I also used WSL. I think I will add it to the README since running on Windows seems a common issue here.

@nWestie
Copy link
Contributor

nWestie commented Dec 26, 2023

I would agree, I recently had to set up my project again on windows and tried WSL instead of docker, and it went very smoothly (especially compared to what I'm remembering from setting up in docker a year or two ago). I already had gcc installed, so needed to install ruby, bundler, and imagemagick myself, then everything was smooth sailing, just open the project in VScode and chug.

@roshanwaa
Copy link

The error you're encountering seems to be related to the libv8-node gem and its native extensions. This gem is required by mini_racer, and it's causing issues during the installation process.

Here are some steps you can try to resolve the issue:

Install Node.js:
libv8-node relies on Node.js, and it seems that it's having trouble downloading Node.js. Ensure that you have Node.js installed on your machine.

Update Bundler:
Update your Bundler version to the latest one by running command:

gem install bundler
Retry Bundle Install:
After installing Node.js and updating Bundler, try running bundle install again:

bundle install
Alternative to mini_racer:
If you continue to face issues, you can consider using an alternative JavaScript runtime that doesn't rely on native extensions. One such alternative is execjs. To switch to execjs, you can update your Gemfile to remove the mini_racer dependency and add execjs:

Replace: gem 'mini_racer'
with:gem 'execjs'Then run bundle install again.

Retry Jekyll Serve:
Once the bundle install is successful, try running Jekyll serve again:

bundle exec jekyll serve

@deepanshudagdi
Copy link

deepanshudagdi commented Feb 6, 2024

Thanks! It worked and I recommend installing jupyter again after installing bundle

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

6 participants