Updated for Rails 4.0.0+
-
Set up the
bower
gem. -
Follow the Bower instructions and list your dependencies in your
bower.json
, e.g.// bower.json
{
# If your workers are inactive for a long period of time, they'll lose | |
# their MySQL connection. | |
# | |
# This hack ensures we re-connect whenever a connection is | |
# lost. Because, really. why not? | |
# | |
# Stick this in RAILS_ROOT/config/initializers/connection_fix.rb (or somewhere similar) | |
# | |
# From: | |
# http://coderrr.wordpress.com/2009/01/08/activerecord-threading-issues-and-resolutions/ |
!!! 5 | |
/[if lt IE 7] <html lang="en" class="no-js ie6"> | |
/[if IE 7 ] <html lang="en" class="no-js ie7"> | |
/[if IE 8 ] <html lang="en" class="no-js ie8"> | |
/[if IE 9 ] <html lang="en" class="no-js ie9"> | |
<!--[if (gt IE 9)|!(IE)]><!--> <html lang="en" class="no-js"> <!--<![endif]--> | |
%head | |
%meta{:charset => "utf-8"}/ | |
/ | |
Always force latest IE rendering engine (even in intranet) & Chrome Frame |
after "deploy:symlink", "deploy:restart_workers" | |
## | |
# Rake helper task. | |
# http://pastie.org/255489 | |
# http://geminstallthat.wordpress.com/2008/01/27/rake-tasks-through-capistrano/ | |
# http://ananelson.com/said/on/2007/12/30/remote-rake-tasks-with-capistrano/ | |
def run_remote_rake(rake_cmd) | |
rake_args = ENV['RAKE_ARGS'].to_s.split(',') | |
cmd = "cd #{fetch(:latest_release)} && #{fetch(:rake, "rake")} RAILS_ENV=#{fetch(:rails_env, "production")} #{rake_cmd}" |
require 'fog' | |
username = 'testuser' | |
bucket = 'uniquebucketname1234' | |
aws_credentials = { | |
:aws_access_key_id => 'YOUR-ACCESS-KEY-ID', | |
:aws_secret_access_key => 'YOUR-SECRET-ACCESS-KEY' | |
} |
worker_processes 1; | |
error_log /usr/local/var/log/nginx.error.log; | |
events { | |
worker_connections 1024; | |
} | |
http { | |
include mime.types; |
def compile_asset?(path) | |
# ignores any filename that begins with '_' (e.g. sass partials) | |
# all other css/js/sass/image files are processed | |
if File.basename(path) =~ /^[^_].*\.\w+$/ | |
puts "Compiling: #{path}" | |
true | |
else | |
puts "Ignoring: #{path}" | |
false | |
end |
#!/usr/bin/perl -w | |
# Copyright 2010 Amazon.com, Inc. or its affiliates. All Rights Reserved. | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"). You may not | |
# use this file except in compliance with the License. A copy of the License | |
# is located at | |
# | |
# http://aws.amazon.com/apache2.0/ | |
# |
# Run with: rake environment elasticsearch:reindex | |
namespace :elasticsearch do | |
desc "re-index elasticsearch" | |
task :reindex => :environment do | |
klass = Place | |
ENV['CLASS'] = klass.name | |
ENV['INDEX'] = new_index = klass.tire.index.name << '_' << Time.now.strftime('%Y%m%d%H%M%S') |
# encoding: utf-8 | |
Refinery::I18n.configure do |config| | |
config.enabled = true | |
config.default_locale = :en | |
config.current_locale = :en | |
config.default_frontend_locale = :en |
Updated for Rails 4.0.0+
Set up the bower
gem.
Follow the Bower instructions and list your dependencies in your bower.json
, e.g.
// bower.json
{