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 with rake generate #57

Closed
ahhqx opened this Issue Jul 30, 2011 · 17 comments

Comments

Projects
None yet
@ahhqx

ahhqx commented Jul 30, 2011

$rake generate

Generating Site with Jekyll

/Users/eddie/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/psych.rb:148:in parse': couldn't parse YAML at line 42 column 0 (Psych::SyntaxError) from /Users/eddie/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/psych.rb:148:inparse_stream'
from /Users/eddie/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/psych.rb:119:in parse' from /Users/eddie/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/psych.rb:106:inload'
from /Users/eddie/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/psych.rb:205:in load_file' from /Users/eddie/.rvm/gems/ruby-1.9.2-p290/gems/jekyll-0.11.0/lib/jekyll.rb:119:inconfiguration'
from /Users/eddie/.rvm/gems/ruby-1.9.2-p290/gems/jekyll-0.11.0/bin/jekyll:207:in <top (required)>' from /Users/eddie/.rvm/gems/ruby-1.9.2-p290/bin/jekyll:19:inload'
from /Users/eddie/.rvm/gems/ruby-1.9.2-p290/bin/jekyll:19:in `

'

OS: Mac OSX 10.7

@kennym

This comment has been minimized.

Show comment
Hide comment
@kennym

kennym Jul 30, 2011

Please, give us the full trace log by running rake -t generate.

kennym commented Jul 30, 2011

Please, give us the full trace log by running rake -t generate.

@kennym

This comment has been minimized.

Show comment
Hide comment
@kennym

kennym Jul 30, 2011

Just to be sure that it's not one of your config files causing the traceback, or psych itself.

kennym commented Jul 30, 2011

Just to be sure that it's not one of your config files causing the traceback, or psych itself.

@ahhqx

This comment has been minimized.

Show comment
Hide comment
@ahhqx

ahhqx Jul 31, 2011

its the psych issue,i change the yaml parser and it runs no problem now

ahhqx commented Jul 31, 2011

its the psych issue,i change the yaml parser and it runs no problem now

@ahhqx ahhqx closed this Jul 31, 2011

@irae

This comment has been minimized.

Show comment
Hide comment
@irae

irae Aug 13, 2011

I'm having the same problem. Mac OS X 10.7

/Users/irae/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/psych.rb:148:in `parse': couldn't parse YAML at line 2 column 44 (Psych::SyntaxError)
    from /Users/irae/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/psych.rb:148:in `parse_stream'
    from /Users/irae/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/psych.rb:119:in `parse'
    from /Users/irae/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/psych.rb:106:in `load'
    from /Users/irae/.rvm/gems/ruby-1.9.2-p290/gems/jekyll-0.11.0/lib/jekyll/convertible.rb:33:in `read_yaml'
    from /Users/irae/.rvm/gems/ruby-1.9.2-p290/gems/jekyll-0.11.0/lib/jekyll/post.rb:39:in `initialize'
    from /Users/irae/.rvm/gems/ruby-1.9.2-p290/gems/jekyll-0.11.0/lib/jekyll/site.rb:163:in `new'
    from /Users/irae/.rvm/gems/ruby-1.9.2-p290/gems/jekyll-0.11.0/lib/jekyll/site.rb:163:in `block in read_posts'
    from /Users/irae/.rvm/gems/ruby-1.9.2-p290/gems/jekyll-0.11.0/lib/jekyll/site.rb:161:in `each'
    from /Users/irae/.rvm/gems/ruby-1.9.2-p290/gems/jekyll-0.11.0/lib/jekyll/site.rb:161:in `read_posts'
    from /Users/irae/.rvm/gems/ruby-1.9.2-p290/gems/jekyll-0.11.0/lib/jekyll/site.rb:128:in `read_directories'
    from /Users/irae/.rvm/gems/ruby-1.9.2-p290/gems/jekyll-0.11.0/lib/jekyll/site.rb:98:in `read'
    from /Users/irae/.rvm/gems/ruby-1.9.2-p290/gems/jekyll-0.11.0/lib/jekyll/site.rb:38:in `process'
    from /Users/irae/.rvm/gems/ruby-1.9.2-p290/gems/jekyll-0.11.0/bin/jekyll:250:in `<top (required)>'
    from /Users/irae/.rvm/gems/ruby-1.9.2-p290/bin/jekyll:19:in `load'
    from /Users/irae/.rvm/gems/ruby-1.9.2-p290/bin/jekyll:19:in `<main>'

How can I change the yaml parser?

irae commented Aug 13, 2011

I'm having the same problem. Mac OS X 10.7

/Users/irae/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/psych.rb:148:in `parse': couldn't parse YAML at line 2 column 44 (Psych::SyntaxError)
    from /Users/irae/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/psych.rb:148:in `parse_stream'
    from /Users/irae/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/psych.rb:119:in `parse'
    from /Users/irae/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/psych.rb:106:in `load'
    from /Users/irae/.rvm/gems/ruby-1.9.2-p290/gems/jekyll-0.11.0/lib/jekyll/convertible.rb:33:in `read_yaml'
    from /Users/irae/.rvm/gems/ruby-1.9.2-p290/gems/jekyll-0.11.0/lib/jekyll/post.rb:39:in `initialize'
    from /Users/irae/.rvm/gems/ruby-1.9.2-p290/gems/jekyll-0.11.0/lib/jekyll/site.rb:163:in `new'
    from /Users/irae/.rvm/gems/ruby-1.9.2-p290/gems/jekyll-0.11.0/lib/jekyll/site.rb:163:in `block in read_posts'
    from /Users/irae/.rvm/gems/ruby-1.9.2-p290/gems/jekyll-0.11.0/lib/jekyll/site.rb:161:in `each'
    from /Users/irae/.rvm/gems/ruby-1.9.2-p290/gems/jekyll-0.11.0/lib/jekyll/site.rb:161:in `read_posts'
    from /Users/irae/.rvm/gems/ruby-1.9.2-p290/gems/jekyll-0.11.0/lib/jekyll/site.rb:128:in `read_directories'
    from /Users/irae/.rvm/gems/ruby-1.9.2-p290/gems/jekyll-0.11.0/lib/jekyll/site.rb:98:in `read'
    from /Users/irae/.rvm/gems/ruby-1.9.2-p290/gems/jekyll-0.11.0/lib/jekyll/site.rb:38:in `process'
    from /Users/irae/.rvm/gems/ruby-1.9.2-p290/gems/jekyll-0.11.0/bin/jekyll:250:in `<top (required)>'
    from /Users/irae/.rvm/gems/ruby-1.9.2-p290/bin/jekyll:19:in `load'
    from /Users/irae/.rvm/gems/ruby-1.9.2-p290/bin/jekyll:19:in `<main>'

How can I change the yaml parser?

@ahhqx

This comment has been minimized.

Show comment
Hide comment
@ahhqx

ahhqx Aug 15, 2011

sorry, you can find answer here:
http://stackoverflow.com/questions/4980877/rails-error-couldnt-parse-yaml

On Sun, Aug 14, 2011 at 4:03 AM, irae <
reply@reply.github.com>wrote:

I'm having the same problem. Mac OS X 10.7

/Users/irae/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/psych.rb:148:in
parse': couldn't parse YAML at line 2 column 44 (Psych::SyntaxError) from /Users/irae/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/psych.rb:148:inparse_stream'
from
/Users/irae/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/psych.rb:119:in
parse' from /Users/irae/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/psych.rb:106:inload'
from
/Users/irae/.rvm/gems/ruby-1.9.2-p290/gems/jekyll-0.11.0/lib/jekyll/convertible.rb:33:in
read_yaml' from /Users/irae/.rvm/gems/ruby-1.9.2-p290/gems/jekyll-0.11.0/lib/jekyll/post.rb:39:ininitialize'
from
/Users/irae/.rvm/gems/ruby-1.9.2-p290/gems/jekyll-0.11.0/lib/jekyll/site.rb:163:in
new' from /Users/irae/.rvm/gems/ruby-1.9.2-p290/gems/jekyll-0.11.0/lib/jekyll/site.rb:163:inblock in read_posts'
from
/Users/irae/.rvm/gems/ruby-1.9.2-p290/gems/jekyll-0.11.0/lib/jekyll/site.rb:161:in
each' from /Users/irae/.rvm/gems/ruby-1.9.2-p290/gems/jekyll-0.11.0/lib/jekyll/site.rb:161:inread_posts'
from
/Users/irae/.rvm/gems/ruby-1.9.2-p290/gems/jekyll-0.11.0/lib/jekyll/site.rb:128:in
read_directories' from /Users/irae/.rvm/gems/ruby-1.9.2-p290/gems/jekyll-0.11.0/lib/jekyll/site.rb:98:inread'
from
/Users/irae/.rvm/gems/ruby-1.9.2-p290/gems/jekyll-0.11.0/lib/jekyll/site.rb:38:in
process' from /Users/irae/.rvm/gems/ruby-1.9.2-p290/gems/jekyll-0.11.0/bin/jekyll:250:in<top (required)>'
from /Users/irae/.rvm/gems/ruby-1.9.2-p290/bin/jekyll:19:in load' from /Users/irae/.rvm/gems/ruby-1.9.2-p290/bin/jekyll:19:in

'

How can I change the yaml parser?

Reply to this email directly or view it on GitHub:
#57 (comment)

ahhqx commented Aug 15, 2011

sorry, you can find answer here:
http://stackoverflow.com/questions/4980877/rails-error-couldnt-parse-yaml

On Sun, Aug 14, 2011 at 4:03 AM, irae <
reply@reply.github.com>wrote:

I'm having the same problem. Mac OS X 10.7

/Users/irae/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/psych.rb:148:in
parse': couldn't parse YAML at line 2 column 44 (Psych::SyntaxError) from /Users/irae/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/psych.rb:148:inparse_stream'
from
/Users/irae/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/psych.rb:119:in
parse' from /Users/irae/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/psych.rb:106:inload'
from
/Users/irae/.rvm/gems/ruby-1.9.2-p290/gems/jekyll-0.11.0/lib/jekyll/convertible.rb:33:in
read_yaml' from /Users/irae/.rvm/gems/ruby-1.9.2-p290/gems/jekyll-0.11.0/lib/jekyll/post.rb:39:ininitialize'
from
/Users/irae/.rvm/gems/ruby-1.9.2-p290/gems/jekyll-0.11.0/lib/jekyll/site.rb:163:in
new' from /Users/irae/.rvm/gems/ruby-1.9.2-p290/gems/jekyll-0.11.0/lib/jekyll/site.rb:163:inblock in read_posts'
from
/Users/irae/.rvm/gems/ruby-1.9.2-p290/gems/jekyll-0.11.0/lib/jekyll/site.rb:161:in
each' from /Users/irae/.rvm/gems/ruby-1.9.2-p290/gems/jekyll-0.11.0/lib/jekyll/site.rb:161:inread_posts'
from
/Users/irae/.rvm/gems/ruby-1.9.2-p290/gems/jekyll-0.11.0/lib/jekyll/site.rb:128:in
read_directories' from /Users/irae/.rvm/gems/ruby-1.9.2-p290/gems/jekyll-0.11.0/lib/jekyll/site.rb:98:inread'
from
/Users/irae/.rvm/gems/ruby-1.9.2-p290/gems/jekyll-0.11.0/lib/jekyll/site.rb:38:in
process' from /Users/irae/.rvm/gems/ruby-1.9.2-p290/gems/jekyll-0.11.0/bin/jekyll:250:in<top (required)>'
from /Users/irae/.rvm/gems/ruby-1.9.2-p290/bin/jekyll:19:in load' from /Users/irae/.rvm/gems/ruby-1.9.2-p290/bin/jekyll:19:in

'

How can I change the yaml parser?

Reply to this email directly or view it on GitHub:
#57 (comment)

@jdnavarro

This comment has been minimized.

Show comment
Hide comment
@jdnavarro

jdnavarro Aug 24, 2011

I have exactly the same problem but couldn't find out how to change the YAML default parser. The thread from SO looks specific to RoR. Where is config/boot.rb in the case of Octopress?

jdnavarro commented Aug 24, 2011

I have exactly the same problem but couldn't find out how to change the YAML default parser. The thread from SO looks specific to RoR. Where is config/boot.rb in the case of Octopress?

@irae

This comment has been minimized.

Show comment
Hide comment
@irae

irae Aug 25, 2011

As I understand, this is a problem inside one of the gems. Since the purpose of octopress is an easier way to use jekyll, I think this issue should be reopened. I don't have the necessary skill do dig into the problem and propose a patch to the specific gem. In the stack overflow thread some comment even mention this to be a problem in bundler.

Can someone change the Gemfile or something in a way that this works out of the box, as expected?

irae commented Aug 25, 2011

As I understand, this is a problem inside one of the gems. Since the purpose of octopress is an easier way to use jekyll, I think this issue should be reopened. I don't have the necessary skill do dig into the problem and propose a patch to the specific gem. In the stack overflow thread some comment even mention this to be a problem in bundler.

Can someone change the Gemfile or something in a way that this works out of the box, as expected?

@jdnavarro

This comment has been minimized.

Show comment
Hide comment
@jdnavarro

jdnavarro Aug 25, 2011

It's now working for me properly. In my case it was a problem coming from ZSH syntax, I was not escaping the square brackets properly when creating a new blog post with rake. The syntax error could be more informative though.

jdnavarro commented Aug 25, 2011

It's now working for me properly. In my case it was a problem coming from ZSH syntax, I was not escaping the square brackets properly when creating a new blog post with rake. The syntax error could be more informative though.

@irae

This comment has been minimized.

Show comment
Hide comment
@irae

irae Aug 25, 2011

Now I understand what was going on. Each begin of a post is a little YAML. This was not clear to me. I wasn't creating the post with the commandline, I was trying to import from tumblr. The file was entirely alright and in UTF-8. It was breaking with an "em dash" (—), witch in fixed width fonts is almost the same as "en dash" (–) or an hyphen (-). That's why I wasn't able to find the problem.

I'll dig into this further later, but may be it's a new issue entirely. Thanks for pointing that out, @jdnavarro.

irae commented Aug 25, 2011

Now I understand what was going on. Each begin of a post is a little YAML. This was not clear to me. I wasn't creating the post with the commandline, I was trying to import from tumblr. The file was entirely alright and in UTF-8. It was breaking with an "em dash" (—), witch in fixed width fonts is almost the same as "en dash" (–) or an hyphen (-). That's why I wasn't able to find the problem.

I'll dig into this further later, but may be it's a new issue entirely. Thanks for pointing that out, @jdnavarro.

@Burnsoft

This comment has been minimized.

Show comment
Hide comment
@Burnsoft

Burnsoft Sep 15, 2011

i found that when I was initially editing the ymf config file I didn't have a space after the ':' this fixes the parsing error

fails:
twitter_user:nikburns
ok:
twitter_user: nikburns

Burnsoft commented Sep 15, 2011

i found that when I was initially editing the ymf config file I didn't have a space after the ':' this fixes the parsing error

fails:
twitter_user:nikburns
ok:
twitter_user: nikburns

@zzaman

This comment has been minimized.

Show comment
Hide comment
@zzaman

zzaman Nov 15, 2011

Thanks @Burnsoft! I ran into the same issue, followed your advice and it works now!

zzaman commented Nov 15, 2011

Thanks @Burnsoft! I ran into the same issue, followed your advice and it works now!

@DrayChou

This comment has been minimized.

Show comment
Hide comment
@DrayChou

DrayChou Feb 6, 2012

Thanks @Burnsoft ,I 'm too

DrayChou commented Feb 6, 2012

Thanks @Burnsoft ,I 'm too

@andrewmichaelsmith

This comment has been minimized.

Show comment
Hide comment
@andrewmichaelsmith

andrewmichaelsmith Mar 12, 2012

Thanks @Burnsoft that did the trick for me, too!

andrewmichaelsmith commented Mar 12, 2012

Thanks @Burnsoft that did the trick for me, too!

@hfcc8685

This comment has been minimized.

Show comment
Hide comment
@hfcc8685

hfcc8685 commented Mar 18, 2012

Thanks @Burnsoft

@hsilvest

This comment has been minimized.

Show comment
Hide comment
@hsilvest

hsilvest Apr 8, 2012

Thanks @Burnsoft, i had the same issue

hsilvest commented Apr 8, 2012

Thanks @Burnsoft, i had the same issue

@Giiome

This comment has been minimized.

Show comment
Hide comment
@Giiome

Giiome Apr 20, 2012

i've gote the same issue with author: in the _config.yml file.
i put an @ like this :

author: @Myname

without the @, it's ok.

Giiome commented Apr 20, 2012

i've gote the same issue with author: in the _config.yml file.
i put an @ like this :

author: @Myname

without the @, it's ok.

@iloveayu

This comment has been minimized.

Show comment
Hide comment
@iloveayu

iloveayu May 20, 2012

Thank you @Burnsoft ! That's the point! Everything works now. (^O^)/

iloveayu commented May 20, 2012

Thank you @Burnsoft ! That's the point! Everything works now. (^O^)/

skychan pushed a commit to skychan/octopress that referenced this issue Jan 26, 2016

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