Ruby:安装了 bundler-2.2.7 导致安装旧的 gems如何强制它使用 bundler-2.2.5 或其他解决方案?

如何解决Ruby:安装了 bundler-2.2.7 导致安装旧的 gems如何强制它使用 bundler-2.2.5 或其他解决方案?

我像这样安装了 Fastlane gem:

gem cleanup
gem list bundler
bundle install --no-document bundler -v 2.2.5
gem install fastlane

但我收到此错误: 如您所见,下载 fastlane-2.54.1 我需要一个较新的版本,它是 fastlane-2.171.0

Cleaning up installed gems...
 Clean up complete
 bundler (default: 2.2.3)
 Unknown switches "--no-document","-v"
 Did you mean?  "--no-prune"
 Successfully installed rouge-2.0.7
 Successfully installed xcpretty-0.3.0
 Successfully installed xcpretty-travis-formatter-1.0.1
 Successfully installed nanaimo-0.3.0
 Successfully installed colored2-3.1.2
 Successfully installed claide-1.0.3
 Successfully installed CFPropertyList-2.3.6
 Successfully installed atomos-0.1.3
 Successfully installed xcodeproj-1.19.0
 Successfully installed word_wrap-1.0.0
 Successfully installed tty-screen-0.5.1
 Successfully installed unicode-display_width-1.7.0
 Successfully installed terminal-table-1.8.0
 Successfully installed terminal-notifier-1.8.0
 Successfully installed slack-notifier-1.5.1
 Successfully installed security-0.1.3
 Successfully installed rubyzip-1.3.0
 Successfully installed plist-3.6.0
 Successfully installed multi_xml-0.6.0
 Successfully installed multipart-post-2.0.0
 Successfully installed multi_json-1.15.0
 Successfully installed mini_magick-4.5.1
 Successfully installed highline-1.7.10
 Successfully installed thor-1.1.0
 Successfully installed webrick-1.7.0
 Successfully installed jwt-2.2.2
 Successfully installed faraday-0.17.3
 Successfully installed public_suffix-4.0.6
 Successfully installed addressable-2.7.0
 Successfully installed signet-0.14.1
 Successfully installed retriable-3.1.2
 Successfully installed uber-0.1.0
 Successfully installed declarative-option-0.1.0
 Successfully installed declarative-0.0.20
 Successfully installed representable-3.0.4
 Successfully installed mini_mime-1.0.2
 Successfully installed httpclient-2.8.3
 Successfully installed os-1.1.1
 Successfully installed memoist-0.16.2
 Successfully installed googleauth-0.15.0
 Successfully installed google-apis-core-0.2.1
 Successfully installed google-apis-discovery_v1-0.1.0
 Successfully installed gems-1.2.0
 Successfully installed zeitwerk-2.4.2
 Successfully installed concurrent-ruby-1.1.8
 Successfully installed tzinfo-2.0.4
 
 HEADS UP! i18n 1.1 changed fallbacks to exclude default locale.
 But that may break your application.
 
 If you are upgrading your Rails application from an older version of Rails:
 
 Please check your Rails app for 'config.i18n.fallbacks = true'.
 If you're using I18n (>= 1.1.0) and Rails (< 5.2.2),this should be
 'config.i18n.fallbacks = [I18n.default_locale]'.
 If not,fallbacks will be broken in your app by I18n 1.1.x.
 
 If you are starting a NEW Rails application,you can ignore this notice.
 
 For more info see:
 https://github.com/svenfuchs/i18n/releases/tag/v1.1.0
 
 Successfully installed i18n-1.8.7
 Successfully installed activesupport-6.1.1
 Successfully installed google-apis-generator-0.1.2
 *******************************************************************************
 The google-api-client gem is deprecated and will likely not be updated further.
 
 Instead,please install the gem corresponding to the specific service to use.
 For example,to use the Google Drive V3 client,install google-apis-drive_v3.
 For more information,see the FAQ in the OVERVIEW.md file or the YARD docs.
 *******************************************************************************
 Successfully installed google-api-client-0.53.0
 Successfully installed gh_inspector-1.1.3
 Successfully installed fastimage-2.2.1
 Successfully installed faraday_middleware-0.14.0
 Building native extensions. This could take a while...
 invalid options: -SHN
 (invalid options are ignored)
 Successfully installed unf_ext-0.0.7.7
 Successfully installed unf-0.1.4
 Successfully installed domain_name-0.5.20190701
 Successfully installed http-cookie-1.0.3
 Successfully installed faraday-cookie_jar-0.0.7
 Successfully installed excon-0.78.1
 Successfully installed dotenv-2.7.6
 Successfully installed commander-fastlane-4.4.6
 Successfully installed colored-1.2
 Successfully installed bundler-1.17.3
 Successfully installed babosa-1.0.4
 Successfully installed fastlane-2.54.1

这是我一周前运行的 gem 命令,它成功地为我下载了正确的 Fastlane gem 版本

gem cleanup
gem list bundler
bundle install bundler 
gem install fastlane
2021-01-18T15:22:52.5729450Z Successfully installed bundler-2.2.5
2021-01-18T15:22:52.5731210Z 1 gem installed
2021-01-18T15:22:53.2670020Z Could not locate Gemfile
2021-01-18T15:22:53.7987180Z Could not locate Gemfile
2021-01-18T15:23:26.8921550Z Successfully installed slack-notifier-2.3.2
2021-01-18T15:23:26.8953050Z Successfully installed atomos-0.1.3
2021-01-18T15:23:26.8962540Z Successfully installed CFPropertyList-3.0.3
2021-01-18T15:23:26.9064490Z Successfully installed claide-1.0.3
2021-01-18T15:23:26.9106410Z Successfully installed colored2-3.1.2
2021-01-18T15:23:26.9107550Z Successfully installed nanaimo-0.3.0
2021-01-18T15:23:26.9108470Z Successfully installed xcodeproj-1.19.0
2021-01-18T15:23:26.9109430Z Successfully installed rouge-2.0.7
2021-01-18T15:23:26.9110370Z Successfully installed xcpretty-0.3.0
2021-01-18T15:23:26.9127830Z Successfully installed terminal-notifier-2.0.0
2021-01-18T15:23:26.9128880Z Successfully installed unicode-display_width-1.7.0
2021-01-18T15:23:26.9129940Z Successfully installed terminal-table-1.8.0
2021-01-18T15:23:26.9130890Z Successfully installed plist-3.6.0
2021-01-18T15:23:26.9132410Z Successfully installed public_suffix-4.0.6
2021-01-18T15:23:26.9133340Z Successfully installed addressable-2.7.0
2021-01-18T15:23:26.9180840Z Successfully installed multipart-post-2.0.0
2021-01-18T15:23:27.8142420Z Successfully installed word_wrap-1.0.0
2021-01-18T15:23:27.8149220Z Successfully installed tty-screen-0.8.1
2021-01-18T15:23:27.8150290Z Successfully installed tty-cursor-0.7.1
2021-01-18T15:23:27.8151220Z Successfully installed tty-spinner-0.9.3
2021-01-18T15:23:27.8152040Z Successfully installed babosa-1.0.4
2021-01-18T15:23:27.8152910Z Successfully installed colored-1.2
2021-01-18T15:23:27.8154190Z Successfully installed highline-1.7.10
2021-01-18T15:23:27.8155390Z Successfully installed commander-fastlane-4.4.6
2021-01-18T15:23:27.8156280Z Successfully installed excon-0.78.1
2021-01-18T15:23:27.8157200Z Successfully installed faraday-net_http-1.0.1
2021-01-18T15:23:27.8158060Z Successfully installed ruby2_keywords-0.0.2
2021-01-18T15:23:27.8158990Z Successfully installed faraday-1.3.0
2021-01-18T15:23:27.8159320Z Building native extensions. This could take a while...
2021-01-18T15:23:38.8884610Z Successfully installed unf_ext-0.0.7.7
2021-01-18T15:23:38.8938770Z Successfully installed unf-0.1.4
2021-01-18T15:23:38.8942020Z Successfully installed domain_name-0.5.20190701
2021-01-18T15:23:38.8945190Z Successfully installed http-cookie-1.0.3
2021-01-18T15:23:38.8946460Z Successfully installed faraday-cookie_jar-0.0.7
2021-01-18T15:23:38.8947890Z Successfully installed faraday_middleware-1.0.0
2021-01-18T15:23:38.8948900Z Successfully installed fastimage-2.2.1
2021-01-18T15:23:38.8978150Z Successfully installed gh_inspector-1.1.3
2021-01-18T15:23:38.8981380Z Successfully installed mini_magick-4.11.0
2021-01-18T15:23:38.8982690Z Successfully installed rubyzip-2.3.0
2021-01-18T15:23:38.8983930Z Successfully installed security-0.1.3
2021-01-18T15:23:38.8985290Z Successfully installed xcpretty-travis-formatter-1.0.1
2021-01-18T15:23:38.8988880Z Successfully installed dotenv-2.7.6
2021-01-18T15:23:38.8990250Z Successfully installed naturally-2.2.1
2021-01-18T15:23:38.8991500Z Successfully installed simctl-1.6.8
2021-01-18T15:23:38.8992750Z Successfully installed jwt-2.2.2
2021-01-18T15:23:38.8994170Z Successfully installed declarative-option-0.1.0
2021-01-18T15:23:38.8997560Z Successfully installed declarative-0.0.20
2021-01-18T15:23:38.9000700Z Successfully installed uber-0.1.0
2021-01-18T15:23:38.9001920Z Successfully installed representable-3.0.4
2021-01-18T15:23:38.9003150Z Successfully installed retriable-3.1.2
2021-01-18T15:23:38.9004340Z Successfully installed mini_mime-1.0.2
2021-01-18T15:23:38.9005600Z Successfully installed multi_json-1.15.0
2021-01-18T15:23:38.9006920Z Successfully installed signet-0.14.0
2021-01-18T15:23:38.9008250Z Successfully installed memoist-0.16.2
2021-01-18T15:23:38.9009400Z Successfully installed os-1.1.1
2021-01-18T15:23:38.9010660Z Successfully installed googleauth-0.14.0
2021-01-18T15:23:38.9012000Z Successfully installed httpclient-2.8.3
2021-01-18T15:23:38.9016350Z Successfully installed google-api-client-0.38.0
2021-01-18T15:23:38.9019500Z Successfully installed google-cloud-env-1.4.0
2021-01-18T15:23:38.9022580Z Successfully installed google-cloud-errors-1.0.1
2021-01-18T15:23:38.9023820Z Successfully installed google-cloud-core-1.5.0
2021-01-18T15:23:38.9040570Z Successfully installed google-apis-core-0.2.0
2021-01-18T15:23:38.9046810Z Successfully installed google-apis-iamcredentials_v1-0.1.0
2021-01-18T15:23:38.9051060Z Successfully installed google-apis-storage_v1-0.1.0
2021-01-18T15:23:38.9054080Z Building native extensions. This could take a while...
2021-01-18T15:24:00.2078850Z Successfully installed digest-crc-0.6.3
2021-01-18T15:24:00.2079760Z Successfully installed google-cloud-storage-1.30.0
2021-01-18T15:24:00.2080490Z Successfully installed emoji_regex-3.2.1
2021-01-18T15:24:00.2081070Z Successfully installed jmespath-1.4.0
2021-01-18T15:24:00.2081750Z Successfully installed aws-partitions-1.416.0
2021-01-18T15:24:00.2082380Z Successfully installed aws-eventstream-1.1.0
2021-01-18T15:24:00.2083440Z Successfully installed aws-sigv4-1.2.2
2021-01-18T15:24:00.2084060Z Successfully installed aws-sdk-core-3.111.1
2021-01-18T15:24:00.2084650Z Successfully installed aws-sdk-kms-1.41.0
2021-01-18T15:24:00.2085300Z Successfully installed aws-sdk-s3-1.87.0
2021-01-18T15:24:00.2085890Z Successfully installed fastlane-2.171.0
2021-01-18T15:24:00.2086180Z 74 gems installed

解决方法

如果您的机器中有多个版本的 bundler,如下所示:

 >>gem list bundler

  

      *** LOCAL GEMS ***
    
    bundler (2.1.4,1.17.1)

要重新捆绑指定要使用的捆绑器,您可以使用此语法:

bundler _1.17.1_ install

请注意是 bundler 而不是 bundle,您始终可以使用 _version_ 指定要使用哪个版本的 bundle。

>>bundler _1.17.1_ -v 
Bundler version 1.17.1
>> bundler _2.1.4_ -v
Bundler version 2.1.4    

希望使用另一个打包程序版本可以解决您的问题,加油。

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐


依赖报错 idea导入项目后依赖报错,解决方案:https://blog.csdn.net/weixin_42420249/article/details/81191861 依赖版本报错:更换其他版本 无法下载依赖可参考:https://blog.csdn.net/weixin_42628809/a
错误1:代码生成器依赖和mybatis依赖冲突 启动项目时报错如下 2021-12-03 13:33:33.927 ERROR 7228 [ main] o.s.b.d.LoggingFailureAnalysisReporter : *************************** APPL
错误1:gradle项目控制台输出为乱码 # 解决方案:https://blog.csdn.net/weixin_43501566/article/details/112482302 # 在gradle-wrapper.properties 添加以下内容 org.gradle.jvmargs=-Df
错误还原:在查询的过程中,传入的workType为0时,该条件不起作用 &lt;select id=&quot;xxx&quot;&gt; SELECT di.id, di.name, di.work_type, di.updated... &lt;where&gt; &lt;if test=&qu
报错如下,gcc版本太低 ^ server.c:5346:31: 错误:‘struct redisServer’没有名为‘server_cpulist’的成员 redisSetCpuAffinity(server.server_cpulist); ^ server.c: 在函数‘hasActiveC
解决方案1 1、改项目中.idea/workspace.xml配置文件,增加dynamic.classpath参数 2、搜索PropertiesComponent,添加如下 &lt;property name=&quot;dynamic.classpath&quot; value=&quot;tru
删除根组件app.vue中的默认代码后报错:Module Error (from ./node_modules/eslint-loader/index.js): 解决方案:关闭ESlint代码检测,在项目根目录创建vue.config.js,在文件中添加 module.exports = { lin
查看spark默认的python版本 [root@master day27]# pyspark /home/software/spark-2.3.4-bin-hadoop2.7/conf/spark-env.sh: line 2: /usr/local/hadoop/bin/hadoop: No s
使用本地python环境可以成功执行 import pandas as pd import matplotlib.pyplot as plt # 设置字体 plt.rcParams[&#39;font.sans-serif&#39;] = [&#39;SimHei&#39;] # 能正确显示负号 p
错误1:Request method ‘DELETE‘ not supported 错误还原:controller层有一个接口,访问该接口时报错:Request method ‘DELETE‘ not supported 错误原因:没有接收到前端传入的参数,修改为如下 参考 错误2:cannot r
错误1:启动docker镜像时报错:Error response from daemon: driver failed programming external connectivity on endpoint quirky_allen 解决方法:重启docker -&gt; systemctl r
错误1:private field ‘xxx‘ is never assigned 按Altʾnter快捷键,选择第2项 参考:https://blog.csdn.net/shi_hong_fei_hei/article/details/88814070 错误2:启动时报错,不能找到主启动类 #
报错如下,通过源不能下载,最后警告pip需升级版本 Requirement already satisfied: pip in c:\users\ychen\appdata\local\programs\python\python310\lib\site-packages (22.0.4) Coll
错误1:maven打包报错 错误还原:使用maven打包项目时报错如下 [ERROR] Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:3.2.0:resources (default-resources)
错误1:服务调用时报错 服务消费者模块assess通过openFeign调用服务提供者模块hires 如下为服务提供者模块hires的控制层接口 @RestController @RequestMapping(&quot;/hires&quot;) public class FeignControl
错误1:运行项目后报如下错误 解决方案 报错2:Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project sb 解决方案:在pom.
参考 错误原因 过滤器或拦截器在生效时,redisTemplate还没有注入 解决方案:在注入容器时就生效 @Component //项目运行时就注入Spring容器 public class RedisBean { @Resource private RedisTemplate&lt;String
使用vite构建项目报错 C:\Users\ychen\work&gt;npm init @vitejs/app @vitejs/create-app is deprecated, use npm init vite instead C:\Users\ychen\AppData\Local\npm-