Skip to content

Instantly share code, notes, and snippets.

View kzk's full-sized avatar
🍶

Kazuki Ohta kzk

🍶
View GitHub Profile
$ bin/pip freeze > requirements.txt
$ cat requirements.txt
gunicorn==0.13.2
pycurl==7.16.4
simplejson==2.2.1
tornado==2.0
wsgiref==0.1.2
mkdir heroku-tornado
cd heroku-tornado
virtualenv --no-site-packages .
source bin/activate
./bin/pip install pycurl==7.16.4
./bin/pip install simplejson
./bin/pip install tornado
./bin/pip install gunicorn
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
auto eth0
iface eth0 inet manual
knife bootstrap 192.168.1.14 -N staging_td-worker --ssh-user ubuntu --ssh-password ubuntu --sudo -E staging -r 'role[base]'
$ export JRUBY_OPTS='--1.8 --server -J-Xmx1024m'
$ trinidad -e development -f config/trinidad.yml
2011/09/04 15:16:30 org.apache.coyote.AbstractProtocolHandler init
情報: Initializing ProtocolHandler ["http-bio-3000"]
2011/09/04 15:16:30 org.apache.catalina.core.StandardService startInternal
情報: Starting service Tomcat
2011/09/04 15:16:30 org.apache.catalina.core.StandardEngine startInternal
情報: Starting Servlet Engine: Apache Tomcat/7.0.11
2011-09-04 15:16:30 INFO: No global web.xml found
2011-09-04 15:16:32 INFO: Info: received max runtimes = 1
# Enable threaded mode
config.threadsafe!
---
port: 3000
jruby_min_runtimes: 1 # min number of runtimes
jruby_max_runtimes: 1 # max number of runtimes
web_apps:
default:
extensions:
platforms :jruby do
# Trinidad
gem 'trinidad'
end
$ gem install rails
$ rails new myapp
$ rails new myapp
$ cd myapp
$./script/rails s
=> Booting WEBrick
=> Rails 3.1.0 application starting in development on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
[2011-09-04 15:06:54] INFO WEBrick 1.3.1
$ bash < <(curl -s https://rvm.beginrescueend.com/install/rvm)
$ rvm install jruby-1.6.4
$ rvm jruby-1.6.4
$ ruby --version
jruby 1.6.4 (ruby-1.8.7-p330) ...