Exit code 255 - can't create build


We’ve got a Rails 3 stack with MySQL, and I’m trying to get our first build to run. Tests pass locally, and the app runs fine in development. However, when trying to build, I get the following error:

export RAILS_ENV="test"
export RACK_ENV="test"
bundle exec rake db:create db:schema:load --trace
You are using ‘.rvmrc’, it requires trusting, it is slower and it is not compatible with other ruby managers,
you can switch to ‘.ruby-version’ using ‘rvm rvmrc to ruby-version’
or ignore this warning with ‘rvm rvmrc warning ignore /home/ubuntu/TidyClub/.rvmrc’,
’.rvmrc’ will continue to be the default project file in RVM 1 and RVM 2,
to ignore the warning for all files run ‘rvm rvmrc warning ignore all.rvmrcs’.

Using /home/ubuntu/.rvm/gems/ruby-1.9.3-p194 with gemset tidyclub_3.2

cp config/environment.example.yml config/environment.yml

export RAILS_ENV="test"
export RACK_ENV="test"
bundle exec rake db:create db:schema:load --trace
returned exit code 255

Action failed: rake db:create db:schema:load

I have no idea where it’s failing, whether it’s dying at trying to create the db or whether it can’t load the schema. Any help is appreciated



This is pretty strange since Ruby and MySQL are both well supported on CircleCI. Are you able to SSH into the build and try this step manually to see if you get any additional logging or output?



thanks for the ssh tip. Looks like we have a manual step/check in our boot.rb file which kills the app if it doesn’t find a file, and prompts you to manually copy an environment.example.yml file to environment.yml.

Is there a way to automatically run a “cp config/environment.example.yml config/environment.yml” at each build?


RTFM’d, figured it out. For anyone else, add to your circle.yml

    - cp config/blah.foo.yml config/foo.yml

I did find that the circle.yml file appeared to get cached even after committing a new version, took a few goes for it to update properly.


Glad you were able to figure this out! Thanks for sharing the solution. :slight_smile: