Unable to run jekyll - github

I use Github pages to host my websites,I have test it on my local machine, and it works well, but when I push my sites on Github, I got an error. It says
The page build failed with the following error:
unable to run jekyll
My _config.yml file
---
auto : false
lsi : false
pygments : true
permalink : none
markdown : maruku
maruku:
use_divs: true
use_tex: true
png_engine : blahtex
png_dir : images/latex/
png_url : /images/latex/
I have searched the web, but can't find any useful ideas. Who can help me?
I have resorted to Github, they sent me the log, here is the error:
Maruku: Using extended syntax for div elements.\nMaruku: Using LaTeX extension. Images in images/latex/.\n/var/lib/gems/1.8/gems/maruku-0.6.0/lib/maruku/ext/math/mathml_engines/blahtex.rb:40:in convert_to_png_blahtex': Blahtex error: empty output (RuntimeError)\n\tfrom /var/lib/gems/1.8/gems/maruku-0.6.0/lib/maruku/ext/math/to_html.rb:64:in send'\n\tfrom /var/lib/gems/1.8/gems/maruku-0.6.0/lib/maruku/ext/math/to_html.rb:64:in render_png'\n\tfrom /var/lib/gems/1.8/gems/maruku-0.6.0/lib/maruku/ext/math/to_html.rb:120:in to_html_equation'\n\tfrom /var/lib/gems/1.8/gems/maruku-0.6.0/lib/maruku/output/to_html.rb:970:in send'\n\tfrom /var/lib/gems/1.8/gems/maruku-0.6.0/lib/maruku/output/to_html.rb:970:in array_to_html'\n\tfrom /var/lib/gems/1.8/gems/maruku-0.6.0/lib/maruku/output/to_html.rb:961:in each'\n\tfrom /var/lib/gems/1.8/gems/maruku-0.6.0/lib/maruku/output/to_html.rb:961:in array_to_html'\n\tfrom /var/lib/gems/1.8/gems/maruku-0.6.0/lib/maruku/output/to_html.rb:956:in children_to_html'\n\tfrom /var/lib/gems/1.8/gems/maruku-0.6.0/lib/maruku/output/to_html.rb:50:in to_html'\n\tfrom /var/lib/gems/1.8/gems/jekyll-0.11.0/bin/../lib/jekyll/converters/markdown.rb:120:in convert'\n\tfrom /var/lib/gems/1.8/gems/jekyll-0.11.0/bin/../lib/jekyll/convertible.rb:46:in transform'\n\tfrom /var/lib/gems/1.8/gems/jekyll-0.11.0/bin/../lib/jekyll/convertible.rb:84:in do_layout'\n\tfrom /var/lib/gems/1.8/gems/jekyll-0.11.0/bin/../lib/jekyll/post.rb:189:in render'\n\tfrom /var/lib/gems/1.8/gems/jekyll-0.11.0/bin/../lib/jekyll/site.rb:193:in render'\n\tfrom /var/lib/gems/1.8/gems/jekyll-0.11.0/bin/../lib/jekyll/site.rb:192:in each'\n\tfrom /var/lib/gems/1.8/gems/jekyll-0.11.0/bin/../lib/jekyll/site.rb:192:in render'\n\tfrom /var/lib/gems/1.8/gems/jekyll-0.11.0/bin/../lib/jekyll/site.rb:40:in process'\n\tfrom /var/lib/gems/1.8/gems/jekyll-0.11.0/bin/jekyll:250\n\tfrom /var/lib/gems/1.8/bin/jekyll:19:in `load'\n\tfrom /var/lib/gems/1.8/bin/jekyll:19\n"
From the log, We can see the problem is `convert_to_png_blahtex': Blahtex error: empty output (RuntimeError). I read the blahtex code,
if png.name != 'png'
maruku_error "Blahtex error: \n#{doc}"
return nil
end
But, png files are there. Anyone has encountered this problem?

I'm not sure the _config.yml file is the problem. I've pushed an invalid one to my site and the pages still render fine. That said, try removing your _config.yml all together. Github pages work fine without it for me. If the page still fails to render, you know it's something else.

Don't use maruku
maruku hasnt had an update since June 2010.
Personally I prefer kramdown.

Related

How can I let Hugo detect theme?

I am trying out a Hugo theme and what happened was when I used the command hugo server, I see the following error message.
Building sites … WARN 2020/07/20 14:33:07 Page.URL is deprecated and will be removed in a future release. Use .Permalink or .RelPermalink. If what you want is the front matter URL value, use .Params.url
ERROR 2020/07/20 14:33:07 render of "taxonomy" failed: "D:\Hugo\bin\my_conf\themes\devfest-theme-hugo\layouts\_default\baseof.html:7:3": execute of template failed: template: taxonomy/list.html:7:3: executing "taxonomy/list.html" at <readFile "static/icons.svg">: error calling readFile: file "static\\icons.svg" does not exist
ERROR 2020/07/20 14:33:07 render of "home" failed: "D:\Hugo\bin\my_conf\themes\devfest-theme-hugo\layouts\_default\baseof.html:7:3": execute of template failed: template: index.html:7:3: executing "index.html" at <readFile "static/icons.svg">: error calling readFile: file "static\\icons.svg" does not exist
Built in 100 ms
Error: Error building site: failed to render pages: render of "taxonomy" failed: "D:\Hugo\bin\my_conf\themes\devfest-theme-hugo\layouts\_default\baseof.html:7:3": execute of template failed: template: taxonomy/list.html:7:3: executing "taxonomy/list.html" at <readFile "static/icons.svg">: error calling readFile: file "static\\icons.svg" does not exist
It seems saying that I misplaced some of the template files. I wonder if I have installed the theme correctly, or something I misunderstood?
What I have Done
Installed hugo and confirmed it is installed.
Created a new site called my-conf (Just trying out) and the themes directory.
I've cloned the repository into my themes directory. I am using GitHub Desktop on Windows.
Added the theme information using theme = "devfest-theme-hugo".
Used the command hugo server.
Ideally, you would add the themes as a submodule, as in the documentation, and the theme page itself:
hugo new site my-conf
cd my-conf
mkdir themes
git submodule add https://github.com/GDGToulouse/devfest-theme-hugo.git themes/devfest-theme-hugo
And add it to your configuration (which you seem to have done):
echo 'theme = "ananke"' >> config.toml
Then, regarding readFile:
To use the readFile function in your templates, make sure the path is relative to your Hugo project’s root directory:
{{ readFile "/content/templates/local-file-templates" }}
In the template: layouts/_default/baseof.html seems to have the right path.
Yet, looking at the history of GDGToulouse/devfest-theme-hugo/layouts/_default/baseof.html, I see it has changed during a commit "WIP 2020".
The version before that commit included:
{{ readFile "themes/devfest-theme-hugo/static/icons.svg" | safeHTML }}
Which, from the discussion, seems to work better!

How to add Babel support for nullishCoalescingOperator to vue project?

In my Vue-CLI project, when I tried using the ?? operator, I got this error:
Syntax Error: SyntaxError: /Users/stevebennett/odev/freelancing/v-map/src/components/Map.vue: >Support for the experimental syntax 'nullishCoalescingOperator' isn't currently enabled (30:29):
...
Add #babel/plugin-proposal-nullish-coalescing-operator (https://git.io/vb4Se) to the 'plugins' section of your Babel config to enable transformation.
I installed #babel/plugin-syntax-nullish-coalescing-operator (its name seems to have changed), added it to my babel.config.js:
module.exports = {
presets: ['#vue/app'],
plugins: ['#babel/plugin-syntax-nullish-coalescing-operator'],
};
Now the error message seems to have gone backwards, no reference to the operator name at all:
Module parse failed: Unexpected token (39:35)
You may need an appropriate loader to handle this file type.
| case 8:
| points = _context.sent;
console.log(sheetID ?? 37);
What am I doing wrong?
For me, the #babel/plugin-syntax-nullish-coalescing-operator plugin would not work, which is the one you are using.
I had to use the #babel/plugin-proposal-nullish-coalescing-operator plugin which is the one that the error message suggests you use.
Additionally, I noticed this on the page for the #babel/plugin-syntax-nullish-coalescing-operator plugin:
I can't say for sure if this will fix your problem, but it certainly fixed mine

How to import github repos into Atom editor?

In Atom editor, there is an import package that should allow user to import github repos into the Atom, here: https://atom.io/packages/import
I've tried it and it didn't work and gave me this error:
Uncaught TypeError: Cannot read property 'projectHome' of undefined
An issue was also raised but did anyone else have the same problem and know how to resolve this? My system is an Ubuntu 14.04.1
How to import Github repos into Atom editor?
I've tried to remove ~/.atom/config file but it doesn't exist:
alvas#ubi:~/.atom$ ls
compile-cache config.cson nohup.out packages storage
I've tried removing the config.cson and the same error. When i tried to grep for ProjectHome, i got:
alvas#ubi:~/.atom$ grep -nRHI projectHome *
compile-cache/coffee/5047aaae22a3f9ac99b5d85d388d780b7e76a729.js:96: workspace = atom.config.settings.core.projectHome;
compile-cache/coffee/5047aaae22a3f9ac99b5d85d388d780b7e76a729.js:97: defaultWorkspace = atom.config.defaultSettings.core.projectHome;
packages/import/lib/import-view.coffee:41: workspace = atom.config.settings.core.projectHome
packages/import/lib/import-view.coffee:42: defaultWorkspace = atom.config.defaultSettings.core.projectHome
You can try, to see if that make the issue go away, a similar solution like issue 3845:
Hm, the issue disappeared after I'd remove my ~/.atom/config.
I don't remember if I set something there with hands – guess some of local installed package did something :(
You can see a similar error at Atom.project.path (cannot call path of undefined in test), which points out that not every variable are set.

Opencart Fatal error: Call to a member function get() on a non-object

Trying to move from local host to new server. Fresh install worked fine, no problems. When I uploaded my files mydomain.com/admin comes up with a white screen and mydomain.com produces this error:
Fatal error: Call to a member function get() on a non-object in /home4/pawpostc/public_html/index.php on line 103.
So I took a look at index.php line 103:
if ($config->get('config_error_display')) {
echo '<b>' . $error . '</b>: ' . $errstr . ' in <b>' . $errfile . '</b> on line <b>' . $errline . '</b>';
}
Seems like there is a problem with my config files. So I went and had a look at them. I have gone over them a few times but can not find the mistake, probably missing something, so here are the config files.
config.php (in my root www. folder):
<?php
// HTTP
define('HTTP_SERVER', 'http://www.pawpost.com.au/');
define('HTTP_IMAGE', 'http://www.pawpost.com.au/image/');
define('HTTP_ADMIN', 'http://www.pawpost.com.au/admin/');
// HTTPS
define('HTTPS_SERVER', 'http://www.pawpost.com.au/');
define('HTTPS_IMAGE', 'http://www.pawpost.com.au/image/');
// DIR
define('DIR_APPLICATION', '/home4/pawpostc/public_html/catalog/');
define('DIR_SYSTEM', '/home4/pawpostc/public_html/system/');
define('DIR_DATABASE', '/home4/pawpostc/public_html/system/database/');
define('DIR_LANGUAGE', '/home4/pawpostc/public_html/catalog/language/');
define('DIR_TEMPLATE', '/home4/pawpostc/public_html/catalog/view/theme/');
define('DIR_CONFIG', '/home4/pawpostc/public_html/system/config/');
define('DIR_IMAGE', '/home4/pawpostc/public_html/image/');
define('DIR_CACHE', '/home4/pawpostc/public_html/system/cache/');
define('DIR_DOWNLOAD', '/home4/pawpostc/public_html/download/');
define('DIR_LOGS', '/home4/pawpostc/public_html/system/logs/');
// DB
define('DB_DRIVER', 'mysql');
define('DB_HOSTNAME', 'localhost');
define('DB_USERNAME', 'my user name');
define('DB_PASSWORD', 'my password');
define('DB_DATABASE', 'my database');
define('DB_PREFIX', 'oc_');
?>
admin/config.php:
<?php
// HTTP
define('HTTP_SERVER', 'http://www.pawpost.com.au/admin/');
define('HTTP_CATALOG', 'http://www.pawpost.com.au/');
define('HTTP_IMAGE', 'http://www.pawpost.com.au/image/');
// HTTPS
define('HTTPS_SERVER', 'http://www.pawpost.com.au/admin/');
define('HTTPS_CATALOG', 'http://www.pawpost.com.au/');
define('HTTPS_IMAGE', 'http://www.pawpost.com.au/image/');
// DIR
define('DIR_APPLICATION', '/home4/pawpostc/public_html/admin/');
define('DIR_SYSTEM', '/home4/pawpostc/public_html/system/');
define('DIR_DATABASE', '/home4/pawpostc/public_html/system/database/');
define('DIR_LANGUAGE', '/home4/pawpostc/public_html/admin/language/');
define('DIR_TEMPLATE', '/home4/pawpostc/public_html/admin/view/template/');
define('DIR_CONFIG', '/home4/pawpostc/public_html/system/config/');
define('DIR_IMAGE', '/home4/pawpostc/public_html/image/');
define('DIR_CACHE', '/home4/pawpostc/public_html/system/cache/');
define('DIR_DOWNLOAD', '/home4/pawpostc/public_html/download/');
define('DIR_LOGS', '/home4/pawpostc/public_html/system/logs/');
define('DIR_CATALOG', '/home4/pawpostc/public_html/catalog/');
// DB
define('DB_DRIVER', 'mysql');
define('DB_HOSTNAME', 'localhost');
define('DB_USERNAME', 'my user name');
define('DB_PASSWORD', 'my password');
define('DB_DATABASE', 'my database');
define('DB_PREFIX', 'oc_');
?>
Any help on this would be appreciated.
I was using opencart and installed vqmod.
All of a sudden I have one of the same errors.
This solved my problem:
in system/library/session.php
replace start session with:
session_save_path(realpath(dirname($_SERVER['DOCUMENT_ROOT']) . '/../tmp'));
The most likely issue is that one or more of your library files are corrupt from uploading. Re upload your system/library/ folder from your local one. Your config files seem fine and the error doesn't reference a config issue. What is line 103 in your index.php file?
please cross check you have set all permissions
i had came across this error and was solved,
that was due to a file permission problem
I was struggling with the same problem after migrating my site to a new VPS environment. I figured it HAD to be something to do with the changed document-root path or permissions of my shop and pulled out a lot of hair trying to get to the core of the problem.
I finally realised that I had incorrect permissions on my PHP session-data store! In my case, the folder at /var/lib/php/session/ was owned by apache (naturally) but I had changed apache to run as a different user so it could no longer write to the session-store.
The error messages in this case are cryptic (to say the least!) and didn't give a clue that the problem might just be lack of write permission!
Oh well, we should know by now that 90% of unix issues are down to perms!
I upload a file at my server (directory: vqmod/....php ).
Just change vqmod file permission. I set 777 and that solved it.
From the error you received, it looks like the $config variable is not getting set.
The $config variable is set on line 35 using the Config class which is located in system/library/config.php
I think if you figure out why the class isn't getting instantiated, you'll be able to fix the issue.
This could be a couple things:
The system/library/config.php file may not have been uploaded to the new server
As mentioned in previous answers, there could be a permissions issue. Check the permissions of system/library/config.php and make sure the correct user has ownership.
Or it could be a completely unrelated issue.
The error is due to permissions set on the cache folder. Setting that to 755 and the files to 555 with set you home and dry.
I had the same issue. I changed vqmod permission to 777. I am not sure this solved the problem, but I checked my website without adding www. before the domain and it worked. The warning was removed if I check http://daytodaystore.com. If I check http://www.daytodaystore.com, the warning is there.
I had this problem when i migrated my server from 2G to 4GH on Godaddy.
Came across this forum and found that the issue is with session.php
Then, i guessed 'tmp' folder was missing. So, i created one just one step above html folder. and gave it a 777 access. Problem was fixed and my website looks great after that.

Algebra filter error in moodle

I installed moodle 1.9.12 and now I want to use Algebra notation in content. I enable "TeX Notation" and "Algebra Notation" in administrator panel and also install mimetext and dvips and Imagemagic on the server. fortunately Tex Notation works fine but I got the following error for Algebra:
sh: /var/www/html/moodle/filter/tex/mimetex.linux: not found
The shell command
"/var/www/html/moodle/filter/tex/mimetex.linux" -e "/var/www/moodledata/filter/algebra/de06d6c44d98ba4e42dffca988bf530b.gif" -- '\Large \frac{\sin\left(z\right)}{x^{2}+y^{2}}'
returned status = 127
File size of mimetex executable /var/www/html/moodle/filter/tex/mimetex.linux is 830675
The file permissions are: 100775
The md5 checksum of the file is 56bcc40de905ce92ebd7b083c76e019e
Image not found!
Note: /var/www/html/moodle/filter/tex/mimetex.linux exists on the server and is executable!!!
What is the problem?? Any idea?????
From what you have described, calling the general tex filter debug page works and does not show up the same error.
/filter/tex/texdebug.php works, but /filter/algebra/algebradebug.php does not.
If this is the case, perhaps you could check for an open_basedir, or safe_mode_exec_dir being set to include the current working directory, or otherwise restricting the execution of /var/www/html/moodle/filter/tex/mimetex.linux, while the current working directory is /var/www/html/moodle/filter/algebra.
You could look at this by visiting /admin/phpinfo.php at your site, and look carefully at the effective values of open_basedir, safe_mode and safe_mode_exec_dir.
You could also check the apache error log or add the following lines to the top of the algebra debug php file, and you might see some extra error messages:
$CFG->debug = 6143 ;
$CFG->debugdisplay= 1 ;
Hope that helps