Jasminerice: spec failing because jQuery is not defined

coffeescript, jasmine, ruby-on-rails, rubygems, testing

Solution

In `spec/javascripts/spec.js.coffee`

Simply add the line `#= require jquery` before `#= require_tree ./`

Problem

I just installed the gem Jasminerice in a Ruby-on-rails project. Following the instructions on Jasminerice Github I created a spec, started the rails server, and navigated to the /jasmine route. Although the spec was written to pass, it failed with ReferenceError: jQuery is not defined

Original source