I've decided to use dotenv-rails and this seems to have remedied things. 
Perhaps it was an eval order issue.

I did have ENV populated with all values I expected to see, they just 
weren't in the configurations.

Thanks

On Thursday, April 2, 2015 at 10:44:56 PM UTC+10, Frederick Cheung wrote:
>
>
>
> On Thursday, April 2, 2015 at 9:15:00 AM UTC+1, Stuart Fraser wrote:
>>
>> I have noticed in Rails 4.2 the following in rails console
>>
>> #database.yml
>> ...
>> development:
>>   <<: *default
>>   database: project_development
>>   username: root
>>   password: <%= ENV['PASSWORD'] %>
>>
>> development_replica:
>>   <<: *default
>>   database: replicat_db
>>   username: replica_user
>>   password: <%= ENV['REPLICA_PASSWORD'] %>
>>
>>
>> If I look at ActiveRecord::Base.configurations['development'] the 
>> password set
>> If I look at ActiveRecord::Base.configurations['development_replicate'] 
>> the password is nil
>>
>> This happens with any embedded ruby that is not in the Rails.env 
>> configuration block.
>>  
>>
> Is this expected behaviour? 
>>
>>
> The erb step happens before YAML parsing so that sounds unlikely. Are you 
> sure that environment variable is set.
>
> Fred
>

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rubyonrails-talk+unsubscr...@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/98fa64b7-fde3-40ef-a4f2-df04e292a2a0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to