Skip to content
This repository has been archived by the owner on Jun 16, 2020. It is now read-only.

ReferenceError: Can't find variable: jQuery #168

Open
eugenekorpan opened this issue Sep 24, 2012 · 2 comments
Open

ReferenceError: Can't find variable: jQuery #168

eugenekorpan opened this issue Sep 24, 2012 · 2 comments

Comments

@eugenekorpan
Copy link

Hi, I really like the idea of running jasmine specs without browser, especially when I need to run them on CI tool. So I'm trying to make it up and running but get error while running the specs

http://pastie.org/4790584

the funny thing is when I run specs with rake jasmine:ci or using jasmine server they pass successfully.

Any ideas?

Thanks, Eugene

@evgenyneu
Copy link

I have the similar problem. After upgrading jasmine-headless-webkit gem to 0.9.0.rc.2 it shows the error when I run tests in guard

Guard::JasmineHeadlessWebkit running the following: [..].coffee
couldn't find file 'jquery'

Tests work fine from command line: bundle exec jasmine-headless-webkit. Tests worked both from command line and guard in previous version 0.8.4.

jasmine.yml:

src_files:
 - "application.{js,coffee}"

stylesheets:

helpers:
  - "helpers/**/*.{js,coffee}"

spec_files:
  - "**/*[Ss]pec.{js,coffee}"

src_dir: "app/assets/javascripts"

spec_dir: spec/javascripts

asset_paths:
 - "vendor/assets/javascripts"

@lenntt
Copy link

lenntt commented Feb 20, 2013

similar issue,
Jasmine from the browser thinks everything is ok, but bundle exec rake jasmine-headless-webkit shows the following:

  bundle exec jasmine-headless-webkit
  Got bus address:  "unix:abstract=/tmp/dbus-8Ghk5lRJKz,guid=b48e48f488bbac4c50a1adaa00000010" 
  Connected to accessibility bus at:  "unix:abstract=/tmp/dbus-  8Ghk5lRJKz,guid=b48e48f488bbac4c50a1adaa00000010" 
  Registered DEC:  true 
  Registered event listener change listener:  true 
  ReferenceError: Can't find variable: $

  Test ordering seed: --seed 5834

I use rails-jquery and put assets/jquery in my jasmine.yml

could it have to do something with the asset pipeline of rails 3.1+?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants