genghiskhan
genghiskhan

Reputation: 1149

How to get newer version of Ruby into gem environment

I've installed Ruby 2.2.2 with rbenv. However when I run

gem env

it says that I am using 2.0.0. I read on a different question to run

sudo gem install -n /usr/local/bin --no-ri --no-rdoc bundler
rbenv rehash
bundle --path=vendor/bundle

However, when running the last line, I receive the error:

Could not locate Gemfile or .bundle/ directory

How do I get the system to use Ruby 2.2.2?

EDIT: I printed out the contents of my .bash_profile and it had the following two lines:

export PATH
export PATH="$HOME/.rbenv/bin:$PATH"

Is it bad that there is a blank export PATH? If so, how do I remove it?

Upvotes: 0

Views: 35

Answers (2)

genghiskhan
genghiskhan

Reputation: 1149

It turns out RVM was still present in the system. All I had to do was run:

rvmsudo rvm implode

Upvotes: 0

Sara Fuerst
Sara Fuerst

Reputation: 6068

If you have Ruby 2.2.2 installed already, you can use renv global

rbenv global 2.2.2

Check out the documentation here.

Upvotes: 1

Related Questions