When I run rails console in my production server with this command
rails c
I get this message:
You must use Bundler 2 or greater with this lockfile.
I checked bundler version:
gem list bundler
And I got this
bundler (2.0.2, default: 1.17.3, 1.16.3)
bundler-unload (1.0.2)
rubygems-bundler (1.4.4)
I read I could set bundler version with this command
bundle _2.0.2_ -v
And I got this message
Bundler version 2.0.2
But I keep getting the same error when running rails console.
Finally, some more information. My Gemfile.lock says I bundled with v2.0.1 (development bundler version). I'm using rvm in production and rbenv in development (not on purpose; I always used rbenv but I inherited an application using rvm in production).
What should I do to run rails console in production server in this situation? Can I uninstall older bundler versions and keep only v2.0.2? Should I updgrade to v2.0.2 in development to have the same versions?
Thanks!