New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error after upgrading to Ruby 1.9.3 #836

Closed
stefanvermaas opened this Issue Mar 4, 2013 · 15 comments

Comments

Projects
None yet
7 participants
@stefanvermaas

stefanvermaas commented Mar 4, 2013

Hi,

I've found some problems with Ruby 1.9.3 and Jekyll and I can't figure out how to solve this ( read a lot about it on the internet ). I've upgraded to Ruby 1.9.3 using RVM and everything goes wrong after running the jekyll command.

This is what I get:

YAML Exception reading 2012-07-21-a-brand-new-project.md: invalid byte sequence in US-ASCII
YAML Exception reading 2012-07-30-keep-everything-in-sync.md: invalid byte sequence in US-ASCII
YAML Exception reading 2012-08-03-shame-on-you-ie.md: invalid byte sequence in US-ASCII
YAML Exception reading 2012-09-08-the-advantage-of-ruby-for-a-front-end-developer.md: invalid byte sequence in US-ASCII
YAML Exception reading 2012-09-22-designing-html5-pretty-neat-huh.md: invalid byte sequence in US-ASCII
YAML Exception reading 2012-09-28-webusers-are-no-webdesigners.md: invalid byte sequence in US-ASCII
YAML Exception reading 2012-10-25-eventbrite-choose-wisely-between-web-and-native.md: invalid byte sequence in US-ASCII
YAML Exception reading 2012-10-25-sections-are-not-the-new-divs.md: invalid byte sequence in US-ASCII
Liquid Exception: invalid byte sequence in US-ASCII in 2012-07-21-a-brand-new-project.md
/Users/stefan/.rvm/gems/ruby-1.9.3-p392/gems/liquid-2.4.1/lib/liquid/template.rb:141:in `split'
/Users/stefan/.rvm/gems/ruby-1.9.3-p392/gems/liquid-2.4.1/lib/liquid/template.rb:141:in `tokenize'
/Users/stefan/.rvm/gems/ruby-1.9.3-p392/gems/liquid-2.4.1/lib/liquid/template.rb:58:in `parse'
/Users/stefan/.rvm/gems/ruby-1.9.3-p392/gems/liquid-2.4.1/lib/liquid/template.rb:46:in `parse'
/Users/stefan/.rvm/gems/ruby-1.9.3-p392/gems/jekyll-0.12.1/lib/jekyll/convertible.rb:79:in `do_layout'
/Users/stefan/.rvm/gems/ruby-1.9.3-p392/gems/jekyll-0.12.1/lib/jekyll/post.rb:195:in `render'
/Users/stefan/.rvm/gems/ruby-1.9.3-p392/gems/jekyll-0.12.1/lib/jekyll/site.rb:200:in `block in render'
/Users/stefan/.rvm/gems/ruby-1.9.3-p392/gems/jekyll-0.12.1/lib/jekyll/site.rb:199:in `each'
/Users/stefan/.rvm/gems/ruby-1.9.3-p392/gems/jekyll-0.12.1/lib/jekyll/site.rb:199:in `render'
/Users/stefan/.rvm/gems/ruby-1.9.3-p392/gems/jekyll-0.12.1/lib/jekyll/site.rb:41:in `process'
/Users/stefan/.rvm/gems/ruby-1.9.3-p392/gems/jekyll-0.12.1/bin/jekyll:264:in `<top (required)>'
/Users/stefan/.rvm/gems/ruby-1.9.3-p392/bin/jekyll:19:in `load'
/Users/stefan/.rvm/gems/ruby-1.9.3-p392/bin/jekyll:19:in `<main>'
/Users/stefan/.rvm/gems/ruby-1.9.3-p392/bin/ruby_noexec_wrapper:14:in `eval'
/Users/stefan/.rvm/gems/ruby-1.9.3-p392/bin/ruby_noexec_wrapper:14:in `<main>'
Build Failed

I've checked the files and they're all saved as UTF-8. I've added these lines to my .bashrc and .bash_profile files:

export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8

But that didn't do the trick.. Hope you guys can help me out.

@jwebcat

This comment has been minimized.

jwebcat commented Mar 4, 2013

Try updating your ruby gem sometimes this works.
On Mar 4, 2013 4:15 AM, "Stefan Vermaas" notifications@github.com wrote:

Hi,

I've found some problems with Ruby 1.9.3 and Jekyll and I can't figure out
how to solve this ( read a lot about it on the internet ). I've upgraded to
Ruby 1.9.3 using RVM and everything goes wrong after running the jekyll
command.

This is what I get:

YAML Exception reading 2012-07-21-a-brand-new-project.md: invalid byte sequence in US-ASCII
YAML Exception reading 2012-07-30-keep-everything-in-sync.md: invalid byte sequence in US-ASCII
YAML Exception reading 2012-08-03-shame-on-you-ie.md: invalid byte sequence in US-ASCII
YAML Exception reading 2012-09-08-the-advantage-of-ruby-for-a-front-end-developer.md: invalid byte sequence in US-ASCII
YAML Exception reading 2012-09-22-designing-html5-pretty-neat-huh.md: invalid byte sequence in US-ASCII
YAML Exception reading 2012-09-28-webusers-are-no-webdesigners.md: invalid byte sequence in US-ASCII
YAML Exception reading 2012-10-25-eventbrite-choose-wisely-between-web-and-native.md: invalid byte sequence in US-ASCII
YAML Exception reading 2012-10-25-sections-are-not-the-new-divs.md: invalid byte sequence in US-ASCII
Liquid Exception: invalid byte sequence in US-ASCII in 2012-07-21-a-brand-new-project.md
/Users/stefan/.rvm/gems/ruby-1.9.3-p392/gems/liquid-2.4.1/lib/liquid/template.rb:141:in split' /Users/stefan/.rvm/gems/ruby-1.9.3-p392/gems/liquid-2.4.1/lib/liquid/template.rb:141:intokenize'
/Users/stefan/.rvm/gems/ruby-1.9.3-p392/gems/liquid-2.4.1/lib/liquid/template.rb:58:in parse' /Users/stefan/.rvm/gems/ruby-1.9.3-p392/gems/liquid-2.4.1/lib/liquid/template.rb:46:inparse'
/Users/stefan/.rvm/gems/ruby-1.9.3-p392/gems/jekyll-0.12.1/lib/jekyll/convertible.rb:79:in do_layout' /Users/stefan/.rvm/gems/ruby-1.9.3-p392/gems/jekyll-0.12.1/lib/jekyll/post.rb:195:inrender'
/Users/stefan/.rvm/gems/ruby-1.9.3-p392/gems/jekyll-0.12.1/lib/jekyll/site.rb:200:in block in render' /Users/stefan/.rvm/gems/ruby-1.9.3-p392/gems/jekyll-0.12.1/lib/jekyll/site.rb:199:ineach'
/Users/stefan/.rvm/gems/ruby-1.9.3-p392/gems/jekyll-0.12.1/lib/jekyll/site.rb:199:in render' /Users/stefan/.rvm/gems/ruby-1.9.3-p392/gems/jekyll-0.12.1/lib/jekyll/site.rb:41:inprocess'
/Users/stefan/.rvm/gems/ruby-1.9.3-p392/gems/jekyll-0.12.1/bin/jekyll:264:in <top (required)>' /Users/stefan/.rvm/gems/ruby-1.9.3-p392/bin/jekyll:19:inload'
/Users/stefan/.rvm/gems/ruby-1.9.3-p392/bin/jekyll:19:in <main>' /Users/stefan/.rvm/gems/ruby-1.9.3-p392/bin/ruby_noexec_wrapper:14:ineval'
/Users/stefan/.rvm/gems/ruby-1.9.3-p392/bin/ruby_noexec_wrapper:14:in `

'
Build Failed

I've checked the files and they're all saved as UTF-8. I've added these
lines to my .bashrc and .bash_profile files:

export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8

But that didn't do the trick.. Hope you guys can help me out.


Reply to this email directly or view it on GitHubhttps://github.com//issues/836
.

@stefanvermaas

This comment has been minimized.

stefanvermaas commented Mar 4, 2013

Tried that before posting this issue, without any luck. You know why this error occurs?

@jwebcat

This comment has been minimized.

jwebcat commented Mar 4, 2013

No not exactly. I had quite the time myself getting Jekyll to play nice on
my Windows machine.
Can you use ruby 2.0.0 instead?
Also if you installed using homebrew maybe try uninstalling ruby and re
installing with rbenv instead.
On Mar 4, 2013 12:51 PM, "Stefan Vermaas" notifications@github.com wrote:

Tried that before posting this issue, without any luck. You know why this
error occurs?


Reply to this email directly or view it on GitHubhttps://github.com//issues/836#issuecomment-14404648
.

@jwebcat

This comment has been minimized.

jwebcat commented Mar 4, 2013

Hmm what text editor are you using?
On Mar 4, 2013 12:56 PM, "Jupiter Webcat" jwebcat@gmail.com wrote:

No not exactly. I had quite the time myself getting Jekyll to play nice on
my Windows machine.
Can you use ruby 2.0.0 instead?
Also if you installed using homebrew maybe try uninstalling ruby and re
installing with rbenv instead.
On Mar 4, 2013 12:51 PM, "Stefan Vermaas" notifications@github.com
wrote:

Tried that before posting this issue, without any luck. You know why this
error occurs?


Reply to this email directly or view it on GitHubhttps://github.com//issues/836#issuecomment-14404648
.

@stefanvermaas

This comment has been minimized.

stefanvermaas commented Mar 4, 2013

I'm using Coda 2. Didn't have any problems before upgrading to 1.9.3.

@jwebcat

This comment has been minimized.

jwebcat commented Mar 4, 2013

Will you try with sublime text 2 and see if that's the issue.
I honestly can't imagine it could be.
You never know though.

What version of Jekyll?
On Mar 4, 2013 12:59 PM, "Stefan Vermaas" notifications@github.com wrote:

I'm using Coda 2. Didn't have any problems before upgrading to 1.9.3.


Reply to this email directly or view it on GitHubhttps://github.com//issues/836#issuecomment-14405079
.

@stefanvermaas

This comment has been minimized.

stefanvermaas commented Mar 5, 2013

Didn't make a difference. It worked when I removed the body of all the posts..

Version of Jekyll: 0.12.1

@jwebcat

This comment has been minimized.

jwebcat commented Mar 5, 2013

Great bro :)
I'm glad it's working now.
On Mar 5, 2013 12:44 AM, "Stefan Vermaas" notifications@github.com wrote:

Didn't make a difference. It worked when I removed the body of all the
posts..

Version of Jekyll: 0.12.1


Reply to this email directly or view it on GitHubhttps://github.com//issues/836#issuecomment-14429196
.

@stefanvermaas

This comment has been minimized.

stefanvermaas commented Mar 5, 2013

Thanks for thinking along!

@bradwright

This comment has been minimized.

bradwright commented Apr 24, 2013

I also have this issue. Condensed test case:

_posts/2013-test.md:

---
title: This is a test
---

I’m a non-ASCII sentence.

Output of command:

$ bundle exec jekyll _posts _site
WARNING: Could not read configuration. Using defaults (and options).
        No such file or directory - _posts/_config.yml
Building site: _posts -> _site
YAML Exception reading 2013-test-case.md: invalid byte sequence in US-ASCII
Liquid Exception: invalid byte sequence in US-ASCII in 2013-test-case.md
/opt/boxen/rbenv/versions/1.9.3-p362/lib/ruby/gems/1.9.1/gems/liquid-2.5.0/lib/liquid/tem
plate.rb:141:in `split'                                                                 
/opt/boxen/rbenv/versions/1.9.3-p362/lib/ruby/gems/1.9.1/gems/liquid-2.5.0/lib/liquid/tem
plate.rb:141:in `tokenize'                                                              
/opt/boxen/rbenv/versions/1.9.3-p362/lib/ruby/gems/1.9.1/gems/liquid-2.5.0/lib/liquid/tem
plate.rb:58:in `parse'                                                                  
/opt/boxen/rbenv/versions/1.9.3-p362/lib/ruby/gems/1.9.1/gems/liquid-2.5.0/lib/liquid/tem
plate.rb:46:in `parse'                                                                  
/opt/boxen/rbenv/versions/1.9.3-p362/lib/ruby/gems/1.9.1/gems/jekyll-0.12.1/lib/jekyll/co
nvertible.rb:79:in `do_layout'                                                          
/opt/boxen/rbenv/versions/1.9.3-p362/lib/ruby/gems/1.9.1/gems/jekyll-0.12.1/lib/jekyll/pa
ge.rb:100:in `render'                                                                   
/opt/boxen/rbenv/versions/1.9.3-p362/lib/ruby/gems/1.9.1/gems/jekyll-0.12.1/lib/jekyll/si
te.rb:204:in `block in render'                                                          
/opt/boxen/rbenv/versions/1.9.3-p362/lib/ruby/gems/1.9.1/gems/jekyll-0.12.1/lib/jekyll/si
te.rb:203:in `each'                                                                     
/opt/boxen/rbenv/versions/1.9.3-p362/lib/ruby/gems/1.9.1/gems/jekyll-0.12.1/lib/jekyll/si
te.rb:203:in `render'                                                                   
/opt/boxen/rbenv/versions/1.9.3-p362/lib/ruby/gems/1.9.1/gems/jekyll-0.12.1/lib/jekyll/si
te.rb:41:in `process'                                                                   
/opt/boxen/rbenv/versions/1.9.3-p362/lib/ruby/gems/1.9.1/gems/jekyll-0.12.1/bin/jekyll:26
4:in `<top (required)>'                                                                 
/opt/boxen/rbenv/versions/1.9.3-p362/bin/jekyll:23:in `load'
/opt/boxen/rbenv/versions/1.9.3-p362/bin/jekyll:23:in `<main>'
Build Failed

Jekyll version:

$ bundle exec jekyll --version   
Jekyll 0.12.1

Output of file:

$ file _posts/2013-test-case.md 
_posts/2013-test-case.md: UTF-8 Unicode text
@bradwright

This comment has been minimized.

bradwright commented Apr 24, 2013

And using:

$ bundle exec jekyll --version      
jekyll 1.0.0.rc1

I get:

bundle exec jekyll serve -s _posts 
Configuration file: none
            Source: _posts
       Destination: /Users/bradleyw/Projects/test-jekyll/_site
      Generating... Error reading file /Users/bradleyw/Projects/test-jekyll/_posts/2013-t
est-case.md: invalid byte sequence in US-ASCII                                          
Liquid Exception: invalid byte sequence in US-ASCII in 2013-test-case.md
/opt/boxen/rbenv/versions/1.9.3-p362/lib/ruby/gems/1.9.1/gems/liquid-2.5.0/lib/liquid/tem
plate.rb:141:in `split'                                                                 
/opt/boxen/rbenv/versions/1.9.3-p362/lib/ruby/gems/1.9.1/gems/liquid-2.5.0/lib/liquid/tem
plate.rb:141:in `tokenize'                                                              
/opt/boxen/rbenv/versions/1.9.3-p362/lib/ruby/gems/1.9.1/gems/liquid-2.5.0/lib/liquid/tem
plate.rb:58:in `parse'                                                                  
/opt/boxen/rbenv/versions/1.9.3-p362/lib/ruby/gems/1.9.1/gems/liquid-2.5.0/lib/liquid/tem
plate.rb:46:in `parse'                                                                  
/Users/bradleyw/Projects/jekyll/lib/jekyll/convertible.rb:81:in `do_layout'
/Users/bradleyw/Projects/jekyll/lib/jekyll/page.rb:106:in `render'
/Users/bradleyw/Projects/jekyll/lib/jekyll/site.rb:234:in `block in render'
/Users/bradleyw/Projects/jekyll/lib/jekyll/site.rb:233:in `each'
/Users/bradleyw/Projects/jekyll/lib/jekyll/site.rb:233:in `render'
/Users/bradleyw/Projects/jekyll/lib/jekyll/site.rb:44:in `process'
/Users/bradleyw/Projects/jekyll/lib/jekyll/command.rb:18:in `process_site'
/Users/bradleyw/Projects/jekyll/lib/jekyll/commands/build.rb:23:in `build'
/Users/bradleyw/Projects/jekyll/lib/jekyll/commands/build.rb:7:in `process'
/Users/bradleyw/Projects/jekyll/bin/jekyll:83:in `block (2 levels) in <top (required)>'
/opt/boxen/rbenv/versions/1.9.3-p362/lib/ruby/gems/1.9.1/gems/commander-4.1.3/lib/command
er/command.rb:180:in `call'                                                             
/opt/boxen/rbenv/versions/1.9.3-p362/lib/ruby/gems/1.9.1/gems/commander-4.1.3/lib/command
er/command.rb:180:in `call'                                                             
/opt/boxen/rbenv/versions/1.9.3-p362/lib/ruby/gems/1.9.1/gems/commander-4.1.3/lib/command
er/command.rb:155:in `run'                                                              
/opt/boxen/rbenv/versions/1.9.3-p362/lib/ruby/gems/1.9.1/gems/commander-4.1.3/lib/command
er/runner.rb:402:in `run_active_command'                                                
/opt/boxen/rbenv/versions/1.9.3-p362/lib/ruby/gems/1.9.1/gems/commander-4.1.3/lib/command
er/runner.rb:66:in `run!'                                                               
/opt/boxen/rbenv/versions/1.9.3-p362/lib/ruby/gems/1.9.1/gems/commander-4.1.3/lib/command
er/delegates.rb:11:in `run!'                                                            
/opt/boxen/rbenv/versions/1.9.3-p362/lib/ruby/gems/1.9.1/gems/commander-4.1.3/lib/command
er/import.rb:10:in `block in <top (required)>'                                          
Build Failed
@upvalue

This comment has been minimized.

upvalue commented May 15, 2013

I'm still encountering this issue after using a git checkout of Jekyll from today. Adding in bradleywright's change by hand (the :encoding => 'UTF-8') part fixed it for me.

@parkr

This comment has been minimized.

Member

parkr commented May 15, 2013

If you take post.content and encode it as UTF-8, then it works for you? Can you change the encoding of the file when you make them? Does that fix the issue?

@upvalue

This comment has been minimized.

upvalue commented May 15, 2013

I got it to work after changing my system-wide locale to UTF-8, which I thought I had already done. No modifications to Jekyll required. It was still pretty annoying as non-ASCII sequences were sneaking into my site when I copied and pasted some text from elsewhere.

@ammmmb

This comment has been minimized.

ammmmb commented May 11, 2014

export LC_ALL=en_US.UTF-8 solved my problem. thanks!

@jekyll jekyll locked and limited conversation to collaborators Feb 27, 2017

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