Middleman server does not start, regexp has invalid internal

I have moved hosting providers and reinstalled rubies and resellers.

When I run bundle exe middleman server

I get:

/var/lib/gems/1.8/gems/haml-4.0.4/lib/haml/parser.rb:86: warning: regexp has invalid spacing / var / lib / gems / 1.8 / gems / middleman-s3_sync-3.0. 21 / lib / middleman-s3_sync.rb :: in require': /var/lib/gems/1.8/gems/middleman-s3_sync-3.0.21/lib/middleman/s3_sync.rb:54: syntax error, unexpected ':', expecting ')' (SyntaxError) @progress_bar ||= ProgressBar.create(total: paths.length) ^ /var/lib/gems/1.8/gems/middleman-s3_sync-3.0.21/lib/middleman/s3_sync.rb:54: syntax error, unexpected ')', expecting kEND /var/lib/gems/1.8/gems/middleman-s3_sync-3.0.21/lib/middleman/s3_sync.rb:67: syntax error, unexpected '.', expecting kEND ... .reject { |p| File.directory?(p... ^ /var/lib/gems/1.8/gems/middleman-s3_sync-3.0.21/lib/middleman/s3_sync.rb:137: syntax error, unexpected $end, expecting kEND from /var/lib/gems/1.8/gems/middleman-s3_sync-3.0.21/lib/middleman-s3_sync.rb:2 from /var/lib/gems/1.8/gems/bundler-1.3.5/lib/bundler/runtime.rb:72:in

require 'from / var / lib / gems / 1.8 / gems / bundler-1.3.5 / lib / bundler / runtime.rb: 72: in require' from /var/lib/gems/1.8/gems/bundler-1.3.5/lib/bundler/runtime.rb:70:in

each' from / var / lib / gems / 1.8 / gems / bundler-1.3.5 / lib / bundler / runtime.rb: 70: in require' from /var/lib/gems/1.8/gems/bundler-1.3.5/lib/bundler/runtime.rb:59:in

each 'from / var / lib / gems / 1.8 / gems / bundler-1.3.5 / lib / bundler / runtime. rb: 59: in require' from /var/lib/gems/1.8/gems/bundler-1.3.5/lib/bundler.rb:132:in

require 'from / var / lib / gems / 1.8 / gems / middleman-core-3.2.0 / lib / middleman-core / load_paths.rb: 38: in setup_load_paths' from /var/lib/gems/1.8/gems/middleman-core-3.2.0/bin/middleman:10 from /usr/local/bin/middleman:19:in

load' from / usr / local / bin / middleman: 19

My Ruby knowledge is very poor, but when I look at the code, I don't see a syntax error. I looked at the s3_sync git node code and this piece of code hasn't changed in a while. I suspect this is an encoding issue, however I am a bit stuck trying to fix it. Any light you can shed will be very helpful.

Additional info: I've tried Ruby 1.8 and 1.9.3. And this is on Ubuntu 12.04.

0


source to share


1 answer


SyntaxError seems to be complaining about this inside Middleman:

ProgressBar.create(total: paths.length)

      

The path /var/lib/gems/1.8/

indicates that you are using Ruby 1.8.X. But JavaScript style Hash notation:



total: paths.length

      

does not work in 1.8, you must use the notation there :total => paths.length

. It looks like you cannot use this version of Middleman since 1.8.7, or upgrade to 1.9.3+, or downgrade your Middleman to something that works with old Rubies.

+1


source







All Articles