RVM is not a function, selecting rubies with 'rvm use ...' will not work

1,348 views
Skip to first unread message

Tony Wei

unread,
Feb 15, 2016, 10:35:00 PM2/15/16
to go-cd
Don't know why,

03:26:24.550 GO_TO_REVISION_COLUMBO_UNITTESTS=74745fe01b06cfcce9d6ca6513cf99e699a23999
03:26:25.712 RVM is not a function, selecting rubies with 'rvm use ...' will not work.
03:26:25.713 
03:26:25.714 You need to change your terminal emulator preferences to allow login shell.
03:26:25.714 Sometimes it is required to use `/bin/bash --login` as the command.
03:26:25.714 Please visit https://rvm.io/integration/gnome-terminal/ for an example.
03:26:25.714 
03:26:27.768 A ruby must be selected in order to delete a gemset.
03:26:30.116 Can not create gemset when using system ruby.  Try 'rvm use <some ruby>' first.
03:26:31.283 RVM is not a function, selecting rubies with 'rvm use ...' will not work.
03:26:31.284 
03:26:31.284 You need to change your terminal emulator preferences to allow login shell.
03:26:31.284 Sometimes it is required to use `/bin/bash --login` as the command.
03:26:31.285 Please visit https://rvm.io/integration/gnome-terminal/ for an example.
03:26:31.285 
03:26:31.301 /var/go/.rvm/bin/rvm

But I ran it locally it doesn't have this problem.



Aravind SV

unread,
Feb 18, 2016, 10:18:53 AM2/18/16
to go...@googlegroups.com
rvm is setup as a function normally, and not used as a command. Same as nvm, rbenv, etc. That's what the message is telling you. You're using it as a command.

In this case, rvm has an another way to use it, with rvm do. Otherwise, you need to use it in a script with the rvm init sourced in. This page has more info: https://rvm.io/workflow/scripting

This is not a GoCD problem. It's an rvm setup problem. rvm is supposed to be used from the shell, in the way it is setup by default.

--
You received this message because you are subscribed to the Google Groups "go-cd" group.
To unsubscribe from this group and stop receiving emails from it, send an email to go-cd+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Sem Spiri

unread,
Mar 25, 2016, 10:21:18 AM3/25/16
to go-cd
I use Script Executor plugin and start script with
##!/bin/bash --login
double hash is required

Tony Wei

unread,
Mar 25, 2016, 10:24:30 AM3/25/16
to go-cd
Thanks. I will try your suggestion absolutely!
Reply all
Reply to author
Forward
0 new messages