I followed the instructions and thoughts raised in this question: "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 2"
I have the same error after problems with /User folder when a script removed the folders preceding with "." which included the .rbenv folder.
After a rebuild of rails, rbenv and such. Im still getting the error from rails
"Your Ruby version is 2.0.0, but your Gemfile specified 2.2.2"
RubyGems Environment:
- RUBYGEMS VERSION: 2.4.5
- RUBY VERSION: 2.2.2 (2015-04-13 patchlevel 95) [x86_64-darwin15]
- INSTALLATION DIRECTORY: /Users/chris/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0
- RUBY EXECUTABLE: /Users/chris/.rbenv/versions/2.2.2/bin/ruby
- EXECUTABLE DIRECTORY: /Users/chris/.rbenv/versions/2.2.2/bin
- SPEC CACHE DIRECTORY: /Users/chris/.gem/specs
- SYSTEM CONFIGURATION DIRECTORY: /Users/chris/.rbenv/versions/2.2.2/etc
- RUBYGEMS PLATFORMS:
- ruby
- x86_64-darwin-15
- GEM PATHS:
- /Users/chris/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0
- /Users/chris/.gem/ruby/2.2.0
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => false
- :backtrace => false
- :bulk_threshold => 1000
- "gem" => "-n/usr/local/bin"
- REMOTE SOURCES:
- https://rubygems.org/
- SHELL PATH:
- /Users/chris/.rbenv/versions/2.2.2/bin
- /usr/local/Cellar/rbenv/0.4.0/libexec
- /Users/chris/.rbenv/shims
- /Users/chris/.rbenv/bin
- /usr/local/bin
- /usr/local/sbin
- /usr/local/mysql/bin
- /Library/PostgreSQL/9.4/bin
- /usr/local/bin
- /usr/bin
- /bin
- /usr/sbin
- /sbin
Here is the current version:
$ rbenv versions
system
* 2.2.2 (set by /Users/chris/Dropbox/git/frontend.1/.ruby-version)
2.2.3
Current .bash_profile
PS1="\u$ "
alias ll="ls -lahG"
export PATH="/usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin:/Library/Postg$
export PATH="$HOME/.rbenv/bin:$PATH"
I tried this:
gem install --no-ri --no-rdoc bundler
rbenv rehash
bundle --path=vendor/bundle
But it did not fix or change the error.