This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset=utf-8> | |
<title></title> | |
</head> | |
<body> | |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.0/jquery.min.js"></script> | |
</body> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
#Place this in your root directory of your rails app | |
#Ensure that you have install thor gem | |
#To list the command, type 'thor -T' | |
module Heroku | |
class Db < Thor | |
desc "production_to_local", "clone a remote heroku database to the local environment" | |
method_option :remote_production, :type => :string, :default => 'production' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "bundler/capistrano" | |
namespace :db do | |
require 'yaml' | |
desc "Copy the remote production database to the local development database NOTE: postgreSQL specific" | |
task :pg_backup_production, :roles => :db, :only => { :primary => true } do | |
# First lets get the remote database config file so that we can read in the database settings | |
tmp_db_yml = "tmp/database.yml" | |
get("#{shared_path}/config/database.yml", tmp_db_yml) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Using rake (10.0.2) | |
Using i18n (0.6.1) | |
Using multi_json (1.3.7) | |
Using activesupport (3.2.9) | |
Using builder (3.0.4) | |
Using activemodel (3.2.9) | |
Using erubis (2.7.0) | |
Using journey (1.0.4) | |
Using rack (1.4.1) | |
Using rack-cache (1.2) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
source 'https://rubygems.org' | |
gem 'rails', '3.2.9' | |
# Bundle edge Rails instead: | |
# gem 'rails', :git => 'git://github.com/rails/rails.git' | |
gem 'sqlite3' | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Completed 500 Internal Server Error in 64ms | |
NoMethodError (undefined method `products' for #<Spree::Promotion::Rules::FirstOrder:0x007fc21936ff78>): | |
activemodel (3.2.9) lib/active_model/attribute_methods.rb:407:in `method_missing' | |
activerecord (3.2.9) lib/active_record/attribute_methods.rb:149:in `method_missing' | |
activerecord (3.2.9) lib/active_record/associations/collection_proxy.rb:89:in `map' | |
activerecord (3.2.9) lib/active_record/associations/collection_proxy.rb:89:in `method_missing' | |
/Users/kennychan/.bundler/ruby/1.9.1/spree-df8470bcc693/core/app/models/spree/calculator/per_item.rb:36:in `matching_products' | |
/Users/kennychan/.bundler/ruby/1.9.1/spree-df8470bcc693/core/app/models/spree/calculator/per_item.rb:16:in `block in compute' | |
activerecord (3.2.9) lib/active_record/associations/collection_proxy.rb:89:in `each' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# config/environment.rb | |
config.gem "bitfluent-activemerchant", :lib => "activemerchant" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
apt-get -y update | |
apt-get -y install build-essential zlib1g-dev libssl-dev lib64readline-gplv2-dev libyaml-dev | |
cd /tmp | |
wget ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p194.tar.gz | |
tar -xvzf ruby-1.9.3-p194.tar.gz | |
cd ruby-1.9.3-p194/ | |
./configure --prefix=/usr/local | |
make | |
make install |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fancy_echo "Installing Postgres, a good open source relational database ..." | |
brew install postgres --no-python | |
initdb /usr/local/var/postgres -E utf8 | |
fancy_echo "Installing Redis, a good key-value database ..." | |
brew install redis | |
fancy_echo "Installing The Silver Searcher (better than ack or grep) to search the contents of files ..." | |
brew install the_silver_searcher |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jade_files = Dir.glob("../**/*.jade") | |
jade_files.each do |jade_file| | |
puts "Renaming #{jade_file}" | |
pug_file = jade_file.gsub(/.jade$/, '.pug') | |
puts "> #{pug_file}" | |
File.rename(jade_file, pug_file) | |
end |
OlderNewer