{"id":7036,"date":"2014-05-17T00:23:46","date_gmt":"2014-05-17T00:23:46","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/05\/17\/error-with-gitlab-sidekiq-gemfile-syntax-error-collection-of-common-programming-errors\/"},"modified":"2014-05-17T00:23:46","modified_gmt":"2014-05-17T00:23:46","slug":"error-with-gitlab-sidekiq-gemfile-syntax-error-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2014\/05\/17\/error-with-gitlab-sidekiq-gemfile-syntax-error-collection-of-common-programming-errors\/","title":{"rendered":"Error with Gitlab: Sidekiq; gemfile syntax error-Collection of common programming errors"},"content":{"rendered":"<p>I&#8217;ve been breaking my head over this error for hours now, and still haven&#8217;t found a fix. When I run sidekiq using <code>sudo -u root -H RAILS_ENV=production script\/background_jobs start<\/code> I&#8217;m getting this error in the sidekiq.log:<\/p>\n<pre><code>Gemfile syntax error:\n\/home\/website\/git\/gitlab\/Gemfile:20: syntax error, unexpected ':', expecting $end\ngem \"mysql2\", group: :mysql\n<\/code><\/pre>\n<p>I&#8217;ve installed Ruby 2.1.0 and am running CentOS. I&#8217;ve seen other posts with this error, and their problem was that they were running Ruby 1.8, however, I&#8217;m running Ruby 2.1.0 and also getting this error.<\/p>\n<p>Any help is greatly appreciated.<\/p>\n<p>EDIT: My gemfile http:\/\/pastebin.com\/T5z4GZ3a<\/p>\n<p><code>bundle<\/code> returns<\/p>\n<pre><code>Your bundle is complete!\nGems in the groups development, test, postgres, puma and aws were not installed.\nIt was installed into .\/vendor\/bundle\n<\/code><\/pre>\n<p>EDIT2: My <code>background_jobs<\/code> script http:\/\/pastebin.com\/kdicTFqk<\/p>\n<p><code>bundle show bundler<\/code> returns<\/p>\n<pre><code>2.1.0\n\/usr\/local\/rvm\/gems\/ruby-2.1.0@global\/gems\/bundler-1.5.2\n<\/code><\/pre>\n<p>EDIT3: I think I have found the problem, not sure how to solve it though. I added <code>p RUBY_VERSION<\/code> as first line of my Gemfile, then I changed every line written like this: <code>group: :mysql<\/code> to this <code>:group =&gt; :mysql<\/code> (because that is working on older versions).<\/p>\n<p>However, when I run Sidekiq now, this shows up in the sidekiq.log:<\/p>\n<pre><code>\"1.8.7\"\nbundler: command not found: sidekiq\nInstall missing gem executables with `bundle install`\n<\/code><\/pre>\n<p>I am really, really confused now. Here it clearly says my Ruby version is 1.8.7, but that&#8217;s not right. <code>ruby -v<\/code> or <code>rvm list rubies<\/code> only show that Ruby 2.1.0 is installed, and set as default.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;ve been breaking my head over this error for hours now, and still haven&#8217;t found a fix. When I run sidekiq using sudo -u root -H RAILS_ENV=production script\/background_jobs start I&#8217;m getting this error in the sidekiq.log: Gemfile syntax error: \/home\/website\/git\/gitlab\/Gemfile:20: syntax error, unexpected &#8216;:&#8217;, expecting $end gem &#8220;mysql2&#8221;, group: :mysql I&#8217;ve installed Ruby 2.1.0 and [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-7036","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/7036","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=7036"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/7036\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=7036"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=7036"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=7036"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}