Ruby shows an error message "Undefined method `name'" when I try to generate...
Status: Beta
Brought to you by:
worden
My system gives the following message:
Andreis-iMac:github-pages-sandbox andrei$ jekyll build Configuration file: /Users/andrei/GitHub/github-pages-sandbox/_config.yml Source: /Users/andrei/GitHub/github-pages-sandbox Destination: /Users/andrei/GitHub/github-pages-sandbox/_site Incremental build: disabled. Enable with --incremental Generating... jekyll 3.1.6 | Error: undefined method `name' for #<Jekyll::Document:0x007ffd652a0a70>
More precisely, it does not like the following piece of code:
site.posts.docs.each do |post| if post.name.match(/\.wmd$/) convertPost post end end
it's the lines No. 69-73 in wmd.rb of https://sourceforge.net/p/workingwiki/code/HEAD/tree/trunk/wmd/
Anonymous
PS: I changed posts.each to posts.docs.each since it was required by my version of Ruby
I can substitute post.name.match with post.basename.match, so that
Then I would need to use basename instead of name in convertPost-function below. But then I get another error
Also, I've got another depreciation
PS: I assume it's mainly b/c of a newer version of jekyll
I've been using it with Jekyll 2.5.3. I need to update.
Or actually I think I have it running with a more recent version of jekyll on our server at UCSF, but I don't have access to that today. Working on upgrading on ubuntu 14.04 (my laptop).
update: I have figured out how to install ruby-2.3.1 on ubuntu 14.04 and updated the installation instructions. It looks like it's generating the same error messages that you reported.
Am working on this error:
If read_directories is no longer there, I need to call something else to get it to include all project files that have been generated while processing into the jekyll site. That's never been a very good way of doing it anyway, because it gets out of sync when multiple pages alter the same project directory. I need to browse the new jekyll code and see how it scans directories for files.
All Ruby errors and deprecations seem to be fixed, but it looks like either Jekyll's internals have changed in some way or I've introduced a bug that stops it from doing the markdown processing correctly - though the WMD pre- and post-processing are fine - I'm working on it
wmd.rb looks to be running correctly on the github demo site. The demo site needs some updating, as the Sage libraries need a different installation procedure now. Also I want to test wmd.rb on a site that uses pages as well as posts.
OK. Seems to be good now. Now in the latest SVN trunk commit. I need to update the documentation and upload a new .tar.gz.
Closing. Ruby code updated, demo website updated, instructions updated, new tar file uploaded to source forge.
(though it looks like the mathml on the demo site might be a little off)