Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

SyntaxError #8

Closed
jgorset opened this Issue · 2 comments

4 participants

@jgorset

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
Collaborator

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

@peleteiro peleteiro closed this
@mwanas

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
Something went wrong with that request. Please try again.