I am doing bundle install on a rails project. But its showing me following error:
Could not find compatible versions
Because rails >= 4.0.0.beta1, < 5.0.5.rc1 depends on bundler
>= 1.3.0, < 2.0
and the current Bundler version (2.4.18) does not satisfy
bundler >= 1.3.0, < 2.0,
rails >= 4.0.0.beta1, < 5.0.5.rc1 cannot be used.
So, because Gemfile depends on rails = 4.1.6,
version solving has failed.
Your bundle requires a different version of Bundler than the
one you're running.
Install the necessary version with `gem install
bundler:2.0.0.pre.3` and rerun bundler using `bundle
_2.0.0.pre.3_ update`
I am currently using macOS Monterey (M1) version 12.2.1.
My current rbenv version is 3.1.3
I also tried 'bundle install' but it says:
> An error occurred while installing json (1.8.1),
> and Bundler cannot continue.
I also tried degrading ruby version to 2.1.5 using rbenv install 2.1.5 but it is saying BUILD FAILED (macOS 12.2.1 using ruby-build 20230428)