[ rails ] Rails params

1. #{Rails.root}

rails root filepath

 

2. #{Rails.application.secrets.host.nested}

# config/secrets.yml

common: &default_settings
host:
  nested: 'https://whateverurl'

development:
 <<: *default_settings

testenv1:
 <<: *default_settings

whatevertestenv2:
 <<: *default_settings

production:
 <<: *default_settings
host:
  nested: 'https://whatever_another_url'

ref : https://stackoverflow.com/questions/36160318/rake-not-seeing-rails-application-secrets

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s