cboettig / labnotebook

:notebook: Source code and version history for my online lab notebook
http://www.carlboettiger.info
Creative Commons Zero v1.0 Universal
98 stars 61 forks source link

list of gems with version used to compile notebook? #108

Closed antass closed 11 years ago

antass commented 11 years ago

I have decided to revisit my issue with building the notebook with jekyll on my new Mac system. Currently I am facing a similar problem I had in Ubuntu:

Configuration file: /Users/antass/GitHub/labnotebook/_config.yml
/Users/antass/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/site_ruby/2.0.0/rubygems/specification.rb:1988:in `raise_if_conflicts': Unable to activate crack-0.4.1, because safe_yaml-0.7.1 conflicts with safe_yaml (~> 0.9.0) (Gem::LoadError)

I think it would be very helpful if you could post a list of gems you have installed on your system - I could try to install all appropriate gem versions and see if that resolves this issue.

I am not ready to give up! Thanks in advance :)

antass commented 11 years ago

I reverted to an older version of crack (0.3.2), which did not complain when I removed the conflicting safe_yaml 0.9.0 gem. I also installed an older version of ruby: 1.9.3, which is what I had on my Ubuntu when everything worked.

I also fetched all recent changes from the repo, which solved my authentication problem (missing quotes when calling the credentials).

Now the compilation gets stuck on applying the html5 template. I get this error:

Liquid Exception: no time information in " " in html5.html /Users/antass/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/time.rb:267:in parse': no time information in " " (ArgumentError)

Full (but truncated) output:

antass@server:~/GitHub/labnotebook$ jekyll serve --trace Configuration file: /Users/antass/GitHub/labnotebook/_config.yml WARNING: Nokogiri was built against LibXML version 2.8.0, but has dynamically loaded 2.7.8 loaded config Source: /Users/antass/GitHub/labnotebook Destination: /Users/antass/GitHub/labnotebook/_site Generating... Generating page path metadata with base_name.rb Storing raw md versions as post metadata with raw_content.rb Getting Google Analytics data Garb authenticating for anna.krentowicz Liquid Exception: no time information in " " in html5.html /Users/antass/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/time.rb:267:in parse': no time information in " " (ArgumentError) from /Users/antass/.rvm/gems/ruby-1.9.3-p448/gems/jekyll-1.0.3/lib/jekyll/filters.rb:157:intime' from /Users/antass/.rvm/gems/ruby-1.9.3-p448/gems/jekyll-1.0.3/lib/jekyll/filters.rb:56:in date_to_xmlschema' from /Users/antass/.rvm/gems/ruby-1.9.3-p448/gems/liquid-2.5.2/lib/liquid/strainer.rb:43:ininvoke' from /Users/antass/.rvm/gems/ruby-1.9.3-p448/gems/liquid-2.5.2/lib/liquid/context.rb:82:in invoke' from /Users/antass/.rvm/gems/ruby-1.9.3-p448/gems/liquid-2.5.2/lib/liquid/variable.rb:102:inblock in render'

If I rename temporarily the html5.html file, everything compiles, but obviously the page has no CSS formatting. Any ideas what could be the cause for the time issue in html5 layout?

Thanks Carl! Your work on the notebook is greatly appreciated!

cboettig commented 11 years ago

You can find a list of gems in the Gemfile. If you have bundler installed, you can use bundle install in the repo's base directory and it will install those files listed in the Gemfile. As I have not deployed on a new machine recently though, I'm not 100% sure that gemfile is up to date...) Anyway, glad you got the gems working on your own.

The html5.html layout pulls in the header template from _includes/head.html, which has a metadata section in _includes/metadata.html. Several of those lines pull in date information from the git commit log using my various plugins -- from your error it looks like one of those is failing to get a date, causing the compiler to panic.

For now, you might just want to delete the {% include metadata.html %} line inside _includes/head.html.

You'll want to edit that anyway since it includes some metadata specific to me (I've tried to have most of metadata pulled in from the _config.yaml, but not all of it.

antass commented 11 years ago

Hi Carl. Thanks for such a quick response!

Deleting {% include metadata.html %} did not work unfortunately :( I committed all my changes to make sure that there was a commit date for all pages, but that didn't help either. I am still getting the same error.

Also, the Gemfile doesn't include versions.

cboettig commented 11 years ago

Wierd. But renaming _layouts/html5.html does work? Nothing else in that file really does anything interesting (or anything involving dates for sure...) Dates are also added to the sidebar (_includes/sidebar.html) .

You might be better off starting with a clean template (e.g. Jekyll bootstrap, twitter bootstrap css) and then just adding elements from my repo as you need them (or seeing how I implemented such-and-such). My additions and modifications are really just personalizations of those more fromal platforms and never intended to work whole-cloth.

antass commented 11 years ago

Yes, if I rename _layouts/html5.html to _layout/html5.html.backup it will compile, but the website will not be formatted properly.

I wouldn't bother you with this have I not had it working before. The problem is that I know it should work, but doesn't since moving from Ubuntu to Mac.

Anyway, I'll play around with this more, and if nothing works, I'll take your suggestion and start from scratch. Thanks!

antass commented 11 years ago

Ok, so I didn't realize that commenting out the metadata.html line wouldn't be enough, but it turns out only after actually deleting the line did it compile properly. Issue solved.

cboettig commented 11 years ago

Yup, HTML comments are still parsed. Liquid has it's own commenting syntax, {% comment %} . glad things are working for you.