Running Jekyll Serve on Debian Chromebook - ruby

I am working on a Chromebook, where I have setup a debian chroot.
I ran the following commands with no problems:
$ gem install jekyll
$ jekyll new myblog
$ cd myblog
When running:
~/myblog $ jekyll serve
I receive the following error:
/home/damon/.rvm/gems/ruby-2.2.0/gems/liquid-2.6.1/lib/liquid/htmltags.rb:43: warning:
duplicated key at line 46 ignored: "index0"
Configuration file: /home/damon/myblog/_config.yml
Source: /home/damon/myblog
Destination: /home/damon/myblog/_site
Generating...
Liquid Exception: Failed to get header. in _posts/2014-12-28-welcome-to-jekyll.markdown
jekyll 2.5.3 | Error: Failed to get header.
I have tried changing Ruby versions from 2.2 and 1.9.
Does anyone have an idea one how to resolve this issue?
Please let me know if you need any further information.

Most likely you haven't installed Python 2.7.3 - Do not install Python 3 since Pygments (the highlighter) doesn't support Python 3. See related Github Issue here.
A re-install of Python can also fix it.

Related

Getting Pygments dependency error when trying to compile Jekyll site

I'm beginning to set up a Jekyll site and I've installed everything and copied the contents of this theme into the site's directory. I've installed Pygments via the gem install pygments.rb command and it seemed to install fine. But I'm still getting the error from my screenshot below when trying jekyll serve . I found this post and tried the commands in the given answer, installing pygments worked fine, but when I tried gem 'pygments.rb' I got the error in the first line of the screenshot "Unknown command pygments.rb".
I'm running this command in the directory with my gemfile, so I'm not sure what the problem is.
I'm not really sure what else I can try. I've installed pygments but I still get the error that it is not installed. I am using rbenv to manage my Ruby versions, I have the global ruby version set to 2.0.0-p247. Any ideas how I can fix this?
Edit: So I followed the theme's install guide, but I'm getting the same error except for Kramdown:
Conversion error: Jekyll::Converters::Markdown encountered an error while converting '_posts/2016-01-08-welcome-to-jekyll.markdown':
Missing dependency: kramdown
ERROR: YOUR SITE COULD NOT BE BUILT:
------------------------------------
Missing dependency: kramdown
If you read theme's install steps, your not supposed to battle with any pygments install.
Here are two working ways for a Jekyll install :
http://jekyllrb.com/docs/quickstart/
https://help.github.com/articles/using-jekyll-with-pages/#installing-jekyll

Jekyll "serve" command error: File to import not found or unreadable: base. Load paths: on line 46

First off, I have little Linux experience and no Ruby experience, however, I have googled and could not find an area like what I'm getting. Any help is appreciated. I apologize if this is not a good place to post this. I have installed Jekyll with the following, and only the following, commands on Ubuntu 15.04 64 bit:
sudo apt-get install ruby-full
gem update --system
gem install jekyll
cd /home/william
mkdir CS
cd CS/
gem install execjs
sudo apt-get install nodejs
jekyll new kx8w
New jekyll site installed in /home/william/KX8W.
jekyll serve
The error returned by Jekyll is as follows:
Configuration file: none
Source: /home/william/CS
Destination: /home/william/CS/_site
Generating...
Build Warning: Layout 'post' requested in KX8W/_posts/2015-05-12-welcome-to-jekyll.markdown does not exist.
Build Warning: Layout 'page' requested in KX8W/about.md does not exist.
Build Warning: Layout 'default' requested in KX8W/index.html does not exist.
Conversion error: Jekyll::Converters::Scss encountered an error while converting 'KX8W/css/main.scss':
File to import not found or unreadable: base. Load paths: on line 46
jekyll 2.5.3 | Error: File to import not found or unreadable: base.
Load paths:
on line 46
Welcome to Linux! You were close but need to make sure you're in the correct directory before running jekyll serve.
When you run:
jekyll new kx8w
It creates the new site in the directory you're currently in. The output line tells you where it put it (i.e. "/home/william/KX8W"). You need to be in that directory to start jekyll. So, do:
cd /home/william/KX8W
Once you do that jekyll serve will work as expected.
Note that for some reason jekyll built the site in the "/home/william/KX8W" directory instead of under the "/home/william/CS/KX8W" which is what I'd expect given your list of commands. That's probably related to the installs you did or maybe there was another change. Nothing to worry about, just something to watch out for. The biggest trick is just to make sure that after you run the jekyll new cool_new_site command you then change into that directory with cd cool_new_site before running jekyll serve.

Running jekyll server in windows 7 results in "error: Invalid argument"

It is my first time using Jekyll. Running jekyll server gives me this error:
Configuration file: h:/jekyll_demo/myblog/_config.yml
Source: h:/jekyll_demo/myblog
Destination: h:/jekyll_demo.myblog/_site
Generating... error: Invalid argument - h:/jekyll_demo/myblog/_site/h:. use --trace to view backtrace
ruby is 1.9.3p545
jekyll is 1.4.3
pygments.rb is 0.5.0
When run jekyll server --trace, it shows this message:
C:\Users\Administrator> jekyll server --trace
Configuration file: none
Source: C:/Users/Administrator
Destination: C:/Users/Administrator/_site
Generating...
C:/Ruby193/lib/ruby/gems/1.9.1/gems/jekyll-1.4.3/lib/jekyll/ site.rb:145:in open': Permission denied - . (Errno::EACCES)
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/jekyll-1.4.3/lib/jekyll/site.rb :145:in entries'
Because Jekyll 1.4.3 is broken on Windows, this is a known issue.
v1.4.3 is broken on Windows #1948
What you can do is to install Jekyll 1.4.2 instead of using the latest one. Or use Linux/Mac, because Jekyll doesn't support Windows officially.
gem install jekyll --version "=1.4.2"

Jekyll on Windows Liquid Exception: Failed to get header

I'm trying to use Jekyll on my windows 7 (64bit) PC.
I have installed Ruby, Ruby Devkit, Python 2.7, Jekyll and Pygments but getting this error
E:\jekyll\my-site>jekyll serve
Configuration file: E:/jekyll/my-site/_config.yml
Source: E:/jekyll/my-site
Destination: E:/jekyll/my-site/_site
Generating... Liquid Exception: Failed to get header. in 2013-07-19-welcome-to-jekyll.markdown
error: Failed to get header.. Use --trace to view backtrace
I also got this error, and a couple of other similar errors too, and finally got to a solution: you need to have a couple of compatible versions of the required Ruby, Python and Pygments.
Install Ruby 1.9.3-p448 version (download here);
Install Python 2.7.5 version (download here);
Install Pygments 0.5.0
gem uninstall pygments.rb
gem install pygments.rb --version "=0.5.0"
I hope it helps.
Edited: Don't forget to add the correct PATHs to your system variables. In my case, it was:
C:\Python27;C:\Ruby193
In order to improve this content, there is a simple tutorial (written in Portuguese, but I guess you can understand the steps, always considering the versions of software/plugins listed above) - view tutorial.
Another possible cause for this error message on Windows is that the path to the Pygments scripts contains spaces. Took me a while to figure this one out...
For my situation, install pygments 0.5.0 or 0.5.4 both have problem. I fixed by re-install python 2.7.6. Please refer to following answer:
https://github.com/jekyll/jekyll/issues/1181#issuecomment-35963876
I had two versions of python installed on my system.(Windows 8.1)
Python22 and Python27.
I removed Python22, added Python27 to System variables and issue got fixed.

ERROR: While executing gem ... (Zlib::GzipFile::Error) not in gzip format

I am developing a Sencha touch 2 application. I have been following the "Styling the user interface of a Sencha Touch application" tutorial on theming of secha touch applications.
It requires me to install Ruby, Compass and SASS.
I installed Ruby using the installer from rubyinstaller.org.
On executing the following command, I get the expected result which confirms correct installation:
C:\>ruby -v
ruby 1.9.3p327 (2012-11-10) [i386-mingw32]
Current source is up to date:
C:\>gem sources
** CURRENT SOURCES **
http://rubygems.org/
Next, since I am behind a proxy, I used the following command to install HAML/Compass:
C:\>gem install -p [proxy:port] compass
ERROR: While executing gem ... (Zlib::GzipFile::Error)
not in gzip format**
Can someone help me? I found solutions such as system update, gem sources update, but everything is up to date on my system.
Edit:
C:\>gem install compass
works perfectly fine on my private system. When I try the same command from my workplace I need to use the proxy as mentioned above and that results in an error.
I assume the ERROR occurs since the web sense at my workplace blocks these downloads.
Solution: I downloaded the required gems: chunky_png, fssm, compass, sass, haml etc.. directly from http://rubygems.org/gems and placed these gems in my local directory.
After this I tried gem install compass. This first searches your local directory. On finding the required gems, installation takes place. Does not require connection to the ruby website.
Note: Run the command from the path where the gems are located
eg: I have placed the gems in C:\Ruby193\lib\ruby\gems\1.9.1\gems
So I run the following command :
C:\Ruby193\lib\ruby\gems\1.9.1\gems>gem install compass
I had a similar problem, it worked on my own private laptop, but failed while using a virtual server at work (running Ubuntu 12.10) that used a proxy.
Following the suggestion I found here, from the command line I defined:
export HTTPS_PROXY=proxy-address:proxy-port-number
export HTTP_PROXY=proxy-address:proxy-port-number
and then my gem install package worked fine.

Resources