2015-05-29 84 views
5

我試圖建立與codeship的持續集成。我們的項目是一個帶角度應用程序的Rails API,目前在public目錄中。爲了工作,grunt需要找到指南針可執行文件。Codeship與羅盤運行咕嚕

我要說的是,設置命令應該是:

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 

然而,似乎codeship不喜歡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或類似的東西。

謝謝。

+0

你找到任何解決這個?我也有同樣的問題,與codeship –

+0

不,它不工作,但:( –

回答

2

今天我有同樣的問題,這是我如何解決它:

我編輯的設置命令在項目設置>測試。 這樣,您可以在運行grunt任務之前運行命令gem install compass

這是它的外觀: Setup Commands screenshot

我希望這個作品對你來說太

+0

感謝您的答案...但我已經有,作爲安裝命令沒有成功... –