Saw Thinkar Nay Htoo
Saw Thinkar Nay Htoo

Reputation: 396

Fail to install bundle ruby version manager

I have never tried Ruby before. I am trying to run this elixirschool github repo.

I first got this error message.

$ bundle install  
Your Ruby version is 2.5.1, but your Gemfile specified ~> 2.3.7

So I follow the instruction from the question. How to fix "Your Ruby version is 1.9.3, but your Gemfile specified 2.0.0"

Now I get this message.

$ bundle install  
Traceback (most recent call last):  
    1: from /usr/local/bin/bundle:23:in `<main>'
/usr/local/bin/bundle:23:in `load': cannot load such file -- /usr/local/lib/ruby/gems/2.5.0/gems/bundler-1.16.1/exe/bundle (LoadError)

I also did this command.

$ bundler install
Traceback (most recent call last):
    2: from /usr/local/bin/bundler:23:in `<main>'
    1: from /usr/local/Cellar/ruby/2.5.1/lib/ruby/2.5.0/rubygems.rb:308:in `activate_bin_path'
/usr/local/Cellar/ruby/2.5.1/lib/ruby/2.5.0/rubygems.rb:289:in `find_spec_for_exe': can't find gem bundler (>= 0.a) with executable bundler (Gem::GemNotFoundException)

Upvotes: 0

Views: 2378

Answers (2)

0dumz
0dumz

Reputation: 61

Open the gemfile in the root of the folder and delete this:

BUNDLED WITH
   1.16.2 #or whatever version number you see 

Then run:

sudo gem install bundler

Check:

bundle --version

Upvotes: 1

Saw Thinkar Nay Htoo
Saw Thinkar Nay Htoo

Reputation: 396

Upvotes: 0

Related Questions