This file contains hidden or 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
[~] gem i mysql | |
Building native extensions. This could take a while... | |
ERROR: Error installing mysql: | |
ERROR: Failed to build gem native extension. | |
/Users/dstrelau/.rvm/ruby-enterprise-1.8.7-20090928/bin/ruby extconf.rb | |
checking for mysql_ssl_set()... no | |
checking for rb_str_set_len()... no | |
checking for rb_thread_start_timer()... no | |
checking for mysql.h... no |
This file contains hidden or 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
#!/bin/sh | |
NAME=nginx | |
DESC=nginx | |
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin | |
DAEMON=/usr/local/sbin/nginx | |
DAEMON_ARGS="" | |
CONFIG=/etc/nginx/nginx.conf | |
PID_FILE="/var/run/${NAME}.pid" |
This file contains hidden or 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
[~] gem env | |
RubyGems Environment: | |
- GEM PATHS: | |
- /Users/dstrelau/.gem/ruby/1.8.7 | |
- /Users/dstrelau/.gem/ruby/1.8 | |
- /Users/dstrelau/.rvm/ruby-1.8.7-p174/lib/ruby/gems/1.8 | |
[~] rvm use 1.8.7 | |
[~] gem env | |
RubyGems Environment: | |
- GEM PATHS: |
This file contains hidden or 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
[~] rvm install 1.8.6 -d | |
++ which curl | |
+ rvm_curl=/usr/bin/curl | |
+ '[' 0 -ne 0 ']' | |
+ rvm_curl='/usr/bin/curl -O -L -s' | |
+ '[' -z '' -a -z 1.8.6 ']' | |
+ rvm_implementation=ruby | |
+ niceness=0 | |
++ whoami | |
+ '[' dstrelau = root ']' |
This file contains hidden or 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
$ ruby -v | |
ruby 1.8.7 (2009-06-12 patchlevel 174) [i686-darwin9.8.0] | |
$ rake -v | |
(in /Users/dstrelau/proj) | |
/Users/dstrelau/.rvm/ruby-1.8.6-p369/bin/ruby -I"lib:test" | |
[...] |
This file contains hidden or 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
class User < ActiveRecord::Base | |
include ValidationContexts | |
validation_context :default, :signup do | |
validates_uniqueness_of :email, :allow_blank => true | |
validates_presence_of :email | |
end | |
validation_context :signup do | |
validates_confirmation_of :password |
This file contains hidden or 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 'ostruct' | |
module Configurable | |
def config | |
@config ||= OpenStruct.new | |
yield @config if block_given? | |
end | |
def respond_to?(sym) | |
@config.respond_to?(sym) || super(sym) | |
end |
This file contains hidden or 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 'rack/hoptoad_notifier' | |
use Rack::HoptoadNotifier do |config| | |
config[:api_key] = 'XXXXXXXX' | |
end |
This file contains hidden or 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
== 0. Create and checkout local development branch | |
You've probably done this already. | |
git checkout master # now on master | |
git checkout -b development origin/development # track remote dev branch | |
== 1. Adding features for bug 12000 | |
This is optional, but highly encouraged. You can just develop right on your |
This file contains hidden or 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
CREATE USER 'backup'@'localhost'; | |
GRANT SELECT, LOCK TABLES ON *.* TO 'backup'@'localhost'; |