bundle 不知道 ruby 是什么?

bundle doesn't know what ruby is?

所以,不久前,这个命令在我的电脑上运行,但是,我不记得我是否改变了什么,但现在删除了我所有的 Ruby 安装,并且只有 ChefDK 0.4。 0 安装并在我的路径中使用 .chefdk/gem 和 C:\opscode\chefdk\bin;C:\opscode\chefdk\embedded\bin 在我的路径中,我得到以下结果。

C:\Users\Phillip\Desktop\password_vault
λ bundle exec ruby bin\password_vault
bundler: command not found: ruby
Install missing gem executables with `bundle install`

C:\Users\Phillip\Desktop\password_vault
λ bundle install
Resolving dependencies...
Using rake 10.4.2
Using bundler 1.8.5
Using rack 1.6.0
Using rack-protection 1.5.3
Using tilt 1.4.1
Using sinatra 1.4.5
Using password_vault 0.0.1 from source at .
Bundle complete! 3 Gemfile dependencies, 7 gems now installed.
Use `bundle show [gemname]` to see where a bundled gem is installed.

C:\Users\Phillip\Desktop\password_vault
λ bundle exec ruby bin\password_vault
bundler: command not found: ruby
Install missing gem executables with `bundle install`

C:\Users\Phillip\Desktop\password_vault

我不确定我还做错了什么。

您已安装 Ruby,因为捆绑程序正在使用它。

不知何故,您的包路径没有 Ruby,或者已经忘记了它。

要解决此问题,请使用bundle --path,例如:

bundle --path "C:\foo\goo\hoo\ruby\bin" 

路径是您在系统上放置 Ruby 的任何位置,加上您希望捆绑程序可用的任何其他路径项,例如其他软件的 bin 目录。

Bundler 会记住路径,以便将来在这台机器上安装。