gem install rails --pre
rails new my_app -T
gem 'acts_as_tree' | |
gem "simple_form" | |
gem 'inherited_resources', '1.1.2' | |
gem 'has_scope' | |
gem 'compass', :group => :development | |
gem 'devise' | |
if yes?('Add gem rails_admin?') | |
gem 'rails_admin', :git => 'git://github.com/sferik/rails_admin.git' | |
end |
var demo = { | |
update: function() { | |
$('#demo-widget').remove(); | |
var serialized = $(':radio, input, #id_single_occupation').serialize(); | |
var multiselected = $('#id_selected_occupations option:selected').map(function () { | |
return $(this).val(); | |
}).get().join(','); | |
serialized += '&selected_occupations=' + multiselected; | |
var iframe = $('<iframe id="demo-widget" src="/widget/demo/?' + serialized + '#' + encodeURIComponent(document.location.href) +'" scrolling="no" frameborder="0"></iframe>'); | |
iframe.appendTo('#widget-preview'); |
# DON'T PUT THIS COMMENT IN THE Procfile | |
# FOR DEVELOPMENT | |
# Run from command line with: bundle exec rvmsudo foreman start | |
# ---------------------------------------------------------------- | |
app: bundle exec unicorn -p 3000 -c config/unicorn.rb | |
web: /usr/sbin/nginx -g "daemon off;" | |
# FOR PRODUCTION | |
# export with:foreman export upstart /etc/init -c web=2 -c worker=4 -c clock=1 |
module Vagrant | |
module Provisioners | |
class Sprinkle < Base | |
register :sprinkle | |
class Config < Vagrant::Config::Base | |
attr_accessor :cookbooks_path | |
end | |
def prepare |
# config/locales/en.yml | |
en: | |
errors: | |
messages: | |
wrong_size: "is the wrong size (should be %{file_size})" | |
size_too_small: "is too small (should be at least %{file_size})" | |
size_too_big: "is too big (should be at most %{file_size})" |
# Install RVM and dependencies | |
sudo aptitude install curl git-core | |
sudo bash -c "bash <( curl -L https://github.com/wayneeseguin/rvm/raw/1.3.0/contrib/install-system-wide ) --version '1.3.0'" | |
sudo apt-get install build-essential bison openssl libreadline6 libreadline6-dev curl git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-0 libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf libc6-dev | |
sudo adduser `whoami` rvm | |
echo 'source /usr/local/lib/rvm' >> ~/.bashrc | |
# Set up users and groups | |
sudo useradd --home /var/www --create-home --groups rvm nginx && sudo chmod g+w /var/www | |
sudo adduser `whoami` nginx | |
# |