• Register
0 votes
61 views

Problem :

I am trying to execute the below script:

gem install rdoc --no-document

gem install bundle

bundle

 I have already added /srv/myuser/.gem/ruby/2.5.0/bin to the path so I was able to install the gems.

I can also find the bundle when I try to perform:

ls -ltrah /srv/myuser/.gem/ruby/2.5.0/bin

I have also tried to install the bundler but that is not helping the cause. Am I doing anything wrong here ?

The gem which bundle command is showing me nothing. The gem spec bundle command is showing it to me.

I also tried to install the bundler before running the bundle but the same issue as follows

“Can't find gem bundler (>= 0.a) with executable bundle (gem::gemnotfoundexception)”

 appears while executing below commands :

gem list bundle shows

bundle (0.0.1)
bundler (2.0.1)

 

Does anyone have any solution on my issue?

6 5 3
7,540 points

Please log in or register to answer this question.

1 Answer

0 votes

 Solution :

The Bundler version 2 have introduced the new feature to automatically use your version of Bundler which is specified in your Gemfile.lock of your project. So if you have the existing Gemfile.lock with the line like below at the bottom

BUNDLED WITH 1.17.3

Then the Bundler will try to run with the Bundler version < 2.0. Since you have just Bundler 2.0.1 (and the Rubygems >= 2.7.0) installed on your box, it is failing with the rather unhelpful error message.

To fix your issue, you must follow below approach :

·  You need to remove the lines from your Gemfile.lock and must use bundler 2.x everywhere from now on,

·   You can also try to install the bundler 1.x version with gem install bundler -v '< 2.0' to use your appropriate version as specified by the Gemfile.lock.

9 7 4
38,600 points

Related questions

0 votes
1 answer 35 views
35 views
Problem: Hello Kodlogs, I tried pushing my app and I got an error message of this nature; you must use bundler 2 or greater with this lockfile. What can I do to correct this?
asked Nov 2, 2020 Festus James 360 points
0 votes
1 answer 534 views
534 views
Problem : I want to run the specs, you will need to install RSpec. First, run the gem install bundler in a root directory of the project. Then, run the bundle install. To run the single spec file, run the command like below: bundle exec rspec spec/00_hello_spec.rb. To ... ruby, and I want to bundle install inside of the atom? Could anyone tell me how to use the atom or run anything in the atom?
asked Jan 22, 2020 jwilliam 3.9k points
0 votes
1 answer 28 views
28 views
Problem: I am learning ruby and I have updated XCode on my Mac and since then when I run Docker using docker-sync-stack startI get the following error: mkmf.rb can't find header files for ruby at /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/ ... :, brew install rbenv ruby-buildbut that doesn't change anything. Does anyone have idea how I should fix this? I will be thankful!
asked Dec 2, 2020 sasha 6.4k points
0 votes
1 answer 42 views
0 votes
1 answer 10 views
10 views
Problem: Hello Kodlogs, I tried running this command on my app $ Heroku run bash ~$ rails c But it didn't come out well as this error was displayed Could not find rake-12.0.0 in any of the sources Run bundle installs to install missing gems.
asked Dec 27, 2020 Festus James 360 points
0 votes
1 answer 14 views
14 views
Problem: Hello Kodlogs, I encountered a strange issue where vagrant works fine for a while and it completely stops working unexpectedly. Afterward, any of the vagrant commands I run just give me this error: "exec error: exec: "ruby": executable file not found in %PATH%"
asked Dec 29, 2020 Festus James 360 points
0 votes
1 answer 191 views
191 views
Problem : I am trying to install the gem using gem install mygem or update a RubyGems using gem update --system, and it fails with below error: ERROR:  While executing gem ... (Gem::FilePermissionError) You don't have write permissions for the /Library/Ruby/Gems/2.0.0 directory. Does anyone have the idea how to fix this error?
asked Jan 22, 2020 jwilliam 3.9k points
0 votes
1 answer 37 views
37 views
Problem : I have created a project on my old laptop using rails and heroku. I am trying to access the files and push the new edits to heroku on my laptop. Luckily they are all saved on Git so I can clone the git repository onto my new laptop. My new laptop had ... nightmare for me and I just want to find a correct way to install ruby and rails so that above mentioned errors will get out the way.
asked Nov 28, 2019 alecxe 7.5k points