Rake versions in different rvm-gemset

I created rvm 1.8.7 to run old rail projects.

When I run rake , a warning appears:

WARNING: 'require' rake / rdoctask 'is deprecated. Please use 'require' rdoc / task '(in RDoc 2.4.2+)'.

This is due to the newer version of rake :

 rake (0.9.2.2, 0.8.7) 

on rvm at @global gemset

 $ gem list -d rake *** LOCAL GEMS *** rake (0.9.2.2, 0.8.7) Author: Jim Weirich Rubyforge: http://rubyforge.org/projects/rake Homepage: http://rake.rubyforge.org Installed at (0.9.2.2): /Users/horace/.rvm/gems/ ruby-1.8.7-p358@global (0.8.7): /Users/horace/.rvm/gems/ruby-1.8.7-p358 Ruby based make-like utility. 

If I try to remove rake 0.9.2.2 in gemset @global , a warning appears:

 You have requested to uninstall the gem: rake-0.9.2.2 rvm-1.11.3.3 depends on [rake (>= 0)] If you remove this gems, one or more dependencies will not be met. Continue with Uninstall? [Yn] 

So, how can I use rake 0.8.7 by default in my rvm 1.8.7 ?

+6
source share
1 answer

The gem shells for binary files let you specify which version of a particular program you want to run. So you can go

 rake _0.8.7_ [stuff] 

Or, if you like, you can change the shell to use this version by default (but be careful with gems and rvm that need a new rake). Change the line

 version = ">= 0" 

to

 version = "= 0.8.7" 
+11
source

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


All Articles