Мне нужно установить ruby версии 2.1.5 и Rails версии 4.2.0 на мой сервер Ubuntu. Здесь я получаю сообщение об ошибке, приведенное ниже.
Ошибка:
sudo:source: command not
Я выполнил следующие шаги для установки ROR.
sudo apt-get install curl
sudo gpg --keyserver hkp://keys.gnupg.net --recv-keys D39DC0E3
sudo curl -sSL https://get.rvm.io | bash -s stable
, но когда я выполнил приведенную ниже команду, я получил вышеуказанную ошибку.
sudo source /etc/profile.d/rvm.sh
Опять же, если я запускаю команду ниже
sudo rvm requirements
, я также получаю следующую ошибку.
sudo:rvm:command not found
Пожалуйста, помогите мне устранить эту ошибку и установить среду ROR.
Запустить
sudo -i gpg --keyserver hkp://keys.gnupg.net --recv-keys D39DC0E3
Демонстрационный вывод
gpg: directory `/root/.gnupg' created
gpg: new configuration file `/root/.gnupg/gpg.conf' created
gpg: WARNING: options in `/root/.gnupg/gpg.conf' are not yet active during this run
gpg: keyring `/root/.gnupg/secring.gpg' created
gpg: keyring `/root/.gnupg/pubring.gpg' created
gpg: requesting key D39DC0E3 from hkp server keys.gnupg.net
gpg: /root/.gnupg/trustdb.gpg: trustdb created
gpg: key D39DC0E3: public key "Michal Papis (RVM signing) <mpapis@gmail.com>" imported
gpg: no ultimately trusted keys found
gpg: Total number processed: 1
gpg: imported: 1 (RSA: 1)
и НЕТ
sudo gpg --keyserver hkp://keys.gnupg.net --recv-keys D39DC0E3
Запустить
sudo -i sh -c "curl -sSL https://get.rvm.io | bash -s stable"
Демонстрационный вывод
Downloading https://github.com/rvm/rvm/archive/1.26.11.tar.gz
Downloading https://github.com/rvm/rvm/releases/download/1.26.11/1.26.11.tar.gz.asc
gpg: Signature made Mo 30 Mär 2015 23:52:13 CEST using RSA key ID BF04FF17
gpg: Good signature from "Michal Papis (RVM signing) <mpapis@gmail.com>"
gpg: WARNING: This key is not certified with a trusted signature!
gpg: There is no indication that the signature belongs to the owner.
Primary key fingerprint: 409B 6B17 96C2 7546 2A17 0311 3804 BB82 D39D C0E3
Subkey fingerprint: 62C9 E5F4 DA30 0D94 AC36 166B E206 C29F BF04 FF17
GPG verified '/usr/local/rvm/archives/rvm-1.26.11.tgz'
Creating group 'rvm'
Installing RVM to /usr/local/rvm/
Installation of RVM in /usr/local/rvm/ is almost complete:
* First you need to add all users that will be using rvm to 'rvm' group,
and logout - login again, anyone using rvm will be operating with `umask u=rwx,g=rwx,o=rx`.
* To start using RVM you need to run `source /etc/profile.d/rvm.sh`
in all your open shell windows, in rare cases you need to reopen all shell windows.
# aboettger,
#
# Thank you for using RVM!
# We sincerely hope that RVM helps to make your life easier and more enjoyable!!!
#
# ~Wayne, Michal & team.
In case of problems: http://rvm.io/help and https://twitter.com/rvm_io
и НЕТ
sudo curl -sSL https://get.rvm.io | bash -s stable
Запустить
sudo bash -c "source /etc/profile.d/rvm.sh"
и НЕТ
sudo source /etc/profile.d/rvm.sh
Запустить
sudo -i rvm requirements
Демонстрационный вывод
Checking requirements for ubuntu.
Installing requirements for ubuntu.
Updating system.....................
Installing required packages: libreadline6-dev, libyaml-dev, libsqlite3-dev, libgdbm-dev, libncurses5-dev, bison, libffi-dev........
Requirements installation successful.
и НЕТ
sudo rvm requirements