开发者

Use rvm to execute parameter against many Ruby versions

With most (all?) Ruby interpreters one can write ruby -we "..." and have the supplied Ruby code executed (with warnings).

With RVM one can write rvm ruby foo.rb and have the source file executed against all install开发者_如何学运维ed interpreters.

Is there a way with RVM to run a one-off line of code against all interpreters? I have tried executing both rvm ruby -we "..." and rvm -we ruby "..." to no good effect.


See rvm exec.

rvm exec ruby -we 'puts "#{`which ruby`.strip} #{RUBY_VERSION}"'
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜