Mavericks, RBENV, Your Ruby version is 2.0.0, but your Gemfile specified 2.1.1

Kyle Carlson :

I've read and tried the suggestions in several, other, questions, like mine (all with accepted answers) as well as a few more hours of Google searching, but nothing worked. That leads me to think my issue is something corrupt with a piece of Ruby/RBENV ecosystem on my computer or maybe a dreaded PATH issue. I always have to run sudo to install any gems, which I've never had to do before, so that's puzzling too.

Here are some outputs of files & commands I think are relevant. If you need more information, please let me know:

.zshrc

export PATH="/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin" if which rbenv > /dev/null;
then eval "$(rbenv init - zsh)"; fi

ruby -v

ruby 2.1.1p76 (2014-02-24 revision 45161) [x86_64-darwin13.0]

rbenv local

2.1.1

Gemfile (I've also blown out my gemfile.lock several times too)

source 'https://rubygems.org'

ruby '2.1.1'

gem 'rails', '4.1.4'
... [omitted for brevity]

.ruby-version

2.1.1

echo $PATH

/[user path]/.rbenv/shims:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin

I'd be grateful if anyone has any ideas about what I should try next, short of reformatting my computer.

EDIT 1: Tried option B installing both of them from their git repos below as per Ben Kreeger. type rbenv correctly returned rbenv is a shell function and the original message kept appearing. I reinstalled Mavericks and my setup still isn't working.

EDIT 2: Any time I try to install a gem, I get a Gem::FilePermissionError saying I don't have access to the Ruby 2.0.0 folder (installed as system). Going to fiddle with RBENV some more...

EDIT 3: More debugging (everything below)

Kept erroring when installing Ruby versions with RBENV and found some people mentioning readline issues.

Tried the following steps to fix readline: https://github.com/sstephenson/ruby-build/issues/550#issuecomment-40681557, and got an error that my Xcode command line tool install was bad.

Ran xcode-select --install to reinstall them.

Tried rbenv install 2.1.1 again, and got The Ruby openssl extension was not compiled. Missing the OpenSSL lib?

As per https://coderwall.com/p/n9bnug, I linked my OpenSSL extension with https://coderwall.com/p/n9bnug

Reset versions of Ruby: rbenv local 2.1.1 rbenv global 2.1.1 and rbenv rehash

Everything seems to indicate bundler is trying to use my system Ruby install (2.0.0-p247) instead of what RBENV is specifying. Baffled where the missing link is.

Kyle Carlson :

WOW, JUST WOW.

All I had to do was gem install bundler and then rbenv rehash. Everything worked.

The original error message pointed me to a problem with RBENV or my Ruby version when in reality it was just falling back on an old version of bundler.

Why wouldn't I have received the more standard this needs bundler version [xxxx]... error instead of telling me my Ruby version is specified incorrectly?

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

rbenv Your Ruby version is 2.0.0, but your Gemfile specified 2.1.2

Error Ruby "Your Ruby version is 3.0.2, but your Gemfile specified 2.7.1"

Your Ruby version is 2.3.1, but your Gemfile specified 2.4.1

Your Ruby version is 3.1.2, but your Gemfile specified 2.6.8

How to fix "Your Ruby version is 1.9.3, but your Gemfile specified 2.0.0"

Your Ruby version is 1.9.3, but your Gemfile specified 2.1.0

Your Ruby version is 2.0.0, but your Gemfile specified 2.1.0

Your Ruby version is 2.7.0, but your Gemfile specified 2.7.1

Your Ruby version is 2.5.1 but your Gemfile specified 2.4.0

Your version is 2.3.4, but your Gemfile specified 2.4.1

our Ruby version is 2.6.8, but your Gemfile specified 2.7.5

How to fix "Your Ruby version is 2.3.0, but your Gemfile specified 2.2.5" while server starting

How to fix "Your Ruby version is 2.3.3, but your Gemfile specified 2.7.1" when i use bundle install

keep getting this error "Your Ruby version is 3.0.2, but your Gemfile specified 3.2.2"

I can't seem to shake this fastlane issue on GitHub actions: " Your Ruby version is 3.0.2, but your Gemfile specified 2.7.7"

Why do I get the error "Your Ruby version is 2.0.0, but your Gemfile specified 2.2.2" although I have 2.2.2 installed

Error using heroku_san gem: Your Ruby version is x.x.x, but your Gemfile specified x.x.x (Bundler::RubyVersionMismatch)

Add `gem 'mysql2'` to your Gemfile (and ensure its version is at the minimum required by ActiveRecord)

indices = 2 is not in [0, 1)

Converting (0,1,0, 0, 1, 1, 1) to (0, 0, 0, 1, 0, 1, 2) in R

Your submission was not accepted.Here is an explanation:The call capital_indexes('HI') should return'[0, 1]',but it returned '[0, 1, 0, 1]'

How to output an array with a[0] - a[0]a[1] - a[0]a[1]a[2]

Why is 2 ** (1 << 31) == 0?

values changes (avoid 0 1 to 1 2)

Azure Function deploy error: Your function app is targeting V1, but Azure host has function version V2,

Create the sequence 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4 with seq()

Programatic way to retrieve the Ruby version specified in the Gemfile?

OpenSSL undefined symbol: EVP_mdc2, version OPENSSL_1_1_0

How to solve "Unable to load theme by specified key: 'rwd\/astra'","1":"#0 error in magento2?