laurilehmijoki / s3_website

Manage an S3 website: sync, deliver via CloudFront, benefit from advanced S3 website features.
Other
2.24k stars 187 forks source link

Failed to parse ERB on s3_website push #306

Closed davepeck closed 6 years ago

davepeck commented 6 years ago

bundle exec s3_website push is currently resulting in the following error:

[fail] Could not load the site: Failed to parse ERB in /projects/www/s3_website.yml:
       (SyntaxError) /usr/local/Cellar/ruby/2.5.0_2/lib/ruby/2.5.0/uri/common.rb:460: syntax error, unexpected tLABEL
         def self.decode_www_form(str, enc=Encoding::UTF_8, separator: '&', use__charset_: false, isindex: false)

This error happens with an s3_website.yml file that has been working correctly for years. Just to sanity check, I replaced it with an empty file and got the same result.

I'm running ruby 2.5.0p0 and s3_website 3.4.0.

I'm not convinced this is an s3_website issue; it could be some rot in my local environment. But the error is pretty obtuse. Can you help me hunt down where things are going wrong? Thanks.

davepeck commented 6 years ago

Yup, it's environment rot -- the syntax error was in ruby's uri/common.rb; who knows why. Closing this bug.

kwyn commented 6 years ago

@davepeck what did you do to resolve it? I'm running into this as well.

davepeck commented 6 years ago

@kwyn I ultimately blew away a good portion of my homebrew install and reinstalled it. Not elegant, and not really explanatory, but does seem to have done the trick. YMMV.

kwyn commented 6 years ago

Thanks for the quick response! haha WHELP here goes nothing 🤞

kwyn commented 6 years ago

For the record this fixed it for me...

gerwitz commented 5 years ago

Egad, now I have this on Travis.

[fail] Could not load the site: Failed to parse ERB in .s3_website-release/s3_website.yml:
       (SyntaxError) /home/travis/.rvm/rubies/ruby-2.3.4/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_warn.rb:15: syntax error, unexpected tLABEL
           module_function define_method(:warn) {|*messages, uplevel: nil|

I've cleared caches, so this appears to be a dependency conflict and not environment rot.

Searching makes it appear I'm alone with this, so it's probably not s3_website's fault. I'll update here if I resolve it.

robotmlg commented 5 years ago

I also had this issue on travis. It was fixed by upgrading my ruby from 2.3 to 2.5. looks like you're on 2.3 also, so maybe give that a try if possible with your deps.

gerwitz commented 5 years ago

@robotmlg thanks, that did the trick!