BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
e348af1d
Commit
e348af1d
authored
Jan 14, 2015
by
Marin Jankovski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rescue database error in application settings if the database still doesn't exist.
parent
01ab0812
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
1 deletion
+12
-1
current_settings.rb
lib/gitlab/current_settings.rb
+12
-1
No files found.
lib/gitlab/current_settings.rb
View file @
e348af1d
...
...
@@ -8,7 +8,7 @@ module Gitlab
else
fake_application_settings
end
rescue
ActiveRecord
::
NoDatabaseError
rescue
ActiveRecord
::
NoDatabaseError
,
database_adapter
.
constantize
::
Error
fake_application_settings
end
end
...
...
@@ -22,5 +22,16 @@ module Gitlab
sign_in_text:
Settings
.
extra
[
'sign_in_text'
],
)
end
# We need to check which database is setup
# but we cannot assume that the database exists already.
# Not checking this will break "rake gitlab:setup".
def
database_adapter
if
Rails
.
configuration
.
database_configuration
[
Rails
.
env
][
'adapter'
]
==
'mysql2'
"Mysql2"
else
"PG"
end
end
end
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment