rbenv 不断产生流浪的垫片 [英] rbenv continually generating vagrant shim

查看:34
本文介绍了rbenv 不断产生流浪的垫片的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用带有 rbenv 和各种红宝石的最新 vagrant.

I am using the latest vagrant with rbenv and various rubies.

我正在使用最新的 vagrant,它不再使用 gem.当我执行 vagrant 命令时,我看到以下错误:

I am using the latest vagrant, which no longer uses a gem. When I execute a vagrant command I see the following error:

rbenv: vagrant: command not found

我已经从所有 ruby​​ 环境中删除了旧的 vagrant gem,但是每次我cd" vagrant shim 都会重新生成,这意味着 vagrant 停止工作,直到我手动 rm shim:

I have removed the old vagrant gem from all ruby environments BUT everytime I "cd" the vagrant shim is regenerated, meaning vagrant stops working until I rm the shim manually:

rm /home/{user}/.rbenv/shims/vagrant   

有没有办法强制 rbenv 停止这种行为?

Is there a way to force rbenv to stop this behaviour?

正在使用的 rbenv 插件":

rbenv plugins in use":

  • 红宝石构建
  • rbenv-gemset

推荐答案

在 rbenv 中解决此问题之前,您可以这样做:

Until this issue is resolved in rbenv, you could do this:

alias vagrant /full/path/to/vagrant

然后每次运行 vagrant 时,都会执行实际的 vagrant 二进制文件,而不是 shim.

Then everytime you run vagrant, the actual vagrant binary will be executed, rather than the shim.

这篇关于rbenv 不断产生流浪的垫片的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆