I have a project with some cucumber tests for my Ruby application. When I run the rake task for this on my local development box, all works fine, so I know the tests are properly set up in the project.
I'm having a hard time however getting this to work properly on my buildAgent in TeamCity.
I've created a new project for this, and it's connected to the git repository holding the project. Checking out works fine.
I cannot fire up the rake task however with RVM because the buildAgent keeps complaining that he cannot find a specific gemset for the ruby interpreter.
Running the commands on the buildagent itself under the same user as the application work fine, so why can't the build agent do it when instructed by TeamCity?
In the project I have created 2 build configurations.
The first build configuration ensures that the environment is properly set up on the build agent, by running the following commands on command line:
rvm use 1.9.3
rvm gemset create %env.TEAMCITY_PROJECT_NAME%
The checkout dir defines where the project is being stored, and then I create the gemset for the project. Sufficient to say, this only runs once on the agent.
The project reported success and the gemset actually exists on the build agent when logging.
The second build configuration uses the rake runner and actually fires up the cucumber tests.
The configuration for the rake runner looks like this:
Rake file path:
Rake tasks: run
Ruby interpreter: RVM interpreter: %env.RUBY_VERSION%@%env.TEAMCITY_PROJECT_NAME%
Execute: Only if all previous steps were successful
The ruby version is passed through parameter, the vlaue is 1.9.3
The gemset is also passed as the project name.
When I run the second build configuration, I receive the following error: Cannot start build runner: Gemset 'auth' isn't defined for Ruby interpreter '1.9.3' or the interpreter doesn't exist or isn't a file or isn't a valid RVM interpreter name.
However, when I got on the box the following is there:
rvm gemset list
gemsets for ruby-1.9.3-p374 (found in /usr/local/rvm/gems/ruby-1.9.3-p374)
So the gemset actually exists, and is usable.
Why does the buildagent not see it?
Message was edited by: Arne De Herdt