What to do if an error occurs when nokogiri enters when bundle install

background

I'm using a Mac, but when I try to build a docker-machine on Parallels Desktop Pro Edition environment, I get an error no matter what I do at the stage of bundle install to the docker container, so this article I have written.

approach

it's simple. Just add the following to .bundle / config in the directory where you are trying to run bundle install:

Project root/.bundle/config


BUNDLE_BUILD__NOKOGIRI: "--use-system-libraries"

After adding, if you execute bundle install using the docker container, it will pass smoothly.

How did you find it?

Before the nokogiri error, throwing an error in therubyracer and running $ bundle config --local build.therubyracer --with-v8-include = / usr / local / opt / [email protected] will fix it. Information and actually solved it, but when this command is executed, BUNDLE_BUILD__THERUBYRACER:"-with -v8-dir = / usr / local / opt / [email protected] " was added. However, even if I executed bundle config build.nokogiri" --use-system-libaries " in nokogiri, nothing changed to .bundle / config, so I added" Maybe manually. I thought, "Well, then I'll pass it?"

I thought that other measures led to success, so I deleted the added contents, deleted the directory containing the gem that I put in bundle install, and tried running bundle install again. I didn't pass. When I returned the added contents and executed bundle install, it succeeded. I think this method is the simplest.

Recommended Posts

What to do if an error occurs when nokogiri enters when bundle install
Add gem'rails-i18n','~> 6.0.0' and what to do if bundle install gives an error
What to do and how to install when an error occurs in DXRuby 1.4.7
What to do if an ActionController :: UnknownFormat error occurs
What to do if an error occurs when doing npm install axios in React + Typescript project
What to do if mysql2 gets a bundle install error
no space left on device What to do if an error occurs
What to do if you get an error when you hit Heroku logs
What to do if ClassNotFoundException occurs when starting Tomcat
What to do when a null byte error occurs
Error ExecJS :: RuntimeUnavailable: What to do when it occurs
wildflly10 java8 ERROR [org.jboss.jca.core.tx.jbossts.XAResourceRecoveryImpl] (Periodic Recovery) IJ000906 What to do if an error occurs
What to do when javax.batch.operations.JobStartException occurs
What to do if you get an error with bundle install by entering gem'bcrypt' in your Gemfile
What to do if an error occurs in VS Code when importing a django module or your own module installed by pip install
What to do when a javax.el.PropertyNotWritableException occurs
What to do if you install Ubuntu
What to do when an UnsupportedCharsetException occurs in a lightweight JRE
What to do if a SAX Parser error occurs when using Liferay 7 / DXP on AWS
What to do if you get an error during rails db: reset
What to do if you get an uninitialized constant Likes Controller error
Error when bundle install
What to do if an SSH key authentication error occurs during automatic deployment to EC2 with Capistrano
What to do when IllegalStateException occurs in PlayFramework
What to do if you should have installed Rails but an error occurs with rails -v (for beginners)
What to do if you get an error on heroku rake db: migrate
What to do if ffi installation fails when launching an application in Rails
What to do if you get an "A server is already running." Error when you try to start the rails server
After installing'devise''bootstrap' of gemfile with rails, what to do when url is an error
What to do if you get the error Couldn't find Item without an ID
What to do if you get a port error when docker-compose up on Mac
What to do when you launch an application with rails
What to do if you get an error saying "Please enter a valid value" when getting with Rails datetime_field
What to do if you get an error saying "Could not find a JavaScript runtime." When starting rails server
[Rails] What to do if you accidentally install bundle in the production environment in your local environment
What to do if you get a "Cannot Pull Container Error" when starting ECS ​​Fargate
What to do after Vagrant install
[Rails] What to do if you can't get an error message with the errors method
What to do if you get an error in Basic authentication during Rails test code
[Rails 6] What to do when a missing a template error occurs after introducing haml [Super easy]
What to do when an error occurs in rails db: migrate ((StandardError: An error has occurred, this and all later migrations canceled :))
<Dot installation> What to do if you cannot proceed due to an error when building a development environment for Rails learning.
What to do if you get a gcc error in Docker
What to do if you get a DISPLAY error in gym.render ()
What to do if you get angry with OpenSSL with pyenv install
What to do if you go offline due to SSL certificate error when running Jenkins on Mac
[Spring Boot] What to do if an HttpMediaTypeNotAcceptableException occurs on an endpoint for which produces is set
[Programming beginner] What to do when rails s becomes an error in the local development environment
[Note] What to do if bundle install in Chapter 3 of the rails tutorial is not possible
What to do if you get a JNI shared library error when trying to build in Eclipse
What to do if you get an [An HTTP request took too long to complete.] Error in Docker.
A reminder when an aapt.exe error occurs
What to do when undefined method ʻuser_signed_in?'
[Composer] [Laravel] What to do if you cannot install due to insufficient memory
What to do if you can't install the plugin from the Eclipse marketplace
What to do if tomcat process remains when tomcat is stopped in eclipse
Notes on what to do when a WebView ClassNotFoundException occurs in JavaFX 12
What to do if zip dies if there is a pom when making an executable jar with gradle
What to do if you can't bundle update and bundle install after installing Ruby 3.0.0 in the Rails tutorial
What to do if you get an error saying Cannot find a valid baseurl for repo when you use yum -y install docker in a udemy course using CentOS7
What to do if you get a SQLite3 :: BusyException: database is locked error