I am trying to pass ERB to database.yml a very normal action with my other project, it looks like he doesn’t want to accept the database configuration as ERB and only wants them, because he
Ive tried to install dotenv even figaro, but both give the same error
ERROR (line 1)
.rvm/gems/ruby-2.2.1/gems/activerecord-4.2.0/lib/active_record/connection_adapters/connection_specification.rb:37:in `initialize': undefined method `tr' for nil:NilClass (NoMethodError)
ERROR (continued)
connection_specification.rb:270:in `new'
connection_specification.rb:270:in `resolve_url_connection'
connection_specification.rb:258:in `resolve_hash_connection'
database.yml
development:
<<: *default
database: <%= ENV['DATABASE_URL'] %>
username: <%= ENV["DATABASE_USER"] %>
password: <%= ENV["DATABASE_PASS"] %>
The dotenv file works because I do not get the secret key without development.
Any help is appreciated if I find out before I post my fix
source
share