gpt4 book ai didi

ruby-on-rails - 你的 Ruby 版本是 2.3.0,但是你的 Gemfile 指定了 2.1.2

转载 作者:数据小太阳 更新时间:2023-10-29 08:02:59 60 4
gpt4 key购买 nike

我正在尝试设置一个现有项目,运行 bundle install 时,出现以下错误。

我已经尝试了很多可能的解决方案,但对我没有用,我也运行了建议的命令,比如 gem pristine bcrypt --version 3.1.10 但对我。

    bipashant@bipashant-Inspiron-5537:~/sanokam$ bundle install

Ignoring bcrypt-3.1.10 because its extensions are not built. Try: gem pristine bcrypt --version 3.1.10
Ignoring curb-0.9.3 because its extensions are not built. Try: gem pristine curb --version 0.9.3
Ignoring debug_inspector-0.0.2 because its extensions are not built. Try: gem pristine debug_inspector --version 0.0.2
Ignoring eventmachine-1.0.3 because its extensions are not built. Try: gem pristine eventmachine --version 1.0.3
Ignoring executable-hooks-1.3.2 because its extensions are not built. Try: gem pristine executable-hooks --version 1.3.2
Ignoring ffi-1.9.8 because its extensions are not built. Try: gem pristine ffi --version 1.9.8
Ignoring gem-wrappers-1.2.7 because its extensions are not built. Try: gem pristine gem-wrappers --version 1.2.7
Ignoring gherkin-2.12.2 because its extensions are not built. Try: gem pristine gherkin --version 2.12.2
Ignoring http_parser.rb-0.5.3 because its extensions are not built. Try: gem pristine http_parser.rb --version 0.5.3
Ignoring kgio-2.8.1 because its extensions are not built. Try: gem pristine kgio --version 2.8.1
Ignoring mysql2-0.3.14 because its extensions are not built. Try: gem pristine mysql2 --version 0.3.14
Ignoring nokogiri-1.6.7 because its extensions are not built. Try: gem pristine nokogiri --version 1.6.7
Ignoring ruby-prof-0.14.2 because its extensions are not built. Try: gem pristine ruby-prof --version 0.14.2

Your Ruby version is 2.3.0, but your Gemfile specified 2.1.2

更新1

bipashant@bipashant-Inspiron-5537:~/sanokam$ rvm list

rvm rubies

=* ruby-2.1.2 [ x86_64 ]
ruby-2.3.0 [ x86_64 ]
ruby-2.3.1 [ x86_64 ]

# => - current
# =* - current && default
# * - default

我还有一个 ruby 版本的 Gemfile。

source 'http://rubygems.org'

ruby '2.1.2'

任何建议将不胜感激,谢谢。

最佳答案

您的 Gemfile 可能有这一行:

ruby '2.1.2'

并且您使用的是 ruby​​ 2.3.0,因此您可以:

  1. 在 rvm/rbenv/chruby 的帮助下切换到 ruby​​ 2.1.2
  2. 将您的 Gemfile 更新为 ruby '2.3.0' 并再次 bundle install

关于ruby-on-rails - 你的 Ruby 版本是 2.3.0,但是你的 Gemfile 指定了 2.1.2,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37917880/

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