Question

I created a build script using Rake & Albacore which builds a solution and executes unit tests. I am trying to set it up in TeamCity. I am getting this error.

Cannot start build runner: If you wan't to use bundler please install it at first. The gem wasn't found in Gem paths of Ruby SDK with interpreter: 'C:\Ruby187\bin/ruby.exe'.

Hide stacktrace

jetbrains.buildServer.agent.rakerunner.RakeTasksBuildService$MyBuildFailureException: If you wan't to use bundler please install it at first. The gem wasn't found in Gem paths of Ruby SDK with interpreter: 'C:\Ruby187\bin/ruby.exe'. Gem paths: C:/Ruby187/lib/ruby/gems/1.8 C:/Users/af/.gem/ruby/1.8

I added one parameter, where Albacore is installed. But, I am still getting the error.

GEM_PATH=C:\Ruby187\lib\ruby\gems\1.8\gems\albacore-0.3.4\albacore.gemspec
Was it helpful?

Solution

Ok finally was able to resolve the problem. I simply created a batch file that executes the rake task and instead of using "Rake Build Step" in Team city; used the command line build step and executed the batch file. It also gives me complete log of all the build steps, tests run etc.

Hopefully this will help someone else too. You don't need to setup a Rake Build Step as it turns out.

OTHER TIPS

It's not clear that Albacore was missing. The error message indicates that TeamCity cannot find Rake itself!

Cannot start build runner

What was the exact Rake task configuration? Specifically the Ruby Interpreter configuration section? You can tell TeamCity exactly which Ruby to run, which will affect which gems are available (and Rake is just a gem).

TeamCity Rake Task Ruby Interpreter Section

It looks like you have a Ruby 1.8.7 installed and that you must have installed Albacore

cmd> gem install albacore

Do you also have Rake installed? In Ruby 1.8.7, the Rake gem was not included by default. You can list the machine's installed gems by

cmd> gem list --local

You'll should install Rake.

cmd> gem install rake

I'm not actually sure how you ended up getting this to work. What's the contents of the batch file? Do you have any other Ruby/Rake installed?

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top