无法找到gem' rails(= 4.2.5.2)x86-mingw32'在您的Gemfile中列出的或在此计算机上可用的任何gem源中

时间:2016-04-17 16:39:51

标签: ruby redmine

我收到错误

 Could not find gem 'rails (= 4.2.5.2) x86-mingw32' in any of the gem sources listed in your Gemfile or available on this machine." 

当我尝试运行命令 rake generate_secret_token

输出宝石环境

RubyGems Environment:

    - RUBYGEMS VERSION: 2.2.5
    - RUBY VERSION: 2.1.8 (2015-12-16 patchlevel 440) [i386-mingw32]
    - INSTALLATION DIRECTORY: C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0
    - RUBY EXECUTABLE: C:/RailsInstaller/Ruby2.1.0/bin/ruby.exe
    - EXECUTABLE DIRECTORY: C:/RailsInstaller/Ruby2.1.0/bin
    - SPEC CACHE DIRECTORY: C:/Users/Souvik Banerjee/.gem/specs
    - RUBYGEMS PLATFORMS:
    - ruby
    - x86-mingw32

GEM PATHS:

    - C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0
    - C:/Users/Souvik Banerjee/.gem/ruby/2.1.0

GEM CONFIGURATION:

    - :update_sources => true
    - :verbose => true
    - :backtrace => false
    - :bulk_threshold => 1000

REMOTE SOURCES:

    - https://rubygems.org/

SHELL PATH:

    - C:\ImageMagick
    - C:\ProgramData\Oracle\Java\javapath
    - C:\WINDOWS\system32
    - C:\WINDOWS
    - C:\WINDOWS\System32\Wbem
    - C:\WINDOWS\System32\WindowsPowerShell\v1.0\
    - C:\Program Files\nodejs\
    - C:\Program Files\Java\jdk1.8.0_65\bin
    - D:\apache-ant-1.9.6\bin
    - C:\Users\Souvik Banerjee\AppData\Local\Android\android-sdk\tools
    - C:\Users\Souvik Banerjee\AppData\Local\Android\android-sdk\platforms
    - C:\Program Files (x86)\Skype\Phone\
    - C:\RailsInstaller\Git\cmd
    - C:\RailsInstaller\Ruby2.1.0\bin

输出 gem list rails

C:\Sites\redmine-3.2.1>gem list rails

LOCAL GEMS

    coffee-rails (4.1.1)
    jquery-rails (4.1.0)
    rails (4.2.6, 4.2.5.1)
    rails-deprecated_sanitizer (1.0.3)
    rails-dom-testing (1.0.7)
    rails-html-sanitizer (1.0.3)
    sass-rails (5.0.4)
    sprockets-rails (3.0.1)

1 个答案:

答案 0 :(得分:3)

您已安装Rails版本4.2.5.1,但显然有人已对其进行了更新,现在您的项目需要版本4.2.5.2。更新你的宝石:

bundle install