在 TravisCI 上将 Grunticon 安装到我们的 Rails 4 引擎时,我们遇到了一个问题。如果有任何想法,我将不胜感激:
- 缩短在 Rails 中安装 Grunticon 的路径
- 一种让 TravisCI 在我们的构建过程中跳过安装 Grunticon 的方法(我们不需要它进行测试)
- 一种在 TravisCI 上升级 npm 的方法(有传言说 npm v3 可能会解决这个问题)
Travis 的错误:
Gem::Package::TooLongFileName: File "node_modules/grunt-grunticon/node_modules/grunticon-lib/node_modules/directory-colorfy/node_modules/phantomjs/node_modules/fs-extra/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/Makefile" has a too long path (should be 256 or less)
An error occurred while installing trusty-convoy-extension (0.0.3), and Bundler
cannot continue.
Make sure that `gem install trusty-convoy-extension -v '0.0.3'` succeeds before
bundling.
The command "eval bundle install --jobs=3 --retry=3 --deployment --path=${BUNDLE_PATH:-vendor/bundle}" failed. Retrying, 2 of 3.
Grunticon 是使用我们根目录中的 Gruntfile.js 安装的。这会触发 node_modules 目录中的脚本。我们遵循了本指南:https://github.com/filamentgroup/grunticon
谢谢!
更新:在 TravisCI 上成功安装了 npm 3。
before_install:
- npm install -g npm@3.x-latest
遗憾的是,没有解决这个问题。
最佳答案
在您的 Travis 预安装中..
npm i -g npm@3
Npm 3 处于后期测试阶段,将为您提供更加扁平的目录结构。
注意:您需要将任何对等依赖项添加到您的 package.json
关于ruby-on-rails - Grunticon 和 TravisCI,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32319074/