$ brew install ruby@2.3
...
$ echo 'export PATH="/usr/local/opt/ruby@2.3/bin:$PATH"' >> ~/.zshrc
$ zsh
$ ruby --version
ruby 2.3.7p456 (2018-03-28 revision 63024) [x86_64-darwin17]
$ gem install bundler
Successfully installed bundler-1.16.4
Parsing documentation for bundler-1.16.4
Done installing documentation for bundler after 4 seconds
1 gem installed
$ bundle
zsh: command not found: bundle
Вопрос: почему bundle
команда не найдена?
С $ gem content bundler
Я нашел bundle
исполняемый файл:
$ /usr/local/lib/ruby/gems/2.3.0/gems/bundler-1.16.4/exe/bundle --version
Версия Bundler 1.16.4
Почему исполняемый файл bundle
отсутствует в /usr/local/opt/ruby@2.3/bin
?
Я вижу Команда Bundle не найдена Mac Вопрос, я должен использовать rbenv ? Я не могу просто использовать brew install ruby@2.3
?
Дополнительная информация:
$ brew --version
Homebrew 1.7.2-112-g0dc2c72
Homebrew/homebrew-core (git revision bc34; last commit 2018-09-02)
А:
$ brew info ruby@2.3
ruby@2.3: stable 2.3.7 (bottled) [keg-only]
Powerful, clean, object-oriented scripting language
https://www.ruby-lang.org/
/usr/local/Cellar/ruby@2.3/2.3.7 (15,093 files, 38.3MB)
Poured from bottle on 2018-09-02 at 19:44:13
From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/ruby@2.3.rb
==> Dependencies
Build: pkg-config ✔
Required: libyaml ✔, openssl ✔, readline ✔
==> Caveats
By default, binaries installed by gem will be placed into:
/usr/local/lib/ruby/gems/2.3.0/bin
You may want to add this to your PATH.
ruby@2.3 is keg-only, which means it was not symlinked into /usr/local,
because this is an alternate version of another formula.
If you need to have ruby@2.3 first in your PATH run:
echo 'export PATH="/usr/local/opt/ruby@2.3/bin:$PATH"' >> ~/.zshrc
For compilers to find ruby@2.3 you may need to set:
export LDFLAGS="-L/usr/local/opt/ruby@2.3/lib"
export CPPFLAGS="-I/usr/local/opt/ruby@2.3/include"
For pkg-config to find ruby@2.3 you may need to set:
export PKG_CONFIG_PATH="/usr/local/opt/ruby@2.3/lib/pkgconfig"