Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

bundler's executable "bundle" conflicts with /usr/local/bin/bundle Overwrite the executable?

Tags:

ruby

jekyll

When I install jekyll bundle and entering the command of gem install jekyll bundler. The terminal pop up the message of bundler's executable "bundle" conflicts with /usr/local/bin/bundle

Overwrite the executable?

like image 499
Jeffrey Wang Avatar asked Mar 14 '18 00:03

Jeffrey Wang


People also ask

How does bundler deploy the bundle for production use?

In deployment mode, Bundler will 'roll-out' the bundle for production use. Please check carefully if you want to have this option enabled in development or test environments. A space-separated list of groups to install only gems of the specified groups. The location to install the specified gems to. This defaults to Rubygems' setting.

What is the use of bundle config?

A space-separated list of optional groups referencing gems to include during installation. You can use bundle config to give Bundler the flags to pass to the gem installer every time bundler tries to install a particular gem.

Why does the command ‘bundler’ fail?

But the execution of the command ‘bundler’ fails. It is having a trouble to find the bundler gem itself. Although the ‘bundler’ tool is actually exist in the system, typing the command generates an error state that the gem bundler is not available. Try to check the Gemfile.lock file where it can be the source of the problem.

What is a bin/rails executable in bundler?

These executables run in Bundler's context. If used, you might add this directory to your environment's PATH variable. For instance, if the rails gem comes with a rails executable, this flag will create a bin/rails executable that ensures that all referred dependencies will be resolved using the bundled gems.


1 Answers

In my case, I have to overwrite both /usr/local/bin/bundle and /usr/local/bin/bundler in order to successfully installed bundler-1.16.6. Otherwise, when running jekyll new websitedir, an error with the following message occurs.

Bundler: ruby: No such file or directory -- /usr/local/lib/ruby/gems/2.5.0/gems/bundler-1.16.1/exe/bundle (LoadError)

In most cases, I think it is safe to overwrite. But it is always good to check what you are actually overwriting. For example, running ls -alh /usr/local/bin/bundle in the terminal gives us the following output. Thus, it is safe to overwrite.

/usr/local/bin/bundle -> ../Cellar/ruby/2.5.1/libexec/gembin/bundle

like image 187
belindanju Avatar answered Sep 22 '22 07:09

belindanju