ruhoh / ruhoh.rb

http://ruhoh.com
616 stars 69 forks source link

Publish to github pages can't use CNAME file #275

Open jonphipps opened 10 years ago

jonphipps commented 10 years ago

According to the instructions here: http://ruhoh.com/docs/2/publish/#toc_11 In order to use a CNAME file with gh-pages you put it in a _root folder in the master branch. Doing this cause the following failure (using ruhoh 2.6 and the this gist: https://gist.github.com/jaimalchohan/8090954):

ruhoh publish github
Using theme: "theme-bootstrap-2"
Deploying to GitHub Pages.
(Settings based on origin remote name: git@github.com:RDARegistry/www.rdaregistry.info.git)
      Type: Project page.
    Source: 'master' branch.
  Compiled: 'gh-pages' branch.
Using theme: "theme-bootstrap-2"
base_path set to: /www.example.info/ for GitHub project page support
Compiling for environment: ''
Javascripts: directory not found - skipping.
Stylesheets: (copying valid files)
  > bootstrap.min.css
  > google_prettify/default.css
  > google_prettify/desert.css
  > google_prettify/sons-of-obsidian.css
  > google_prettify/sunburst.css
  > google_prettify/twitter-bootstrap.css
  > style.css
Widgets: (copying valid files)
  > syntax/javascripts/prettify.js
/Users/me/.rvm/gems/ruby-2.1.0/gems/ruhoh-2.6/lib/ruhoh/resources/pages/collection_view.rb:15:in `sort': comparison of Ruhoh::Resources::Pages::ModelView with Ruhoh::Resources::Pages::ModelView failed (ArgumentError)
    from /Users/me/.rvm/gems/ruby-2.1.0/gems/ruhoh-2.6/lib/ruhoh/resources/pages/collection_view.rb:15:in `all'
    from /Users/me/.rvm/gems/ruby-2.1.0/gems/ruhoh-2.6/lib/ruhoh/resources/pages/compiler.rb:7:in `run'
    from /Users/me/.rvm/gems/ruby-2.1.0/gems/ruhoh-2.6/lib/ruhoh.rb:156:in `block in compile'
    from /Users/me/.rvm/gems/ruby-2.1.0/gems/ruhoh-2.6/lib/ruhoh.rb:153:in `each'
    from /Users/me/.rvm/gems/ruby-2.1.0/gems/ruhoh-2.6/lib/ruhoh.rb:153:in `compile'
    from /Users/me/sites/testing/www/ruhoh-site/plugins/github.rb:57:in `compile'
    from /Users/me/sites/testing/www/ruhoh-site/plugins/github.rb:32:in `run'
    from /Users/me/.rvm/gems/ruby-2.1.0/gems/ruhoh-2.6/lib/ruhoh/client.rb:138:in `publish'
    from /Users/me/.rvm/gems/ruby-2.1.0/gems/ruhoh-2.6/lib/ruhoh/client.rb:45:in `initialize'
    from /Users/me/.rvm/gems/ruby-2.1.0/gems/ruhoh-2.6/bin/ruhoh:41:in `new'
    from /Users/me/.rvm/gems/ruby-2.1.0/gems/ruhoh-2.6/bin/ruhoh:41:in `<top (required)>'
    from /Users/me/.rvm/gems/ruby-2.1.0/bin/ruhoh:23:in `load'
    from /Users/me/.rvm/gems/ruby-2.1.0/bin/ruhoh:23:in `<main>'
    from /Users/me/.rvm/gems/ruby-2.1.0/bin/ruby_executable_hooks:15:in `eval'
    from /Users/me/.rvm/gems/ruby-2.1.0/bin/ruby_executable_hooks:15:in `<main>'

Removing the CNAME file from _root clears that error.

shime commented 10 years ago

If you're still struggling with this, take a look at this simple workaround.

autoferrit commented 10 years ago

That workaround works for me, but I think ideally, it would be nice just to place this file in the _root directory and have ruhoh recognize it.