You have to load the rvm script into your shell.
Put this at the end of your .zshrc or .bashrc or whatever depending on your shell :
[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm"
Я использовал нижеприведенные команды для установки rails в Ubuntu 12.10
sudo apt-get update sudo apt-get install curl \curl -L https://get.rvm.io | bash -s stable source ~/.rvm/scripts/rvm rvm requirements rvm install 1.9.3 rvm use 1.9.3 --default rvm rubygems current gem install rails
Все шаги идут хорошо, но это работает для терминала, на котором мы устанавливаем рельсы. Если мы выходим из терминала и работаем над новым терминалом, то возникает следующая ошибка.
Программа 'rails' может быть найдена в следующих пакетах: * rails * ruby-railties-3.2 Попробуйте: sudo apt-get install
Помогите мне установить рельсы.
You have to load the rvm script into your shell.
Put this at the end of your .zshrc or .bashrc or whatever depending on your shell :
[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm"
Not really sure what exactly your problem is. If you use rvm
and have installed Rails with it, you may have to use
rvm use 1.9.3
after gem install rails
.
Then you may or may have not a gemset
with this. So:
bundle install
should install Rails gem in this gemset
. Maybe use
rvm sudo bundle install
or just manually install the Rails gem.
source ~ / .rvm / scripts / rvm rvm - использование по умолчанию 1.9.3-p374
Запустив следующий код на каждом терминале, Ruby on rails get начинает работать.
Эта проблема возникла потому что
open the terminal preferences and make sure the "run command as a login shell" option is checked in the "title and command" tab, it will load the ~/.bash_profile which contains something like "[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" and set the rvm env for you.