We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bf1e46a commit 7233511Copy full SHA for 7233511
README.md
@@ -101,13 +101,13 @@ production:
101
Establish a connection in your startup code.
102
103
```ruby
104
-ActiveRecord::Base.establish_connection(
105
- YAML.safe_load(
106
- ERB.new(
107
- File.read('config/postgresql.yml')
108
- ).result, [], [], true
109
- )[ENV['RACK_ENV']]
110
-)
+yml = ERB.new(File.read(File.expand_path('config/postgresql.yml', __dir__))).result
+db_config = if Gem::Version.new(Psych::VERSION) >= Gem::Version.new('3.1.0.pre1')
+ ::YAML.safe_load(yml, aliases: true)[ENV['RACK_ENV']]
+ else
+ ::YAML.safe_load(yml, [], [], true)[ENV['RACK_ENV']]
+ end
+ActiveRecord::Base.establish_connection(db_config)
111
```
112
113
### OAuth Version and Scopes
0 commit comments