大家好!我按照https://rvm.io/integration/vagrant
的说明进行操作所以在Vargantfile中我有:
config.vm.box = "hashicorp/precise64"
config.vm.provision :shell, path: "provision/install-rvm.sh", args: "stable", privileged: false
config.vm.provision :shell, path: "provision/install-ruby.sh", args: "1.9.3", privileged: false
config.vm.provision :shell, path: "provision/install-ruby.sh", args: "2.0.0 rails haml", privileged: false
在install-rvm.sh中:
gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
curl -sSL https://get.rvm.io | bash -s $1
在install-ruby.sh中:
source $HOME/.rvm/scripts/rvm || source /etc/profile.d/rvm.sh
rvm use --default --install $1
shift
if (( $# ))
then gem install $@
fi
rvm cleanup all
但在vagrant up
之后它说:
==> default: gpg: requesting key D39DC0E3 from hkp server keys.gnupg.net
==> default: gpg: key D39DC0E3: "Michal Papis (RVM signing) <mpapis@gmail.com>" not changed
==> default: gpg: Total number processed: 1
==> default: gpg: unchanged: 1
==> default: /tmp/vagrant-shell: line 4: curl: command not found
==> default: Running provisioner: shell...
default: Running: /tmp/vagrant-shell20170120-19193-117iyxj.sh
==> default: /tmp/vagrant-shell: line 3: /usr/local/rvm/scripts/rvm: No such file or directory
==> default: /tmp/vagrant-shell: line 3: /etc/profile.d/rvm.sh: No such file or directory
==> default: /tmp/vagrant-shell: line 5: rvm: command not found
==> default: /tmp/vagrant-shell: line 13: rvm: command not found
但如果我在“ubuntu / trusty64”上使用rvm和ruby运行相同的规定 一切正常,
答案 0 :(得分:0)
RVM取决于curl
- 添加额外的行来安装curl,如:
apt-get install curl
在任何对rvm脚本的调用之前