railsのアプリを作っています。  
railsのバージョンを確認しようとすると、下記のようなエラーが発生します。

```

    :/var/www/myapp/development/current$ rails -v
    Could not find rake-12.0.0 in any of the sources
    Run `bundle install` to install missing gems.
    
```

Gemfileは下記のようになっています。bundle installしても結果は変わりません。  
どうしてrailsのバージョンを返してくれないのでしょうか。

お分かりになられる方がいらっしゃいましたら、教えていだけますと大変幸いです。

**Gemfile**

```

    gem 'rails',  '5.0.3'
    gem 'will_paginate',           '3.1.0'
    gem 'bootstrap-will_paginate', '0.0.10'
    gem 'bootstrap-sass', '~> 3.3.6' 
    gem 'sass-rails', '>= 3.2'
    gem 'puma',         '3.4.0'
    gem 'uglifier',     '3.0.0'
    gem 'coffee-rails', '4.2.1'
    gem 'jquery-rails', '4.1.1'
    gem 'turbolinks',   '5.0.1'
    gem 'jbuilder',     '2.4.1'
    gem 'devise'
    gem 'toastr-rails'
    gem 'omniauth'
    gem 'omniauth-facebook'
    gem 'omniauth-twitter'
    gem 'omniauth-google-oauth2'
    gem 'paperclip'
    gem 'geocoder'
    gem 'jquery-ui-rails', '5.0.5'
    gem 'private_pub'
    gem 'thin'
    gem 'ransack'
    gem 'font-awesome-rails'
    gem 'font-awesome-sass'
    gem 'rails-i18n'
    gem 'payjp'
    gem 'carrierwave'
    gem 'rmagick'
    gem 'rack-mini-profiler'
    gem 'rb-readline'
    gem 'unicorn'
    gem 'capistrano', '~> 3.6'
    gem 'capistrano-rails', '~> 1.3'
    gem 'capistrano-bundler'
    gem 'capistrano-passenger'
    gem 'capistrano-rbenv'
    gem 'therubyracer',  platforms: :ruby
    gem 'capistrano3-unicorn'
    gem 'capistrano-safe-deploy-to'
    gem 'listen', '~> 3.1.5'
    gem 'sqlite3', '1.3.13'
    
    group :development do
      gem 'web-console',           '3.1.1'
      gem 'spring',                '1.7.2'
      gem 'spring-watcher-listen', '2.0.0'
    end
    
    group :test do
      gem 'rails-controller-testing', '0.1.1'
      gem 'minitest-reporters',       '1.1.9'
      gem 'guard',                    '2.13.0'
      gem 'guard-minitest',           '2.4.4'
    end
    
    group :production do
      gem 'pg', '0.18.4'
      gem 'rails_12factor'
    
```

**The specs are:**

```

    ubuntu 16.04
    Bundler 1.14.6
    ruby 2.4.1p111 (2017-03-22 revision58053) [x86_64-darwin16]
    Rails 5.0.3
    capistrano 3
    cloud9 (local environment)
    nginx 1.10.3-0ubuntu0.16.04.2
    unicorn 4.9.0-2build2
    
```
CC BY-SA 3.0
2017-07-16T13:19:16.090
36422
2017-07-16T23:46:15.100
2017-07-16T13:54:10.067
27408
27408
question
ruby-on-rails ruby
rails -vすると Could not find rake-12.0.0 in any of the sourcesとエラーが発生
[ruby on rails - Your bundle is locked to rake (12.0.0), but that version
could not be found in any of the sources listed in your Gemfile. - Stack
Overflow](https://stackoverflow.com/questions/41757144/your-bundle-is-locked-
to-rake-12-0-0-but-that-version-could-not-be-found-in-a)  
が同様のエラーです。

<https://stackoverflow.com/a/41757322/1979953>  
の回答のとおり

Step1:

```

    gem install rubygems-bundler
    gem regenerate_binstubs
    
```

Step2:

`vendor/bundle` ディレクトリの削除

`bundle install` をリビルドのために行う

Step3:

`gem update bundler` を試す

関連イシュー: <https://github.com/bundler/bundler/issues/5068>
CC BY-SA 3.0
2017-07-16T23:13:08.087
36434
2017-07-16T23:46:15.100
2017-07-16T23:46:15.100
9008
9008
36422
answer