mardi 5 juillet 2016

Undefined local variable Error when running ruby script in Jenkins

So I have created a ruby on rails application that functions as a basic calculator. I would like to run some ruby unit tests on it in Jenkins. To do so I did the following steps in order:

  • I created a new free style job
  • loaded the app from my repo
  • made sure to check the option to "Run the build in a RVM-managed environment"
  • inputted my Ruby version number (2.3.1)
  • added a build step to execute ruby script
  • tried to run my app with the following commands: "cd (directory with unit tests), ruby (unit test file)"

But when I do so I get the following error: undefined local variable or method `(unit test file)'. When I test the same commands on my console they work perfectly.

Did I miss a configuration step? Would some be able to provide me with a list of their configurations that they used? Has anyone else gotten this error? How did you solve it?

Would someone be able to provide me with a good tutorial link for setting up and running a Jenkins job to execute ruby unit tests? I have tried the following tutorial, but I got lost at the very end. Is there a better tutorial that you have used?

Aucun commentaire:

Enregistrer un commentaire