Jekyll serve error - jekyll 3.2.1 Error: File exists # syserr_fail2_in - ruby

I'm attempting to migrate a Jekyll site over to my local machine and was doing ok but I've run into an error I am struggling to find much information regarding. I am pretty new to the whole Jekyll thing so any help is much appreciated.
When I run bundle exec jekyll serve I get the following error:
$ bundle exec jekyll serve
Configuration file: /home/Documents/devsite/websites/marketing/_config.yml
Source: /home/Documents/devsite/websites/marketing
Destination: /home/Documents/devsite/websites/marketing/_site
Incremental build: disabled. Enable with --incremental
Generating...
Building site for default language: "en-gb" to: /home/Documents/devsite/websites/marketing/_site
jekyll 3.2.1 | Error: File exists # syserr_fail2_in - /home/Documents/devsite/websites/marketing/_site/favicon.ico
I'm unsure as to what this error relates to so I'm a little unsure as to where to go next. Thanks for any help.

Related

Ruby on Rail running apache show index of when accessing the site

I have recently updated to Apache 2.4, and I am using Ruby on Rail to run my application. Following the upgrade, the site shows a content as seen in the image below, and the error on the log file shows this error message. I have tried using the 'Bundle Install' and checked the permission but that hasn't helped. Any advice would be greatly appreciated. Thanks
[ 2022-02-07 07:47:24.5559 8104/7efc89c8f700 age/Cor/App/Implementation.cpp:304 ]: Could not spawn process for application /home/adminuser/hroot: An error occured while starting up the preloader.
Error ID: ba7e6074
Error details saved to: /tmp/passenger-error-RA01E9.html
Message from application: libmysqlclient.so.18: cannot open shared object file: No such file or directory - /usr/local/rvm/gems/ruby-2.0.0-p353#hroot/gems/mysql2-0.3.14/lib/mysql2/mysql2.so (LoadError)
PassengerRuby /usr/local/rvm/gems/ruby-2.0.0-p353#hroot/wrappers/ruby
SetEnv GEM_HOME /root/.gem/ruby/1.9.1
This error shows a problem with the shared objects. You probably updated MySQL/MariaDB libraries with Apache and new libraries are incompatible with your mysql2 gem build. The solution is simple:
First, ensure you are using the ruby-2.0.0-p353#hroot RVM environment.
Then, execute the following command:
gem install mysql2 --version 0.3.14
This should rebuild your mysql2 gem for the new MySQL/MariaDB client libraries on your system.
this isn't the answer anyway but another method to run ruby (in my case Windows 10 ; if you use another OS try to find out how to modify inside index.php the ruby starter)
i post here an alternative method to use apache + php +... and ruby
https://stackoverflow.com/a/71733656/5781320

Bundle using old version of jekyll

I am trying to preview a site I have built in the past, using jekyll. Since then, I believe there have been updates to jekyll, and I now use zsh on MacOS 10.15.2. I'm having trouble now running a preview because it seems bundle keeps using an old version of jekyll.
When I run bundle exec jekyll server --unpublished I receive this error:
(base) ➜ angoodkind.github.io git:(master) ✗ bundle exec jekyll server --unpublished
Configuration file: /Users/adamg/Dropbox/Website/github_io/angoodkind.github.io/_config.yml
NOTE: Inheriting Faraday::Error::ClientError is deprecated; use Faraday::ClientError instead. It will be removed in or after version 1.0
Faraday::Error::ClientError.inherited called from /Users/adamg/Dropbox/Website/github_io/angoodkind.github.io/vendor/cache/ruby/2.6.0/gems/octokit-4.14.0/lib/octokit/middleware/follow_redirects.rb:14.
Source: /Users/adamg/Dropbox/Website/github_io/angoodkind.github.io
Destination: /Users/adamg/Dropbox/Website/github_io/angoodkind.github.io/_site
Incremental build: disabled. Enable with --incremental
Generating...
Error reading file /Users/adamg/Dropbox/Website/github_io/angoodkind.github.io/blog/index.html: (<unknown>): did not find expected key while parsing a block mapping at line 7 column 5
Error: could not read file /Users/adamg/Dropbox/Website/github_io/angoodkind.github.io/vendor/cache/ruby/2.6.0/gems/jekyll-3.5.2/lib/site_template/_posts/0000-00-00-welcome-to-jekyll.markdown.erb: Invalid date '<%= Time.now.strftime('%Y-%m-%d %H:%M:%S %z') %>': Document 'vendor/cache/ruby/2.6.0/gems/jekyll-3.5.2/lib/site_template/_posts/0000-00-00-welcome-to-jekyll.markdown.erb' does not have a valid date in the YAML front matter.
ERROR: YOUR SITE COULD NOT BE BUILT:
------------------------------------
Invalid date '<%= Time.now.strftime('%Y-%m-%d %H:%M:%S %z') %>': Document 'vendor/cache/ruby/2.6.0/gems/jekyll-3.5.2/lib/site_template/_posts/0000-00-00-welcome-to-jekyll.markdown.erb' does not have a valid date in the YAML front matter.
However, the system should be using jekyll 4.0.0, which was recently installed. Why is it using jekyll 3.5.2?

Issue getting wkhtmltoimage working on Amazon Linux / Ruby on Rails

It works fine on my development environment (osx), but I can't get it to work on the server.
in my gemfile
gem 'imgkit'
gem 'wkhtmltoimage-binary'
When I run:
kit = IMGKit.new(html, quality: 100)
img_binary = kit.to_img
I get this error
IMGKit::CommandFailedError: Command failed:
/var/www/myapp/shared/bundle/ruby/2.3.0/bin/wkhtmltoimage --height 0 --quality 100 --format jpg - -:
/var/www/myapp/shared/bundle/ruby/2.3.0/gems/wkhtmltoimage-binary-0.12.5/libexec/wkhtmltoimage-amd64:
error while loading shared libraries: libjpeg.so.8: cannot open shared object file: No such file or directory
I've searched online and tried installing some more packages, but no success. Anyone able to help? Thanks.
Using 'wkhtmltoimage-binary', '~> 0.11.0.1.1' in the Gemfile fixed the issue for me. Found the solution here.

Jekyll Build Not Working after MacOS High Sierra Update

Not sure if this is a bug, but I wasn’t able to find anything on the Web. Everything was working fine using a combination of Grunt, Jekyll and Homebrew to create my website. But once I updated to High Sierra the Jekyll build fails.
The way I usually run Jekyll build is via grunt-shell task like so:
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
shell: {
jekyllBuild: {
command: 'jekyll build'
}
},
connect: {
server: {
options: {
hostname: 'localhost',
port: 4000,
base: '_build'
}
}
},
...
watch: {
jekyll: {
options: {
livereload: true
},
files: [
'**/*.scss',
'**/*.html',
'**/*.js',
// The negations must go after
'!*node_modules/**',
'!*_build/**',
'*.md',
'*.yml',
'img/**',
],
tasks: ['shell:jekyllBuild','postcss']
}
}
});
...
grunt.registerTask('serve', ['shell','connect','watch']);
Which gives the following error:
Running "shell:jekyllBuild" (shell) task
Configuration file: [URL]/_config.yml
Source: [URL]
Destination: _build
Incremental build: disabled. Enable with --incremental
Generating...
jekyll 3.6.0 | Error: negative argument
Warning: Command failed: jekyll build
Use --force to continue.
Aborted due to warnings.
Everything else I run works except Jekyll.
I also tried just running jekyll build without shell task but still got an error:
jekyll 3.6.0 | Error: negative argument
Warning: Command failed: jekyll build
Use --force to continue.
Aborted due to warnings.
I am using Homebrew to keep things local and everything seems to be in the correct location:
~$ which jekyll
/usr/local/bin/jekyll
~$ which ruby
/usr/local/bin/ruby
~$ which grunt
[URL]/.npm-packages/bin/grunt
~$ which gem
/usr/local/bin/gem
~$ which node
/usr/local/bin/node
I realize, my setup may not be the best, but it was working so I'm hoping for some guidance. I was not the one to initially create this setup and I'm not a programmer but rather a web designer who can hack things together to my own detriment at times :)
The issue ended up not being related to OS update, but rather a custom Jekyll plugin that was causing the issue. Once the plugin was removed everything worked. However, something did change perhaps in Jekyll or elsewhere to make the plugin not work all of the sudden. I will open a separate issue to figure that out. Thanks #Casper and #JoostS for quick responses.

Capistrano error: 'Could not find form_data-0.1.0 in any of the sources' while deploying

I have a rails application on the dev server and I deleted the shared folder while attempting to make some changes. When I'm trying to redeploy the application, I get the following error on Capistrano.
servers: ["xx.xxx.xxx.223"] [xx.xxx.xxx.223] executing command
** [out :: xx.xxx.xxx.223] Could not find form_data-0.1.0 in any of the sources
command finished in 41821ms
*** [deploy:update_code] rolling back
* executing "rm -rf /var/www/apps/SITENAME/releases/20150507165055; true"
I have tried bundle install --deployment and I still get the same error
Could not find form_data-0.1.0 in any of the sources
Any help would be greatly appreciated.
This could be caused by outdated Gemfile.lock file. Remove Gemfile.lock, run bundle install and try to start your app again.

Resources