Uninitialized constant RAILS_MAX_THREADS


#1

It looks like the default config/database.yml is incorrect

test:
  username: ubuntu
  database: circle_ruby_test
  adapter: postgresql
  encoding: unicode
  pool: <%= ENV.fetch(RAILS_MAX_THREADS) { 5 } %>
  host: localhost

It should have (notice the quotes):

 pool: <%= ENV.fetch('RAILS_MAX_THREADS') { 5 } %>

I am using the Ubuntu 14.04 build.


#2

Having the same issue, did you ever resolve it?

UPDATE:
Answer is here: http://mikebian.co/fixing-invalid-database_url-reference-on-circleci/
tldr: Don’t use single quotes in your database.yml, as they are filtered out. So:
pool: <%= ENV["DB_POOL"] || ENV['RAILS_MAX_THREADS'] || 5 %>
becomes
pool: <%= ENV["DB_POOL"] || ENV["RAILS_MAX_THREADS"] || 5 %>


#3