user2164689
user2164689

Reputation: 377

Jekyll + AWS Codebuild - EventMachine Gem is Failing

I am trying to run a Jekyll blog on Codebuild. Locally there is no issue, but when trying to run it on Codebuild, it keeps getting stuck on this:

Your bundle is locked to eventmachine (1.2.3), but that version could not be found in any of the sources listed in your Gemfile. If you haven't changed sources, that means the author of eventmachine (1.2.3) has removed it. You'll need to update your bundle to a different version of eventmachine (1.2.3) that hasn't been removed in order to install.

However, the source is normal rubygems and I checked if the version is there and it is. I think it might be a bug in AWS codebuild, but thought it would be good to post here. Has anyone had a similar issue? Any help is welcome. I have tried the following to resolve it:

1) Remove Gemfile Lock

2) Set specific version on the Gemfile.

Bundle is working fine locally

Upvotes: 0

Views: 233

Answers (1)

sdhillon
sdhillon

Reputation: 139

You can replicate and troubleshoot the issue locally and figure out why the build fails inside CodeBuild image. This can be done using CodeBuild's Docker images which can be created using Dockerfiles available at https://github.com/aws/aws-codebuild-docker-images. Instructions to create these images is also available in that repository.

Once the image is created, you can mount your code from host machine inside the container and then run your build commands inside the container. For example:

docker run -it -v /your/project/location:/code aws/codebuild/ruby-2.3.1 bin/bash

Then inside the container, you can execute your build commands against source code available at /code.

Upvotes: 2

Related Questions