Kalanamith
Kalanamith

Reputation: 20688

Ruby on rails error when running rails s

Um quite new to rails and um getting an error when run the command rails s it says Could not find rake-0.9.2.2 in any of the sources Run bundle install to install missing gems. when I run bundle install nothing happened

my gem list has rake 0.9.2.2 what can go wrong? my ruby version is 1.9.3 Thank you in advance

Upvotes: 2

Views: 321

Answers (3)

Arihant Godha
Arihant Godha

Reputation: 2479

Try using rvm and go back to ruby 1.8.7 instead of 1.9.2. This fixed it for me. Don't forget to install rails again (sudo gem install rails while already on 1.8.7) if you have only installed rails for 1.9.3.]

Upvotes: 0

rails_id
rails_id

Reputation: 8220

  1. Remove all the versions of Rake ==> gem uninstall rake
  2. Remove your gemfile.lock => rm Gemfile.lock
  3. Remove gem 'rake' on your gemfile
  4. Run bundle install
  5. Install Rake manually : gem install rake --version=10.0.4

Upvotes: 2

RahulOnRails
RahulOnRails

Reputation: 6542

When you use command gem list, you will get a list of gem installed on your machine.

For example : rake (10.0.4, 10.0.3, 0.9.2.2)

Just see the console which gem is compatible with your application. It is already mentioned in the error log message.

Use

gem uninstall rake

Keep the suitable one and remove the version who is creating trouble. And then run rails s or bundle exec rails s

Upvotes: 1

Related Questions