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
echo "Installing xcode-stuff" | |
xcode-select --install | |
# Check for Homebrew, and then install it | |
if test ! "$(which brew)"; then | |
echo "Installing homebrew..." | |
sh -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" | |
echo "Homebrew installed successfully" | |
else | |
echo "Homebrew already installed!" |
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/initializers/redis.rb | |
require 'redis' | |
require 'redis/objects' | |
REDIS_CONFIG = YAML.load( File.open( Rails.root.join("config/redis.yml") ) ).symbolize_keys | |
dflt = REDIS_CONFIG[:default].symbolize_keys | |
cnfg = dflt.merge(REDIS_CONFIG[Rails.env.to_sym].symbolize_keys) if REDIS_CONFIG[Rails.env.to_sym] | |
$redis = Redis.new(cnfg) | |
Redis::Objects.redis = $redis |