Minima theme build shows "Liquid Exception: Invalid syntax for include tag. File contains invalid characters or sequences" - ruby

Here's a link to my website Facey's Thoughts and here's a link to the GitHub Pages project.
Cloning the (working) repository to my local machine and trying to run jekyll build fails with this error:
Liquid Exception: Invalid syntax for include tag. File contains invalid characters or sequences: social-icons/.svg Valid syntax: {% include file.ext param='value' param2='value' %} in assets/minima-social-ico.html
The Jekyll version is still the same as what's specified in my Gemfile:
jekyll 4.3.1. I have no idea what's changed.
I've tried removing the minima-social-ico.svg file; I've tried removing the posts that I was trying to add; I've tried searching Online for something similar to this issue without luck.
I tried jekyll build with local files, cloning my GitHub pages repo to a new directory, and that repo for sure built last night, and I've tried removing any new .markdown files that I made since the last time it successfully built.
I tried the following:
If I comment out social_links from my _config.yml file, it will build, I assume because it's not using the minima_social_icons.svg file. Why did it work and now it doesn't?

The problem is more with using the remote theme without locking to a specific commit/tag. (Since the v3.0 is still in development, any breaking change added to the main branch will break the build as well, if we refer to the latest changes always.)
One can lock to a specific commit/tag as: (in _config.yml file)
remote_theme: jekyll/minima#<insert-commit-hash_or_tag>
This time the breaking change was #686. Using social links more explicitly, as mentioned by Yshmarov should resolve the issue.
minima:
social_links:
- { platform: github, user_url: "https://github.com/jekyll/jekyll" }
- { platform: twitter, user_url: "https://twitter.com/jekyllrb" }

Updating social links to be more explicit solved it for me:
social_links:
- { platform: rss, user_url: "/feed.xml" }
- { platform: github, user_url: "https://github.com/yshmarov/" }
- { platform: twitter, user_url: "https://twitter.com/yarotheslav" }
- { platform: linkedin, user_url: "https://www.linkedin.com/in/yshmarov/" }

Related

Error: No such file (sftp liximomo extension)

I have this problem when I upload a file on the server using the extension liximomo/vscode-sftp for visual studio code.
[error] Error: No such file
at SFTPStream._transform
at SFTPStream.Transform._read
at SFTPStream._read
How I can fix this problem? I tried to upload files to different servers, so I guess it's not a server-related problem but an extension.
There is a better fix on GitHub that works for upload and download via SFTP extension:
Do a search inside ~/.vscode/extensions/liximomo.sftp-1.12.9/node_modules/ssh2-streams/lib/sftp.js for options.emitClose = false;
Add options.autoDestroy = false; after both instances.
- mrjcgoodwin commented 8 days ago
This is apparently a brand new problem that has been introduced into the newer versions of VS Code. I have FOUND A SOLUTION that seems to work well, by modifying a single line in the extension code. This is only valid for version 1.12.9 of the liximomo.sftp extension.
Here are the steps:
Shutdown / Quit VS Code.
Locate the following file:Mac OS X:
~/.vscode/extensions/liximomo.sftp-1.12.9/node_modules/ssh2-streams/lib/sftp.jsWindows:C:\Users\account_name\.vscode\extensions\liximomo.sftp-1.12.9\node_modules\ssh2-streams\lib\sftp.js
Make a backup copy of the file.
Modify line 388, which should be:if ( code === STATUS_CODE . OK ) { changing it to:if (code === STATUS_CODE.OK || code === STATUS_CODE.NO_SUCH_FILE) {
Save the file.
Relaunch VS Code; test by uploading or downloading from your sftp server. The error should not be present.
The alternative solution involves downgrading your version of VS Code. This is not desirable as you are not getting the latest fixes, security patches, etc..
See the following links regarding this issue:
https://github.com/liximomo/vscode-sftp/issues/266
https://github.com/liximomo/vscode-sftp/issues/569 (repeat)
https://gitmemory.com/issue/liximomo/vscode-sftp/915/827578565 (note, this site has a bad SSL certificate).
If you want to downgrade your VS Code; use this link to find the older versions:
https://code.visualstudio.com/updates/v1_55
CREDIT:
Bao from: https://blog.naver.com/PostView.nhn?blogId=pcgun70&logNo=222341271496
From their blog entry (translated by Google to English):
"At first, there was no solution, but Now, 12 hours later, the Holy
One appeared, who told me how to solve it.files that sftp cannot find
in the first place. There is a calling phrase, VScode is upgraded and
an error is called. It came out. Actually, I did not solve the
problem. Even if the file is not found, the same result as the
success process is exported. It is just a modification. It is
expected that a modified version will be released in the future."
Not an answer to the problem, but solution in another (simple) way:
install Run On Save VSCode extension
write a deploy.sh script along the lines
rsync -avz -e 'ssh -i /home/user/.ssh/id_rsa' --exclude '.history' --exclude '.vscode' --exclude '.git' --exclude '.gitignore' --exclude 'deploy.sh' ./ user#domain.net:/home/user/public_html/
add the following configuration to VSCode settings.json to trigger the deploy.sh script on file save:
"emeraldwalk.runonsave": {
"commands": [
{
"match": ".*",
"isAsync": false,
"cmd": "${workspaceFolder}/deploy.sh"
},
]
}
Just switch to the second one:
There is another solution only upgrading the ssh2 package from the extension.
You just need to go to the extension path:
Windows:
C:\Users\your-user\.vscode\extensions\liximomo.sftp-1.12.9
When you are there, change the version of ssh2 package on the package.json file to ^1.1.0. Finally, just run npm install.
You should restart VSCode.
Alternatively, you could use a fork of the repository that is active and fixing these issues: https://github.com/Natizyskunk/vscode-sftp

go-swagger restapi/configure_todo_list.go - api.TodoGetHandler undefined error

I am a newbie in go and go-swagger. I am following steps in Simple Server tutorial in goswagger.io.
I am using Ubuntu 18.04, swagger v0.25.0 and go 1.15.6.
Following the same steps, there are a few differences of the files generated. For instance, goswagger.io's has find_todos_okbody.go and get_okbody.go in models but mine does not. Why is that so?
Link to screenshot of my generated files vs
Link to screenshot of generated files by swagger.io
Starting the server as written in the tutorial go install ./cmd/todo-list-server/ gives me the following error. Can anyone please help with this?
# my_folder/swagger-todo-list/restapi
restapi/configure_todo_list.go:41:8: api.TodosGetHandler undefined (type *operations.TodoListAPI has no field or method TodosGetHandler)
restapi/configure_todo_list.go:42:6: api.TodosGetHandler undefined (type *operations.TodoListAPI has no field or method TodosGetHandler)
The first step in goswagger.io todo-list is swagger init spec .... Which directory should I run this command in? I ran it in a newly created folder in my home directory. However, from the page, it shows the path to be ~/go/src/github.com/go-swagger/go-swagger/examples/tutorials/todo-list. I am not sure whether I should use go get ..., git clone ... or create those folders. Can someone advise me?
Thanks.
This is likely the documentation lagging behind the version of the code that you are running. As long as it compiles, the specific files the tool generates isn't so crucial.
This is a compilation error. When you do go install foo it will try to build the foo package as an executable and then move that to your GOPATH/bin directory. It seems that the generated code in restapi/configure_todo_list.go isn't correct for the operations code generated.
All you need to run this tutorial yourself is an empty directory and the swagger tool (not its source code). You run the commands from the root of this empty project. In order not to run into GOPATH problems I would initialise a module with go mod init todo-list-example before doing anything else.
Note that while the todo-list example code exists inside the go-swagger source, it's there just for documenting example usage and output.
What I would advice for #2 is to make sure you're using a properly released version of go-swagger, rather than installing from the latest commit (which happens when you just do a go get), as I have found that to be occasionally unstable.
Next, re-generate the entire server, but make sure you also regenerate restapi/configure_todo_list.go by passing --regenerate-configureapi to your swagger generate call. This file isn't always refreshed because you're meant to modify it to configure your app, and if you changed versions of the tool it may be different and incompatible.
If after that you still get the compilation error, it may be worth submitting a bug report at https://github.com/go-swagger/go-swagger/issues.
Thanks #EzequielMuns. The errors in #2 went away after I ran go get - u -f ./... as stated in
...
For this generation to compile you need to have some packages in your GOPATH:
* github.com/go-openapi/runtime
* github.com/jessevdk/go-flags
You can get these now with: go get -u -f ./...
I think it's an error of swagger code generation. You can do as folloing to fix this:
delete file configure_todo_list.go;
regenerate code.
# swagger generate server -A todo-list -f ./swagger.yml
Then, you can run command go install ./cmd/todo-list-server/, it will succeed.

Github pages Jekyll static blog outdated

I setup a Jekyll blog on Github-Pages 5 months ago. It was working at that time, and I though it would be a nice place to post things.
Long story short, I wrote a first post, but then I never used, until yesterday when I wanted to check that all was working fine, but it was not. I also could not run Jekyll locally.
I do not use ruby on my daily basis ,so they were outdated. I though maybe if I update it and generate the site again everything is going to be working fine.
I updated ruby from 2.1.2 to 2.2.1, and I tried other things to make it work. Now is working locally, but throwing this
Generating...
Defaults: An invalid front-matter default set was found:
[{"scope"=>{"path"=>"_posts/"}, "values"=>{"author"=>"Agustin Gambina"}}]
Defaults: An invalid front-matter default set was found:
[{"scope"=>{"path"=>"_posts/"}, "values"=>{"author"=>"Agustin Gambina"}}]
I also added a Gemfile to the root directory
source 'https://rubygems.org'
require 'json'
require 'open-uri'
versions = JSON.parse(open('https://pages.github.com/versions.json').read)
gem 'github-pages', versions['github-pages']
When I run
github-pages health-check
I get this
Checking domain littlebit.me...
Uh oh. Looks like something's fishy: Domain does not resolve to the GitHub Pages server
Does anyone know why it happened to me that is not working anymore? was because it was outdated and something changed?
thank you
You have an error in your _config.yml file :
-
-
scope:
path: "_posts/scala"
values:
author: Agustin Gambina
Must be :
-
scope:
path: "_posts/scala"
values:
author: Agustin Gambina
This is not a fatal error, so your site build, but your rule is not applied.
Concerning the health-check, it works for me as it checks littlebit.me that resolve to github IPs.
$: dig littlebit.me
...
littlebit.me. 1800 IN A 192.30.252.154
littlebit.me. 1800 IN A 192.30.252.153
If it doesn't work on your PC, you may have a DNS problem. Maybe you've set a bad value in your hosts file ?

parse.exe not seeing my projects

I am trying to configure my machine to deploy Parse Cloud Code. This requires downloading and running ParseDeploy.exe, followed by parse new.
I am running Win 8.1, and using the latest parse-windows-2.0.7.exe.
The folder structure is correctly created.
After entering my email & password, I am meant to see a list of my apps. Instead I am seeing:
1: results
Select an App:
"results" is not the name of any of my 3 apps.
This is what the PowerShell output looks like:
PS E:\...\demo> parse new
Creating a new project in directory E:\...\demo\parse
Creating directory E:\...\demo\parse\config
Creating config file E:\...\demo\parse\config\global.js
on
Creating directory E:\...\demo\parse\cloud
Writing out sample file E:\...\demo\parse\cloud\main.js
Creating directory E:\...\demo\parse\public
Writing out sample file E:\...\demo\parse\public\index.
html
Email: richard#glowworm.mobi
Password:
1: results
Select an App:
Related post:
Parse: No list of apps from Parse in CTL windows 7
I have used this successfully on previous projects. What has changed?
Some very old versions of the Parse command line utility may run into this issue due to some backend changes. You can get around this issue by making sure you're running the latest version of the command line utility, available at https://parse.com/docs/downloads
I also recommend joining the Parse developer mailing list, where we made an announcement a couple of weeks ago recommending that people make sure they update their command line utility prior to the backend change going into effect: https://groups.google.com/forum/#!topic/parse-developers/WoRnDft4qmE
Update
v2.1.3 fixes this issue, and works correctly on my machine.
What has changed? Parse has made updates, requiring a new version of parse.exe to be downloaded.
Unfortunately the initial new versions do not work.
Workaround
I have rolled back to using v1.4.2 of parse.exe.
It is currently working for deploying projects.
However, it breaks when creating a new project with parse new (as per my question).
The file that breaks is .\config\global.json - it seems to be in a new format, and it tries to reference this non-existent "results" project.
What I have done is to an existing global.json file from an older project, and manually edit it to update the values for my new project. Here is an example:
{
"global": {
"parseVersion": "1.4.2"
},
"applications": {
"<< AppName >>": {
"applicationId": "<< app id >>",
"masterKey": "<< master key >>"
},
"_default": {
"link": "<< AppName >>"
}
}
}
Just update the following fields:
<< AppName >>
<< app id >>
<< master key >>
(works as of 2 June 2015)
Bug Reported
A bug has been opened related to this issue on Facebook Developers:
https://developers.facebook.com/bugs/971635999542789/
The following versions are not running on my machine:
v2.0.7
v2.0.8
v2.0.9
There are other reports on the support forum that these versions are broken for other people as well.

symfony2 assetics yui compressor on windows (path syntax)

I'm trying to get assetics running with the yui compressor and, if this is running, sass. Right now, both don't work. When removing all filters from config.yml and the twig template, it works and php app/console assetic:dump does copy the css and js files.
Now I want to add the yui compressor and my config.yml looks like this:
assetic:
debug: %kernel.debug%
use_controller: false
filters:
yui_js:
jar: %kernel.root_dir%/Resources/java/yuicompressor-2.4.6.jar
Adding the filter to the template and running assetic:dump again ends in the following error (translation of message by me):
[RuntimeException]
The syntax for filename, directory name or drive name is wrong
I found an article telling me to specify the path to java.exe, so I add this to config.yml:
assetic:
..
java: C:/Program Files (x86)/Java/jre6/bin/java.exe
..
Now assetic:dump tells me:
[RuntimeException]
The COMMAND "C:/Program" is either written wrong or
I tried playing around with both variables (using \ or \ instead of /, adding single or double quotes, working with short alias Progra~1 or Progra~2) in the config, but I didn't get anywhere. The both errors comming up all the time. Maybe someone can point me in the right direction.
Ok, I figured it out. Man, this one was brutal.
Let's start with the easy stuff. A working version of the config.yml can look like this:
assetic:
debug: false
use_controller: false
java: C:\Program Files (x86)\Java\jre6\bin\java.exe
sass: C:\Program Files (x86)\Ruby192\bin\sass.bat
filters:
scss: ~
yui_js:
jar: %kernel.root_dir%\Resources\java\yuicompressor-2.4.6.jar
For some reason, assetic is always importing a whole directory for scss, so I had to make a combine.scss which imports the other scss files in the correct order.
And now it gets ugly, as one have to change the assetics core in order to get this working. The developers of assetic know this bug and I think it is fixed in some development trunk/branch but not the stable one.
The Assetic\Util\ProcessBuilder has to be changed on line 95
if (defined('PHP_WINDOWS_VERSION_MAJOR')) {
,line 103
$script .= ' '.implode(' ', array_map('escapeshellarg', $args));
and line 110
return new Process($script, $this->cwd, null, $this->stdin, $this->timeout, $options);
I hope this bug get fixed soon and till then anybody trying to get it working finds this thread... Took me like 8 hours of debuging, reading and trying different approaches.
Answer by Boo Nov 19 at 22:53 did work for me by changing everything he mentioned in Assetic\Util\ProcessBuilder (I ignored line 95 as it looks the same as in my file)
Now it works on windows. Thanks!
Just to confirm. Im using Symfony 2.0.7 and yuicompressor-2.4.7
For other users who use window server 2008 r2 :
Maybe you should change the C:\windows\Temp folder property to 777 (read/write) for the IIS user / or the machine's normal user
please unpack the ruby.7z from rubyinstaller.org , and go to C:\_ruby193\bin , in this unpack position you should exec the CMD prompt , type :
ruby -S gem install sass
so that you will get the sass.bat in that position
It's time to use Boo's best answer , and please notice that in symfony2 dev env maybe it's not necessary to change the use_controller to false (in the config.yml) , because there's another use_controller in the config_dev.yml (set to true) , and in routing_dev.yml there's also a _assetic router , they're perhaps associated.

Resources