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
| # http://gist.github.com/413042 | |
| # Readily available HAML variant | |
| # stolen from http://github.com/cschneid/irclogger/blob/master/lib/partials.rb | |
| # and made a lot more robust by me | |
| # this implementation uses haml by default. if you want to use any other template mechanism | |
| # then replace `haml` on line 13 and line 17 with `erb` or whatever | |
| module Sinatra::Partials | |
| def partial(template, *args) | |
| template_array = template.to_s.split('/') | |
| template = template_array[0..-2].join('/') + "/_#{template_array[-1]}" |
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
| X.Org X Server 1.6.4 | |
| Release Date: 2009-9-27 | |
| X Protocol Version 11, Revision 0 | |
| Build Operating System: Linux 2.6.24-23-server x86_64 Ubuntu | |
| Current Operating System: Linux pc-adri 2.6.31-20-generic #57-Ubuntu SMP Mon Feb 8 09:02:26 UTC 2010 x86_64 | |
| Kernel command line: BOOT_IMAGE=/boot/vmlinuz-2.6.31-20-generic root=UUID=2e31ea65-d0af-4afa-860a-4a549bd9ba0f ro quiet splash | |
| Build Date: 14 November 2009 05:48:57PM | |
| xorg-server 2:1.6.4-2ubuntu4.1 (buildd@) | |
| Before reporting problems, check http://wiki.x.org |
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
| Question.count | |
| Mongo::MongoArgumentError: DB#command requires an OrderedHash when hash contains multiple keys | |
| from /home/adri/.rvm/gems/ruby-1.8.7-p249/gems/mongo-0.19.1/lib/../lib/mongo/db.rb:439:in `command' | |
| from /home/adri/.rvm/gems/ruby-1.8.7-p249/gems/mongo-0.19.1/lib/../lib/mongo/cursor.rb:91:in `count' | |
| from /home/adri/.rvm/gems/ruby-1.8.7-p249/gems/mongoid-1.2.13/lib/mongoid/cursor.rb:35:in `send' | |
| from /home/adri/.rvm/gems/ruby-1.8.7-p249/gems/mongoid-1.2.13/lib/mongoid/cursor.rb:35:in `count' | |
| from /home/adri/.rvm/gems/ruby-1.8.7-p249/gems/mongoid-1.2.13/lib/mongoid/contexts/mongo.rb:48:in `count' | |
| from /home/adri/.rvm/gems/ruby-1.8.7-p249/gems/mongoid-1.2.13/lib/mongoid/criteria.rb:34:in `__send__' | |
| from /home/adri/.rvm/gems/ruby-1.8.7-p249/gems/mongoid-1.2.13/lib/mongoid/criteria.rb:34:in `count' | |
| from /home/adri/.rvm/gems/ruby-1.8.7-p249/gems/mongoid-1.2.13/lib/mongoid/finders.rb:30:in `count' |
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
| WARNING: #<ArgumentError: Malformed version number string 3.0.0.beta> | |
| # -*- encoding: utf-8 -*- | |
| Gem::Specification.new do |s| | |
| s.name = %q{activesupport} | |
| s.version = "3.0.0.beta" | |
| s.required_rubygems_version = Gem::Requirement.new("> 1.3.1") if s.respond_to? :required_rubygems_version= | |
| s.authors = ["David Heinemeier Hansson"] | |
| s.date = %q{2010-02-04} |
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
| # A sample Gemfile | |
| source :gemcutter | |
| # | |
| #gem 'mongo_mapper', :git => "git://github.com/jnunemaker/mongomapper.git" | |
| gem 'wee' |
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
| ActionView::Template::Error (undefined method `encoding' for #<ActionView::OutputBuffer:0x000000029dbc88 @buffer="">) on line #1 of /home/adri/wa/research/dm_rails3_app/app/views/users/_form.html.erb: | |
| 1: <%= form_for(@user) do |f| %> | |
| 2: <%= f.error_messages %> | |
| 3: | |
| 4: <div class="field"> | |
| app/views/users/_form.html.erb:1:in `_render_template_751928770_21993272_1332362' | |
| app/views/users/new.html.erb:3:in `_render_template_35629377_22056020_0' | |
| app/controllers/users_controller.rb:29:in `new' |
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: | |
| - RUBYGEMS VERSION: 1.3.6 | |
| - RUBY VERSION: 1.9.1 (2009-07-16 patchlevel 243) [x86_64-linux] | |
| - INSTALLATION DIRECTORY: /usr/lib/ruby1.9.1/gems/1.9.1 | |
| - RUBY EXECUTABLE: /usr/bin/ruby1.9.1 | |
| - EXECUTABLE DIRECTORY: /usr/bin | |
| - RUBYGEMS PLATFORMS: | |
| - ruby | |
| - x86_64-linux |
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
| RUBYOPT=rubygems |
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
| pp $LOAD_PATH | |
| ["/var/lib/gems/1.9.1/gems/rubygems-update-1.3.6/hide_lib_for_update", | |
| "/var/lib/gems/1.9.1/gems/rubygems-update-1.3.6/bin", | |
| "/usr/local/lib/site_ruby/1.9.1", | |
| "/usr/local/lib/site_ruby/1.9.1/x86_64-linux", | |
| "/usr/local/lib/site_ruby", | |
| "/usr/lib/ruby/vendor_ruby/1.9.1", | |
| "/usr/lib/ruby/vendor_ruby/1.9.1/x86_64-linux", | |
| "/usr/lib/ruby/vendor_ruby", | |
| "/usr/lib/ruby/1.9.1", |
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
| p Gem.path | |
| # => ["/usr/lib/ruby1.9.1/gems/1.9.1"] |