How do I tell Jekyll/Maruku which post has the Markdown syntax error? - jekyll

How do I tell Jekyll/Maruku to tell me which file has my Mardown syntax error?
The build warning only tells me so much:
$ jekyll --safe
Configuration from /homne/me/_config.yml
Building site: /homne/me -> /homne/me/_site
___________________________________________________________________________
| Maruku tells you:
+---------------------------------------------------------------------------
| Could not find ref_id = "md_entityhellip" for md_link([md_entity("hellip")],"md_entityhellip")
| Available refs are ["png", "2", "3", "4", "5", "6"]
+---------------------------------------------------------------------------
!/home/eoin/.rvm/gems/ruby-1.9.3-p385/gems/maruku-0.6.1/lib/maruku/errors_management.rb:49:in `maruku_error'
!/home/eoin/.rvm/gems/ruby-1.9.3-p385/gems/maruku-0.6.1/lib/maruku/output/to_html.rb:716:in `to_html_link'
!/home/eoin/.rvm/gems/ruby-1.9.3-p385/gems/maruku-0.6.1/lib/maruku/output/to_html.rb:970:in `block in array_to_html'
!/home/eoin/.rvm/gems/ruby-1.9.3-p385/gems/maruku-0.6.1/lib/maruku/output/to_html.rb:961:in `each'
!/home/eoin/.rvm/gems/ruby-1.9.3-p385/gems/maruku-0.6.1/lib/maruku/output/to_html.rb:961:in `array_to_html'
\___________________________________________________________________________
Not creating a link for ref_id = "md_entityhellip".Successfully generated site: /homne/me -> /homne/me/_site

The next version of Jekyll will have better error reporting with MaRuKu and include the path to the file that caused the error.
The current master branch on GitHub should be stable enough that you could use it for testing purposes. Feedback would be welcome if you do decide to test it out. Thanks!

Related

Jekyll, Liquid: using `default: "...", allow_false: true` throws an error

In Jekyll I'm trying to use the default filter, but allowing it to be false. In the documentation it says you can use the allow_false: true parameter. However, when I use this, the Jekyll output shows and error:
Liquid error (.../_includes/room_header.html line 7): wrong number of arguments (given 3, expected 1..2) included (Liquid::ArgumentError)
That line is:
{% assign showNameToggle = include.showNameToggle | default: true, allow_false: true %}
I tried the (almost) exact line from the documentation, but same error:
{{ include.name | default: "No Name", allow_false: true }}
Why does this happen?
Thanks!
The commit you're referring to has not been released yet.
It was committed on Oct 8, 2019.
The latest version was released on March 12, 2019.
To use unreleased code, you can point your Gemfile to the repository:
# Gemfile
# Use code from the default branch (`master`) of the GitHub repository
gem 'liquid', github: 'Shopify/liquid'
CAUTION! Use unreleased code at your own risk. It is generally unstable and may result in unexpected results.

I'm gettng a error while sending a JSON string using ansible

Here i want to send a json string to a url . please check my syntax and let me know whats the problem in my code.
ansiblejson.yml
hosts:localhost
sudo:yes
tasks
- name:send jenkins-jobs
uri
url:"i gave URL here"
method:PUT
return_content:yes
body:-"{{'Name:sai','Node:node number','EventId:123'}}"
status_code:204
body_format:json
Here is the error iam getting
The error appears to be have in "c:/ansiblejson.yml" line 4, column 8, but may be elsewhere in the file depending on the exact syntax problem.
The offending line appears to be :
sudo:yes
tasks:
^ here
First of all, please fix the code formatting.
Don't use backspace only whitespace, because of YAML.
Ansible is telling you everything that you need to know, you forgot an semicolon after the tasks section:
hosts: localhost
sudo: yes
tasks:
- name:send jenkins-jobs
Also, from Ansible 2.2, you should use not sudo: yes, but become: yes, and then what user that you want to become; root, sudo etc...

How to add the SwingLibrary plugin to RobotFramework?

I'm trying to execute the SwingLibrary demo available in https://github.com/robotframework/SwingLibrary/wiki/SwingLibrary-Demo
After setting everything up (Jython, RobotFramework, demo app), I can run the following command:
run_demo.py startapp
, and it works (the demo app starts up).
Now if I try to run the sample tests, it fails:
run_demo.py example.txt
[ ERROR ] Error in file '/home/user1/python-scripts/gui_automation/sample-text.txt': Non-existing setting 'Library SwingLibrary'.
[ ERROR ] Error in file '/home/user1/python-scripts/gui_automation/sample-text.txt': Non-existing setting 'Suite Setup Start Test Application'.
==============================================================================
Sample-Text
==============================================================================
Test Add Todo Item | FAIL |
No keyword with name 'Insert Into Text Field description ${arg}' found.
------------------------------------------------------------------------------
Test Delete Todo Item | FAIL |
No keyword with name 'Insert Into Text Field description ${arg}' found.
------------------------------------------------------------------------------
Sample-Text | FAIL |
2 critical tests, 0 passed, 2 failed
2 tests total, 0 passed, 2 failed
==============================================================================
Output: /home/user1/python-scripts/gui_automation/results/output.xml
Log: /home/user1/python-scripts/gui_automation/results/log.html
Report: /home/user1/python-scripts/gui_automation/results/report.html
I suspect that it cannot find swinglibrary.jar, and therefore my plugin installation is probably messed up.
Any ideas?
Take a look at these error messages in the report:
[ ERROR ] Error in file '...': Non-existing setting 'Library SwingLibrary'.
[ ERROR ] Error in file '...': Non-existing setting 'Suite Setup Start Test Application'.
The first rule of debugging is to always assume error messages are telling you the literal truth.
They are telling you that you have an unknown setting. It thinks you are using a setting literally named "Library SwingLibrary" and one named "Suite Setup Start Test". Those are obviously incorrect setting names. The question is, why is it saying that?
My guess is that you are using the space-separated text format, and you only have a single space between "Library" and "SwingLibrary". Because there is one space, robot thinks that whole line is in the first column of the settings table, and whatever is in the first column is treated as the setting name.
The fix should be as simple as inserting two or more spaces after "Library", and two or more spaces after "Suite Setup".
This type of error is why I always recommend using the pipe-separated format. It makes the boundaries between cells much easier to see.

Cmake compiler "not found" warnings, cause for concern? (MySQL)

Can I safely ignore these cmake compiler warnings?
I'm learning to compile packages from source and practicing on MySQL.
Should I be searching for and installing dev libraries when I see "notices" like this (referencing specific "not found" files):
$ cmake . -LA
...
-- Looking for include file cxxabi.h
-- Looking for include file cxxabi.h - not found.
-- Looking for include file dirent.h
-- Looking for include file dirent.h - found
-- Looking for include file dlfcn.h
-- Looking for include file dlfcn.h - found
And what should I do about notices referencing these "not found" messages:
-- Looking for bmove
-- Looking for bmove - not found
-- Looking for bsearch
-- Looking for bsearch - found
-- Looking for index
-- Looking for index - found
For example, cxxabi.h can be found in libstdc++6-4.7-dev on Debian. Do I need to install libstdc++6-4.7-dev to have a proper compile of MySQL?
I also have some (constant?) warnings that I'm unsure of:
-- Performing Test TIME_T_UNSIGNED
-- Performing Test TIME_T_UNSIGNED - Failed
-- Performing Test HAVE_GETADDRINFO
-- Performing Test HAVE_GETADDRINFO - Success
Overall, my build seems to work good, but I want to be sure.
If CMake configuration process doesn't fail, it means these headers are optional and there are workarounds in the MySQL code for these cases.
It might be also, that when some headers aren't present some features are silently turned off. It make sense to provide MySQL as many optional headers as you can.
Beware that some headers are OS-specific, so you can't and don't have to provide them.

Octopress can't build with Code Block

I try to do something like this Octopress code block
But I can't make it work.
It always shows the following error. My machine is Windows 7.
$ rake generate
## Generating Site with Jekyll
unchanged sass/screen.scss
Configuration from d:/MyProject/Git/octopress/_config.yml
Building site: source -> public
Liquid Exception: No such file or directory - python c:/Ruby193/lib/ruby/gems/1.
9.1/gems/pygments.rb-0.3.7/lib/pygments/mentos.py in 2013-01-06-octopress.markdo
wn
c:/Ruby193/lib/ruby/gems/1.9.1/gems/posix-spawn-0.3.6/lib/posix/spawn.rb:162:in
`spawn'
c:/Ruby193/lib/ruby/gems/1.9.1/gems/posix-spawn-0.3.6/lib/posix/spawn.rb:162:in
`spawn'
c:/Ruby193/lib/ruby/gems/1.9.1/gems/posix-spawn-0.3.6/lib/posix/spawn.rb:307:in
`popen4'
c:/Ruby193/lib/ruby/gems/1.9.1/gems/pygments.rb-0.3.7/lib/pygments/popen.rb:41:i
n `start'
c:/Ruby193/lib/ruby/gems/1.9.1/gems/pygments.rb-0.3.7/lib/pygments/popen.rb:203:
in `mentos'
c:/Ruby193/lib/ruby/gems/1.9.1/gems/pygments.rb-0.3.7/lib/pygments/popen.rb:192:
in `highlight'
d:/MyProject/Git/octopress/plugins/pygments_code.rb:24:in `pygments'
d:/MyProject/Git/octopress/plugins/pygments_code.rb:14:in `highlight'
d:/MyProject/Git/octopress/plugins/code_block.rb:82:in `render'
c:/Ruby193/lib/ruby/gems/1.9.1/gems/liquid-2.3.0/lib/liquid/block.rb:94:in `bloc
k in render_all'
c:/Ruby193/lib/ruby/gems/1.9.1/gems/liquid-2.3.0/lib/liquid/block.rb:92:in `coll
ect'
c:/Ruby193/lib/ruby/gems/1.9.1/gems/liquid-2.3.0/lib/liquid/block.rb:92:in `rend
er_all'
c:/Ruby193/lib/ruby/gems/1.9.1/gems/liquid-2.3.0/lib/liquid/block.rb:82:in `rend
er'
c:/Ruby193/lib/ruby/gems/1.9.1/gems/liquid-2.3.0/lib/liquid/template.rb:124:in `
render'
c:/Ruby193/lib/ruby/gems/1.9.1/gems/liquid-2.3.0/lib/liquid/template.rb:132:in `
render!'
c:/Ruby193/lib/ruby/gems/1.9.1/gems/jekyll-0.12.0/lib/jekyll/convertible.rb:79:i
n `do_layout'
d:/MyProject/Git/octopress/plugins/post_filters.rb:167:in `do_layout'
c:/Ruby193/lib/ruby/gems/1.9.1/gems/jekyll-0.12.0/lib/jekyll/post.rb:195:in `ren
der'
c:/Ruby193/lib/ruby/gems/1.9.1/gems/jekyll-0.12.0/lib/jekyll/site.rb:200:in `blo
ck in render'
c:/Ruby193/lib/ruby/gems/1.9.1/gems/jekyll-0.12.0/lib/jekyll/site.rb:199:in `eac
h'
c:/Ruby193/lib/ruby/gems/1.9.1/gems/jekyll-0.12.0/lib/jekyll/site.rb:199:in `ren
der'
c:/Ruby193/lib/ruby/gems/1.9.1/gems/jekyll-0.12.0/lib/jekyll/site.rb:41:in `proc
ess'
c:/Ruby193/lib/ruby/gems/1.9.1/gems/jekyll-0.12.0/bin/jekyll:264:in `<top (requi
red)>'
c:/Ruby193/bin/jekyll:23:in `load'
c:/Ruby193/bin/jekyll:23:in `<main>'
Build Failed
Without code block, it works fine. I have installed python 2.73 and 3.3 for windows but not luck.
I have tried pygments 0.3.7 and rubypython 0.6.3 as well. It doesn't work.
The funny thing is I google hours and hours,and I don't see anyone else have the same problem.
I must miss something very simple.
I finally fixed the problem. It turns out the PATH for Python wasn't set correctly.
It seems like Python doesn't set up the path automatically.
All I have to do is to add the path.