Pass rspec options from rake on command line

To pass rspec options from a rake task on command line,  use the env variable SPEC_OPTS. For example, to enable backtrace logging when running all spec tests:

rake SPEC_OPTS=-b

References: http://rspec.rubyforge.org/rspec/1.1.12/classes/Spec/Rake/SpecTask.html

 

Rails IDEs issues: change Java interpretor to Sun Java 6 JRE

Sometimes,the Rails (mostly written in Java, like RadRails, RubyMine, 3rd Rail, or Netbeans for Ruby) have some problems running with the default Ubuntu open source java interpretors. You may check the installed java version with:

java -version

Continue reading

Complete Ubuntu install for a Ruby on Rails developer (utils, rails, ff addons)

This is a guide on creating a full-featured Ubuntu dev box for RoR. It assumes that you have already installed the latest version of Ubuntu.

Utils

sudo apt-get install build-essential
 Continue reading 

bundle_fu for JS/CSS concatenation/minimisation

One of the ‘best practices’ to speedup your site (suggested also by YSlow) is to minify/compress/concatenate in one file the JS and CSS files.

Rails 2.0 has a new feature for accomplishing this, as shown here.

However, Rails does not provide JS compression. The bundle_fu plugin comes in handy for this, autocompressing the JS files.
Continue reading