Skip to content

Instantly share code, notes, and snippets.

@whartonn
Created July 1, 2011 18:05
Show Gist options
  • Save whartonn/1059088 to your computer and use it in GitHub Desktop.
Save whartonn/1059088 to your computer and use it in GitHub Desktop.
starting out with this install (ubuntu, nginx, rvm multi-user, rails 3.0.9)
if [[ -s "/usr/local/rvm/environments/ruby-1.9.2-p136@fat" ]] ; then
. "/usr/local/rvm/environments/ruby-1.9.2-p136@fat"
else
rvm --create use "ruby-1.9.2-p136@fat"
fi
source 'http://rubygems.org'
gem 'rails', '3.0.9'
# rake 0.9.0 is broken (should work with rails 3.0.8)
gem 'rake', '~> 0.8.7'
# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'
gem 'sqlite3-ruby', :require => 'sqlite3'
group :staging, :production do
# use postgresql remotely
gem 'pg'
end
group :development do
# access rspec generators
# gem 'rspec-rails'
end
group :test do
# gem 'rspec'
gem 'webrat'
end
group :development, :test do
# gem 'autotest'
# gem 'autotest-rails-pure'
# mac-only
# gem 'autotest-fsevent'
# gem 'autotest-growl'
end
# Use unicorn as the web server
# gem 'unicorn'
# Deploy with Capistrano
gem 'capistrano'
# To use debugger (ruby-debug for Ruby 1.8.7+, ruby-debug19 for Ruby 1.9.2+)
# gem 'ruby-debug'
# gem 'ruby-debug19', :require => 'ruby-debug'
# Bundle the extra gems:
# gem 'bj'
# gem 'nokogiri'
# gem 'sqlite3-ruby', :require => 'sqlite3'
# gem 'aws-s3', :require => 'aws/s3'
gem 'rvm'
gem 'devise', '1.3.4'
gem 'devise_invitable'
gem "oa-oauth", :require => "omniauth/oauth"
gem 'omniauth'
gem 'jquery-rails'
gem 'uuidtools'
gem 'grackle'
gem 'fb_graph'
gem 'factory_girl'
gem 'attr_encrypted'
gem 'will_paginate', '~> 3.0.pre2'
# queue strategies
gem 'delayed_job'
gem 'resque'
gem 'redis'
# gem 'client_side_validations'
# images
gem "paperclip", "~> 2.3"
# sensors
# gem "nikeplus-ruby", :git => 'https://github.com/bob-p/nikeplus-ruby.git'
gem "fitbit"
# better IRB experience
gem 'wirble'
gem 'awesome_print'
gem 'httparty'
gem 'mush'
# Bundle gems for the local environment. Make sure to
# put test-only gems in this group so their generators
# and rake tasks are available in development mode:
# group :development, :test do
# gem 'webrat'
# end
lrwxrwxrwx 1 www-data www-data 36 2011-07-01 17:40 current -> /var/www/fat/releases/20110701174029
drwxrwsr-x 4 www-data www-data 4096 2011-07-01 17:40 releases
drwxrwsr-x 7 www-data www-data 4096 2011-07-01 06:19 shared
user www-data www-data;
worker_processes 1;
#error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;
#pid logs/nginx.pid;
events {
worker_connections 1024;
}
http {
passenger_root /usr/local/rvm/gems/ruby-1.9.2-p136/gems/passenger-3.0.2;
passenger_ruby /usr/local/rvm/wrappers/ruby-1.9.2-p136/ruby;
include mime.types;
default_type application/octet-stream;
#log_format main '$remote_addr - $remote_user [$time_local] "$request" '
# '$status $body_bytes_sent "$http_referer" '
# '"$http_user_agent" "$http_x_forwarded_for"';
#access_log logs/access.log main;
sendfile on;
#tcp_nopush on;
#keepalive_timeout 0;
keepalive_timeout 65;
gzip on;
server {
listen 80;
server_name us-west-1.compute.amazonaws.com;
rails_env production;
root /var/www/fat/current/public;
#autoindex on;
passenger_enabled on;
index index.html index.htm;
client_max_body_size 50M;
#charset koi8-r;
#access_log logs/host.access.log main;
#location / {
# root html;
# index index.html index.htm;
#}
#error_page 404 /404.html;
# redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
# proxy the PHP scripts to Apache listening on 127.0.0.1:80
#
#location ~ \.php$ {
# proxy_pass http://127.0.0.1;
#}
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
#location ~ \.php$ {
# root html;
# fastcgi_pass 127.0.0.1:9000;
# fastcgi_index index.php;
# fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
# include fastcgi_params;
#}
# deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
#
#location ~ /\.ht {
# deny all;
#}
}
# another virtual host using mix of IP-, name-, and port-based configuration
#
#server {
# listen 8000;
# listen somename:8080;
# server_name somename alias another.alias;
# location / {
# root html;
# index index.html index.htm;
# }
#}
# HTTPS server
#
server {
rails_env production;
listen 443;
server_name us-west-1.compute.amazonaws.com;
ssl on;
ssl_certificate /etc/ssl/certs/unsigned_bhi_ssl.crt;
ssl_certificate_key /etc/ssl/private/unsigned_bhi_ssl.key;
ssl_session_timeout 5m;
ssl_protocols SSLv2 SSLv3 TLSv1;
ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP;
ssl_prefer_server_ciphers on;
root /var/www/fat/current/public;
passenger_enabled on;
passenger_use_global_queue on;
# location / {
# root html;
# index index.html index.htm;
# }
}
}
ruby-1.9.2-p136@global:
system:
uname: "Linux ip-10-168-106-243 2.6.31-302-ec2 #7-Ubuntu SMP Tue Oct 13 19:06:04 UTC 2009 i686 GNU/Linux"
bash: "/bin/bash => GNU bash, version 4.0.33(1)-release (i486-pc-linux-gnu)"
zsh: " => not installed"
rvm:
version: "rvm 1.6.20 by Wayne E. Seguin (wayneeseguin@gmail.com) [https://rvm.beginrescueend.com/]"
ruby:
interpreter: "ruby"
version: "1.9.2p136"
date: "2010-12-25"
platform: "i686-linux"
patchlevel: "2010-12-25 revision 30365"
full_version: "ruby 1.9.2p136 (2010-12-25 revision 30365) [i686-linux]"
homes:
gem: "/usr/local/rvm/gems/ruby-1.9.2-p136@global"
ruby: "/usr/local/rvm/rubies/ruby-1.9.2-p136"
binaries:
ruby: "/usr/local/rvm/rubies/ruby-1.9.2-p136/bin/ruby"
irb: "/usr/local/rvm/rubies/ruby-1.9.2-p136/bin/irb"
gem: "/usr/local/rvm/rubies/ruby-1.9.2-p136/bin/gem"
rake: "/usr/local/rvm/gems/ruby-1.9.2-p136@global/bin/rake"
environment:
PATH: "/usr/local/rvm/gems/ruby-1.9.2-p136@global/bin:/usr/local/rvm/rubies/ruby-1.9.2-p136/bin:/usr/local/bin:/usr/local/rvm/gems/ruby-1.9.2-p136@fat/bin:/usr/local/rvm/gems/ruby-1.9.2-p136/bin:/usr/local/sbin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games"
GEM_HOME: "/usr/local/rvm/gems/ruby-1.9.2-p136@global"
GEM_PATH: "/usr/local/rvm/gems/ruby-1.9.2-p136@global:/usr/local/rvm/gems/ruby-1.9.2-p136@global"
MY_RUBY_HOME: "/usr/local/rvm/rubies/ruby-1.9.2-p136"
IRBRC: "/usr/local/rvm/rubies/ruby-1.9.2-p136/.irbrc"
RUBYOPT: ""
gemset: "global"
if ENV['MY_RUBY_HOME'] && ENV['MY_RUBY_HOME'].include?('rvm')
begin
rvm_path = File.dirname(File.dirname(ENV['MY_RUBY_HOME']))
rvm_lib_path = File.join(rvm_path, 'lib')
$LOAD_PATH.unshift rvm_lib_path
require 'rvm'
RVM.use_from_path! File.dirname(File.dirname(__FILE__))
rescue LoadError
# RVM is unavailable at this point.
raise "RVM ruby lib is currently unavailable."
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment