Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Doing bundle --path uses wrong Ruby version

Tags:

ruby

bundler

I'm using Ruby 2.2.2. When I do bundle --path vendor/bundle I get a folder called, strangely enough, vendor/bundle/ruby/2.2.0.

My Gemfile specifies Ruby 2.2.2. My .ruby-version specifies 2.2.2.

When I do rvm list, I get => ruby-2.2.2 [ x86_64 ]. When I do ruby -v, I get ruby 2.2.2p95 (2015-04-13 revision 50295) [x86_64-darwin14]. I even uninstalled Ruby 2.2.0 and I still get the 2.2.0 folder when I do bundle --path vendor/bundle.

Why is it using Ruby 2.2.0 and how can I get it to use 2.2.2?

like image 929
Jason Swett Avatar asked Jul 15 '26 19:07

Jason Swett


1 Answers

I've seen this before as well, I think this is likely the answer to your question:

vendor/bundle and ruby version

You can verify this quickly in your rails console:

> Loading development environment (Rails 4.2.4)
> 2.1.2 :001 > RbConfig::CONFIG['ruby_version']  => "2.1.0"
like image 61
Mike K. Avatar answered Jul 18 '26 08:07

Mike K.