LoginSignup
2
2

More than 5 years have passed since last update.

Could not find rake-10.5.0 in any of the sources の対処法

Posted at

アプリケーションのルートじゃない階層のディレクトリにGemfile を置いて使うアプリケーションにcapistranoでデプロイしようとしたときにハマったので整理

何はともあれ bundle config

$ cd /path/to/app/current
$ bundle config

コマンドを打つことで、bundler が使う設定値の他、その値がどこからロードされたかが確認できる

自分の場合は、環境変数で指定した BUNDLE_GEMFILE だけが出て、 .bundle/config に書かれているはずの BUNDLE_PATH などが出てこなかった

.bundle/config を探す

.bundle/config は、bundle install が意図通り実行されれば、
BUNDLE _GEMFILE で書いた gemfile と同じディレクトリに作られるはずである。

$ cd /path/to/app/current/path/to/gemfile_dir
$ ls .bundle/config

自分の場合はここにファイルが存在しなかった。
よって、意図した BUNDLE_GEMFILE で bundle install が行われなかったと分かる。
たとえ、他のコマンド実行時に BUNDLE_GEMFILE をうまく使えているとしても。

下記リンク先の通りに、gemfile のパスを capistrano で設定したら、うまくいった。
http://qiita.com/negito6/items/042afee41b71ab45e66b

2
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
2