无法在 TeamCity 中构建 Web 项目

Can't build a Web Project in TeamCity

我正在使用 TeamCity 作为我的 CI 服务器 (mac)。我正在尝试构建一个 Web 项目。当我在将目录更改为克隆文件夹后使用 grunt servegrunt buildproduction 时,它工作得很好 fine.But 当我通过 TeamCity 服务器执行此操作时它给出错误 You need to have Ruby and Compass installed and in your system PATH for this task to work 并被中止由于警告。 Ruby 并且 Compass 已经安装在 server.Please 中帮助我。

rm -rf $(pwd)/node_modules/*
rm -rf $(pwd)/bower_components/*
npm cache clear
npm install
npm install bower
npm install grunt-ftp-push --save-dev
bower install
grunt buildproduction

这是我在 Teamcity 中使用的命令行构建步骤..

我会说你可能使用不同的用户或 shell 环境不同(交互式与非交互式)当你手动 运行 这些命令时 运行s通过 TC 它无法在 environment/PATH

中找到那些包