In Rails 3 a couple of constants/methods were set deprecated. However, there are still plugins which use them. This ends normally in the annoying log message: DEPRECATION WARNING: RAILS_ROOT is deprecated. Please use ::Rails.root.to_s. (called from <top (required)> at /Users/heli/hemju/programming/workspace/rubymine/linguist/config/application.rb:12) So what to do when you want to get rid of them? Find them, (optional) [...]
One of our most popular article is “Rails 3 Quicktip: Autoload lib directory including all subdirectories, avoid lazy loading” in which we describe how autoloading the lib directory in Rails 3 can be done. However, one problem was still there, Rails 3 loads the lib directory on startup, but doesn’t reload the lib directory after [...]
Have you ever been came across a situation, when you have to examine all of the words in every stored document in Rails? Wait! here comes the solution and, that is, none other than Sunspot. Sunspot is basically a Ruby Library that is built on top of the RSolr library – A simple, extensible Ruby [...]
I am not a big fan of documentation. In my experience most documentation just exists for its own sake and normally nobody cares about it. In my mind, the code itself should be so expressive that nearly no documentation is needed (libraries and frameworks are the exception to this rule). Luckily, Ruby allows the most [...]
Rails 3 doesn’t autoload files under the lib directory anymore (aka lazy loading). There was quite a discussion about this controversial decision, while lazy loading can be very good and useful, it is also convenient to not have to include every file/folder manually. Fortunately, there is an easy way to enable autoloading again. While most solutions [...]