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
$ rake rails:freeze:gems --trace | |
(in /Users/pb/code/sb) | |
rake aborted! | |
no such file to load -- active_support | |
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require' | |
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `require' | |
/Users/pb/code/sb/vendor/rails/railties/lib/tasks/misc.rake:18 | |
/Users/pb/code/sb/vendor/rails/railties/lib/tasks/rails.rb:4:in `load' | |
/Users/pb/code/sb/vendor/rails/railties/lib/tasks/rails.rb:4 | |
/Users/pb/code/sb/vendor/rails/railties/lib/tasks/rails.rb:4: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
Processing ItemsController#show (for 127.0.0.1 at 2009-08-14 21:59:41) [GET] | |
Parameters: {"timestamp"=>"1250301581724", "action"=>"show", "id"=>"auto_complete_for_category_name", "q"=>"ri", "controller"=>"items", "limit"=>"150"} | |
User Columns (2.2ms) SHOW FIELDS FROM `users` | |
User Load (0.5ms) SELECT * FROM `users` WHERE (`users`.`id` = '1') LIMIT 1 | |
Item Columns (2.1ms) SHOW FIELDS FROM `items` | |
Item Load (0.7ms) SELECT * FROM `items` WHERE (`items`.`id` = 0) | |
ActiveRecord::RecordNotFound (Couldn't find Item with ID=auto_complete_for_category_name): | |
app/controllers/items_controller.rb:12:in `show' |
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
body { | |
font: 86.5% Arial, sans-serif; | |
} | |
#container { | |
width: 960px; | |
margin: 0 auto; | |
padding: 60px 10px 10px 40px; | |
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
module AutoCompleteJquery | |
def self.included(base) | |
base.extend(ClassMethods) | |
end | |
module ClassMethods | |
def auto_complete_association_for(object, klass, attribute, options = {}) | |
define_method("auto_complete_for_#{object}_#{klass}_#{attribute}") do |
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
~/code/peacechina$ rackup config.ru -d | |
Exception `LoadError' at /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31 - no such file to load -- sinatra/base | |
Exception `LoadError' at /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31 - no such file to load -- Win32API | |
Exception `LoadError' at /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:38 - no such file to load -- Win32API | |
Exception `NoMethodError' at /usr/local/lib/ruby/gems/1.8/gems/sinatra-0.9.2/lib/sinatra/base.rb:830 - undefined method `extensions' for Object:Class | |
Exception `NoMethodError' at /usr/local/lib/ruby/gems/1.8/gems/sinatra-0.9.2/lib/sinatra/base.rb:830 - undefined method `extensions' for Object:Class | |
Exception `NoMethodError' at /usr/local/lib/ruby/gems/1.8/gems/sinatra-0.9.2/lib/sinatra/base.rb:830 - undefined method `extensions' for Object:Class | |
Exception `NoMethodError' at /usr/local/lib/ruby/gems/1.8/gems/sinatra-0.9.2/lib/sinatra/base.rb:830 - undefined method `extensions' for Object:Class | |
Exception |
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
~/code/peacechina$ rackup config.ru | |
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require': no such file to load -- peacechina (LoadError) | |
from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require' | |
from config.ru:2 | |
from /usr/local/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/builder.rb:29:in `instance_eval' | |
from /usr/local/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/builder.rb:29:in `initialize' | |
from config.ru:1:in `new' | |
from config.ru:1 | |
from /usr/local/bin/rackup:19:in `eval' | |
from /usr/local/lib/ruby/gems/1.8/gems/rack-1.0.0/bin/rackup:103 |
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
<div class="column"> | |
<h3 class="grey"><span>Solutions</span></h3> | |
<ul> | |
<li><a id="section-link-overview" class="toggle" href="#overview">Overview</a></li> | |
<li><a id="section-link-1" class="toggle" href="#solution-1">Solution 1</a></li> | |
<li><a id="section-link-2" class="toggle" href="#solution-2">Solution 2</a></li> | |
<li><a id="section-link-3" class="toggle" href="#solution-3">Solution 3</a></li> | |
</ul> | |
</div> |
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
class Dna | |
# Prompt user for input. | |
def pick_one | |
puts "Enter DNA sequence. Must contain a, t, c, and g." | |
input = gets.chomp | |
process_input(input) | |
end | |
# Hash of dna sequences and values. | |
# If input exists in hash, return value. |
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
# Simplified version of calvin stephens (http://github.com/Calvin4) elevator program. | |
class Building | |
# Ask the user for the top floor of the building | |
def get_top_floor | |
puts "Please enter the top floor: " | |
@top_floor = gets.chomp!.to_i | |
end | |
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
# oil painting program | |
# painting process to be added later | |
# This Ruby program is a beginners attempt at using Ruby | |
# to make a alla prima oil painting program | |
# basic materials and tools to make an alla prima painting | |
class Painting |