我在Ruby on Rails项目中使用Wercker。我的wercker.yml看起来像这样:
box: ruby
services:
- postgres
build:
steps:
- script:
name: Nokogiri fix
code: bundle config build.nokogiri --use-system-libraries
- bundle-install
- rails-database-yml
- script:
name: Set up db
code: bundle exec rake db:schema:load RAILS_ENV=test
- script:
name: rspec
code: bundle exec rspec
after-steps:
- slack-notifier:
url: $SLACK_URL
channel: notifications
username: werckerbot
问题是wercker每次都使用bundle install下载gem而不是从缓存中获取它们。有了这个,我的构建需要将近2分钟而不是几秒......我该如何解决这个问题?