Error with Gitlab: Sidekiq; gemfile syntax error-Collection of common programming errors
I’ve been breaking my head over this error for hours now, and still haven’t found a fix. When I run sidekiq using sudo -u root -H RAILS_ENV=production script/background_jobs start
I’m getting this error in the sidekiq.log:
Gemfile syntax error:
/home/website/git/gitlab/Gemfile:20: syntax error, unexpected ':', expecting $end
gem "mysql2", group: :mysql
I’ve installed Ruby 2.1.0 and am running CentOS. I’ve seen other posts with this error, and their problem was that they were running Ruby 1.8, however, I’m running Ruby 2.1.0 and also getting this error.
Any help is greatly appreciated.
EDIT: My gemfile http://pastebin.com/T5z4GZ3a
bundle
returns
Your bundle is complete!
Gems in the groups development, test, postgres, puma and aws were not installed.
It was installed into ./vendor/bundle
EDIT2: My background_jobs
script http://pastebin.com/kdicTFqk
bundle show bundler
returns
2.1.0
/usr/local/rvm/gems/ruby-2.1.0@global/gems/bundler-1.5.2
EDIT3: I think I have found the problem, not sure how to solve it though. I added p RUBY_VERSION
as first line of my Gemfile, then I changed every line written like this: group: :mysql
to this :group => :mysql
(because that is working on older versions).
However, when I run Sidekiq now, this shows up in the sidekiq.log:
"1.8.7"
bundler: command not found: sidekiq
Install missing gem executables with `bundle install`
I am really, really confused now. Here it clearly says my Ruby version is 1.8.7, but that’s not right. ruby -v
or rvm list rubies
only show that Ruby 2.1.0 is installed, and set as default.