Is there any difference between :key => "value" (hashrocket) and key: "value" (Ruby 1.9) notations? If not, then I would like to use key: "value" notation. Is there a gem that helps me to convert ...
Ruby Gem install Json fails on Mavericks and Xcode 5.1 - unknown argument: '-multiply_definedsuppress'
I was trying run gem install json and got the following error Gem::Ext::BuildError: ERROR: Failed to build gem native extension. /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ru...
I am using Authlogic-Connect for third party logins. After running appropriate migrations, Twitter/Google/yahoo logins seem to work fine but the facebook login throws exception: SSL_connect returned=...
Why is "slurping" a file not a good practice for normal text-file I/O, and when is it useful? For example, why shouldn't I use these? File.read('/path/to/text.txt').lines.each do |line| # do somet...
UPDATE: Colin's suggestion of removing the line //= require_tree . has fixed the issue. I have wasted over 2 days trying to follow every suggestion out there and fix my issue. I am trying to follow t...
I am running into some issues regarding the Authenticity Token in Rails, as I have many times now. But I really don't want to just solve this problem and go on. I would really like to understand the ...
How can I call a method dynamically when its name is contained in a string variable? For example: class MyClass def foo; end def bar; end end obj = MyClass.new str = get_data_from_user # e.g. `...
Say I am monkey patching a method in a class, how could I call the overridden method from the overriding method? I.e. Something a bit like super E.g. class Foo def bar() "Hello" end end c...
In Ruby some methods have a question mark (?) that ask a question like include? that ask if the object in question is included, this then returns a true/false. But why do some methods have exclamatio...
Here's the console output: sergio@sergio-VirtualBox:~$ rvm list rvm rubies ruby-1.9.3 [ i386 ] sergio@sergio-VirtualBox:~$ rvm use 1.9.3 Using /usr/share/ruby-rvm/gems/ruby-1.9.3 sergio@sergio...