Multibyte error under Ruby 1.9.1
Reported by Martin Hess | June 23rd, 2009 @ 01:48 AM
I've tracked down a problem with Webby It turns out that it has some non-ascii characters in at least one file; for example the second quote in the regular expression below is not an ASCII character:
parts = self.split( %r/( [:.;?!][ ] | (?:[ ]|^)["“] )/x )
webby-0.9.4/lib/webby/core_ext/string.rb
It produces errors like this:
:in `require': /opt/local/lib/ruby1.9/gems/1.9.1/gems/webby-0.9.4/lib/webby/core_ext/string.rb:14: invalid multibyte char (US-ASCII) (SyntaxError)
I fixed it by adding the following to the top of the offending file:
# encoding: utf-8
You might consider adding it to all your files
Comments and changes to this ticket
-
Roger July 17th, 2009 @ 06:22 AM
got this too
C:\dev\ruby>webby-gen website my_site
c:/installs/ruby_trunk_installed/lib/ruby/gems/1.9.1/gems/webby-0.9.4/lib/webby.rb:104:inrequire': c:/installs/ruby_trunk_installed/lib/ruby/gems/1.9.1/gems/webby-0.9.4/lib/webby/core_ext/string.rb:15: invalid multibyte<br/> char (US-ASCII) (SyntaxError)<br/> c:/installs/ruby_trunk_installed/lib/ruby/gems/1.9.1/gems/webby-0.9.4/lib/webby/core_ext/string.rb:15: invalid<br/> multibyte char (US-ASCII)<br/> c:/installs/ruby_trunk_installed/lib/ruby/gems/1.9.1/gems/webby-0.9.4/lib/webby/core_ext/string.rb:15: syntax error, unexpected $end, expecting ')'<br/>
parts = self.split( %r/( [:.;?!][ ] | (?:[ ]|^)["ΓÇ£] )/x )
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป
Static website generate (ASCII Alchemy)