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

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"

Related

Jekyll not starting

I use ubuntu 19.04.
jekyll v 3.0
What am I doing wrong
ilya#ilya-TM1701:~/Desktop/prsng.ru$ bundle exec jekyll s
/var/lib/gems/2.5.0/gems/jekyll-3.0.0/lib/jekyll/hooks.rb:54: warning: constant ::Fixnum is deprecated
Configuration file: /home/ilya/Desktop/prsng.ru/_config.yml
Source: /home/ilya/Desktop/prsng.ru
Destination: /home/ilya/Desktop/prsng.ru/_site
Incremental build: disabled. Enable with --incremental
Generating...
AutoPages: Disabled/Not configured in site.config.
bundler: failed to load command: jekyll (/usr/local/bin/jekyll)
NoMethodError: undefined method `validate_data!' for #<Jekyll:Page #name="index.html">
The validate_data method was introduced in Jekyll 3.1.0
So, you'll have to update your Jekyll version.
Moreover, Jekyll 3.0.0 was released in October 2015. There has been numerous security fixes since then. Therefore, I strongly recommend updating Jekyll to at least v3.8.6. You can do so by running the following command:
gem install jekyll --version 3.8.6
Or simply install the latest release (v4.0.0) by running:
gem update jekyll

jekyll serve isn't working for dependency error

While trying to run the jekyll serve in GitBash(Win10),I got the following error:
$ jekyll server
Configuration file: D:/Blog/mysite/_config.yml
Source: D:/Blog/mysite
Destination: D:/Blog/mysite/_site
Incremental build: disabled. Enable with --incremental
Generating...
done in 3.25 seconds.
Dependency Error: Yikes! It looks like you don't have jekyll-watch 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 -- ruby_dep/warning' If you run into trouble, you can find helpful resources at https://jekyllrb.com/help/!
jekyll 3.7.3 | Error: jekyll-watch·
I was trying to solve the error via these ways:jekyll serve shows a dependency error,but it didn't work.
according to the prompt, I installed the jekyll-watch again, and then I ran jekyll serve again, the same error was coming up again. In other words, it didn't work for me.
$ jekyll server
Configuration file: D:/Blog/mysite/_config.yml
Source: D:/Blog/mysite
Destination: D:/Blog/mysite/_site
Incremental build: disabled. Enable with --incremental
Generating...
done in 3.25 seconds.
Dependency Error: Yikes! It looks like you don't have jekyll-watch 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 -- ruby_dep/warning' If you run into trouble, you can find helpful resources at https://jekyllrb.com/help/!
jekyll 3.7.3 | Error: jekyll-watch
I tried to bundle install,and then ran $ bundle exec jekyll serve,the another error was coming...
$ bundle exec jekyll serve
D:/rubyInstall/Ruby25-x64/lib/ruby/gems/2.5.0/gems/jekyll-3.7.3/lib/jekyll.rb:35:in 'require': cannot load such file -- i18n (LoadError)
from D:/rubyInstall/Ruby25-x64/lib/ruby/gems/2.5.0/gems/jekyll-3.7.3/lib/jekyll.rb:35:in '<top (required)>'
from D:/rubyInstall/Ruby25-x64/lib/ruby/gems/2.5.0/gems/jekyll-3.7.3/exe/jekyll:8:in 'require'
from D:/rubyInstall/Ruby25-x64/lib/ruby/gems/2.5.0/gems/jekyll-3.7.3/exe/jekyll:8:in '<top (required)>'
from D:/rubyInstall/Ruby25-x64/bin/jekyll:23:in 'load'
from D:/rubyInstall/Ruby25-x64/bin/jekyll:23:in '<main>'
Remove the Gemfile.lock file and run bundle install once again.
This is what #ashmaroli was suggesting in the comments and it worked.
The reason I asked you to post the output from bundle show is to assess if all the dependencies have been installed successfully.
If you go through the first error output, you'll see the following:
The full error message from Ruby is: 'cannot load such file -- ruby_dep/warning'
This means that the gem ruby_dep did not install properly. (ruby_dep is a second-order dependency of jekyll-watch)
So, the question here is,
"Where you able to finish bundle install completely without any errors?"
If no, you probably need to install the Ruby Devkit for your Ruby version by running the following:
$ ridk install

jekyll-multiple-languages-plugin cannot be found

I'm newbie to Ruby and Jekyll. Recently I've tried to install Jekyll Multiple Languages Plugin onto my GitLab Pages instance. I've managed to successfully add
'gem install jekyll-multiple-languages-plugin
bundle install'
into the .gitlab-ci.yml but when I try to add
gems:
jekyll-multiple-languages-plugin
into _config.yml in order to use it on the site my commit fails with the following error:
Using jekyll-watch 1.5.0
Using jekyll 3.4.3
Bundle complete! 3 Gemfile dependencies, 20 gems now installed.
Bundled gems are installed into /usr/local/bundle.
$ jekyll build -d public
Configuration file: /builds/myusername/forty-jekyll-theme/_config.yml
Dependency Error: Yikes! It looks like you don't have jekyll-multiple-languages-plugin 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 -- jekyll-multiple-languages-plugin' If you run into trouble, you can find helpful resources at https://jekyllrb.com/help/!
jekyll 3.4.3 | Error: jekyll-multiple-languages-plugin
ERROR: Job failed: exit code 1
I have used this method because any attempt to edit Gemfile ends up in commit error. I've also tried to do all presented steps except adding bundle install. In that case I get the same error, but the beginning looks like:
18 gems installed
$ gem install jekyll-multiple-languages-plugin
Successfully installed jekyll-multiple-languages-plugin-1.5.1
1 gem installed
$ jekyll build -d public
I did not manage to find the way to solve it on Stack Overflow nor other sites. For example this did not help
With the awesome support of allejo from Jekyll's IRC channel I've managed to solve the problem. Here are the steps:
I've used Gemfile. Now it looks like
source 'https://rubygems.org'
gem 'jekyll'
group :jekyll_plugins do
gem 'jekyll-multiple-languages-plugin'
end
The second modified thing was .gitlab-ci.yml (the first line - image: ruby - is also included)
image: ruby
pages:
stage: build
script:
# - gem install jekyll
- gem install bundler
# - gem install jekyll-multiple-languages-plugin
- bundle install
- bundle exec jekyll build -d public
# - jekyll build -d public
artifacts:
paths:
- public
only:
- master
It produced a bug, but it was only caused by the lack of declared language which is part of standard plugin configuration.

Running Jekyll Serve on Debian Chromebook

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.

Redmine installation error on Windows

I am trying to install redmine on windows7 by using the below url :
http://www.helicontech.com/articles/installing-redmine-on-windows-in-production/
But I have encountered with the below error
Windows error:
The pipe has been ended. (ERROR CODE: 109)
Internal module error
message: Connection has broken type: ZooException file: ZooApplication.cpp
line: 885 version: 3.0.97.450
Can someone help me on this ?
Install Redmine from Zoo beta feed http://www.helicontech.com/zoo/feed-beta/
Or make the following changes to gemfile:
gem "mysql2", "~> 0.3.11" to gem "mysql2", "= 0.3.11" and rename deploy_done.rb to deploy.rb
And run deploy once again.

Resources