Heroku run rails runner in circleci


#1

Running heroku run rails runner from rspec stopped working 2 days ago.

I am executing bash from rspec to output a string by running rails runner on heroku.

For example:
abc = `heroku run rails runner “puts ‘abc’” -a <APP_NAME>`

It works fine when running rspec on my mac and when running rails runner from the command line with heroku cli but hangs and times out after 10 minutes when running in circleci 2.0. It seems to be connecting according to the logs (says “starting…”, “connecting…”, “up…”) but times out saying “Too long with no output (exceeded 10m0s)”.

Any idea why it stopped working? There were no code changes.


#2

At a guess, the definition of your build Docker image changed, and introduced a breaking change in one of your tools or libraries. I believe these are automatically rebuilt from upstream changes by CircleCI, which gives you the latest versions, but makes them less stable. What base image are you using?

If this is a problem, you can always create a custom build image, and then pull this from a public/private registry for every build. However, the downside to that you have to spend time maintaining and upgrading that yourself.


#3

Thanks @halfer. I ended up creating a custom image.


#4

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.