This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'bundler/setup' | |
require 'celluloid/autostart' | |
require 'celluloid/probe' | |
Celluloid.logger = ::Logger.new './celluloid.log' | |
class UselessActor | |
include Celluloid | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
>= 0.9.6 (typo?) | |
https://github.com/ruby/ruby/blob/fd5c678ff76ccb815ee52a4035d5549d3d2da74e/ext/openssl/extconf.rb#L61 | |
>= 0.9.7 | |
https://github.com/ruby/ruby/blob/fd5c678ff76ccb815ee52a4035d5549d3d2da74e/ext/openssl/ossl.h#L37 | |
[Closed bug - wont fix](http://bugs.ruby-lang.org/issues/5655) | |
Ruby 1.9.3p0 on MacOS Lion, recommended solution: install OpenSSL using MacPorts or Homebrew. But surely Lion has a OpenSSL >= 0.9.7? | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# FIXME: Can't node write a PID file? This hopes the current user doesn't run more | |
# than one node process. | |
kill_node_server() { | |
kill -9 $(ps | grep -m 1 "node" | cut -c 1-5) | |
} | |
setup_heroku() { | |
gem install heroku -d --no-rdoc --no-ri |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ heroku apps | |
/Users/testuser/.rvm/gems/ruby-1.9.3-p194@my_app/gems/excon-0.16.2/lib/excon/ssl_socket.rb:60: [BUG] Segmentation fault | |
ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-darwin10.8.0] | |
-- Control frame information ----------------------------------------------- | |
c:0019 p:---- s:0100 b:0100 l:000099 d:000099 CFUNC :connect | |
c:0018 p:0661 s:0097 b:0097 l:000096 d:000096 METHOD /Users/testuser/.rvm/gems/ruby-1.9.3-p194@my_app/gems/excon-0.16.2/lib/excon/ssl_socket.rb:60 | |
c:0017 p:---- s:0088 b:0088 l:000087 d:000087 FINISH | |
c:0016 p:---- s:0086 b:0086 l:000085 d:000085 CFUNC :new | |
c:0015 p:0064 s:0081 b:0078 l:000077 d:000077 METHOD /Users/testuser/.rvm/gems/ruby-1.9.3-p194@my_app/gems/excon-0.16.2/lib/excon/connection.rb:357 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
BUNDLE_FROZEN: '1' | |
BUNDLE_PATH: /home/deployer/apps/infrastructureapp/shared/bundle | |
BUNDLE_DISABLE_SHARED_GEMS: '1' | |
BUNDLE_WITHOUT: development:test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
source :rubygems | |
gem 'rails', '3.2.8' | |
gem 'sqlite3' | |
gem 'jquery-rails' | |
group :development do | |
gem 'capistrano' | |
gem 'capistrano_colors' | |
gem 'rvm-capistrano' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
if [[ -s "/home/deployer/.rvm/environments/ruby-1.9.3-p194@infrastructureapp" ]] | |
then | |
source "/home/deployer/.rvm/environments/ruby-1.9.3-p194@infrastructureapp" | |
cd "/home/deployer/apps/infrastructureapp/current" | |
exec bundle "$@" | |
else | |
echo "ERROR: Missing RVM environment file: '/home/deployer/.rvm/environments/ruby-1.9.3-p194@infrastructureapp'" >&2 | |
exit 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
100 = :continue | |
101 = :switching_protocols | |
102 = :processing | |
200 = :ok | |
201 = :created | |
202 = :accepted | |
203 = :non_authoritative_information | |
204 = :no_content | |
205 = :reset_content | |
206 = :partial_content |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'resolv' | |
class Resolv | |
def self.match?( node ) | |
case node | |
when /\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/ | |
name = getname(node) | |
node == getaddress(name) | |
else |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading development environment (Rails 3.0.9) | |
ruby-1.9.2-p290 :001 > env = Rack::MockRequest.env_for('/') | |
=> {"rack.version"=>[1, 1], "rack.input"=>#<StringIO:0x00000102bfa628>, "rack.errors"=>#<StringIO:0x00000102bfa6c8>, "rack.multithread"=>true, "rack.multiprocess"=>true, "rack.run_once"=>false, "REQUEST_METHOD"=>"GET", "SERVER_NAME"=>"example.org", "SERVER_PORT"=>"80", "QUERY_STRING"=>"", "PATH_INFO"=>"/", "rack.url_scheme"=>"http", "HTTPS"=>"off", "SCRIPT_NAME"=>"", "CONTENT_LENGTH"=>"0"} | |
ruby-1.9.2-p290 :002 > ActionController::Dispatcher.new.call(env) | |
=> [200, {"Last-Modified"=>"Wed, 03 Aug 2011 13:08:10 GMT", "Content-Type"=>"text/html", "Content-Length"=>"5780"}, #<Rack::File:0x00000102f7a230 @root="/Users/testuser/Documents/Personal/Source/dispatch-test-rails3-stable/public", @path_info="/index.html", @path="/Users/testuser/Documents/Personal/Source/dispatch-test-rails3-stable/public/index.html">] | |