How To Update Ruby In Mac Osx
Switch among multiple versions of Ruby
Overview
- Versions
- What Ruby-red version is installed?
- Gem version numbers
- Update RubyGems and Bundler:
- Update Bundler:
- Install rbenv
- Uninstall rbenv
- Install to /usr/local/bin
- rbenv vs rvm
- Scarlet Version Manager (rvm)
- Install RVM
- View rvm version number
- Secure route:
- Become latest version of Ruby
- Uninstall Ruby
- To upgrade Ruby using RVM
- Sample Cherry Tree program
- Remove rvm
- Red apps on Mac
- Resources:
- More than on OSX
The major commands around Ruby:
- ruby
- gem
- parcel
- rbenv version director or
- rvm version manager
PROTIP: There is a war going on within the Crimson community between rvm and rbenv. See http://jonathan-jackson.net/rvm-and-rbenv and Ryan McGeary who switched to rbenv.
Versions
-
Await at the listing of Ruby-red versions at
https://world wide web.ruby-lang.org/en/downloads
-
Remember the lastest version number (such as "2.7.1").
What Ruby version is installed?
A Ruby linguistic communication compiler is included in Mac OSX. And so we can jump straight to view version information.
Caution: Don't touch the system Ruby that comes with your Mac.
-
Open up a Concluding Shell Window and blazon:
ruby --version
Alternately:
cherry --version
The response for the High Sierra default:
red ii.3.7p456 (2018-03-28 revision 63024) [universal.x86_64-darwin17] ruby 2.v.1p57 (2018-03-29 revision 63029) [x86_64-darwin17] </tt>
The response for the Sierra default:
reddish 2.3.0p0 (2015-12-25 revision 53290) [x86_64-darwin15]
The response for the Yosemite default:
cherry 2.0.0p481 (2014-05-08 revision 45883) [universal.x86_64-darwin14]
The response after updating on 2016-06-16:
cherry 2.3.1p112 (2016-04-26 revision 54768) [x86_64-darwin15]
Circumspection: The Apple Mac operating system makes use of Cerise, so don't delete the .rvm folder.
-
This should return "hey":
ruby -e "puts 'hey'"
PROTIP: The red command by itself will non render annihilation … forever.
Gem version numbers
-
You don't really need to do the above because this more detailed command provides it besides:
gem env
The response on 2016-06-xvi:
RubyGems Environment: - RUBYGEMS VERSION: 2.six.4 - RUBY VERSION: 2.three.ane (2016-04-26 patchlevel 112) [x86_64-darwin15] - INSTALLATION DIRECTORY: /Users/mac/.rvm/gems/ruby-2.three.1 - USER INSTALLATION DIRECTORY: /Users/mac/.jewel/scarlet/ii.3.0 - Ruddy EXECUTABLE: /Users/mac/.rvm/rubies/ruby-ii.3.1/bin/crimson - EXECUTABLE DIRECTORY: /Users/mac/.rvm/gems/blood-red-two.three.1/bin - SPEC Enshroud DIRECTORY: /Users/mac/.gem/specs - SYSTEM CONFIGURATION DIRECTORY: /Users/mac/.rvm/rubies/cherry-red-two.3.1/etc - RUBYGEMS PLATFORMS: - ruddy - x86_64-darwin-15 - Gem PATHS: - /Users/mac/.rvm/gems/ruby-two.3.1 - /Users/mac/.rvm/gems/ruby-two.three.i@global - Gem CONFIGURATION: - :update_sources => truthful - :verbose => true - :backtrace => false - :bulk_threshold => yard - REMOTE SOURCES: - https://rubygems.org/ - SHELL PATH: - /Users/mac/.rvm/gems/ruby-red-2.3.1/bin - /Users/mac/.rvm/gems/ruby-ii.3.1@global/bin - /Users/mac/.rvm/rubies/blood-red-2.3.1/bin - /Users/mac/depot_tools - /Users/mac/.npm-packages/bin - /Users/mac/miniconda2/bin - /Users/mac/.rbenv/shims - /Users/mac/.rbenv/bin - /usr/local/bin - /usr/bin - /bin - /usr/sbin - /sbin - /Users/mac/gits - /Users/mac/.rvm/bin - /Users/mac/.rvm/bin
-
To view each component individually:
gem --version
The response for the Loftier Sierra default:
2.vii.6
The response for the Sierra default:
2.0.14
The response for the Yosemite default:
2.0.14
Afterwards updating on 2017-02-sixteen:
2.6.10
QUESTION: Listing of versions?
Update RubyGems and Bundler:
-
Update:
sudo gem update --system
The response on 2016-06-16:
Countersign: Updating rubygems-update Fetching: rubygems-update-2.6.4.gem (100%) Successfully installed rubygems-update-ii.vi.4 Parsing documentation for rubygems-update-two.6.4 Installing ri documentation for rubygems-update-ii.6.4 Installing darkfish documentation for rubygems-update-two.6.4 Done installing documentation for rubygems-update afterwards 2 seconds Parsing documentation for rubygems-update-2.6.iv Done installing documentation for rubygems-update after 0 seconds Installing RubyGems 2.six.4 RubyGems 2.vi.4 installed Parsing documentation for rubygems-2.vi.4 Installing ri documentation for rubygems-2.half-dozen.4 === 2.vi.3 / 2016-04-05 ... Pocket-size enhancements: ... Issues fixes: ... RubyGems installed the following executables: /Users/mac/.rvm/rubies/scarlet-two.3.ane/bin/gem Ruby Interactive (ri) documentation was installed. ri is kind of like human pages for ruby libraries. You may access it like this: ri Classname ri Classname.class_method ri Classname#instance_method If you exercise not wish to install this documentation in the futurity, use the --no-document flag, or set up it equally the default in your ~/.gemrc file. See 'gem assist env' for details. RubyGems system software updated
-
List local gems:
jewel list b
A sample case (on 2016-06-16):
bigdecimal (1.3.i, 1.ii.7, default: 1.two.0) libxml-ruby (3.0.0, 2.8.0, 2.6.0) rainbow (2.2.1, 2.1.0) rubocop (0.47.1, 0.xl.0) bundler-unload (ane.0.ii) executable-hooks (1.3.two) rubygems-bundler (1.4.4) ruby-progressbar (ane.eight.one) rubygems-update (2.vi.10, 2.vi.9, 2.6.one) ...
Update Bundler:
-
If bundler is non on the list above:
gem install bundler
A sample response:
Fetching: bundler-ane.12.v.jewel (100%) Successfully installed bundler-1.12.5 Parsing documentation for bundler-one.12.5 Installing ri documentation for bundler-1.12.5 Done installing documentation for bundler after 5 seconds 1 gem installed
-
Navigate to a binder containing :
bundle install
A sample response:
Fetching gem metadata from https://rubygems.org/ Fetching version metadata from https://rubygems.org/ Fetching dependency metadata from https://rubygems.org/ Installing rake 11.1.2 ... Parcel consummate! 5 Gemfile dependencies, 39 gems now installed. Use `bundle evidence [gemname]` to see where a bundled gem is installed.
-
Run
sudo gem install --no-rdoc --no-ri bundler
The response:
Fetching: bundler-1.9.4.gem (100%) Successfully installed bundler-one.ix.4 1 gem installed
-
Update latest version of gem:
sudo jewel update
The response takes several minutes because it touches every gem:
Updating installed gems Updating CFPropertyList ... RubyGems installed the following executables: /usr/local/Cellar/blood-red/two.v.1/bin/precious stone /usr/local/Cellar/ruby/two.5.ane/bin/bundle Cherry-red Interactive (ri) documentation was installed. ri is kind of like homo pages for Ruby libraries. You may access it like this: ri Classname ri Classname.class_method ri Classname#instance_method If y'all do non wish to install this documentation in the future, apply the --no-document flag, or set information technology every bit the default in your ~/.gemrc file. Encounter 'gem help env' for details. RubyGems organisation software updated
-
Press y and Enter if you see:
rake's executable "rake" conflicts with /usr/bin/rake rdoc's executable "rdoc" conflicts with /usr/bin/rdoc rdoc'south executable "ri" conflicts with /usr/bin/ri
-
To rebuild whatever gems using native extensions:
sudo gem pristine \-\-all
-
To uninstall gems non used:
sudo gem cleanup
The response:
Cleaning up installed gems... Clean Upwardly Complete
Install rbenv
Circumspection: To install rbenv, one must first remove RVM because it's incompatible with rbenv.
brew update brew install rbenv ruby-build
The response:
==> Installing dependencies for rbenv: openssl, reddish-build ==> Installing rbenv dependency: openssl ==> Downloading https://homebrew.bintray.com/bottles/openssl-1.0.2k.sierra.bottl ######################################################################## 100.0% ==> Pouring openssl-1.0.2k.sierra.bottle.tar.gz ==> Using the sandbox ==> Caveats A CA file has been bootstrapped using certificates from the SystemRoots keychain. To add additional certificates (e.m. the certificates added in the System keychain), identify .pem files in /usr/local/etc/openssl/certs and run /usr/local/opt/openssl/bin/c_rehash This formula is keg-simply, which means information technology was not symlinked into /usr/local. Apple has deprecated apply of OpenSSL in favor of its ain TLS and crypto libraries If you need to have this software kickoff in your PATH run: repeat 'consign PATH="/usr/local/opt/openssl/bin:$PATH"' >> ~/.bash_profile For compilers to find this software you may need to set: LDFLAGS: -L/usr/local/opt/openssl/lib CPPFLAGS: -I/usr/local/opt/openssl/include For pkg-config to find this software yous may need to set: PKG_CONFIG_PATH: /usr/local/opt/openssl/lib/pkgconfig ==> Summary 🍺 /usr/local/Cellar/openssl/i.0.2k: ane,696 files, 12M ==> Installing rbenv dependency: ruby-build ==> Downloading https://github.com/rbenv/ruby-build/annal/v20170201.tar.gz ==> Downloading from https://codeload.github.com/rbenv/reddish-build/tar.gz/v201702 ######################################################################## 100.0% ==> ./install.sh 🍺 /usr/local/Cellar/scarlet-build/20170201: 334 files, 178.8K, built in 4 seconds ==> Installing rbenv ==> Downloading https://homebrew.bintray.com/bottles/rbenv-1.ane.0.sierra.bottle.t ######################################################################## 100.0% ==> Pouring rbenv-one.1.0.sierra.bottle.tar.gz 🍺 /usr/local/Cellar/rbenv/1.i.0: 36 files, 63.2K
-
What versions of Ruby are available? See https://www.ruby-lang.org/en/downloads/releases/
-
To upgrade Carmine using rbenv, first go the semantic version from the Ruby site, and so:
rbenv install 2.half-dozen.1
The response when two.6.i was all the rage:
carmine-build: apply openssl from homebrew Downloading red-two.6.1.tar.bz2... -> https://enshroud.cherry-lang.org/pub/ruby/2.vi/ruby-2.six.1.tar.bz2 Installing carmine-two.6.ane... ruddy-build: apply readline from homebrew Installed ruby-2.6.i to /Users/wilsonmar/.rbenv/versions/2.6.1
-
Make that version the default globally:
rbenv global two.six.1 red -v
The response I got:
ruby 2.half dozen.1p33 (2019-01-xxx revision 66950) [x86_64-darwin18]
Uninstall rbenv
-
To uninstall, remember rbenv was installed using brew, so:
brew uninstall rbenv red-build
Install to /usr/local/bin
"You don't take write permissions into the /usr/bin directory." is returned considering that directory requires root credentials.
This is why Homebrew installs into the /usr/local/bin
binder.
To specify that binder when installing gems, for example:
precious stone install cocoapods -n /usr/local/bin
PROTIP: To automatically specify -north /usr/local/bin
, salvage create file ~/.gemrc
containing:
:gemdir: - ~/.gem/ruby install: -n /usr/local/bin
rbenv vs rvm
Earlier rbenv, at that place was rvm.
This commodity describes the differences.
PROTIP: Personally, the requirement for gpg to install was a plow-off for RVM as it was hard to get working.
Ruby Version Manager (rvm)
Encounter https://rvm.io/support/troubleshooting
Install RVM
-
In a Terminal:
curl -L https://get.rvm.io | bash -southward stable
Sample response:
% Full % Received % Xferd Average Speed Time Time Time Electric current Dload Upload Total Spent Left Speed 100 194 100 194 0 0 544 0 --:--:-- --:--:-- --:--:-- 544 100 24361 100 24361 0 0 31643 0 --:--:-- --:--:-- --:--:-- 1076k Downloading https://github.com/rvm/rvm/archive/1.29.4.tar.gz Downloading https://github.com/rvm/rvm/releases/download/one.29.4/1.29.4.tar.gz.asc gpg: Signature made Sun Jul ane 13:41:26 2018 MDT gpg: using RSA key 62C9E5F4DA300D94AC36166BE206C29FBF04FF17 gpg: Good signature from "Michal Papis (RVM signing) <mpapis@gmail.com>" [unknown] gpg: aka "Michal Papis <michal.papis@toptal.com>" [unknown] gpg: aka "[jpeg image of size 5015]" [unknown] gpg: WARNING: This key is not certified with a trusted signature! gpg: There is no indication that the signature belongs to the possessor. Main fundamental fingerprint: 409B 6B17 96C2 7546 2A17 0311 3804 BB82 D39D C0E3 Subkey fingerprint: 62C9 E5F4 DA30 0D94 AC36 166B E206 C29F BF04 FF17 GPG verified '/Users/wilsonmar/.rvm/archives/rvm-ane.29.iv.tgz' Upgrading the RVM installation in /Users/wilsonmar/.rvm/ RVM PATH line plant in /Users/wilsonmar/.mkshrc /Users/wilsonmar/.profile /Users/wilsonmar/.bashrc /Users/wilsonmar/.zshrc. RVM sourcing line plant in /Users/wilsonmar/.profile /Users/wilsonmar/.bash_profile /Users/wilsonmar/.zlogin. Upgrade of RVM in /Users/wilsonmar/.rvm/ is consummate. /Users/wilsonmar/.bash_profile:1:PATH=/usr/local/bin/python3:/usr/bin/python:/usr/local/bin:/usr/bin:/usr/sbin:/bin:/sbin:/opt/local/bin:/opt/local/sbin:/usr/local/share/dotnet * Warning: Higher up files contains PATH= with no $PATH inside, this tin break RVM, for details cheque https://github.com/rvm/rvm/issues/1351#issuecomment-10939525 to avoid this alarm prepend $PATH * No new notes to display.
View rvm version number
rvm info
-
For a smaller response:
rvm --version
The response on 2018-10-26:
rvm ane.29.4 (latest) by Michal Papis, Piotr Kuczynski, Wayne E. Seguin [https://rvm.io]
The response on 2016-06-sixteen had an email:
rvm i.27.0 (master) by Wayne E. Seguin <wayneeseguin@gmail.com>, Michal Papis <mpapis@gmail.com> [https://rvm.io/]
Secure route:
Meet https://rvm.io/rvm/security
-
Outset try:
gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB
The response I got:
gpg: keyserver receive failed: Server indicated a failure
-
Alternatively, Since that doesn't piece of work:
ringlet -sSL https://rvm.io/mpapis.asc | gpg --import -
gpg: key 3804BB82D39DC0E3: 47 signatures not checked due to missing keys gpg: key 3804BB82D39DC0E3: public key "Michal Papis (RVM signing) <mpapis@gmail.com>" imported gpg: Total number processed: 1 gpg: imported: 1 gpg: marginals needed: 3 completes needed: 1 trust model: pgp gpg: depth: 0 valid: 2 signed: 0 trust: 0-, 0q, 0n, 0m, 0f, 2u
-
Download:
\curl -O https://raw.githubusercontent.com/rvm/rvm/main/binscripts/rvm-installer
% Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 24361 100 24361 0 0 72332 0 --:--:-- --:--:-- --:--:-- 72502
-
Download:
\ringlet -O https://raw.githubusercontent.com/rvm/rvm/main/binscripts/rvm-installer.asc
% Full % Received % Xferd Boilerplate Speed Fourth dimension Time Fourth dimension Current Dload Upload Total Spent Left Speed 100 833 100 833 0 0 3368 0 --:--:-- --:--:-- --:--:-- 3372
-
Verify:
gpg --verify rvm-installer.asc
gpg: assuming signed data in 'rvm-installer' gpg: Signature made Sat Mar 31 xv:47:44 2018 MDT gpg: using RSA cardinal 62C9E5F4DA300D94AC36166BE206C29FBF04FF17 gpg: Good signature from "Michal Papis (RVM signing) <mpapis@gmail.com>" [unknown] gpg: aka "Michal Papis <michal.papis@toptal.com>" [unknown] gpg: aka "[jpeg prototype of size 5015]" [unknown] gpg: WARNING: This key is non certified with a trusted signature! gpg: There is no indication that the signature belongs to the owner. Primary key fingerprint: 409B 6B17 96C2 7546 2A17 0311 3804 BB82 D39D C0E3 Subkey fingerprint: 62C9 E5F4 DA30 0D94 AC36 166B E206 C29F BF04 FF17
-
Get on the latest version of RVM:
bash rvm-installer stable
The response run on 2018-06-22:
Downloading https://github.com/rvm/rvm/annal/i.29.3.tar.gz Downloading https://github.com/rvm/rvm/releases/download/i.29.3/1.29.3.tar.gz.asc gpg: Signature fabricated Sun Sep ten fourteen:59:21 2017 MDT gpg: using RSA central E206C29FBF04FF17 gpg: Adept signature from "Michal Papis (RVM signing) <mpapis@gmail.com>" [unknown] gpg: aka "Michal Papis <michal.papis@toptal.com>" [unknown] gpg: aka "[jpeg image of size 5015]" [unknown] gpg: WARNING: This key is not certified with a trusted signature! gpg: There is no indication that the signature belongs to the possessor. Main key fingerprint: 409B 6B17 96C2 7546 2A17 0311 3804 BB82 D39D C0E3 Subkey fingerprint: 62C9 E5F4 DA30 0D94 AC36 166B E206 C29F BF04 FF17 GPG verified '/Users/wilsonmar/.rvm/archives/rvm-i.29.3.tgz' Installing RVM to /Users/wilsonmar/.rvm/ Adding rvm PATH line to /Users/wilsonmar/.contour /Users/wilsonmar/.mkshrc /Users/wilsonmar/.bashrc /Users/wilsonmar/.zshrc. Calculation rvm loading line to /Users/wilsonmar/.profile /Users/wilsonmar/.bash_profile /Users/wilsonmar/.zlogin. Installation of RVM in /Users/wilsonmar/.rvm/ is nigh complete: * To offset using RVM you need to run `source /Users/wilsonmar/.rvm/scripts/rvm` in all your open up shell windows, in rare cases you need to reopen all shell windows. /Users/wilsonmar/.bash_profile:one:PATH=/usr/bin/python:/usr/local/bin:/usr/bin:/usr/sbin:/bin:/sbin:/opt/local/bin:/opt/local/sbin:/usr/local/share/dotnet * WARNING: Above files contains `PATH=` with no `$PATH` within, this can break RVM, for details check https://github.com/rvm/rvm/bug/1351#issuecomment-10939525 to avoid this alarm prepend `$PATH`.
-
Do as instructed:
source /Users/wilsonmar/.rvm/scripts/rvm
No response is returned.
Get latest version of Ruby
-
Get on the latest version of RVM:
rvm get stable
The response run on 2017-07-27:
ownloading https://become.rvm.io Downloading https://raw.githubusercontent.com/rvm/rvm/master/binscripts/rvm-installer.asc Verifying /Users/mac/.rvm/athenaeum/rvm-installer.asc gpg: Signature fabricated Lord's day Jul 2 16:42:38 2017 EDT using RSA central ID BF04FF17 gpg: Good signature from "Michal Papis (RVM signing) <mpapis@gmail.com>" [unknown] gpg: Note: This cardinal has expired! Primary key fingerprint: 409B 6B17 96C2 7546 2A17 0311 3804 BB82 D39D C0E3 Subkey fingerprint: 62C9 E5F4 DA30 0D94 AC36 166B E206 C29F BF04 FF17 GPG verified '/Users/mac/.rvm/archives/rvm-installer' Downloading https://github.com/rvm/rvm/archive/i.29.2.tar.gz Downloading https://github.com/rvm/rvm/releases/download/ane.29.2/1.29.2.tar.gz.asc gpg: Signature fabricated Thu Jun 22 12:18:38 2017 EDT using RSA key ID BF04FF17 gpg: Practiced signature from "Michal Papis (RVM signing) <mpapis@gmail.com>" [unknown] gpg: Annotation: This key has expired! Primary key fingerprint: 409B 6B17 96C2 7546 2A17 0311 3804 BB82 D39D C0E3 Subkey fingerprint: 62C9 E5F4 DA30 0D94 AC36 166B E206 C29F BF04 FF17 GPG verified '/Users/mac/.rvm/athenaeum/rvm-1.29.2.tgz' Upgrading the RVM installation in /Users/mac/.rvm/ RVM PATH line found in /Users/mac/.mkshrc /Users/mac/.profile /Users/mac/.bashrc /Users/mac/.zshrc. RVM sourcing line found in /Users/mac/.profile /Users/mac/.bash_profile /Users/mac/.zlogin. Upgrade of RVM in /Users/mac/.rvm/ is complete. # Wilson Mar, # # Give thanks you lot for using RVM! # Nosotros sincerely hope that RVM helps to make your life easier and more than enjoyable!!! # # ~Wayne, Michal & team. In instance of problems: https://rvm.io/help and https://twitter.com/rvm_io Upgrade Notes: /Users/mac/.bash_profile:1:PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/share/dotnet * Alarm: Above files contains `PATH=` with no `$PATH` inside, this can break RVM, for details bank check https://github.com/rvm/rvm/problems/1351#issuecomment-10939525 to avoid this warning prepend `$PATH`. * No new notes to display. RVM reloaded!
Uninstall Cerise
-
Uninstall all versions of Ruby:
rvm uninstall carmine
-
Accept the rvm crush configuration loaded:
source ~/.rvm/scripts/rvm
type rvm | head -n 1Alternately, wipe out the folder and start over:
rm -rf ~/.rvm
scroll -L https://get.rvm.io | fustigate -s stableThe response should exist:
rvm is a function
If and then, effort rvm get head once more.
rvm get head
If the response is:
-fustigate: rvm: command not found
-
Get stable
rvm get stable --auto-dotfiles
To upgrade Carmine using RVM
-
First run:
rvm autolibs homebrew
-
Run:
rvm install ruby
The response:
Searching for binary rubies, this might take some time. No binary rubies available for: osx/10.eleven/x86_64/ruby-ii.three.1. Continuing with compilation. Delight read 'rvm aid mount' to get more than information on binary rubies. Checking requirements for osx_brew. Installing requirements for osx_brew. Updating system..... Installing required packages: autoconf, automake, libtool, readline, libksba, openssl........ Certificates in '/usr/local/etc/openssl/cert.pem' are already upwards to date. Requirements installation successful. Installing Crimson from source to: /Users/mac/.rvm/rubies/ruby-2.3.i, this may take a while depending on your cpu(s)... ruby-2.3.1 - #downloading cherry-red-2.3.ane, this may take a while depending on your connection... % Total % Received % Xferd Average Speed Time Time Time Electric current Dload Upload Total Spent Left Speed 100 13.7M 100 13.7M 0 0 320k 0 0:00:44 0:00:44 --:--:-- 266k perl: warning: Setting locale failed. perl: warning: Please check that your locale settings: LC_ALL = (unset), LC_CTYPE = "en_US.utf-", LANG = "en_US.UTF-8" are supported and installed on your organisation. perl: warning: Falling back to the standard locale ("C"). ruby-2.iii.1 - #extracting ruby-2.3.1 to /Users/mac/.rvm/src/cherry-ii.3.one..... reddish-2.3.1 - #configuring......................................................| ruby-2.3.1 - #post-configuration. ruby-ii.three.ane - #compiling........................................................- ruby-two.3.i - #installing......... ruby-ii.iii.1 - #making binaries executable.. Installed rubygems ii.5.1 is newer than ii.4.eight provided with installed scarlet, skipping installation, use --force to force installation. ruby-two.3.1 - #gemset created /Users/mac/.rvm/gems/ruby-2.three.1@global blood-red-2.3.i - #importing gemset /Users/mac/.rvm/gemsets/global.gems.............| ruby-ii.3.1 - #generating global wrappers........ reddish-2.3.1 - #gemset created /Users/mac/.rvm/gems/ruby-two.3.i ruby-2.3.1 - #importing gemsetfile /Users/mac/.rvm/gemsets/default.gems evaluated to empty gem listing blood-red-ii.3.1 - #generating default wrappers........ carmine-2.3.one - #adjusting #shebangs for (gem irb erb ri rdoc testrb rake). Install of scarlet-2.3.i - #consummate Ruby was congenital without documentation, to build it run: rvm docs generate-ri
-
View versions once again.
-
To install the latest stable rvm release:
roll -ssL https://get.rvm.io | bash -s stable
A sample response:
Downloading https://github.com/rvm/rvm/annal/1.26.11.tar.gz Downloading https://github.com/rvm/rvm/releases/download/1.26.11/1.26.11.tar.gz.asc Establish PGP signature at: 'https://github.com/rvm/rvm/releases/download/ane.26.11/1.26.eleven.tar.gz.asc', but no GPG software exists to validate it, skipping. Installing RVM to /Users/wilsonmar/.rvm/ Adding rvm PATH line to /Users/wilsonmar/.profile /Users/wilsonmar/.mkshrc /Users/wilsonmar/.bashrc /Users/wilsonmar/.zshrc. Adding rvm loading line to /Users/wilsonmar/.profile /Users/wilsonmar/.bash_profile /Users/wilsonmar/.zlogin. Installation of RVM in /Users/wilsonmar/.rvm/ is almost consummate: * To start using RVM you need to run `source /Users/wilsonmar/.rvm/scripts/rvm` in all your open shell windows, in rare cases y'all need to reopen all shell windows. # Wilson Mar, # # Give thanks you for using RVM! # Nosotros sincerely hope that RVM helps to make your life easier and more than enjoyable!!! # # ~Wayne, Michal & squad. In instance of problems: http://rvm.io/help and https://twitter.com/rvm_io * WARNING: You have '~/.profile' file, you might want to load it, to practise that add the post-obit line to '/Users/wilsonmar/.bash_profile': source ~/.profile
-
Some say at this bespeak close the terminal and open again.
Sample Ruby Tree program
Here is a Reddish script to produce a nice Unicode tree along with metadata to its left:
#!/usr/bin/env ruby def tree_hierarchy( root, &children ) queue = [[root,"",true]] [].tap do |results| until queue.empty? item,indent,concluding = queue.pop kids = children[item] extra = indent.empty? ? '' : last ? '└╴' : '├╴' results << [ indent+extra, particular ] results << [ indent, nil ] if last and kids.empty? indent += terminal ? ' ' : '│ ' parts = kids.map{ |yard| [grand,indent,simulated] }.opposite parts.commencement[2] = true unless parts.empty? queue.concat parts end cease finish def tree(dir) cols = tree_hierarchy(File.expand_path(dir)) do |d| File.directory?(d) ? Dir.chdir(d){ Dir['*'].map(&File.method(:expand_path)) } : [] end.map practice |indent,path| if path file = File.basename(path) + File.directory?(path) ? '/' : '' meta = `ls -lhd "#{path}"`.split(/\due south+/) [ [indent,file].bring together, meta[0], meta[4], "%s %-2s %s" % meta[5..7] ] else [indent] end end maxs = cols.outset.zip(*(cols[1..-1])).map{ |c| c.compact.map(&:length).max } tmpl = maxs.map.with_index{ |n,i| "%#{'-' if cols[0][i][/^\D/]}#{due north}s" }.join(' ') cols.map{ |a| a.length==1 ? a.showtime : tmpl % a } end puts tree(ARGV.first || ".") if __FILE__==$0
- Copy and paste the higher up into a text editor program.
- Salve the file named tree.rb.
- In a Last window, navigate to the folder holding the script.
-
Mark the file as executable:
chmod +x tree.rb
This just needs to be done in one case.
-
Run the plan:
tree.rb
ERROR: The response:
./tree.rb:24:in `+': no implicit conversion of true into Cord (TypeError) from ./tree.rb:24:in `block in tree' from ./tree.rb:22:in `map' from ./tree.rb:22:in `tree' from ./tree.rb:35:in `<chief>'
http://superuser.com/users/57219/phrogz
Remove rvm
-
Run the program which removes the rvm/ directory and all the rubies built inside information technology:
rvm repair rvm cleanup rvm implode --force
Are you Sure yous wish for rvm to implode? This will recursively remove /Users/wilsonmar/.rvm and other rvm traces? (anything other than 'yes' volition cancel) > yes Removing rvm-shipped binaries (rvm-prompt, rvm, rvm-sudo rvm-beat and rvm-auto-red) Removing rvm wrappers in /Users/wilsonmar/.rvm/bin Hai! Removing /Users/wilsonmar/.rvm /Users/wilsonmar/.rvm has been removed. Note you may demand to manually remove /etc/rvmrc and ~/.rvmrc if they exist all the same. Please bank check all .bashrc .bash_profile .contour and .zshrc for RVM source lines and delete or comment out if this was a Per-User installation. Also make sure to remove `rvm` grouping if this was a arrangement installation. Finally it might help to relogin / restart if you want to have fresh environment (like for installing RVM over again).
-
Remove folders:
rm -rf /usr/local/rvm sudo rm /etc/profile.d/rvm.sh sudo rm /etc/rvmrc sudo rm ~/.rvmrc
-
Check references to rvm in files (replace vim with your favorite text editor control such as subl, code, etc.):
vim ~/.bash_profile
vim ~/.bashrc
vim ~/.profile
-
Restart Last sessions.
See http://karloespiritu.com/replacing-rvm-with-rbenv-in-bone-x/
Ruby apps on Mac
The programs I've figured out how to install using my fustigate script:
- istats
- gitlab (command line utilities)
- crimson-jmeter
- travis
- rails
- rust (language)
Resources:
This too provides instructions on installation of Ruby-red:
https://gorails.com/setup/osx/ten.14-mojave#reddish
http://www.createdbypete.com/articles/ruby-on-track-development-setup-for-mac-osx/
https://www.digitalocean.com/community/tutorials/how-to-install-ruby-on-rails-with-rbenv-on-ubuntu-16-04
http://devopspy.com/linux/install-latest-ruby-using-rbenv/
More than on OSX
This is one of a series on Mac OSX:
- MacOS Setup step-past-pace, with automation
- MacOS Hardware and accessories
- MacOS dotfiles for System Preferences setup automation
-
MacOS Homebrew installers
- MacOS Boot-up
-
MacOS Versions
- MacOS Keyboard tricks
- MacOS Terminal Tips and Tricks
-
MacOS Observe (files and text in files)
- Text editors and IDEs on MacOS
- MacOS Xcode.app and CommandTools (gcc)
- MacOS Control-line utilities
-
Job Runners Grunt and Gulp
- Applications on MacOS
- 1password on MacOS
-
Data Backups on MacOS
- Manage Deejay Space on MacOS
- Screen capture on MacOS
-
Press from macOS or Linux
-
Ports open
-
MacOS iPhone integration
- Windows on Apple MacOS
- Packer create Vagrant Windows image
-
Remote into Windows
- Python on MacOS
- Maven on MacOS
- Ruby on MacOS
- Node on MacOS installation
-
PHP on MacOS
- Java on MacOS
- Scala ecosystem
Source: https://wilsonmar.github.io/ruby-on-apple-mac-osx/
Posted by: hallvint1982.blogspot.com
0 Response to "How To Update Ruby In Mac Osx"
Post a Comment