美文网首页
brew 升级 ruby

brew 升级 ruby

作者: 蓝白七七 | 来源:发表于2023-05-15 19:56 被阅读0次

brew reinstall ruby 2023-05-16

Pro ~ % brew reinstall ruby
==> Fetching ruby
==> Downloading https://ghcr.io/v2/homebrew/core/ruby/manifests/3.2.2
######################################################################### 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/ruby/blobs/sha256:a4ac080688e87
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sh
######################################################################### 100.0%
==> Reinstalling ruby 
==> Pouring ruby--3.2.2.ventura.bottle.tar.gz
==> Caveats
ruby is keg-only, which means it was not symlinked into /usr/local,
because macOS already provides this software and installing another version in
parallel can cause all kinds of trouble.

If you need to have ruby first in your PATH, run:
  echo 'export PATH="/usr/local/opt/ruby/bin:$PATH"' >> ~/.zshrc

For compilers to find ruby you may need to set:
  export LDFLAGS="-L/usr/local/opt/ruby/lib"
  export CPPFLAGS="-I/usr/local/opt/ruby/include"
==> Summary
🍺  /usr/local/Cellar/ruby/3.2.2: 16,605 files, 46.3MB
==> Running `brew cleanup ruby`...
Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP.
Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).
Removing: /Users/shiran/Library/Caches/Homebrew/ruby--3.2.1... (12.9MB)

Pro ~ % ruby -v
ruby 3.0.0p0 (2020-12-25 revision 95aff21468) [x86_64-darwin21]

--------------------------------------------------------------------------------------------

Pro ~ % open ~/.zshrc

# ruby 的 环境变量
export PATH="/usr/local/opt/ruby/bin:$PATH"
export LDFLAGS="-L/usr/local/opt/ruby/lib"
export CPPFLAGS="-I/usr/local/opt/ruby/include"


Pro ~ % source ~/.zshrc
Pro ~ % ruby -v
ruby 3.2.2 (2023-03-30 revision e51014f9c0) [x86_64-darwin22]

--------------------------------------------------------------------------------------------

强制升级

Pro ~ % rvm list
=* ruby-3.0.0 [ x86_64 ]

# => - current
# =* - current && default
#  * - default

Pro ~ % rvm install "ruby-3.2.2" --default
Searching for binary rubies, this might take some time.
No binary rubies available for: osx/13.3/x86_64/ruby-3.2.2.
Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies.
Checking requirements for osx.
Installing requirements for osx.
Updating system - please wait
Installing required packages: autoconf, automake, libtool, pkg-config, coreutils, libksba, zlib - please wait
Updating certificates bundle '/usr/local/etc/openssl@1.1/cert.pem'
Requirements installation successful.
Installing Ruby from source to: /Users/shiran/.rvm/rubies/ruby-3.2.2, this may take a while depending on your cpu(s)...
ruby-3.2.2 - #downloading ruby-3.2.2, this may take a while depending on your connection...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 19.5M  100 19.5M    0     0   448k      0  0:00:44  0:00:44 --:--:--  447k
No checksum for downloaded archive, recording checksum in user configuration.
ruby-3.2.2 - #extracting ruby-3.2.2 to /Users/shiran/.rvm/src/ruby-3.2.2 - please wait
ruby-3.2.2 - #configuring - please wait
ruby-3.2.2 - #post-configuration - please wait
ruby-3.2.2 - #compiling - please wait
ruby-3.2.2 - #installing - please wait
ruby-3.2.2 - #making binaries executable - please wait
Installed rubygems 3.4.10 is newer than 3.0.9 provided with installed ruby, skipping installation, use --force to force installation.
ruby-3.2.2 - #gemset created /Users/shiran/.rvm/gems/ruby-3.2.2@global
ruby-3.2.2 - #importing gemset /Users/shiran/.rvm/gemsets/global.gems - please wait
ruby-3.2.2 - #generating global wrappers - please wait
ruby-3.2.2 - #gemset created /Users/shiran/.rvm/gems/ruby-3.2.2
ruby-3.2.2 - #importing gemsetfile /Users/shiran/.rvm/gemsets/default.gems evaluated to empty gem list
ruby-3.2.2 - #generating default wrappers - please wait
ruby-3.2.2 - #adjusting #shebangs for (gem irb erb ri rdoc testrb rake).
Install of ruby-3.2.2 - #complete 
Ruby was built without documentation, to build it run: rvm docs generate-ri

Pro ~ % ruby -v
ruby 3.2.2 (2023-03-30 revision e51014f9c0) [x86_64-darwin22]




相关文章

网友评论

      本文标题:brew 升级 ruby

      本文链接:https://www.haomeiwen.com/subject/nwxvsdtx.html