Operation not supported on socket # rb_sysopen - ruby

I upgraded my mac o/s to Yosemite.
After the upgrade I tried to work on a project that is a jekyll site. I ran jekyll serve, and received the following error:
jekyll 2.5.3 | Error: Operation not supported on socket # rb_sysopen
Any ideas what the issue could be?

I had the same problem and I got this solved by removing runctl file from the base directory.

I had the same problem:
jekyll 3.3.1 | Error: Operation not supported on socket # rb_sysopen - /Users/fanybo/Library/Application Support/Google/Chrome/App Shim Socket
I was running the server on the root directory, then I changed the directory, and changed the browser, now it works!

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

<urlopen error [SSL: TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 alert protocol version (_ssl.c:590)>

I'm currently installing emsdk. I was just following the tutorial in their site but got stuck at this command:
./emsdk install latest
Here is the output:
Installing SDK 'sdk-1.38.0-64bit'..
Installing tool 'clang-e1.38.0-64bit'..
The contents of file 'llvm/tag/osx_64bit/emscripten-llvm-e1.38.0.tar.gz' already exist in destination '/Users/user1/Desktop/emsdk/clang/e1.38.0_64bit', skipping.
Done installing tool 'clang-e1.38.0-64bit'.
Installing tool 'node-8.9.1-64bit'..
The contents of file 'node-v8.9.1-darwin-x64.tar.gz' already exist in destination '/Users/user1/Desktop/emsdk/node/8.9.1_64bit', skipping.
Done installing tool 'node-8.9.1-64bit'.
Installing tool 'emscripten-1.38.0'..
Error downloading URL 'https://github.com/kripken/emscripten/archive/1.38.0.tar.gz': <urlopen error [SSL: TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 alert protocol version (_ssl.c:590)>
Installation failed!
I already tried upgrading to Python 3 from Python 2.7 as well as upgraded my OpenSSL as per suggestion of some posts here. How can I fix this?
I ran into the same problem. I tried updating openssl on MacOS and using a newer version of python, but it still didn't work.
A hacky work around that worked for me is to download the failing file manually into the zips folder.
For example
cd zips
wget https://github.com/kripken/emscripten/archive/1.38.0.tar.gz
Then try to install again and it should work.

Unicorn+Sinatra+Nginx | FATAL error adding listener

I have a Sinatra application hosted using Nginx and Unicorn. it went down when I upgraded the operating system (Ubuntu 14.04.5 LTS) on the server, and I was able to bring them all back up except this one, the lone Rack-based application. When I try to launch Unicorn (unicorn -c unicorn.rb -D), I get the following error:
I, [2017-08-06T15:39:54.426004 #6505] INFO -- : unlinking existing socket=/tmp/unicorn.wheels-within-wheels.sock
F, [2017-08-06T15:39:54.427777 #6505] FATAL -- : error adding listener addr=/tmp/unicorn.wheels-within-wheels.sock
/home/deployer/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/unicorn-5.2.0/lib/unicorn/socket_helper.rb:113:in `unlink': Operation not permitted # unlink_internal - /tmp/unicorn.wheels-within-wheels.sock (Errno::EPERM)
from /home/deployer/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/unicorn-5.2.0/lib/unicorn/socket_helper.rb:113:in `$
from /home/deployer/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/unicorn-5.2.0/lib/unicorn/socket_helper.rb:107:in `$
from /home/deployer/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/unicorn-5.2.0/lib/unicorn/http_server.rb:231:in `li$
from /home/deployer/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/unicorn-5.2.0/lib/unicorn/http_server.rb:808:in `bl$
from /home/deployer/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/unicorn-5.2.0/lib/unicorn/http_server.rb:808:in `ea$
from /home/deployer/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/unicorn-5.2.0/lib/unicorn/http_server.rb:808:in `bi$
from /home/deployer/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/unicorn-5.2.0/lib/unicorn/http_server.rb:130:in `st$
from /home/deployer/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/unicorn-5.2.0/bin/unicorn:126:in `<top (required)>'
from /home/deployer/.rbenv/versions/2.2.3/bin/unicorn:23:in `load'
from /home/deployer/.rbenv/versions/2.2.3/bin/unicorn:23:in `<main>'
Anyone have an idea on how to fix this? Thanks.
It's fixed after I performed the following two steps:
As described in this Server Fault answer, I changed the group of the application owner, 'deployer', from 'deployer' to 'staff'.
I changed the owner of the socket file to deployer:staff (sudo chown deployer:staff /tmp/unicorn.wheels-within-wheels.sock).
Then I ran bundle update to update the gems, and finally Unicorn ran successfully and the application was live again.
The following link said that kind of problem is occured upgrading MacOSX to El Capitan. if you can follow the same path, maybe you could resolve the problem.
ERROR: While executing gem ... (Errno::EPERM) Operation not permitted

Set up jekyll on windows

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"

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