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(@event) do |f| %> | |
| <%= f.error_messages %> | |
| <p> | |
| <%= f.label :title %><br /> | |
| <%= f.text_field :title %> | |
| </p> | |
| <p> | |
| <%= f.label :permalink %><br /> | |
| <%= f.text_field :permalink %> | |
| </p> |
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
| rake production radiant:extensions:aggregation:update --trace | |
| ** Invoke production (first_time) | |
| ** Execute production | |
| ** Invoke environment (first_time) | |
| ** Execute environment | |
| rake aborted! | |
| Don't know how to build task 'radiant:extensions:aggregation:update' | |
| /opt/ruby-enterprise-1.8.6-20081215/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:1704:in `[]' | |
| /opt/ruby-enterprise-1.8.6-20081215/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:2026:in `invoke_task' | |
| /opt/ruby-enterprise-1.8.6-20081215/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:2005:in `top_level' |
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
| <%= f.error_messages %> | |
| <p> | |
| <%= f.label :name %><br /> | |
| <%= f.text_field :name %> | |
| </p> | |
| <p> | |
| <%= f.label :permalink %><br /> | |
| <%= f.text_field :permalink %> | |
| </p> | |
| <p> |
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
| # Method borrowed from deprecated Rails Inflector class | |
| def ordinalize(number) | |
| if (11..13).include?(number.to_i % 100) | |
| "#{number}th" | |
| else | |
| case number.to_i % 10 | |
| when 1; "#{number}st" | |
| when 2; "#{number}nd" | |
| when 3; "#{number}rd" | |
| else "#{number}th" |
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
| # 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 |
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
| # 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 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 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 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
| <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 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
| ~/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 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
| ~/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 |