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
Related
I'm trying to install middleman. I installed the gem and can see it in my gem list. However, if I enter middleman -v I get the message middleman: command not found.
I tried installing bundler to run middleman with a Gemfile in the project directory using bundle exec middleman. But when I try to run bundle I get the following error:
bash: /usr/bin/bundle: /usr/bin/ruby: bad interpreter: No such file or directory
I'm running ruby v. 2.6 and installed middleman v.4.3.5 on Ubuntu 18.04.
Any help would be very much appreciated; I've wasted half a day trying to solve this and I'm still on high waters!
which ruby gives me /snap/bin/ruby and my path variable is /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/usr/share/rvm/bin. The problem is that ruby is in the snap folder.
I just uninstalled the ruby snap (and snaps in general) and installed "normal" Ruby, which had the correct path (usr/bin/ruby). The middleman installation then worked fine.
I've error when i install Jekyll on MacOS 10.13.2 with 'gem install jekyll' command:
ERROR: While executing gem ... (Gem::FilePermissionError)
To solve this problem i am installed RVM and install Jekyll with RVM. Jekyll runs perfectly. But i've some critical problem here. Jekyll comes with default theme named 'Minima'. I want to customize theme, but i check site file, includes file is not here. So can't customize theme.
To find the includes file i use that command on the terminal:
which gem minima
Output:
/Users/bekircem/.rvm/rubies/ruby-2.4.1/bin/gem
So i can't access to includes and other similiar files.
How can i fix that problem? Any suggestions?
Ok. I found a solution. Detailed description on the Jekyll.org about theme defaults.
I tried to install this starter project: https://github.com/shakyShane/jekyll-gulp-sass-browser-sync
I have the latest Ruby and Node.js installed. I followed the setup instructions for this starter project: installed jekyll, gulp, ran the npm install command and after that gulp. And when I ran gulp I got this error message:
Dependency Error: Yikes! It looks like you don't have pygments
or one of its dependencies installed. In order to use Jekyll as currently configured, you'll
need to install this gem. The full error message from Ruby is:
'cannot load such file -- pygments' If you run into trouble, you can find helpful resources
at http://jekyllrb.com/help/!
Liquid Exception: pygments in C:/work/Web/MySite/_posts/2014-04-20-welcome-to-jekyll.markdown
ERROR: YOUR SITE COULD NOT BE BUILT:
------------------------------------
pygments
I tried to install pygments manually: gem install pygments.rb, but it didn't help.
I'm new to Ruby and Jekyll... What went wrong here and how can it be fixed?
UPDATE
This is the error message from gem install pygments.rb:
Temporarily enhancing PATH to include DevKit...
Building native extensions. This could take a while...
ERROR: Error installing pygments.rb:
ERROR: Failed to build gem native extension.
current directory: C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/yajl-ruby-1.2.1/ext/yajl
C:/Ruby23-x64/bin/ruby.exe -r ./siteconf20160811-6768-1qhknd7.rb extconf.rb
creating Makefile
current directory: C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/yajl-ruby-1.2.1/ext/yajl
make "DESTDIR=" clean
current directory: C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/yajl-ruby-1.2.1/ext/yajl
make "DESTDIR="
generating yajl-x64-mingw32.def
compiling yajl.c
yajl.c: In function 'yajl_status_to_string':
yajl.c:61:1: warning: visibility attribute not supported in this configuration; ignored [-Wattributes]
...more of these yajl_... visibility attribute not supported messages...
c:/ruby23-x64/devkit/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.7.2/../../../../x86_64-w64-mingw32/lib/../lib/dllcrt2.o: file not recognized: File trun
cated
collect2.exe: error: ld returned 1 exit status
make: *** [yajl.so] Error 1
make failed, exit code 2
Gem files will remain installed in C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/yajl-ruby-1.2.1 for inspection.
Results logged to C:/Ruby23-x64/lib/ruby/gems/2.3.0/extensions/x64-mingw32/2.3.0/yajl-ruby-1.2.1/gem_make.out
OK, after a very long time I finally found a solution to the problem I had. Here's what I did:
Completely uninstalled all gems.
Uninstalled Ruby DevTools
Uninstalled Ruby
Re-installed Ruby
Re-installed Ruby DevTools (downloaded it again, apparently my previous download had corrupted files) , changed config.yml to include - C:/Ruby23-x64
Re-installed pygments.rb (this time it went well, without any errors)
Installed Python (very important)
Edited Gulp's _config.yml and changed default highlighter from pygments to rouge
Installed redcarpet gem gem install redcarpet
Ran gulp again and this time it finally worked as expected!
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.
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.