Skip to content
This repository has been archived by the owner on May 23, 2019. It is now read-only.

NameError: undefined local variable or method `asset_paths' when running rake teaspoon #31

Open
mupakoz opened this issue Mar 14, 2016 · 4 comments

Comments

@mupakoz
Copy link

mupakoz commented Mar 14, 2016

I'm trying to run teaspoon tests according to your tutorial (great job btw 👍 ), but I run into an issue with rake teaspoon command:

Starting the Teaspoon server...                                                                                   
Teaspoon running default suite at http://127.0.0.1:60997/teaspoon/default                                         
Error: NameError: undefined local variable or method `asset_paths' for #<#<Class:0x00000002714fd8>:0x000000088952d
0>                                                                                                                
  # http://127.0.0.1:60997/teaspoon/default?reporter=Console:1 -- global code                                     

Error: Failed to load: http://127.0.0.1:60997/teaspoon/default?reporter=Console                                   
rake aborted!    

Do you have any idea what might have gone wrong? I'm new to teaspoon and I could not find a soultion yet.

@jetsgit
Copy link

jetsgit commented May 29, 2016

Yes, I am getting the same error

@jetsgit
Copy link

jetsgit commented May 29, 2016

Ok, this error can be solved by pointing teaspoon gem source to github:

gem 'teaspoon', git: 'git://github.com/modeset/teaspoon.git'

...in Gemfile.

@davetron5000
Copy link
Owner

I missed this somehow. I'm surprised you have to use the master branch of teaspoon. Can either @mupakoz or @jetsgit post your repos somewhere that exhibit the error?

@jetsgit
Copy link

jetsgit commented Jun 16, 2016

@davetron5000 my actual app has diverted from your sample quite a bit. However, I did clone your
repo.

I ran db:setup
Next I ran be rake . All the tests passed OK.
Next I ran be rake teaspoon
I got the following errors:

➜ receta git:(master) ✗ be rake teaspoon
Starting the Teaspoon server...
Teaspoon running default suite at http://127.0.0.1:60811/teaspoon/default
Error: NameError: undefined local variable or method `asset_paths' for #<#Class:0x007fab19ef57b0:0x007fab19ee7368>

http://127.0.0.1:60811/teaspoon/default?reporter=Console:1 -- global code

Error: Failed to load: http://127.0.0.1:60811/teaspoon/default?reporter=Console
rake aborted!

/Users/jet/.rvm/gems/ruby-2.2.2@tacocopter/gems/teaspoon-0.7.9/lib/tasks/teaspoon.rake:5:in `block in <top (required)>
/Users/jet/.rvm/gems/ruby-2.2.2@tacocopter/bin/ruby_executable_hooks:15:in `eval'
/Users/jet/.rvm/gems/ruby-2.2.2@tacocopter/bin/ruby_executable_hooks:15:in `<main>'
Tasks: TOP => teaspoon
(See full trace by running task with --trace)

I created a pull request #32 which uses teaspoon form github, teaspoon-jasmine.

Good chance you do not want to merge that, as it changes .rvm-gemset, .rvm-version,
upadates a lot of rails stuff. However, it does include a teaspoon_env.rb that is configured
correctly, and also fixes errors I was getting from jasmine matcher toEqualData
Just providing as something to work with.

Jasmine and Spec tests all pass.

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