0

I have ruby 2.3.0 and 2.3.1 installed via chruby and:

$ cat ~/.ruby-version
ruby-2.3.1

But each time I open a new terminal window, it gets reset 2.3.0.

$ cd my_rails_app
$ rails s
Your Ruby version is 2.3.0, but your Gemfile specified 2.3.1

but

$ cat Gemfile
source 'https://rubygems.org'

ruby '2.3.1'

and for some reason:

$ chruby
 * ruby-2.3.0
   ruby-2.3.1

Therefore I alwasys have to do:

$ chruby    ruby-2.3.1
Sojo
  • 5,455
  • 3
  • 10
  • 11

1 Answers1

0

You need to set the default version of Ruby for it to load in your shell profile (e.g. .bashrc, .zshrc, etc) like so:

chruby ruby-2.3.1

baarkerlounger
  • 1,217
  • 8
  • 40
  • 57