mayijia66fly
mayijia66fly

Reputation: 75

RubyMine: Could not find rake-10.5.0 in any of the sources

I am new to Ruby on Rails and I am using RubyMine 8. After I created a new project I tried to look at the rails version by typing $ rails -v, then I got Could not find rake-10.5.0 in any of the sources Run 'bundle install' to install missing gems. I tried to install rake by typing $ gem install rake but I still get this error. Can someone help me? Here are two screenshots: Cannot find rake error and Warnings.

I tried bundle install and bundle update by going into Tools-->Bundler-->Install(and Update), and I've checked rake version by typing rake --version(gives me 10.5.0) but neither of them works. Thank you!!

Upvotes: 2

Views: 2502

Answers (2)

mayijia66fly
mayijia66fly

Reputation: 75

I solved my problem by

  1. Uninstall ALL gems, including rails gem:
    gem uninstall -aIx

  2. Re-install rails:
    gem install rails

  3. Then RubyMine somehow don't detect the rails version I just installed, to create a project, run rails new projectName
    in the terminal to create a project, and then open the project folder in RubyMine.

Upvotes: 1

Apoorv
Apoorv

Reputation: 1389

Use the following

Bundle exec rake rake-command

And use

rails -version 

To know the rails version After all this run

bundle install

..

Upvotes: 0

Related Questions