There is a way to install multiple versions of Ruby on Windows, just like the famed RVM for Linux. It is called Pik. A fantastic piece of software, yet I got some “There was an error. Error: can’t dup NilClass” messages while trying to use it at first. To avoid that, and fix it if [...]
August 6 2010 by
Ryan Carter in
Rails,
Ruby |
Could it be any simpler? This is FOR-ing through a collection, array, hash, zoo, snorkel, what have you. <% for book in books %> <%= book %> <% end %>
August 6 2010 by
Ryan Carter in
Rails,
Ruby |
Time.now is a ruby function to display the current time. The
July 26 2010 by
Ryan Carter in
Ruby |
To convert a string or other object into an integer (number) do this: "23".to_i This will produce 23 (as a number) If you do something like this: "Hello".to_i You will get 0 returned, because Ruby can’t understand that object and translate it into a number.
July 26 2010 by
Ryan Carter in
Ruby |
To convert a number to a string in Ruby, do this: 40.to_s
Ruby Logo by hongiiv Today I am starting to learn Ruby, and that so I can next learn Ruby on Rails. I have flirted with the RoR language, been a long-time fan, but today I become a first-time caller. I am tired of being on the outside looking into the red-tinted party in the hizouse. [...]