Reputation: 1974
I have installed many flavors of ruby on rvm, and using following command to change rvm ruby versions.
rvm use 1.9.3
then ruby -v
gives me following result
ruby 1.9.3p551 (2014-11-13 revision 48407) [i686-linux]
but when i try to run any commands like rails s
or bundle install
it gives me following error
Your Ruby version is 2.3.1, but your Gemfile specified 1.9.3
Upvotes: 0
Views: 106
Reputation: 524
Using
rvm list
you can get list of ruby version on your system along with current & default versions.
If ruby version is not specified in Gemfile, then it is generally considering default rvm version.
But if it is specified in Gemfile, then that version of ruby should be installed in your system along with its bundler.
First make sure ruby version either installing or using it,
rvm install '1.9.3'
rvm use '1.9.3'
To install bundle of required ruby version, run this command
gem install bundler
Upvotes: 2
Reputation: 44360
That's can happens, when you trying to use fresh installed ruby
without bundler
, all newest installed ruby
should also include bundler
installation.
$> rvm use 1.9.3 && gem install bundler # may terminal reload needed
$> bundle install
$> bundle exec rails s
Upvotes: 1