I've built a Rails 5 app and it's working great but I'd like to change the Ruby version I'm running it on. I'm using RVM 1.27.0 on Ubuntu 16.04. I copied the app folder to a different path and changed the versions on .ruby_version and my Gemfile:
ruby 2.2.2p95 (2015-04-13 revision 50295) [x86_64-linux]
Your Ruby version is 2.3.1, but your Gemfile specified 2.2.2.
You're using a system bundler which is why you're seeing a different version of ruby. All you need to do is install bundler under your current ruby version:
gem install bundler bundle install
Once you do a bundle install you'll get the gem's built for the correct ruby version.