新しくRailsプロジェクトを作った時にEventLogに以下のようなメッセージが出てNavigate to Declareを筆頭にいくつかの機能が動かないことがあった
16:10:04 RubyMine Gem Manager
RubyMine has detected that
some of the gems required for 'my-project'
are not installed
Install missing gems
(show balloon)
/usr/bin/ruby -e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift) /Users/akiroom/my-project/bin/bundle install
Fetching gem metadata from https://rubygems.org/...........
Fetching version metadata from https://rubygems.org/..
sudo: no tty present and no askpass program specified
Bundler::GemspecError: Could not read gem at /Library/Ruby/Gems/2.0.0/cache/rake-10.4.2.gem. It may be corrupted.
An error occurred while installing rake (10.4.2), and Bundler cannot continue.
Make sure that `gem install rake -v '10.4.2'` succeeds before bundling.
Process finished with exit code 5
rake 10.4.2はインストール済みなのでさっぱり分からず。
なんだろうと思ったら、rvmの影響で/usr/bin/rubyとrubyの指す場所が違っていた
% /usr/bin/ruby -v
ruby 2.0.0p481 (2014-05-08 revision 45883) [universal.x86_64-darwin13]
% ruby -v
ruby 2.1.4p265 (2014-10-27 revision 48166) [x86_64-darwin13.0]
% which ruby
/Users/akiroom/.rvm/rubies/ruby-2.1.4/bin/ruby
ので、Railsプロジェクトの直下に以下のファイルを置いて対応した
.ruby-version
ruby-2.1.4