Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-17241

GEM_PATH env variable wrong when using envinject + rvm plugins

    Details

    • Similar Issues:

      Description

      The GEM_PATH environmental variable is not getting set correctly on master nodes. On slave nodes, it works just fine.

      Here is a sample of how it looks:

      GEM_PATH: "file:/var/lib/jenkins/jenkins-data/plugins/ruby-runtime/WEB-INF/lib/stapler-jruby-1.177.jar!/gem"

      Here is an example of how I expect it to render:

      GEM_PATH: "/var/lib/jenkins/.rvm/gems/ree-1.8.7-2012.02rn:/var/lib/jenkins/.rvm/gems/ree-1.8.7-2012.02@global"

      ---------------

      Disabling the envinject plugin renders the GEM_PATH environmental variable correctly.

      Also, we can use the plugin to override the GEM_PATH manually, but this is not ideal. We should be able to render this environmental variable via rvm.

        Attachments

          Activity

          Hide
          jtomson James Tomson added a comment -

          I can reproduce using

          • Jenkins ver. 1.541
          • Environment Injector Plugin 1.89
          • Rvm Plugin 0.4
          Show
          jtomson James Tomson added a comment - I can reproduce using Jenkins ver. 1.541 Environment Injector Plugin 1.89 Rvm Plugin 0.4
          Hide
          kstevens Keith Stevens added a comment -

          Also reproduced

          • Jenkins 1.565
          • Environment Injector 1.89
          • RVM Plugin 0.4
          Show
          kstevens Keith Stevens added a comment - Also reproduced Jenkins 1.565 Environment Injector 1.89 RVM Plugin 0.4
          Hide
          lacostej lacostej added a comment -

          Had this suddenly appear on my server 2 days ago on a job that runs multiple times a day.

          Config (installed in December)

          • Jenkins 1.580.2
          • Environment Injector 1.90
          • RVM Plugin 0.4

          Server up for 36 days, jenkins restarted 2 days ago using the /restart URL, so it perhaps was the reason this started failing. Not sure why.

          I worked-around it by hardcoding GEM_PATH in that job. Only that job seems to be affected so far. ?!

          Show
          lacostej lacostej added a comment - Had this suddenly appear on my server 2 days ago on a job that runs multiple times a day. Config (installed in December) Jenkins 1.580.2 Environment Injector 1.90 RVM Plugin 0.4 Server up for 36 days, jenkins restarted 2 days ago using the /restart URL, so it perhaps was the reason this started failing. Not sure why. I worked-around it by hardcoding GEM_PATH in that job. Only that job seems to be affected so far. ?!
          Hide
          stefanthurnherr Stefan Thurnherr added a comment - - edited

          Similar problem here, but neither EnvInject nor Rvm plugins are installed. Our Jenkins is v1.586 (no slaves, master only). I've uninstalled ruby-runtime via plugin manager and then soft-restarted jenkins (restart checkbox).

          GEM_PATH	file:/var/lib/jenkins/plugins/ruby-runtime/WEB-INF/lib/stapler-jruby-1.209.jar!/gem
          

          Update: Shutting down jenkins, and then starting it again solved the problem: the env variable GEM_PATH disappeared.

          Show
          stefanthurnherr Stefan Thurnherr added a comment - - edited Similar problem here, but neither EnvInject nor Rvm plugins are installed. Our Jenkins is v1.586 (no slaves, master only). I've uninstalled ruby-runtime via plugin manager and then soft-restarted jenkins (restart checkbox). GEM_PATH file:/var/lib/jenkins/plugins/ruby-runtime/WEB-INF/lib/stapler-jruby-1.209.jar!/gem Update: Shutting down jenkins, and then starting it again solved the problem: the env variable GEM_PATH disappeared.
          Hide
          sschuberth Sebastian Schuberth added a comment -

          Thanks Stefan Thurnherr! I can confirm restarting the Jenkins service from the shell works. However, once I do a "soft" restart via the web interface (e.g. after updating plugins), stapler-jruby is back in the GEM_PATH

          Show
          sschuberth Sebastian Schuberth added a comment - Thanks Stefan Thurnherr ! I can confirm restarting the Jenkins service from the shell works. However, once I do a "soft" restart via the web interface (e.g. after updating plugins), stapler-jruby is back in the GEM_PATH

            People

            • Assignee:
              gbois Gregory Boissinot
              Reporter:
              bgoad Brian Goad
            • Votes:
              4 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

              • Created:
                Updated: