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 Foo | |
def foo | |
puts "foo method" | |
end | |
end | |
module Bar | |
class Foo | |
def bar | |
puts "bar method" |
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
source :rubygems | |
ruby "1.9.3" | |
gem "rails" | |
gem "heroku-api" | |
env :FOO | |
env :BAR | |
env :BAZ |
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 Foo | |
def bar | |
"bar" | |
end | |
module Baz | |
def bar | |
"baz" | |
super |
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
<%= form_for [@product, @image] do |f| %> | |
<%= f.file_field :file %> | |
<% 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
go() | |
{ | |
local file_name=${1%.*} | |
if [ -n "$1" ]; then | |
__gocompile $file_name | |
__gorun $@ | |
__gocleanup $file_name | |
else | |
echo "The file '$1' does not exist." |
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
project_type = :rails | |
output_style = :expanded |
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
# Step 1: patch fakeweb | |
module FakeWeb | |
@factory = {} | |
def self.factory(key) | |
return set_factory!(key) unless block_given? | |
@key = key | |
@factory[@key] ||= {} |
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
eva:tae_jeong dharrigan$ bundle exec rake production db:bootstrap --trace | |
(in /Users/dharrigan/Projects/Personal/tae_jeong) | |
NOTE: Gem.source_index is deprecated, use Specification. It will be removed on or after 2011-11-01. | |
Gem.source_index called from /Users/dharrigan/.rvm/gems/ruby-1.8.7-head/gems/rails-2.3.14/lib/rails/gem_dependency.rb:21. | |
** Invoke production (first_time) | |
** Execute production | |
** Invoke environment (first_time) | |
** Execute environment | |
rake aborted! | |
uninitialized constant SheetsExtension::MenuRenderer |
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
# fails:Proc#eql? returns true if the bodies of self and other are identical but represented by different objects | |
# (https://github.com/rubinius/rubinius/blob/master/spec/tags/19/ruby/core/proc/eql_tags.txt#L1) | |
eva:~ dharrigan$ ruby -v | |
ruby 1.9.3p6 (2011-12-20 revision 34080) [x86_64-darwin11.2.0] | |
eva:~ dharrigan$ irb | |
1.9.3p6 :001 > foo = proc { :foo } | |
=> #<Proc:0x007fb47122eea8@(irb):1> | |
1.9.3p6 :002 > foo2 = lambda { :foo } | |
=> #<Proc:0x007fb471232648@(irb):2 (lambda)> |
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
#!/usr/bin/env ruby | |
require "thor" | |
class Foo < Thor | |
desc :foo, "This is the foo description" | |
def speak | |
puts "foo!!!" | |
end |