-1

I am trying to install resque brain (https://github.com/stitchfix/resque-brain) on my vm machine which runs centos. When I run 'rake test' I get the following error.

[!] There was an error parsing `Gemfile`: compile error - syntax error, unexpected ':', expecting $end
gem 'spring',        group: :development
                           ^. Bundler cannot continue.

 #  from /root/user/resque-brain/Gemfile:11
 #  -------------------------------------------
 #  gem 'jbuilder', '~> 2.0'
 >  gem 'spring',        group: :development
 #  gem 'bower-rails'
 #  -------------------------------------------

Any suggestions how I might be able to fix this? I tried so far to update ruby and buddle.

# bundle -v
Bundler version 1.10.6

# ruby -v
ruby 1.8.7 (2013-06-27 patchlevel 374) [x86_64-linux]
Simone Carletti
  • 173,507
  • 49
  • 363
  • 364
ionman
  • 39
  • 5

2 Answers2

0

Ruby 1.8 doesn't support JSON-style hashes. So try gem 'spring', :group => :development or just

group :development do
  gem 'spring'
end
SpeedyWizard
  • 568
  • 6
  • 13
0

The Gemfile file syntax is based on Ruby 1.9 as it uses the json-style syntax.

group: :development

You use Ruby 1.8.7, therefore you must rewrite it into

:group => :development

Please note you are using a very old version of Ruby which is buggy, outdated, slow and most importantly no longer supported.

You should upgrade your Ruby version before proceeding, as this one will likely not be the only issue you will encounter. I'm not even sure that Rescue and associated libraries are still compatible with Ruby 1.8.

Simone Carletti
  • 173,507
  • 49
  • 363
  • 364