I am on a Mac running OSX 10.11 El Capitan. I installed Ruby 2.3.1 via rvm. If I type in the terminal
ruby --version
It says that I am running 2.0.0
But if I type
rvm use 2.3.1
And then
ruby --version
It says that I am running 2.3.1
But next time I open terminal it goes back to 2.0.0
How can I use latest version of Ruby by default?
rvm --default use 2.3.1
Documentation here.
Make a .ruby-version file in a directory of your project and in it put ruby-3.2.1 or which ever version you want
Related
I am trying to upgrade Ruby because I need to setup a Jekyll template, and I need to latest version to do it. Since I have a Mac running Sierra, I already have Ruby preinstalled as well as the Homebrew installation. When I install it using brew install ruby, it works, but when I check the version, it is still at 2.0.0 instead of 2.3.1 where it should be. Homebrew says I have 2.3.1, but the CLI says I have 2.0.0. I tried to use brew link --override ruby to make it work, but it said everything was working and it got me nowhere.
Use rbenv and plugin ruby-build. It will keep several versions of ruby on the one machine.
After install go to directory with your code, run rbenv install 2.3.1 and create file .ruby-version containing 2.3.1. All scripts running from this directory will use ruby 2.3.1.
Or you will able to set ruby version for all running scripts - rbenv global 2.3.1
my macbook is OSX El Capitan. It has Apple pre-installed universal Ruby version 2.0.0.
Now, I want to use latest Ruby 2.3.0. I managed to use rvm to install Ruby 2.3.0. I see the following message after rvm finished installing ruby 2.3.0:
Ruby was built without documentation, to build it run: rvm docs generate-ri
/Users/John/.rvm/bin/rvm: line 66: shell_session_update: command not found
Creating alias default for ruby-2.3.0...
* To start using RVM you need to run `source /Users/John/.rvm/scripts/rvm`
in all your open shell windows, in rare cases you need to reopen all shell windows.
I followed this message, & run command
source /Users/John/.rvm/scripts/rvm
but when I run ruby -v, the version is still Apple pre-installed Ruby 2.0.0. How can I switch to the ruby I installed through rvm?
(under path .rvm/rubies I can find ruby-2.3.0)
To switch to using 2.3.0, do
rvm use 2.3.0
To make it default, do
rvm use --default 2.3.0
I have 1.8 and 2.0 installed on my system. How I can delete the old one or Use the new one to work with gems?
Be sure to install RVM and then select version 2.0 like this:
rvm use 2.0.0
You can check which version is being used with
ruby -v
I'm a total newbie when it comes to using Terminal, so I don't really understand what's happening here when I try to upgrade my ruby version (1.8.7) with rvm on a Mac OS X 10.7.3.
When I input
rvm install current && rvm use current
I get this
system
system
What does this mean? And how can I proceed with the installation of the latest version?
The current rvm command outputs the name of the currently active installation of Ruby; in this case, it's using your system's pre-installed Ruby (1.8.7).
Try this:
rvm install 2.0 # (or whatever version you need)
rvm use 2.0 --default # this sets the default to the 2.0 install
I'm trying to install Ruby version 2.0.0 using RVM. I'm trying to use the Rails installer (railsinstaller.org).
I have downloaded the package and ran the installer and I have also restarted all terminal windows.
Here is the issue I am encountering:
my terminal http://img822.imageshack.us/img822/9704/stacks.png
As you can see, it says that RVM installed Ruby version 2.0.0. When I try to tell RVM to use this version it says that it is not installed.
Looks like it may have been fixed. Try rvm get head and then try again: https://github.com/wayneeseguin/rvm/issues/1832