简体   繁体   English

无法使用特定版本的捆绑软件

[英]Cannot use specific version of bundler

I'm on Debian 9 and I'm trying to use the 1.16.3 version of bundler on a ruby on rails site. 我使用的是Debian 9,并且尝试在Rails网站上的ruby上使用1.16.3版本的bundler。 However for some reason the system insists on using the older version 1.13.6 both by default and when I explicitly specify it: 但是由于某种原因,系统在默认情况下和我明确指定它时都坚持使用旧版本1.13.6:

在此处输入图片说明

To resolve this I tried completely uninstalling the 1.13.6 version: 要解决此问题,我尝试完全卸载1.13.6版本:

在此处输入图片说明

Now I'm starting to feel like I'm taking crazy pills. 现在,我开始觉得自己正在服用疯狂药丸。 Is it physically possible to use the 1.16.3 version? 在物理上可以使用1.16.3版本吗?

Edit in reply to matthewd: which -a bundler finds two hits: 修改以回复matthewd:其中-捆绑程序找到两个命中:

/usr/local/bin/bundler
/usr/bin/bundler

If run with bundler -v both report to be version 1.13.6 如果使用bundler -v运行,则两个都报告为1.13.6版

Edit in reply to Kedarnag Mukanahallipatna: There is no .rvm directory in /home/manos/. 编辑以回复Kedarnag Mukanahallipatna: / home / manos /中没有.rvm目录。 Could this be somewhere else? 可以在其他地方吗?

Bundler is pain in the a** Bundler是痛苦中的**

You can solve this by executing these set of commands. 您可以通过执行这些命令集来解决此问题。 Keep in consideration your ruby version also. 还请考虑您的红宝石版本。

before_install:
- rvm implode --force
- \curl -sSL https://get.rvm.io | bash -s 1.27.0
- rvm reload
- rvm install 2.2.3
- gem uninstall -i /home/travis/.rvm/gems/ruby-2.2.3 bundler -x
- gem install bundler -v 1.16.3

After a lot of back and forth I ended up uninstalling ruby and rails that were previously installed via apt. 经过很多次来回后,我最终卸载了以前通过apt安装的ruby和rails。 I then reinstalled ruby via apt and instead of getting rails via apt I got it with 然后,我通过apt重新安装了ruby,而不是通过apt获得了rails,我得到了

gem install rails

Bundler is now at 1.16.3. 捆绑器现在为1.16.3。

A disclaimer though... since this whole thing has been a side issue while I was dealing with other rails problems, I've also done a bunch of other reinstalling so there's a chance something there affected the bundler. 不过免责声明...由于在我处理其他Rails问题时,整个事情一直是一个附带问题,因此我也做了很多其他的重新安装工作,因此有可能会影响捆绑器。 So there's that. 就是这样。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM