1

Mac OSXでbashスクリプトを書いています。今、私はライブラリアン・シェフを設定したいのですが、

echo "installing the librarian-chef gem"
gem install librarian-chef

echo "librarian-chef installing cookbooks from the recipies"
librarian-chef install

そしてそれを実行します。残りのbashスクリプトが完了するようにしますが、私はこれを取得し続けますline 31: librarian-chef: command not found

だから私は宝石がうまくインストールされたと思ったが、パスが更新されていなかったので使用できなかった?だから私は試しました

echo "librarian-chef installing cookbooks from the recipies"
source ~/.bash_profile
librarian-chef install

リフレッシュするようにしましたが、うまくいきませんでしたか?

./vagrant_prepare.sh: line 30: ~/.bash_profile: No such file or directory

どうすればインストールして、これを見た人が使用できますか?

私はbashプロファイルを持っています

 ls -a
.           .bash_history       .dropbox        .rbenv      .viminfo        Dumps           Pictures        temp
..          .bash_profile       .gem            .redis          Desktop         Library         Public          test.sh
.CFUserTextEncoding .bundler        .gitconfig      .ruby-version       Documents       Movies          VirtualBox VMs
.DS_Store       .cache          .local          .ssh            Downloads       Music           Work
.Trash          .config         .pow            .vagrant.d      Dropbox         Nexus           chronosphere.sh
4

1 に答える 1

1

これをあなたに追加してください~/.bash_profile

eval "$(rbenv init -)"

ターミナルを再度開き、スクリプトを再度実行します。

#!/bin/bash
echo "installing the librarian-chef gem"
gem install librarian-chef

echo "librarian-chef installing cookbooks from the recipies"
librarian-chef install
于 2014-11-24T02:27:16.377 に答える