gpt4 book ai didi

ruby-on-rails - Bundler 似乎无法通过 Rbenv 找到正确的 Ruby

转载 作者:数据小太阳 更新时间:2023-10-29 06:55:40 26 4
gpt4 key购买 nike

多年来,我一直使用 RVM 作为我的 Ruby 版本管理器,但为了简单起见,我想切换到 rbenv。但是我在部署时发现了一些奇怪的问题。这是它似乎出错的地方:

# env RBENV_ROOT=\"/home/deploy/.rbenv\" PATH=\"/home/deploy/.rbenv/shims:/home/deploy/.rbenv/bin:$PATH\"  /home/deploy/.rbenv/bin/rbenv exec bundle install --gemfile /domains/myapp.com/releases/20140119013611/Gemfile --path /domains/myapp.com/shared/bundle --deployment --without development test

> rbenv: bundle: command not found

> The `bundle' command exists in these Ruby versions:
> 2.0.0-p353

好的,所以我指定我想要的 rbenv 版本 --

# env RBENV_ROOT=\"/home/deploy/.rbenv\" PATH=\"/home/deploy/.rbenv/shims:/home/deploy/.rbenv/bin:$PATH\" RBENV_VERSION=\"2.0.0-p353\" /home/deploy/.rbenv/bin/rbenv exec bundle install --gemfile /domains/myapp.com/releases/20140119013611/Gemfile --path /domains/myapp.com/shared/bundle --deployment --without development test
> rbenv: version `"2.0.0-p353"' is not installed

嗯。这很奇怪。

# rbenv versions
> system
> * 2.0.0-p353 (set by /home/deploy/.rbenv/version)

知道我哪里出错了吗? bundle install 命令似乎认为 2.0.0-p353 不存在,但 rbenv versions 显示了它。可能发生了什么?

最佳答案

安装打包工具:gem install bundler。安装项目的依赖:bundle install

关于ruby-on-rails - Bundler 似乎无法通过 Rbenv 找到正确的 Ruby,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21212278/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com