Skip to content

Instantly share code, notes, and snippets.

IOError: closed stream
close at org/jruby/RubyIO.java:2053
begin_restart at /u/apps/docmago/shared/bundle/jruby/1.9/gems/puma-1.6.3-java/lib/puma/server.rb:637
run at /u/apps/docmago/shared/bundle/jruby/1.9/gems/puma-1.6.3-java/lib/puma/cli.rb:438
call at org/jruby/RubyProc.java:249
2012-10-23 22:07:54 +0200: Listen loop error: #<Errno::EBADF: Bad file descriptor - Bad file descriptor>
org/jruby/ext/socket/RubyUNIXServer.java:81:in `accept'
/u/apps/docmago/shared/bundle/jruby/1.9/gems/puma-1.6.3-java/lib/puma/server.rb:252:in `handle_servers'
org/jruby/RubyArray.java:1612:in `each'
/u/apps/docmago/shared/bundle/jruby/1.9/gems/puma-1.6.3-java/lib/puma/server.rb:248:in `handle_servers'
@haberbyte
haberbyte / gist:4240465
Created December 8, 2012 14:32
JRuby on Ubuntu x86_64 trying to install pygments gem with native extensions.
rake aborted!
load error: posix_spawn_ext -- java.lang.UnsatisfiedLinkError: failed to load shim library, error: /opt/rubies/jruby-1.7.1/lib/native/x86_64-Linux/libjruby-cext.so: cannot open shared object file: No such file or directory
org/jruby/RubyKernel.java:1027:in `require'
# Rails 4, empty app
# app/controllers/clients_controller.rb
class ClientsController < ApplicationController
def index
@clients = Client.all
end
end
# app/views/clients/index.html.erb
<li><img src="img/portfolio/1.jpg" height="200"></li>
<li><img src="img/portfolio/2.jpg" height="200"></li>
<li><img src="img/portfolio/3.jpg" height="200"></li>
<li><img src="img/portfolio/4.jpg" height="200"></li>
<li><img src="img/portfolio/5.jpg" height="200"></li>
<li><img src="img/portfolio/6.jpg" height="200"></li>
<li><img src="img/portfolio/7.jpg" height="200"></li>
<li><img src="img/portfolio/8.jpg" height="200"></li>
<li><img src="img/portfolio/9.jpg" height="200"></li>
<li><img src="img/portfolio/10.jpg" height="200"></li>
# MODEL
class Case < ActiveRecord::Base
include Eventable
has_many :tasks
concerning :Assignment do
def assign_to(new_owner:, details:)
transaction do
@haberbyte
haberbyte / gist:11295921
Created April 25, 2014 16:48
Figure - Subfigure
\begin{figure}[h]
\makebox[\linewidth][c]{%
\begin{subfigure}[b]{.6\textwidth}
\centering
Figure 1
\caption{5 feasible network states}
\end{subfigure}%
\begin{subfigure}[b]{.6\textwidth}
\centering
Figure 2
\usepackage{nomencl}
% Rename command to \abk instead of \nomenclature
\let\abk\nomenclature
% German title for list of abbreviations
% \renewcommand{\nomname}{Abkürzungsverzeichnis}
% Distance between abbreviation and explanation
\setlength{\nomlabelwidth}{.20\hsize}
\renewcommand{\nomlabel}[1]{#1 \dotfill}
% Smaller line spacing
%\setlength{\nomitemsep}{-3.5pt}%-\parsep}
### Keybase proof
I hereby claim:
* I am habermann24 on github.
* I am habermann24 (https://keybase.io/habermann24) on keybase.
* I have a public key whose fingerprint is 1440 951A 98CB 6940 AD35 4CDF D386 1C5D C6DC 34A5
To claim this, I am signing this object:
input {
udp {
host => "0.0.0.0"
buffer_size => 32768
port => 5228
codec => json_lines
}
}
output {
class ClaimBroadcastJob < ApplicationJob
queue_as :default
def perform(claim)
message = "#{claim.user.name} just claimed a desk!"
ActionCable.server.broadcast "activity_channel", user_id: claim.user.id, message: message
end
end