Ruby on rails error when starting s rails

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

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

+2
source share
3 answers
  • Uninstall all versions of Rake ==> gem uninstall rake
  • Remove gemfile.lock => rm Gemfile.lock
  • Remove gem 'rake' on gemfile
  • Run bundle install
  • Install Rake manually: gem install rake --version=10.0.4
+2
source

When you use the gem list command, you will get a list of gems installed on your computer.

For example: rake (10.0.4, 10.0.3, 0.9.2.2)

Just browse the console where gem is compatible with your application. This has already been mentioned in the error log message.

Use

gem remove rake

Save the appropriate version and delete the version that creates the problem. Then run rails s or bundle exec rails s

+1
source

Try using rvm and go back to ruby ​​1.8.7 instead of 1.9.2. This fixed it for me. Remember to re-install the rails (sudo gem installation guides, albeit already at 1.8.7) if you only have guides for 1.9.3 installed.]

0
source

Source: https://habr.com/ru/post/1485742/


All Articles