私は以前、UbuntuでRubyバージョン1.9.3を使用していて、おそらくbashプロファイルを台無しにする更新を行いました。バージョン1.8.7を使用するのではなく、元に戻すための支援が必要です。現在rails s
、Ruby 1.8.7でサーバーを開きますが、アプリで使用している新しい構文が原因でエラーが発生します。
.bash_profile
:
cat ~/.bash_profile
### Added by the Heroku Toolbelt
export PATH="/usr/local/heroku/bin:$PATH"
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*
which rails
:
/usr/local/bin/rails
which ruby
:
/usr/bin/ruby
ruby -v
:
ruby 1.8.7 (2011-06-30 patchlevel 352) [i686-linux]
rvm list
:
rvm rubies
=* ruby-1.9.3-p194 [ i686 ]
# => - current
# =* - current && default
# * - default
rvm use 1.9.3
:
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.