RVM and Jenkins setup

前端 未结 6 1186
悲哀的现实
悲哀的现实 2020-12-08 15:44

I am new to Jenkins CI. I\'m install RVM in my remote Jenkins and when I execute below shell.

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


        
6条回答
  •  我在风中等你
    2020-12-08 16:14

    Jenkins nodes don't load paths the same way, so it's not using the proper path to find rvm's version of ruby. You can set the path for a given agent.

    1. Find your current PATH by doing echo $PATH
    2. Assuming you've set up rvm properly, find where rvm's version of ruby is located by running which ruby
    3. There's a setting in the Configuration of your agent where you can set environmental variables. Set PATH to be 1 and 2 concatenated.

提交回复
热议问题