bashシェルスクリプトを実行するとき、私はruby1.9.3を使用しています。次に、スクリプト内で、JRubに切り替えます(rvmを使用しています)。rvm use jruby
スクリプト内でJRubyに切り替えてみましたが、うまくいきませんでした。
RVM is not a function, selecting rubies with 'rvm use ...' will not work.
You need to change your terminal emulator preferences to allow login shell.
Sometimes it is required to use `/bin/bash --login` as the command.
Please visit https://rvm.io/integration/gnome-terminal/ for a example.
./run.sh: line 10: jruby: command not found
type rvm | head -n1
コマンドプロンプトで実行すると、次のようになりますrvm is a function
。だから私は問題がわからない。sudo()を使ってJRubyをインストールしたからかもしれないと思いましたsudo rvm install jruby
。そこで、sudoを使用してシェルスクリプトを再度実行しました。再びエラーが発生しました。
rvmを使用してbashシェルスクリプト内からrubiesを切り替えるにはどうすればよいですか?
ありがとう