Ruby版本> = X与当前版本不兼容

时间:2021-03-23 07:01:06

I have rbenv installed on my system and am trying to run the standard bundle install command within my ruby application now. I'm getting the following error though:

我已经在我的系统上安装了rbenv,并且我正在尝试在我的ruby应用程序中运行标准的bundle install命令。我收到以下错误:

activesupport-5.0.1 requires ruby version >= 2.2.2, which is incompatible with the current version, ruby 1.9.3p484

activesupport-5.0.1需要ruby version> = 2.2.2,这与当前版本不兼容,ruby 1.9.3p484

I've checked everything on my end and am unsure where it's getting the old version of ruby 1.9.3... since I have 2.3.0 installed:

我已经检查了我的一切,我不确定它在哪里得到旧版本的ruby 1.9.3 ...因为我安装了2.3.0:

> rbenv versions
    system
  * 2.3.0 (set by /neo-main/.ruby-version)

> ruby --version
  ruby 2.3.0p0 (2015-12-25 revision 53290) [i686-linux]

> echo $PATH
  /root/.rbenv/shims:/root/.rbenv/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games

I've rebooted just to make sure there wasn't something stuck in memory or whatever too.

我重新启动只是为了确保没有东西卡在内存或其他任何东西。

1 个解决方案

#1


9  

Check where your bundle command is coming from; it's probably outside rbenv. Do a gem install bundler and then rerun eval "$(rbenv init -)" to pick up the new shim.

检查bundle命令的来源;它可能在rbenv之外。做一个gem install bundler,然后重新运行eval“$(rbenv init - )”来获取新的shim。

#1


9  

Check where your bundle command is coming from; it's probably outside rbenv. Do a gem install bundler and then rerun eval "$(rbenv init -)" to pick up the new shim.

检查bundle命令的来源;它可能在rbenv之外。做一个gem install bundler,然后重新运行eval“$(rbenv init - )”来获取新的shim。