Próbuję ustawić ciągłą integrację z kodowaniem. Nasz projekt to Rails API z kanciastą aplikacją, która na razie znajduje się w katalogu public
. Aby pracować, chrząstka musi znaleźć kompas wykonywalny.Kod do uruchomienia gruntu z kompasem
Powiedziałbym, że komendy konfiguracyjne powinny być:
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
I rurociąg Test:
bundle exec rspec
cd public && grunt test
Jednak wydaje się, że codeship nie lubi gem install compass
linię i narzeka z:
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.
I daje mi to wskazówkę, której nie jestem pewien:
Please make sure the gem wasn't yanked from http://www.rubygems.org
Jednak jeśli usunąć gem install compass
linię, a zamiast tego dodaję compass
do mojego app Rails Gemfile
, to działa. Ale naprawdę czuję się brzydko i źle, dodając kompas do mojej Gemfile. To nie ma z tym nic wspólnego. Moja aplikacja Rails jest interfejsem REST API, więc nie chce wiedzieć nic o kompasie, css lub czymś podobnym.
Dzięki.
Znaleźliście jakieś rozwiązanie na to? Mam taki sam problem z codehip –
Nie, to nie działa, ale :( –