First create a Ubuntu 13.04 x64 droplet on DigitalOcean Control Panel
Then ssh with root account, run this in termianl:
$ wget -qO- https://raw.github.com/progrium/dokku/master/bootstrap.sh | sudo bash
require 'fiddle' | |
module Python | |
def __class__= k | |
value = _wrap self | |
[k.object_id<<1].pack('Q').unpack('C8').each_with_index {|n,i|value[i+8]=n} | |
end | |
def _wrap klass; Fiddle::Pointer.new Fiddle.dlwrap klass; end | |
end |
Prerequisites:
Software components used:
sudo wget -O /etc/yum.repos.d/jenkins.repo http://pkg.jenkins-ci.org/redhat/jenkins.repo | |
sudo rpm --import http://pkg.jenkins-ci.org/redhat/jenkins-ci.org.key | |
sudo yum -y install jenkins | |
sudo yum -y install java-1.7.0-openjdk.x86_64 | |
# Login as the jenkins user and specify shell explicity, | |
# since the default shell is /bin/false for most | |
# jenkins installations. | |
sudo su jenkins -s /bin/bash |
#config/initializers/devise.rb | |
config.warden do |manager| | |
manager.strategies.add :token_header_authenticable, TokenHeaderAuthenticable | |
manager.default_strategies(:scope => :user).unshift :token_header_authenticable | |
end |
References: | |
http://blog.carbonfive.com/2012/02/27/supporting-cross-domain-ajax-in-rails-using-jsonp-and-cors/ | |
https://github.com/cyu/rack-cors | |
http://nelm.io/blog/2011/11/cors-with-sencha-touch/ | |
http://jessehowarth.com/2011/04/27/ajax-login-with-devise | |
============================================================================================================= | |
GEMFILE | |
============================================================================================================= | |
gem 'rack-cors', :require => 'rack/cors' |
define ruby_stack_trace | |
set $VM_FRAME_MAGIC_METHOD = 0x11 | |
set $VM_FRAME_MAGIC_BLOCK = 0x21 | |
set $VM_FRAME_MAGIC_CLASS = 0x31 | |
set $VM_FRAME_MAGIC_TOP = 0x41 | |
set $VM_FRAME_MAGIC_FINISH = 0x51 | |
set $VM_FRAME_MAGIC_CFUNC = 0x61 | |
set $VM_FRAME_MAGIC_PROC = 0x71 | |
set $VM_FRAME_MAGIC_IFUNC = 0x81 | |
set $VM_FRAME_MAGIC_EVAL = 0x91 |
This guide enables you to install (ruby-build) and use (rbenv) multiple versions of ruby, isolate project gems (gemsets and/or bundler), and automatically use appropriate combinations of rubies and gems.
# Ensure system is in ship-shape.
aptitude install git zsh libssl-dev zlib1g-dev libreadline-dev libyaml-dev
# Usage: | |
# | |
# If your controller action looks like this | |
# | |
# def show | |
# @person = Person.find(params[:id]) | |
# SlowPersonater(@person) | |
# end | |
# | |
# change it to look like this: |
This installs a patched ruby 1.9.3-p327 with various performance improvements and a backported COW-friendly GC, all courtesy of funny-falcon.
You will also need a C Compiler. If you're on Linux, you probably already have one or know how to install one. On OS X, you should install XCode, and brew install autoconf
using homebrew.