sudo -u git -H bundle exec rake db:setup RAILS_ENV=production leads error with Gitlab 5.0

952 views
Skip to first unread message

Kiran Patil

unread,
Mar 16, 2013, 2:37:31 AM3/16/13
to gitl...@googlegroups.com
Hi,

Command sudo -u git -H bundle exec rake db:setup RAILS_ENV=production leads to below error.

kiran@fossmate:/home/git/gitlab$ sudo -u git -H bundle exec rake db:setup RAILS_ENV=production       
gitlabhq_production already exists
rake aborted!
(<unknown>): mapping values are not allowed in this context at line 37 column 20
/home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/settingslogic-2.0.9/lib/settingslogic.rb:103:in `initialize'
/home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/settingslogic-2.0.9/lib/settingslogic.rb:60:in `new'
/home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/settingslogic-2.0.9/lib/settingslogic.rb:60:in `instance'
/home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/settingslogic-2.0.9/lib/settingslogic.rb:37:in `[]'
/home/git/gitlab/config/initializers/1_settings.rb:38:in `<top (required)>'
/home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:245:in `load'
/home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:245:in `block in load'
/home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:236:in `load_dependency'
/home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:245:in `load'
/home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/railties-3.2.12/lib/rails/engine.rb:588:in `block (2 levels) in <class:Engine>'
/home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/railties-3.2.12/lib/rails/engine.rb:587:in `each'
/home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/railties-3.2.12/lib/rails/engine.rb:587:in `block in <class:Engine>'
/home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/railties-3.2.12/lib/rails/initializable.rb:30:in `instance_exec'
/home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/railties-3.2.12/lib/rails/initializable.rb:30:in `run'
/home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/railties-3.2.12/lib/rails/initializable.rb:55:in `block in run_initializers'
/home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/railties-3.2.12/lib/rails/initializable.rb:54:in `each'
/home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/railties-3.2.12/lib/rails/initializable.rb:54:in `run_initializers'
/home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/railties-3.2.12/lib/rails/application.rb:136:in `initialize!'
/home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/railties-3.2.12/lib/rails/railtie/configurable.rb:30:in `method_missing'
/home/git/gitlab/config/environment.rb:5:in `<top (required)>'
/home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/backports-2.6.7/lib/backports/tools.rb:314:in `require'
/home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/backports-2.6.7/lib/backports/tools.rb:314:in `require_with_backports'
/home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:251:in `block in require'
/home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:236:in `load_dependency'
/home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:251:in `require'
/home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/railties-3.2.12/lib/rails/application.rb:103:in `require_environment!'
/home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/railties-3.2.12/lib/rails/application.rb:297:in `block (2 levels) in initialize_tasks'
Tasks: TOP => db:setup => db:schema:load_if_ruby => environment
(See full trace by running task with --trace)

With --trace for full trace:
------------------------------------
kiran@fossmate:/home/git/gitlab$ sudo -u git -H bundle exec rake db:setup RAILS_ENV=production --trace
[sudo] password for kiran:
** Invoke db:setup (first_time)
** Invoke db:schema:load_if_ruby (first_time)
** Invoke db:create (first_time)
** Invoke db:load_config (first_time)
** Execute db:load_config
** Invoke rails_env (first_time)
** Execute rails_env
** Execute db:create
gitlabhq_production already exists
** Invoke environment (first_time)
** Execute environment
rake aborted!
(<unknown>): mapping values are not allowed in this context at line 37 column 20
/usr/local/lib/ruby/1.9.1/psych.rb:203:in `parse'
/usr/local/lib/ruby/1.9.1/psych.rb:203:in `parse_stream'
/usr/local/lib/ruby/1.9.1/psych.rb:151:in `parse'
/usr/local/lib/ruby/1.9.1/psych.rb:127:in `load'
/home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/settingslogic-2.0.9/lib/settingslogic.rb:103:in `initialize'
/home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/settingslogic-2.0.9/lib/settingslogic.rb:60:in `new'
/home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/settingslogic-2.0.9/lib/settingslogic.rb:60:in `instance'
/home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/settingslogic-2.0.9/lib/settingslogic.rb:37:in `[]'
/home/git/gitlab/config/initializers/1_settings.rb:38:in `<top (required)>'
/home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:245:in `load'
/home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:245:in `block in load'
/home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:236:in `load_dependency'
/home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:245:in `load'
/home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/railties-3.2.12/lib/rails/engine.rb:588:in `block (2 levels) in <class:Engine>'
/home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/railties-3.2.12/lib/rails/engine.rb:587:in `each'
/home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/railties-3.2.12/lib/rails/engine.rb:587:in `block in <class:Engine>'
/home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/railties-3.2.12/lib/rails/initializable.rb:30:in `instance_exec'
/home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/railties-3.2.12/lib/rails/initializable.rb:30:in `run'
/home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/railties-3.2.12/lib/rails/initializable.rb:55:in `block in run_initializers'
/home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/railties-3.2.12/lib/rails/initializable.rb:54:in `each'
/home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/railties-3.2.12/lib/rails/initializable.rb:54:in `run_initializers'
/home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/railties-3.2.12/lib/rails/application.rb:136:in `initialize!'
/home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/railties-3.2.12/lib/rails/railtie/configurable.rb:30:in `method_missing'
/home/git/gitlab/config/environment.rb:5:in `<top (required)>'
/home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/backports-2.6.7/lib/backports/tools.rb:314:in `require'
/home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/backports-2.6.7/lib/backports/tools.rb:314:in `require_with_backports'
/home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:251:in `block in require'
/home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:236:in `load_dependency'
/home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:251:in `require'
/home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/railties-3.2.12/lib/rails/application.rb:103:in `require_environment!'
/home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/railties-3.2.12/lib/rails/application.rb:297:in `block (2 levels) in initialize_tasks'
/home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/rake-10.0.3/lib/rake/task.rb:228:in `call'
/home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/rake-10.0.3/lib/rake/task.rb:228:in `block in execute'
/home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/rake-10.0.3/lib/rake/task.rb:223:in `each'
/home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/rake-10.0.3/lib/rake/task.rb:223:in `execute'
/home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/rake-10.0.3/lib/rake/task.rb:166:in `block in invoke_with_call_chain'
/usr/local/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize'
/home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/rake-10.0.3/lib/rake/task.rb:159:in `invoke_with_call_chain'
/home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/rake-10.0.3/lib/rake/task.rb:187:in `block in invoke_prerequisites'
/home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/rake-10.0.3/lib/rake/task.rb:185:in `each'
/home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/rake-10.0.3/lib/rake/task.rb:185:in `invoke_prerequisites'
/home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/rake-10.0.3/lib/rake/task.rb:165:in `block in invoke_with_call_chain'
/usr/local/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize'
/home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/rake-10.0.3/lib/rake/task.rb:159:in `invoke_with_call_chain'
/home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/rake-10.0.3/lib/rake/task.rb:187:in `block in invoke_prerequisites'
/home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/rake-10.0.3/lib/rake/task.rb:185:in `each'
/home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/rake-10.0.3/lib/rake/task.rb:185:in `invoke_prerequisites'
/home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/rake-10.0.3/lib/rake/task.rb:165:in `block in invoke_with_call_chain'
/usr/local/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize'
/home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/rake-10.0.3/lib/rake/task.rb:159:in `invoke_with_call_chain'
/home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/rake-10.0.3/lib/rake/task.rb:152:in `invoke'
/home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/rake-10.0.3/lib/rake/application.rb:143:in `invoke_task'
/home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/rake-10.0.3/lib/rake/application.rb:101:in `block (2 levels) in top_level'
/home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/rake-10.0.3/lib/rake/application.rb:101:in `each'
/home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/rake-10.0.3/lib/rake/application.rb:101:in `block in top_level'
/home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/rake-10.0.3/lib/rake/application.rb:110:in `run_with_threads'
/home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/rake-10.0.3/lib/rake/application.rb:95:in `top_level'
/home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/rake-10.0.3/lib/rake/application.rb:73:in `block in run'
/home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/rake-10.0.3/lib/rake/application.rb:160:in `standard_exception_handling'
/home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/rake-10.0.3/lib/rake/application.rb:70:in `run'
/home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/rake-10.0.3/bin/rake:33:in `<top (required)>'
/home/git/gitlab/vendor/bundle/ruby/1.9.1/bin/rake:23:in `load'
/home/git/gitlab/vendor/bundle/ruby/1.9.1/bin/rake:23:in `<main>'
Tasks: TOP => db:setup => db:schema:load_if_ruby => environment

Thanks,
Kiran.

Kiran Patil

unread,
Mar 16, 2013, 3:39:35 AM3/16/13
to gitl...@googlegroups.com
Check Application Status also results in same issue.

kiran@fossmate:/home/git/gitlab$ sudo -u git -H bundle exec rake
gitlab:env:info RAILS_ENV=production --trace
** Invoke gitlab:env:info (first_time)
/home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/rake-10.0.3/lib/rake/task.rb:152:in
`invoke'
/home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/rake-10.0.3/lib/rake/application.rb:143:in
`invoke_task'
/home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/rake-10.0.3/lib/rake/application.rb:101:in
`block (2 levels) in top_level'
/home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/rake-10.0.3/lib/rake/application.rb:101:in
`each'
/home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/rake-10.0.3/lib/rake/application.rb:101:in
`block in top_level'
/home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/rake-10.0.3/lib/rake/application.rb:110:in
`run_with_threads'
/home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/rake-10.0.3/lib/rake/application.rb:95:in
`top_level'
/home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/rake-10.0.3/lib/rake/application.rb:73:in
`block in run'
/home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/rake-10.0.3/lib/rake/application.rb:160:in
`standard_exception_handling'
/home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/rake-10.0.3/lib/rake/application.rb:70:in
`run'
/home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/rake-10.0.3/bin/rake:33:in
`<top (required)>'
/home/git/gitlab/vendor/bundle/ruby/1.9.1/bin/rake:23:in `load'
/home/git/gitlab/vendor/bundle/ruby/1.9.1/bin/rake:23:in `<main>'
Tasks: TOP => gitlab:env:info => environment
kiran@fossmate:/home/git/gitlab$
> --
> You received this message because you are subscribed to the Google Groups
> "GitLab" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to gitlabhq+u...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

Jason Pascoe

unread,
Mar 16, 2013, 8:06:57 PM3/16/13
to gitl...@googlegroups.com
Let me know if you find a solution as I've got exactly the same results.
Jason

Jason Pascoe

unread,
Mar 16, 2013, 8:15:35 PM3/16/13
to gitl...@googlegroups.com
Fixed by correcting spacing in config/gitlab.yml

Now I have a issue with Gitlab Shell "post-receive hooks in repos are links: ... rake aborted!"

Kiran Patil

unread,
Mar 17, 2013, 4:08:51 AM3/17/13
to gitl...@googlegroups.com
which line spaces did u correct from the gitlab.yml ?

Jason Pascoe

unread,
Mar 17, 2013, 7:06:26 PM3/17/13
to gitl...@googlegroups.com
I didn't put enough spaces when I changed the trackers to nil. Just make
sure that you have 2 space indentations for each function and sub function

Jason
>>> /home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/rake-10.0.3/lib/rake/
>>> task.rb:228:in
>>> `call'
>>>
>>> /home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/rake-10.0.3/lib/rake/
>>> task.rb:152:in
>>> `invoke'
>>>
>>> /home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/rake-10.0.3/lib/rake/
>>> application.rb:143:in
>>> `invoke_task'
>>>
>>> /home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/rake-10.0.3/lib/rake/
You received this message because you are subscribed to a topic in the
Google Groups "GitLab" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/gitlabhq/MYhZ2bYVwos/unsubscribe?hl=en.
To unsubscribe from this group and all its topics, send an email to

Kiran Patil

unread,
Mar 19, 2013, 12:16:31 AM3/19/13
to gitl...@googlegroups.com
I rebased gitlab.yml to gitlab.yml.example and all db stuff works fine now.

Thanks for the information.

Kiran

farheensu...@gmail.com

unread,
Dec 6, 2016, 9:01:01 PM12/6/16
to GitLab
@ Kiran- Could you please elaborate on how you rebased gitlab.yml? I am facing the same issue!
@Jason - I have checked the double indentations, still does not work :(
 
Help is appreciated, Thanks!

-Farheen
Reply all
Reply to author
Forward
0 new messages