-
On Mac OSX Lion: “ERROR: Error installing ruby-oci8: ERROR: Failed to build gem native extension”
Running Mac OSX Lion, trying to bundle install a project that included the ruby-oci8 gem, I received the following error: Building native extensions. This could take a while… ERROR: Error installing ruby-oci8: ERROR: Failed to build gem native extension. The fix: Fortunately, the 64-bit client for Oracle has now been updated for Lion/Mountain Lion. Download…
-
Fun with the Ruby & (unary ampersand) and String#to_proc
In trying to grasp the unary & operator in ruby, I ran across [Stupid Ruby Tricks: String#to_proc]. Therefore, I decided I had to further twist the language features to my own will. Like many things in Ruby with duck-typing, the following syntax: (‘a’..’z’).map &:upcase …makes use of the fact that Symbol has a #to_proc method,…
-
Experimenting with Rails’ String Manipulation from ActiveSupport::CoreExtensions::String::Inflections
This is my experimentation with the string manipulation methods used [largely internally] in Rails. This is largely a repeat of the documentation here, but I did dig into pluralize/singularize and a couple of other examples more in depth. Look at [path to active_support gem version]/lib/active_support/inflections.rb for the full list of plural, singular, irregular, and uncountable…