I'm not sure if this is bitbucket's issue or a docker issue since the bitbucket file looks a lot like it might be using docker-compose/docker behind the scenes. However, I could not find this exact problem anywhere and the solutions I did find didn't work. I'm not too sure about the environment section I added. I added that in another attempt to get it working. This is my bitbucket-pipelines.yml
image: ruby:2.5.1
environment:
- BUNDLE_PATH=vendor/bundle
pipelines:
default:
- step: name: Bundle Install caches:
- bundler
script:
- apt-get update
- apt-get install -y qt5-default libqt5webkit5-dev gstreamer1.0-plugins-base gstreamer1.0-tools gstreamer1.0-x
- export DATABASE_URL=postgresql://test_user:test_user_password@localhost/pipelines
- bundle install --binstubs
- bundle install --path vendor/bundle
services:
- redis
- postgres
- step: name: Initialize databases
caches:
- bundler
script:
- RAILS_ENV=development bundle exec rake db:setup
- RAILS_ENV=test bundle exec rake db:test:prepare
services:
- postgres
- redis
- step: name: Test caches:
- bundler
script:
- bundle exec rake
services:
- postgres
- redis
definitions: services: postgres: image: postgres
environment: POSTGRES_DB: pipelines
POSTGRES_USER: test_user
POSTGRES_PASSWORD: test_user_password
redis: image: redis
caches: bundler: vendor/bundle
When it gets to the initialize database
step, it can't find the rake command:
+ RAILS_ENV=development bundle exec rake db:setup
bundler: failed to load command: rake (/usr/local/bin/rake)
Bundler::GemNotFound: Could not find rake-12.3.3 in any of the sources
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.