How to initialize an Array of Hashes in Ruby
How to initialize an array of hashes. Each value of keys within the hash will initially consist of an empty array: your_hash = Hash.new {|h,k| h[k] = [] }
How to initialize an array of hashes. Each value of keys within the hash will initially consist of an empty array: your_hash = Hash.new {|h,k| h[k] = [] }
When I was trying to install ruby-2.1.3 via RVM (rvm install 2.1.3), I got the following error: I resolved this issue by reinstalling ruby 2.1.3 with –disable-binary option:
‘ ‘ ” ” %q( ) – matches with single-quote but you can choose %Q| | – like double-quote but you can choose end chars doc =
Python vs. Ruby: A Battle to The Death
At GoGaRuco (Golden Gate RubyConf) in San Francisco, CA today… Talk by Aaron Patterson minitest require ‘minitest/autorun’ refute_equal (same as assert_not in TestUnit) inherit from MiniTest::Unit::TestCase Test Performance Run test with -verbose, you can see how long each test takes. minitest/spec (similar to rspec) ——— ObjectSpace ObjectSpace.each_object do |obj| p obj end count_object_size (to see […]
At GoGaRuco (Golden Gate RubyConf) today in San Francisco, CA The following is just some brief notes and may or may not make any sense. Talks went pretty quickly. Concurrency with Rubinius Ron Evans – TicketMaster (universal api) – allows migration of one system to another. (supports JIRA amongst other things) —– Fixture Builder by […]
At GoGaRuCo (Golden Gate RubyConf) today in San Francisco, CA… Talk by Eric Mill who works at Sunlight Labs and who is working with government to make their data public. Here are some examples of where you can get data. Data SF.org Californa Data Chicago Every Block New York Data Mine United States Data GovTrack.us […]
At GoGaRuco (Golden Gate RubyConf) today in San Francisco, CA… Talk by: Sarah Mei, Pivotal Labs How you store data in Ruby without using a relational database. ActiveModel compliant libraries mongoDB: mongoid – gem: mongoid How do you unify a model with a data scattered across multiple stores? This is not solved yet. How do […]
At GoGaRuco (Golden Gate RubyConf) today… Here’s what I got out of the Open Source Development talk: If you want to build up your open source project and manage it properly, you have to be open to newer contributors who are enthusiastic, even if they build a feature you think is useless. Communication is important. […]
I have an existing rails application and want to switch to using RVM in order to tie particular versions of Ruby, Rails and RubyGems to this application. My existing Rails application has a frozen Rails version 2.2.2 tied into it and so exists in my vendor/rails directory. Before I installed RVM, the following question came […]