Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
iv
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
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
1 deletion
+12
-1
lib/gitlab/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