How do I install ruby gems on Mac

后端 未结 5 1080
灰色年华
灰色年华 2021-01-30 01:38

How do I install RubyGems on my Mac?

I tried to run $ gem install rubygems-update with no luck . It returns

ERROR:  While executing gem ...          


        
5条回答
  •  情歌与酒
    2021-01-30 02:12

    One more variant is to use brew-gem.

    https://formulae.brew.sh/formula/brew-gem

    https://github.com/sportngin/brew-gem

    Just copy/paste from the documentation:

    brew install brew-gem

    Usage

    brew gem install heroku

    To install a specific version: brew gem install heroku 3.8.3

    To install using a brew installed ruby(/usr/local/bin/ruby): brew gem install heroku --homebrew-ruby

    And with a specific version: brew gem install heroku 3.8.3 --homebrew-ruby

    To upgrade: brew gem upgrade heroku

    To uninstall: brew gem uninstall heroku

    To check information: brew gem info heroku

    Note: Installed gems are listed in brew list with prefix of gem-, like gem-heroku.

提交回复
热议问题