ruby-on-rails - Grunticon 和 TravisCI

标签 ruby-on-rails node.js npm travis-ci

在 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/

相关文章:

ruby-on-rails - 无法将瘦配置为在 CentOs 上的系统启动时启动

ruby-on-rails - 如何找出哪个 Ruby gem 劫持了 ActiveRecord 关联方法

Node.js:类型错误无法读取未定义的属性 'find'

angular - 使用 angular2 中的 'xlsx' 导出到 CSV 文件

git - 将 github 组织或存储库标记为已弃用的标准方法?

ruby-on-rails - 无法让 highcharts 在 Rails 中工作

ruby-on-rails - 为什么 Date.yesterday 也算作 Date.today?

linux - 无法在nodejs中执行git命令

javascript - 如何在客户端(浏览器)使用uWS?

javascript - 尝试设置 .env 文件时出现“require is not Define”错误