herpderp
herpderp

Reputation: 16177

Rake command using the wrong path

Recently I installed jruby and put it in my home directory. This apparently hijacked rake:

$ which ruby
/usr/bin/ruby
$ which rake
/home/user/jruby-1.5.5/bin/rake

Which seemed to be causing problems. So I moved the jruby folder and reinstalled rake, which at first seemed to fix it:

$ which rake
/usr/bin/rake

But when I run rake it's still trying to use the one in jruby:

user@user-desktop:~/rails/appname$ rake db:migrate
bash: /home/user/jruby-1.5.5/bin/rake: No such file or directory

How do I fix this?

Upvotes: 0

Views: 551

Answers (1)

zetetic
zetetic

Reputation: 47548

Try RVM. It is invaluable for isolating different Ruby versions. Once installed do

rvm install jruby

That gets you a separate environment for running JRuby. You can switch between versions with

rvm system
rvm jruby

Upvotes: 3

Related Questions