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
NoMethodError in Group#find | |
Showing /Users/will/Dropbox/www/finder/app/views/layouts/application.html.erb where line #37 raised: | |
undefined method `html_safe' for nil:NilClass | |
Extracted source (around line #37): | |
34: </script> | |
35: | |
36: <div id="wrapper"> |
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
<% content_for :some_section do %> | |
… Long section of view code | |
<% end # some_section %> |
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
<% content_for :some_section do %> | |
… Long section of view code | |
<% 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
… Create a file: | |
octobrain:~ will$ echo foo > /tmp/foo | |
… launch IRB: | |
octobrain:~ will$ irb | |
ruby-1.9.2-p0 > f = File.open('/tmp/foo') | |
=> #<File:/tmp/foo> | |
ruby-1.9.2-p0 > f.flock(File::LOCK_EX) |
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
octobrain:~ will$ irb | |
ruby-1.9.2-p0 :001 > $stderr.puts "foo" | |
foo | |
=> nil | |
ruby-1.9.2-p0 :002 > $stderr.reopen(File.open("/dev/null", "w+")) | |
=> #<File:/dev/null> | |
ruby-1.9.2-p0 :003 > $stderr.puts "foo" | |
=> nil | |
ruby-1.9.2-p0 :004 > |
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
# dir is an array of dir entries, eg: ['ar', 'fe', '4a', 'c9'] | |
def delete_empty_dirs(dir) | |
begin | |
Dir.rmdir File.join(self.base_storage_path, dir.join('/')) | |
dir.pop | |
delete_empty_dirs(dir) | |
rescue SystemCallError | |
return | |
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
index 57b442a..8264475 100644 | |
--- a/lib/trollop.rb | |
+++ b/lib/trollop.rb | |
@@ -362,7 +362,7 @@ class Parser | |
params = given_data[:params] | |
opts = @specs[sym] | |
- raise CommandlineError, "option '#{arg}' needs a parameter" if params.empty? && opts[:type] != :flag | |
+ raise CommandlineError, "option '#{arg}' needs a parameter" if params.empty? && opts[:type] != :flag and not opts[:allow_blank] | |
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
octobrain:~ will$ perl -e'use strict; print "foo\n" if false' | |
Bareword "false" not allowed while "strict subs" in use at -e line 1. | |
Execution of -e aborted due to compilation errors. |
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 CreatePosts < ActiveRecord::Migration | |
def self.up | |
create_table :posts do |t| | |
t.string :title, :null => false | |
t.text :body | |
t.string :author, :null => false, :default => "Anonymous" | |
t.timestamps | |
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
GitHub SSH access is temporarily unavailable (0x04). | |
Check http://status.github.com for details. |