sorry for this dumb question, but i’m getting zero iq as of this moment
i cannot seem to run properly an rvm command inside a script file. my
objective is to run a ruby script on all rvm versions installed.
eg, the ff runs fine when run thru the cli,
for i in rvm list strings; do rvm use “$i”; ruby -v; done
but when the above code is placed inside a script file, and then the
script is run, you wont get the expected output. You just the same
ruby -v result on all rvm ruby versions, as if rvm use command was
ignored…
but when the above code is placed inside a script file, and then the
script is run, you wont get the expected output. You just the same
ruby -v result on all rvm ruby versions, as if rvm use command was
ignored…
I just noticed your update, so I deleted more than half my response.
But I wanted to mention that in addition to the ways outlined on that
page, I find that wrapping version changes inside a bash function
works well and is quite handy. Here’s one example from a recent
project:
I just noticed your update, so I deleted more than half my response.
But I wanted to mention that in addition to the ways outlined on that
page, I find that wrapping version changes inside a bash function
works well and is quite handy. Here’s one example from a recent
project: A quick and dirty solution to run my specs through multiple ruby versions. · GitHub
Then in the console, running ./multispec.sh does the job nicely.
yes, the script does work as written verbatim in cli and as shell
function, wc baffled me much why i cannot run it fine inside a script
file. i have in fact now included the sourcing inside the function.
this way i wont forget it
thanks Ammar for the multispec tip.
best regards -botp
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.