I am using different version of ruby and Jruby on my machine. On my machine I have rvm and use this rvm to switch to different version of ruby.
when I run the following command directly on console, then it works fine.
rvm use 3.0.0
rvm use jruby-9.2.9.0
But I want to execute these command as shell script and below is the syntax for that.
#!/bin/bash
#
# A script used to verify installation or install Jruby-9.2.9.0 and ruby-3.0.0
rvm use 3.0.0
rvm use jruby-9.2.9.0
When this script is executed then it does not has any impact and did not switch between different version of ruby. What wrong with this script?
Following is error that I see on console after executing this.
To fix this problem I followed RVM is not a function, selecting rubies with 'rvm use ...' will not work this url and in case shell execution. this is also not working.