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
<p>I am getting the error </p>

<pre><code> 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." 
</code></pre>

<p>when I try to run the command <strong>rake generate_secret_token</strong></p>

<p>Output of <strong>gem environment</strong></p>

<pre><code>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 =&gt; true
    - :verbose =&gt; true
    - :backtrace =&gt; false
    - :bulk_threshold =&gt; 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
</code></pre>

<p>Output of <strong>gem list rails</strong></p>

<pre><code>C:\Sites\redmine-3.2.1&gt;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)
</code></pre>