使用罗盘

时间:2015-05-29 07:44:29

标签: gruntjs compass codeship

我正在尝试与codeship建立持续集成。我们的项目是带有角度应用程序的Rails API,目前,它位于public目录中。为了工作,grunt需要找到罗盘可执行文件。

我想说设置命令应该是:

rvm use 2.1.3 --install
bundle install
export RAILS_ENV=test
bundle exec rake db:schema:load
bundle exec rake db:migrate
bundle exec rake db:test:prepare
# We need compass in frontend
gem install compass
nvm install 0.10.25
nvm use 0.10.25
npm install
npm install -g grunt-cli

测试管道:

bundle exec rspec
cd public && grunt test

然而,似乎代码行不喜欢gem install compass行并且抱怨:

Running "concurrent:test" (concurrent) task Warning: /home/rof/.rvm/gems/ruby-2.1.3/gems/bundler-1.9.4/lib/bundler/spec_set.rb:92:in `block in materialize': Could not find rake-10.4.2 in any of the sources

(Bundler::GemNotFound) from /home/rof/.rvm/gems/ruby-2.1.3/gems/bundler-1.9.4/lib/bundler/spec_set.rb:85:in `map!'
from /home/rof/.rvm/gems/ruby-2.1.3/gems/bundler-1.9.4/lib/bundler/spec_set.rb:85:in `materialize'
from /home/rof/.rvm/gems/ruby-2.1.3/gems/bundler-1.9.4/lib/bundler/definition.rb:132:in `specs' from /home/rof/.rvm/gems/ruby-2.1.3/gems/bundler-1.9.4/lib/bundler/definition.rb:177:in `specs_for' from /home/rof/.rvm/gems/ruby-2.1.3/gems/bundler-1.9.4/lib/bundler/runtime.rb:13:in `setup'
from /home/rof/.rvm/gems/ruby-2.1.3/gems/bundler-1.9.4/lib/bundler.rb:129:in `setup' from /home/rof/.rvm/gems/ruby-2.1.3/gems/bundler-1.9.4/lib/bundler.rb:134:in `require'
from /home/rof/.rvm/gems/ruby-2.1.3/gems/compass-1.0.3/bin/compass:26:in `<top (required)>'
from /home/rof/.rvm/gems/ruby-2.1.3/bin/compass:23:in `load'
from /home/rof/.rvm/gems/ruby-2.1.3/bin/compass:23:in `<main>'
from /home/rof/.rvm/gems/ruby-2.1.3/bin/ruby_executable_hooks:15:in `eval'
from /home/rof/.rvm/gems/ruby-2.1.3/bin/ruby_executable_hooks:15:in `<main>'
Use --force to continue.

它给了我一个我不确定理解的提示:

Please make sure the gem wasn't yanked from http://www.rubygems.org

但是,如果我删除了gem install compass行,而是将compass添加到我的Rails应用Gemfile,则可行。但是我真的觉得为我的Gemfile添加指南针很难看。它与它无关。我的Rails应用程序是一个REST API,所以它不想知道任何关于指南针,CSS或类似的东西。

感谢。

1 个答案:

答案 0 :(得分:2)

我今天遇到了同样的问题,这就是我解决问题的方法:

我在项目设置上编辑了设置命令&gt;测试。 这样,您可以在运行grunt任务之前运行命令gem install compass

它的外观如下: Setup Commands screenshot

我希望这也适合你