Set up jekyll on windows - ruby

I try to set up jekyll on window10 (x64)
Ruby -v
ruby 2.2.3p173 (2015-08-18 revision 51636) [x64-mingw32]
gem -v
2.6.6
D:\myblog>jekyll serve
Configuration file: D:/myblog/_config.yml
Source: D:/myblog
Destination: D:/myblog/_site
Incremental build: disabled. Enable with --incremental
Generating...
Error reading file C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/minima-1.0.1/_layouts/default.html: No such file or directory # rb_sysopen - /Ruby22-x64/lib/ruby/gems/2.2.0/gems/minima-1.0.1/_layouts/default.html
Error reading file C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/minima-1.0.1/_layouts/page.html: No such file or directory # rb_sysopen - /Ruby22-x64/lib/ruby/gems/2.2.0/gems/minima-1.0.1/_layouts/page.html
Error reading file C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/minima-1.0.1/_layouts/post.html: No such file or directory # rb_sysopen - /Ruby22-x64/lib/ruby/gems/2.2.0/gems/minima-1.0.1/_layouts/post.html
Can someone help me to fix it?

I was having the same problem. Following the path shown in the command line (for me it was) :
C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/minima-1.0.1/_layouts/default.html
and copying the _layouts, _includes and _sass folders manually did the thing for me. Although this is not a permanent solution as there seems some bug which is preventing jekyll to copy file from the directory shown in the error.
Hope this helps you too for now.

The issue is due to your Project directory and Ruby installation, being on different drives (i.e. D: vs. C:).
To fix, you can simply create a (junction) link to C:/Ruby22-x64 from the location D:/Ruby22-x64.
Commands you need to enter:
D:
cd /
mklink /J "Ruby22-x64" "C:/Ruby22-x64"

Related

Ocra error "No such file or directory # rb_sysopen" in Ocra when compiling

"No such file or directory # rb_sysopen - C:/Users//OneDrive/Desktop/ruby/fiber.so (Errno::ENOENT)" keeps getting thrown by Ocra when I try to compile my app into an exe.
I've used fixes mentioned by others but none of them work, likely because most of them are for an older version of Ruby.
I'm using Ruby2d and I include it in my command:
ocra --verbose move.rb --no-dep-run --gem-minimal=ruby2d

Build kustomize 3.2.0 on Windows

Can someone suggest how to install 3.2.0 version of kustomize on Windows, please?
I need specifically v3.2.0 on Windows. I am following this tutorial.
Source code: https://github.com/kubernetes-sigs/kustomize/releases/tag/v3.2.0
I downloaded the zip file and installed Go. However when I run go install . inside that kustomize folder i get: no Go files in path/kustomize/..
Also tried step by step aforementioned tutorial but same error..
EDIT: Trying to install via https://github.com/kubernetes-sigs/kustomize/blob/master/hack/install_kustomize.sh ./install_kustomize.sh 3.2.0 I get: Version v3.2.0 does not exist.
When I try ./install_kustomize.sh 3.2.1 I get:
tar (child): ./kustomize_v*_windows_amd64.tar.gz: Cannot open: No such file or directory
tar (child): Error is not recoverable: exiting now
tar: Child returned status 2
tar: Error is not recoverable: exiting now
Env: Windows 10, executing in GIT Bash
You'll need to run go install ./cmd/kustomize/.
That is where the main.go is you want built.
This will install the executable in your %GOBIN%.
You might want to use go build -o kustomize.exe ./cmd/kustomize/ instead to get the executable in your current working directory.

cannot open shared object file: No such file or directory yet file directory and everything exists (ruby project)

Error: The application encountered the following error: libicudata.so.48: cannot open shared object file: No such file or directory - /usr/local/rvm/gems/ruby-2.3.1/gems/charlock_holmes-0.7.6/lib/charlock_holmes/charlock_holmes.so (LoadError)
yet vi /usr/local/rvm/gems/ruby-2.3.1/gems/charlock_holmes-0.7.6/lib/charlock_holmes/charlock_holmes.so opens it right up...
I am on centos 7 using ruby 2.3.1
Any idea why this is doing this

Can't load Metasploit after installation

After istallation of Metaploit via darkoperator/MSF-Installer try to start the msfconsole and it return:
/usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require': cannot load such file -- /usr/local/bin/config/boot (LoadError)
from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /usr/local/bin/msfconsole:23:in `<main>'
using:
Linux ubuntu 3.13.0-32-generic
Have someone an idea?
For me it helped following:
sudo chmod o+r /var/lib/gems/1.9.1/gems/robots-0.10.1/lib/robots.rb
after that user is able to run metasploit.
As user4170357 but with a slight difference due to: Mac OS X 10.9.5
to fix, run:
sudo chmod o+r /Library/Ruby/Gems/2.0.0/gems/robots-0.10.1/lib/robots.rb
(path is a little bit different than original answer)
This is a bug in the kernel where file-system becomes read-only or inaccessible randomly. Read more here.
To fix Just reboot and it will be fixed.
From http://techlogbook.wordpress.com/2014/08/19/installing-metasploit-on-xubuntu-14-04/
$ msfconsole
/usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in require': cannot load such file -- /usr/local/bin/config/boot (LoadError)
from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:inrequire'
from /usr/local/bin/msfconsole:23:in `'
What I did was to edit /usr/local/bin/msfconsole line 23, and replace that line with:
require File.expand_path('/usr/local/share/metasploit-framework/config/boot.rb', __FILE__)
Make sure that the path for config/boot.rb is correct for your system.
Now, when I run msfconsole again, it gives me some warning of missing permission to write some log file.
Rails Error: Unable to access log file. Please ensure that /usr/local/share/metasploit-framework/log/production.log exists and is chmod 0666. The log level has been raised to WARN and the output directed to STDERR until the problem is fixed.
So I need to create the directory and make sure it is accessible.
$ cd /usr/local/share/metasploit-framework/
$ mkdir log
$ chmod 777 log
Now, I can run msfconsole. Before reaching the prompt, however, I got the following warning:
[-] WARNING! The following modules could not be loaded!
[-] /usr/local/share/metasploit-framework/modules/auxiliary/scanner/smb/smb_login.rb: LoadError cannot load such file -- robots`
Maybe that can help you get started
this might be becuase you bundled or installed metasploit as root you might need to get root access to run metasploit

PHPUnit instllation broken since Mountain Lion upgrade

I upgraded my Mac from Lion to Mountain Lion a few months ago.
I previously had PHPUnit working with my Zend Framework 1.11 without issue but had not used it much.
I now have Zend Framewoprk 2 running on a Quick Start website but I simply cannot gwet PHPUnit to work.
I've searched numerous questions related to this on Stackoverflow and tried reinstalls and path changes to php.ini without success.
I have also checked that my PEAR install is working fine, which it is but the error is the same when I try "phpunit --version"
PHP Warning: require(/usr/lib/php/PHPUnit/Autoload.php): failed to open stream: No such file or directory in /usr/bin/phpunit on line 43
Warning: require(/usr/lib/php/PHPUnit/Autoload.php): failed to open stream: No such file or directory in /usr/bin/phpunit on line 43
PHP Fatal error: require(): Failed opening required '/usr/lib/php/PHPUnit/Autoload.php' (include_path='.:/Users/johnadmin/pear/share/pear/PEAR:/Users/johnadmin/pear/share/pear:/usr/bin/phpunit:/Users/johnadmin/pear/share/pear/PHPUnit:/usr/bin/phpunit:/Users/johnadmin/pear/bin/pear') in /usr/bin/phpunit on line 43
Fatal error: require(): Failed opening required '/usr/lib/php/PHPUnit/Autoload.php' (include_path='.:/Users/johnadmin/pear/share/pear/PEAR:/Users/johnadmin/pear/share/pear:/usr/bin/phpunit:/Users/johnadmin/pear/share/pear/PHPUnit:/usr/bin/phpunit:/Users/johnadmin/pear/bin/pear') in /usr/bin/phpunit on line 43
Attempts to reinstall phpunit results in me been told phpunit is already installed and its version current.
$ sudo pear install phpunit/PHPUnit
phpunit/PHPUnit is already installed and is the same as the released version 3.7.10
install failed
Trying to uninstall fails as phpunit is a dependancy in other items/applications.
Is there anyway I can fix this or completely remove it and reinstall fresh?
include_path in my php.ini is:
include_path=".:/Users/johnadmin/pear/share/pear/PEAR:/Users/johnadmin/pear/share/pear:/usr/bin/phpunit:/Users/johnadmin/pear/share/pear/PHPUnit:/usr/bin/phpunit:/Users/johnadmin/pear/bin/pear"
Additional info in case its relevant:
> which phpunit
/usr/bin/phpunit
> which pear
/Users/johnadmin/pear/bin/pear
> which php
/usr/bin/php
Autoload.php is located in
/Users/johnadmin/pear/share/pear/PHPUnit
Additionally, the folder '/usr/lib/php/' exists but the PHPUnit directory is not under that, it is under /Users/johnadmin/pear/share/pear/PHPUnit
bash_profile content/paths
PATH=$PATH:/usr/local/Cellar/imagick/3.0.1:/usr/local/sbin:/Users/johnadmin/pear/share/pear:$
##
# Your previous /Users/johnadmin/.bash_profile file was backed up as /Users/johnadmin/.bash_$
##
# MacPorts Installer addition on 2012-04-17_at_08:37:29: adding an appropriate PATH variable$
export PATH=/opt/local/bin:/opt/local/sbin:$PATH
# Finished adapting your PATH environment variable for use with MacPorts.
##
# Your previous /Users/johnadmin/.bash_profile file was backed up as /Users/johnadmin/.bash_$
##
# MacPorts Installer addition on 2012-10-09_at_16:09:32: adding an appropriate PATH variable$
export PATH=/opt/local/bin:/opt/local/sbin:$PATH
# Finished adapting your PATH environment variable for use with MacPorts.
##
# Your previous /Users/johnadmin/.bash_profile file was backed up as /Users/johnadmin/.bash_$
##
# MacPorts Installer addition on 2012-12-06_at_13:40:25: adding an appropriate PATH variable$
export PATH=/opt/local/bin:/opt/local/sbin:$PATH
# Finished adapting your PATH environment variable for use with MacPorts.
At my wits end as I do not know what else to check frankly and any help would be a big help. Ta
John
Nevermind after hours of trying various solutions I found that creating a simlink to the PHPUnit folder worked.
Command I used was
sudo ln -s /Users/johnadmin/pear/share/pear/PHPUnit /usr/lib/php/PHPUnit
Seriously, this helped me a lot:
Install Composer (http://getcomposer.org)
composer require phpunit/phpunit 3.7.*
composer update
Three simple steps to pull PHPUnit source, and binary to your project.

Resources