# Jekyll Serve Error

## Background

I updated the Jekyll-Bootstrap source code for Blog 2.

## Problem

Then, I wanted to preview it.

[owner@localhost ~/blog2]$jekyll serve /home/owner/.rvm/gems/ruby-2.1.2@global/gems/bundler-1.6.5/lib/bundler/resolver. rb:357:in resolve': Could not find gem 'jekyll (~> 3.1) ruby' in the gems avail able on this machine. (Bundler::GemNotFound) from /home/owner/.rvm/gems/ruby-2.1.2@global/gems/bundler-1.6.5/lib/bund ler/resolver.rb:164:in start' from /home/owner/.rvm/gems/ruby-2.1.2@global/gems/bundler-1.6.5/lib/bund ler/resolver.rb:129:in resolve' from /home/owner/.rvm/gems/ruby-2.1.2@global/gems/bundler-1.6.5/lib/bund ler/definition.rb:203:in resolve' from /home/owner/.rvm/gems/ruby-2.1.2@global/gems/bundler-1.6.5/lib/bund ler/definition.rb:133:in specs' from /home/owner/.rvm/gems/ruby-2.1.2@global/gems/bundler-1.6.5/lib/bund ler/definition.rb:178:in specs_for' from /home/owner/.rvm/gems/ruby-2.1.2@global/gems/bundler-1.6.5/lib/bund ler/definition.rb:167:in requested_specs' from /home/owner/.rvm/gems/ruby-2.1.2@global/gems/bundler-1.6.5/lib/bund ler/environment.rb:18:in requested_specs' from /home/owner/.rvm/gems/ruby-2.1.2@global/gems/bundler-1.6.5/lib/bund ler/runtime.rb:13:in setup' from /home/owner/.rvm/gems/ruby-2.1.2@global/gems/bundler-1.6.5/lib/bund ler.rb:120:in setup' from /home/owner/.rvm/gems/ruby-2.1.2/gems/jekyll-2.5.3/lib/jekyll/plugi n_manager.rb:37:in require_from_bundler' from /home/owner/.rvm/gems/ruby-2.1.2/gems/jekyll-2.5.3/bin/jekyll:16:in <top (required)>' from /home/owner/.rvm/gems/ruby-2.1.2/bin/jekyll:23:in load' from /home/owner/.rvm/gems/ruby-2.1.2/bin/jekyll:23:in <main>' from /home/owner/.rvm/gems/ruby-2.1.2/bin/ruby_executable_hooks:15:in e val' from /home/owner/.rvm/gems/ruby-2.1.2/bin/ruby_executable_hooks:15:in < main>'  How can it be previewed? # Fixed Jekyll-Bootstrap Asset Path (2) | Comments | ## Background I attempted to manually fix a problem in the first post in this series half a year ago. ## Problem I have just updated the Jekyll source code for Blog 2. [owner@localhost ~/blog2]$ git pull jekyll master
remote: Counting objects: 37, done.
remote: Total 37 (delta 10), reused 10 (delta 10), pack-reused 27
Unpacking objects: 100% (37/37), done.
3a34785..8193869  master     -> jekyll/master
Removing sitemap.txt
Auto-merging _includes/JB/setup
CONFLICT (content): Merge conflict in _includes/JB/setup
Auto-merging _config.yml
Automatic merge failed; fix conflicts and then commit the result.


How to repair this failed merge?

# Restore Corrupt Git Repository

## Background

I hadn’t used Vim on my GNU/Linux desktop for a month. When I used it again, an error message was shown on the screen.

[owner@localhost ~]$vi Error detected while processing /home/owner/.vim/bundle/nerdtree/plugin/NERD_tree.vim: line 153: E117: Unknown function: nerdtree#ui_glue#setupCommands Error detected while processing function nerdtree#postSourceActions: line 2: E117: Unknown function: nerdtree#ui_glue#createDefaultBindings Press ENTER or type command to continue  Since I was occupied with another blog, thinking that the problem would be quickly fixed by an update of the NERD tree, a Vim plugin for showing a file tree in a sidebar, I didn’t want to find out the cause. ## Problem During this Vundle update, an exclamation mark with red background was displayed on the LHS of the item Plugin 'scrooloose/nerdtree' in the list contained in the status bar. I then checked Vundle’s update log. [2016-08-12 15:18:40] Plugin scrooloose/nerdtree [2016-08-12 15:18:40]$ cd '/home/owner/.vim/bundle/nerdtree' && git pull && git submodule update --init --recursive
[2016-08-12 15:18:40] > error: object file .git/objects/2e/2b649232d6ae4d02d74793e5da0ee08480ad8d is empty
[2016-08-12 15:18:40] > error: object file .git/objects/2e/2b649232d6ae4d02d74793e5da0ee08480ad8d is empty
[2016-08-12 15:18:40] > fatal: loose object 2e2b649232d6ae4d02d74793e5da0ee08480ad8d (stored in .git/objects/2e/2b649232d6ae4d02d74793e5da0ee08480ad8d) is corrupt
[2016-08-12 15:18:40] > fatal: The remote end hung up unexpectedly
[2016-08-12 15:18:40] >


While I was trying to update this plugin manually by typing in Git commands in bash, the electricity supply of my desktop went off suddenly. After it had been switched on again, I tried typing in the commands again, and I got the same error.

How can the Git repository be restored to its previous state, so that it’s intact?

# $\rm \LaTeX$ French Letter With Signature

## Background

Same as my recent post Writting Letter With Bibliography.

## Problem

How to add a scanned signature to a $\rm \LaTeX$ document for the lettre class?

# $\rm \LaTeX$ French Letter Template

I just include the files here for future references. Since the code are universal, I assume that the source file and the linked PDF file below are in public domain, despite the CC-BY-SA licence at the bottom of this page.

# Writting Letter With Bibliography

## Background

Recently, I need to write letters. Get the formatting for addressee and sender automatically done, I choose $\rm \LaTeX$. I cite a book in my letter, and try to add a bibliography at the end of the letter.

## Problem

During the compilation for the following letter, an error was thrown.

Here’s my compilation procedure.

$xelatex noltrbib.tex$ biber noltrbib
$xelatex noltrbib.tex This is XeTeX, Version 3.1415926-2.5-0.9999.3 (TeX Live 2013/Debian) restricted \write18 enabled. ... ! Undefined control sequence. \\blx@head@bibliography [#1]->\section *{#1}\markboth {\MakeUppercase {#1}}{... l.52 \end {letter} ? ...  I type <Enter> at ?, and get a PDF that seems OK. You may read the log file for this file to know more about this error. However, each time I use$\rm \LaTeX$-Suite to compile the document inside Vim, a quickfix window pops up. This is quite inconvenient: I need to use <C-w>k to switch to the original buffer or ZQ to close the quickfix window. Therefore, I am motivated to find out a solution for this error. # I-Search and Reverse I-Search | Comments | One knows that long commands can be retrieved by <C-r>. If the search fails, one may cancel it by <C-g>. However, how can one search forward through the command history instead of backword? The answer is simple: add stty -ixon to your BASHRC. #$\rm \LaTeX$-Suite in Portable Git | Comments | ## Background A year ago, I was using msysgit on M$ Win* 7. Its support for Unicode characters isn’t so good, and I can’t write a text file with accents like “café” in the Vim editor that shipped with msysgit. As a result, I needed GVim for editing my $\rm \LaTeX$ documents.

Unluckily, unlike Linux, the GVim can never have forward control. Therefore, I needed to switch windows between GVim and Git Bash.

More importantly, if I want to apply the Linux skills and the tools on M$Win*, I need portable programs excutable on a USB unless I carry my laptop. Luckily, the bash shell in Git for Windows has improved a lot. The accents are well supported. Then, I have switched from GVim to the embedded Vim in Git for Windows. Luckily, the setup of Vundle was smooth. Most of the installed plugins work fine in terminal Vim. ## Problem 1 In the post Git Portable Home Path, a BAT file is included so that the home folder and the HOMEDRIVE environment are automatically set. Since the same Git repository can be shared among multiple devices, such as my Linux desktop, my M$ Win* 7 laptop, and my USB stick, a bare repository is needed for efficient pulling and pushing of Git commits. Since I work outside home, I place a bare Git repo in my USB stick. However, for each local Git repository stored in the USB stick (under ~/local_repo, a.k.a. $HOMEDRIVE/PortableGit/home/owner/local_repo), I need to run the following command for each time I use Git Bash. ## Problem 2 After making some changes on a$\rm \TeX$file, I compiled the file using Mik$\rm \TeX$Portable. 1. Browse the folder $HOMEDRIVE/MikTeXPortable/.
2. Double-click on miktex-portable.cmd.
3. In the Command Prompt popped up, switch to $HOMEDRIVE/PortableGit/home/owner/local_repo. 4. Type pdflatex file.tex. This sounds really slow. The goal is to find a more efficient$\rm \LaTeX\$ editing workflow.

That’s not the end. Another bad news came from eu1lmr.fd. I’ve got error similar to fengbaobao6’s. The compilation was stuck at ...\tex\latex\euenc\eu1lmr.fd. Then an error was shown: “Fontconfig error: Cannot load config file”.

# Can't Visit WordPress.com

## Background

While removing the “here”’s in the hyperlink text, I clicked on a link to my old blog on WordPress.com. Unfortunately, after 15 seconds, I couldn’t see the output.

## More errors

I suspect that it was a problem of the server of WordPress.com. I think the following screenshot confirm my guess.

</source>

## Remarks

This justifies the migration from WordPress to Octopress of this blog.