Jump to content

The ultimate community for Ruby on Rails developers.


Unable to do rake command

  • Please log in to reply
3 replies to this topic

#1 distraff



  • Members
  • 4 posts

Posted 01 September 2013 - 09:42 PM

Previously I have been trying to install ruby and rails and used apt-get at one point.  I did install previous versions of ruby and rails by mistake which I had to correct.  Now I used rvm to install ruby 2.0.0 and rails 4.0.0 but when I try to run the rake command I get:

/usr/bin/env: ruby1.9.1: No such file or directory

The problem here seems to be is that my system is looking for something for ruby1.9.1 when I am using ruby 2.0.0.  What is going on here?



#2 Ohm



  • Moderators
  • 529 posts
  • LocationCopenhagen

Posted 01 September 2013 - 09:44 PM

When I do a 

which rake

I get


What do you get?

Blog: http://ohm.sh | Twitter: @madsohm | Work: Lokalebasen.dk

#3 Kelli Shaver

Kelli Shaver


  • Administrators
  • 76 posts
  • LocationKentucky

Posted 02 September 2013 - 05:16 PM   Best Answer

I'd start with, uninstalling rake and then reinstalling the latest version

gem uninstall rake
gem install rake -v=10.1.0

As a quick work-around, however, 'bundle exec rake <whatever>' should work. If bundle is looking for the wrong version, you may need to run 

bundle update rake

  • james likes this

#4 distraff



  • Members
  • 4 posts

Posted 02 September 2013 - 07:54 PM

Thanks for the help.   That solved the problem!

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users