RVM and Jenkins setup

0 votes

I’m a fresher when it comes to Jenkins CI and I’ve installed RVM in my remote Jenkins. When I try to execute the following shell commands,

#!/bin/bash -x
source ~/.bashrc
rvm use 1.9.3@rails-3.2.3

I get the the error

+ source /var/lib/jenkins/.bashrc
++ PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/var/lib/jenkins/.rvm/bin:/var/lib/jenkins/.rvm/bin
+ rvm use 1.9.3@rails-3.2.3
RVM is not a function, selecting rubies with 'rvm use ...' will not work.
You need to change your terminal settings to allow shell login.
Please visit https://rvm.io/workflow/screen/ for example.

Where am I going wrong?

Aug 9, 2018 in Jenkins by lina
• 8,100 points
61 views

2 answers to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
0 votes

adding a shebang to the build commands in jenkins fixed this for me

    #!/usr/bin/env bash
    rvm use 2.0.0
    bundle install
    rake test
    ...

answered Aug 9, 2018 by Kalgi
• 35,800 points
0 votes

Try this:

. $(/home/RVM_USER/.rvm/bin/rvm env 1.9.3@rails-3.2.3 --path)

make sure you run the stable RVM:

rvm get stable
answered Aug 10, 2018 by Nilesh
• 6,900 points

Related Questions In Jenkins

0 votes
1 answer

How can I create global macros and templates in jenkins job builder?

you can append the path to the ...READ MORE

answered Apr 2, 2018 in Jenkins by ajs3033
• 7,040 points
192 views
0 votes
2 answers

Is possible for Jenkins to auto start and stop slave nodes?

Try Jenkins Plugin called as Slave SetupPlugin. This ...READ MORE

answered Aug 6, 2018 in Jenkins by Nilesh
• 6,900 points
429 views
0 votes
1 answer

What are parameterized jobs in jenkins and how to configure it?

Hey @Hannah, Parameterized jobs/builds are the ones ...READ MORE

answered Dec 16, 2018 in Jenkins by Kiyara
275 views
0 votes
1 answer

How to create backup and copy files in jenkins?

Hey @Anisha, all you need to do is ...READ MORE

answered Feb 16 in Jenkins by Anjali
102 views
+13 votes
2 answers
0 votes
1 answer
0 votes
1 answer

Jenkins and GitHub webhook: HTTP 403

You need to create a specific user ...READ MORE

answered Aug 9, 2018 in Jenkins by Kalgi
• 35,800 points
380 views
0 votes
1 answer

how to install jenkins and how to run pom.xml through jenkins

The complete process to install Jenkins can be ...READ MORE

answered Feb 12 in Jenkins by Kalgi
• 35,800 points
237 views

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.