SyntaxError #8

Closed
jgorset opened this Issue Jul 6, 2012 · 2 comments

Comments

Projects
None yet
4 participants
@jgorset

jgorset commented Jul 6, 2012

Hi,

I'm receiving a SyntaxError upon loading the library under ruby 1.9.3p0:

irb(main):001:0> require "duration"
SyntaxError: /Users/administrator/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/duration-0.1.0/lib/duration/localizations/korean.rb:6: invalid multibyte char (US-ASCII)
/Users/administrator/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/duration-0.1.0/lib/duration/localizations/korean.rb:6: invalid multibyte char (US-ASCII)
/Users/administrator/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/duration-0.1.0/lib/duration/localizations/korean.rb:6: syntax error, unexpected $end, expecting keyword_end
      PLURALS   = %w(초 분 시간 일 주)
                       ^
    from /Users/administrator/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
    from /Users/administrator/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
    from /Users/administrator/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/duration-0.1.0/lib/duration/localizations.rb:3:in `<top (required)>'
    from /Users/administrator/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
    from /Users/administrator/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
    from /Users/administrator/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/duration-0.1.0/lib/duration.rb:4:in `<top (required)>'
    from /Users/administrator/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rubygems/custom_require.rb:59:in `require'
    from /Users/administrator/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rubygems/custom_require.rb:59:in `rescue in require'
    from /Users/administrator/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rubygems/custom_require.rb:35:in `require'
    from (irb):1
    from /Users/administrator/.rbenv/versions/1.9.3-p0/bin/irb:12:in `<main>'
@gcirne

This comment has been minimized.

Show comment Hide comment
@gcirne

gcirne Jul 6, 2012

Contributor

This looks like a problem with strings not being UTF-8.

Contributor

gcirne commented Jul 6, 2012

This looks like a problem with strings not being UTF-8.

@peleteiro peleteiro closed this May 22, 2013

@mwanas

This comment has been minimized.

Show comment Hide comment
@mwanas

mwanas Aug 15, 2013

just add # -- coding: utf-8 -- to the beginning of the file

mwanas commented Aug 15, 2013

just add # -- coding: utf-8 -- to the beginning of the file

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment