我已经移动了托管服务提供商并重新安装了 ruby 和中间人。
当我跑步时,bundle exe middleman server
我得到:
/var/lib/gems/1.8/gems/haml-4.0.4/lib/haml/parser.rb:86:警告:正则表达式的间隔无效/var/lib/gems/1.8/gems/middleman-s3_sync-3.0。 21/lib/middleman-s3_sync.rb:2: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
需要来自 /var/lib/gems/1.8/gems/bundler-1.3.5/lib/bundler/runtime.rb:72:inrequire' from /var/lib/gems/1.8/gems/bundler-1.3.5/lib/bundler/runtime.rb:70:in
each' 来自 /var/ lib/gems/1.8/gems/bundler-1.3.5/lib/bundler/runtime.rb:70:inrequire' from /var/lib/gems/1.8/gems/bundler-1.3.5/lib/bundler/runtime.rb:59:in
each' 来自 /var/lib/gems/1.8/gems/bundler-1.3.5/lib/bundler/runtime .rb:59:inrequire' from /var/lib/gems/1.8/gems/bundler-1.3.5/lib/bundler.rb:132:in
require' 来自 /var/lib/gems/1.8/gems/middleman-core-3.2.0/lib/middleman-core/load_paths.rb:38:insetup_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' 来自 /usr/local/bin /中间人:19
我的 Ruby 知识很差,但是当我查看代码时,我没有看到语法错误。我查看了 s3_sync git hub 代码,这部分代码在一段时间内没有改变。我怀疑这是一个编码问题,但是我在尝试修复它时有点卡住了。您可以散发的任何光都将非常有帮助。
附加信息:我尝试过 Ruby 1.8 和 1.9.3。这是在 Ubuntu 12.04 上。