项目

一般

简介

Bitnami redmine中执行了gem update命令后,出现错误,无法再实现bundle install和安装插件,如何解决?

1

小 龙
3 个月 之前增加

安装bitnami后,已测试可以成功为redmine安装新插件。然后执行了gem update命令,执行中出现了很多错误。之后,无法再执行bundle install和bundle exec...命令。执行gem check命令,显示:ERROR: While executing gem ... (ArgumentError)wrong number of arguments (given 4, expected 1)。执行bundle exec...命令,显示:Could not find gem 'redmine_extensions x64-mingw32’ in any of the gem sources listed in your Gemfile or in gems cached in vendor/cache.Run `bundle install` to install missing gems.
应该如何解决?为什么执行了gem update命令会出错呢?

该问题是由于在未换源的情况下执行update命令导致。gem国外源由于网络等原因,直接执行update会出现错误,应切换为国内源执行。

解答 (1)

1

Chen Snowman
3 个月 之前增加

小 龙 重新安装redmine_extensions 试试看,执行如下命令看看:

bundle exec gem install redmine_extensions
bundle 

执行了,还是不行,错误显示没变:
D:\Bitnami\bitnami\apps\redmine\htdocs>bundle exec gem install redmine_extensions
Could not find gem 'redmine_extensions x64-mingw32’ in any of the gem sources listed in your Gemfile or in gems cached in vendor/cache.
Run `bundle install` to install missing gems.

D:\Bitnami\bitnami\apps\redmine\htdocs>bundle show
Could not find gem 'redmine_extensions x64-mingw32’ in any of the gem sources
listed in your Gemfile or in gems cached in vendor/cache.

  1. 先下载 https://rubygems.org/downloads/redmine_extensions-0.4.1.gem
  2. 然后再试试通过本地方式安装 bundle exec gem install -l 本地路径\redmine_extensions-0.4.1.gem
  3. bundle

还是没用,发现只要是bundle exec命令,都是同样的错误:Could not find gem 'redmine_extensions x64-mingw32’ in any of the gem sources listed in your Gemfile or in gems cached in vendor/cache.

bundle exec gem install -l 本地路径\redmine_extensions-0.4.1.gem 这个语句是本地安装,不应该报错的。确保你的本地路径不要写错。

    (1-1/1)