mercredi 22 septembre 2021

echo 'eval "$(rbenv init -)"' >> ~/.zshrc not appending zshrc file

I am trying to install Ruby on Rails on OSmac Big Sur.

I have installed Xcode and brew

% gcc --version Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/4.2.1 Apple clang version 12.0.0 (clang-1200.0.32.29) Target: x86_64-apple-darwin20.5.0 Thread model: posix InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

% brew -v

Homebrew 3.2.13-4-gbefaeba

I also have installed ruby, rbenv and Rails

% ruby -v
ruby 2.6.3p62 (2019-04-16 revision 67580) [universal.x86_64-darwin20]

% rbenv -v
rbenv 1.1.2

% rails -v
Rails 6.1.4.1

'rbenv init' gives me the following

 % rbenv init 
# Load rbenv automatically by appending
# the following to ~/.zshrc:

eval "$(rbenv init -)"

I tried

echo 'eval "$(rbenv init -)"' >> ~/.zshrc

which gives

quote>

and

% echo ''eval "$(rbenv init -)"' >> ~/.bash_profile

which gives

quote>

Why is echo 'eval "$(rbenv init -)"' >> ~/.zshrc not appending the file zshrc as expected?

Aucun commentaire:

Enregistrer un commentaire