Question

I'm on Mac/Mavericks, using rbenv and this rail 4 repo. My rbenvs version is set to 2.1.0, I uninstalled RVM, but when I type in ruby -v it says ruby 2.1.1p76 (2014-02-24 revision 45161) [x86_64-darwin13.0] what do I need to do to make rbenv the default service for my ruby version?

However, the annoyance is working with my rails app. When I change ruby in my Gemfile to 2.1.1 and bundle install, it says my ruby version is 2.0.0. When I change my version to 2.1.1, it says my Ruby version is 2.0.0.

What do I need to do to set my ruby version to 2.1.0 so the Gemfile can recognize it?

enter image description here enter image description here

Bash_profile:

export PATH=/usr/local/bin:$PATH
PS1='\W \u\$ '

if which rbenv > /dev/null; then eval "$(rbenv init -)"; fi

export PATH="$HOME/.rbenv/bin:$PATH"
export PATH="$HOME/.rbenv/shims:$PATH"
Was it helpful?

Solution

Bundler is trying to tell you that the version of Ruby you have loaded is not matching the one you specified in your Gemfile.

rbenv install 2.1.0 && rbenv local 2.1.0

OTHER TIPS

Was it Spring, maybe? Try spring stop

See How to fix "Your Ruby version is 1.9.3, but your Gemfile specified 2.0.0" for details.

I've actually noticed that message showing up if you don't install bundler right off the bat in the new ruby version before trying to perform a bundle update.

    Your Ruby version is 2.0.0, but your Gemfile specified x.x.x

In my case I was moving from the Ruby 2.0 that comes with Mavericks to Ruby 1.9.3p125 with rbenv. I believe the shell will try using whatever bundle binary that is available. My solution was just:

    gem install bundler
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top