yaml.h is missing on ruhoh 2.2 #203

Closed
victorwoo opened this Issue Aug 18, 2013 · 16 comments

Projects

None yet

4 participants

@victorwoo

I've read #54 and update every component to the newest (aug.17.2013), but still missing "yaml.h" in ruby 2.0.0p247 + gem 2.0.3 + ruhoh 2.2

D:\blog>ruby -v
ruby 2.0.0p247 (2013-06-27) [i386-mingw32]
D:\blog>gem -v
2.0.3

D:\blog>gem install ruhoh
Successfully installed ruhoh-2.2
Parsing documentation for ruhoh-2.2
1 gem installed

D:\blog>bundle install
Fetching gem metadata from https://rubygems.org/..........
Fetching gem metadata from https://rubygems.org/..
Resolving dependencies...
Using directory_watcher (1.4.1)
Using mini_portile (0.5.1)
Using mustache (0.99.4)
Using nokogiri (1.6.0)
Installing psych (1.3.4)
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension
.

C:/ruby-2.0.0-p247-i386-mingw32/bin/ruby.exe extconf.rb

checking for yaml.h... no
yaml.h is missing. Try 'port install libyaml +universal' or 'yum install libyaml
-devel'

@victorwoo

Excuse me, is there any on concern about this?

@plusjade
Member

@victorwoo sorry I didn't comment, but I have no easy way to test on Windows systems. Historically, ruby has always been a huge pain in the ass to install on Windows. It's even true it is painful to install on OSX, just less so.

Sorry I cannot be of any more help. I'm hoping others will eventually see this. Also (though I know this doesn't help you) it's why the long-long-term goal of ruhoh is to be language-agnostic and ported to other languages.

@plusjade
Member

Oh, one another thing, I truly would love to remove the yaml dependency and switch everything to JSON. YAML fails for me to this day on my systems as well. The reason yaml is still used is because of ruhoh's roots in jekyll.

I can't just remove yaml from ruhoh without releasing a major version so perhaps a quick fix would be if i forked the project, removed yaml depdencies and switch to JSON. Would you be interested in that solution?

@victorwoo

Any information need I provide to help debugging this problem?

@Stebalien
Contributor

You need to install libyaml. I don't know if this tutorial is any good but you could try it: https://github.com/masnick/beautify-gem/wiki/Installing-psych-on-Windows
Nevermind. Already mentioned in the other thread.

@victorwoo

@Stebalien yes I've installed libyaml. And it still doesn't work.
Since @plusjade said to remove YAML dependency, it's a good news to move on. Glad to hear that, time to stop painful wainting 👍

@wzpan
wzpan commented Aug 28, 2013

I used to try setup ruhoh on Windows. Failed. Then I gave up.

OT:

it's why the long-long-term goal of ruhoh is to be language-agnostic and ported to other languages.

Good point. I hope one day when I need to quickly write a post(even without my PC) I needn't have to spend too much time to prepare all the stuff. An online editor like wordpress maybe cute. Another interesting application is scriptogr.am, which allows users to write a markdown file on dropbox then the service will render it after sync.

@plusjade
Member

@wzpan that's what post.ruhoh.com was for; hosted service where a user didn't necessarily need to run anything on their computer. However the project was growing too wide, not enough attention to any one core thing. It's not a good way to build a user base. So now, even though I'm super slow at everything, I have more focus on slowly making the core value-offering good enough to where (ideally) users will be empowered to build the richer user experience services.

Slowly...very slowly.. haha.

Just curious, why do you stick with ruhoh? Your honest answer will help me understand where the focus should stay, because as you say... scriptogram, jekyll, octopress, tumblr, middleman, prose.io, pelican -- so many options!

@victorwoo

@plusjade I think we stick with ruhoh because you are the author of jekyll and wish your works may lead to the future.

@wzpan
wzpan commented Aug 28, 2013

Hi @plusjade ,

Just curious, why do you stick with ruhoh? Your honest answer will help me understand where the focus should stay, because as you say... scriptogram, jekyll, octopress, tumblr, middleman, prose.io, pelican -- so many options!

It's just my first static blog generator. Honestly speaking I'm in favor of jekyll and pelican, too. And I don't refuse to give other systems a try.

But ruhoh is young, and promising, with a hard working group struggling to make it fly. That's why I'm still using it for now.

@plusjade
Member

@wzpan good to know, and for sure, I understand =). Even I don't use ruhoh as much as I should! But then again, it has a lot to do with the whole "developers are obsessed with the tools more than the product" nonsense =p.

@plusjade
Member

@victorwoo I hacked out a JSON branch for you. Please see if you can install it:

# Gemfile

source "https://rubygems.org"
gem 'ruhoh', git: "git@github.com:ruhoh/ruhoh.rb.git", branch: "json"

$ bundle install

This should give you ruhoh v2.3.1 @ https://github.com/ruhoh/ruhoh.rb/tree/json

Please verify that you can, at minimum, install the gem and possibly play with the commands:

$ bundle exec ruhoh --version
$ bundle exec ruhoh console
$ > ruhoh.config

Note that you still may not be able to run the blog scaffold because it has yaml files. (yaml should still be supported but seems that you don't have the library).

If you want to try to get a blog running you can:

  1. convert config.yml -> config.json
  2. convert data.yml -> data.json
  3. convert all top yaml meta-data headers in the pages.

Old top yaml metatdata:

---
title: "blah"
description: "hello"
---

# some text

New json metadata format:

{
  "title" : "blah",
  "description" : "hello"
}

# some text

The opening bracket { must be on the very first line at the first character position

To convert from YAML to JSON you can use : http://yaml-online-parser.appspot.com/

Please let me know if it works!

@victorwoo

$ bundle install is successful
What's next? The official site's $ bundle exec rackup -p 9292 reports:

configuration D:/Dropbox/vichamp/ruhoh.rb/config.ru not found
@plusjade
Member

You have to execute the command within you blog directory right now you are
in the ruhoh gem directory.
On Aug 30, 2013 12:32 AM, "victorwoo" notifications@github.com wrote:

$ bundle install is successful
What's next? The official site's $ bundle exec rackup -p 9292 reports:

configuration D:/Dropbox/vichamp/ruhoh.rb/config.ru not found


Reply to this email directly or view it on GitHubhttps://github.com/ruhoh/ruhoh.rb/issues/203#issuecomment-23544936
.

@victorwoo

There is README.md, bin, lib, etc., in ruhoh.rb. Is it the right directory?

D:\Dropbox\vichamp\ruhoh.rb>bundle exec rackup -p 9292
configuration D:/Dropbox/vichamp/ruhoh.rb/config.ru not found
@plusjade
Member

Ruhoh v2.4 omits psych and yaml dependency. If you can't get yaml parsing to work (natively) please use JSON.

e.g. config.json, data.json and JSON in the file Top Metadata

Top Metadata JSON example:

{
    "title": "Hello World!",
    "layout": "hi",
    "tags": [
        "one",
        "two",
        "three"
    ]
}

... file contents go here ...
@plusjade plusjade closed this Sep 18, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment