Skip to content

Instantly share code, notes, and snippets.

From 003273df39c7e65b27197930064c77f2141969d5 Mon Sep 17 00:00:00 2001
From: Adam Cooper <adam.cooper@gmail.com>
Date: Sun, 16 Oct 2011 18:21:15 -0700
Subject: [PATCH] fixing the bundle install issue
---
hubruby.gemspec | 2 +-
lib/hubruby.rb | 2 +-
lib/version.rb | 3 +++
3 files changed, 5 insertions(+), 2 deletions(-)
class Redis
attr_accessor :server
end
class RedisNamespace
attr_accessor :redis
def initialize(namespace, options = {})
self.redis = options[:redis] || :internal
end
@adamcooper
adamcooper / gist:5315262
Created April 4, 2013 23:23
Don't use "and" in ruby.
>> [1,2,3, 4].each {|x| puts x; break if x == 1}
1
=> nil
>> [1,2,3, 4].each {|x| puts x; puts 'broken' and break if x == 1}
1
broken
2
3
4
gem 'rails', '3.2.13' # change as required
require 'active_record'
# Print out what version we're running
puts "Active Record #{ActiveRecord::VERSION::STRING}"
# Connect to an in-memory sqlite3 database (more on this in a moment)
ActiveRecord::Base.establish_connection(
:adapter => 'sqlite3',
:database => ':memory:'