jejacks0n / teaspoon

Teaspoon: Javascript test runner for Rails. Use Selenium, BrowserStack, or PhantomJS.
1.43k stars 243 forks source link

teaspoon failing to load on TravisCI #132

Closed jedschneider closed 10 years ago

jedschneider commented 10 years ago

@jejacks0n do you have a hunch why this isn't loading? I wanted to make sure the url is correct (not a holdover from teabag) and this is the best way to run the teaspoon specs on travis.

** Invoke teaspoon (first_time)
** Invoke environment 
** Execute teaspoon
Starting the Teaspoon server...
Teaspoon running default suite at http://127.0.0.1:52746/teaspoon/default
Error: Failed to load: http://127.0.0.1:52746/teaspoon/default?reporter=Console
rake aborted!
/home/travis/build/modeset/qdoba/vendor/bundle/ruby/1.9.1/gems/teaspoon-0.7.7/lib/tasks/teaspoon.rake:5:in `block in <top (required)>'
/home/travis/build/modeset/qdoba/vendor/bundle/ruby/1.9.1/gems/rake-10.1.0/lib/rake/task.rb:236:in `
(stack  trace continues...)
jejacks0n commented 10 years ago

Everything looks ok.. It runs locally? My guess would be that something is wrong with files being loaded or something.. can you make sure you're running it with the master branch? I did some work for Rails 4 and better exception notifications, so that might help us sort out what's wrong.

jedschneider commented 10 years ago

@jejacks0n the better reporting gets us a step closer:

Error: ActionController::RoutingError: uninitialized constant Teaspoon::SpecController

So, does that mean the engine is not getting routed properly?

theworkerant commented 10 years ago

I get the same on Travis with my new project, no tests even written.

jejacks0n commented 10 years ago

It looks like rails isn't auto loading the engines controllers. We don't know why this is the case, but have confirmed that requiring that controller fixes it. So, the really odd thing is that this happens with consistency when it happens, but only happens on a few projects.

jayzes commented 10 years ago

@theworkerant would you be able to gist your gemfile/gemfile.lock for that new project? Curious if there are any commonalities with projects we have that are failing.

theworkerant commented 10 years ago

@jayzes Sure thing.

https://gist.github.com/theworkerant/e5b78c5403466b320493#file-gemfile-rb

jejacks0n commented 10 years ago

Well, I added a "fix" for this, but it still seems fishy to me.

tommoor commented 10 years ago

same issue here, what fix did you add?

jejacks0n commented 10 years ago

it now requires the controller that it uses.. it seems like an engine should be able to resolve that, but I suspect some other gem or setup is breaking that. does it work in your development env? does it work in test env? I still don't know the culprit.

tommoor commented 10 years ago

It works in the test environment fine but not travis. I think it would be helpful if you posted the changes you made for others that stumble across this issue :) :beers:

jejacks0n commented 10 years ago

I fixed it in the repo, so use master.

https://github.com/modeset/teaspoon/blob/master/lib/teaspoon/engine.rb#L1

tommoor commented 10 years ago

Ah okay, tried that and realised I'm getting a slightly different error actually - will continue to investigate:

$ bundle exec teaspoon
** [Raven] Raven 0.7.0 ready to catch errors
Starting the Teaspoon server...
>> Thin web server (v1.5.1 codename Straight Razor)
>> Maximum connections set to 1024
>> Listening on 0.0.0.0:43971, CTRL+C to stop
Teaspoon running default suite at http://127.0.0.1:43971/teaspoon/default
Error: Timeout::Error: execution expired
  # http://127.0.0.1:43971/teaspoon/default?reporter=Console:1
Error: Failed to load: http://127.0.0.1:43971/teaspoon/default?reporter=Console
tommoor commented 10 years ago

I still can't get to the bottom of this, is there a way to make the output more verbose?

jejacks0n commented 10 years ago

@jayzes and I just made a change that will make this better (we hope). If you're not suppressing logs, then it should display why the server failed to start.. This might be a good place to start to identify. In our case, it was because we didn't provide the ENV for the secret_key_base, which was keeping things from starting successfully. Let us know what you see in your logs when you use github: 'modeset/teaspoon' for your gem.

tommoor commented 10 years ago

Tried this again using github as source, doesn't seem to have made a difference to the output for me?

screen shot 2014-01-19 at 11 46 52

jejacks0n commented 10 years ago

@tommoor: check your logs?

tommoor commented 10 years ago

You mean the hamburger button in the top right? Displays the same thing, is there somewhere else I should look? Btw - I'm using the hosted version on travis-ci.com if that makes any difference

screen shot 2014-01-20 at 13 53 15

jejacks0n commented 10 years ago

your rails logs. are you using thin, out of curiosity? if you're not, add it to your gemfile and report please.

jejacks0n commented 10 years ago

assuming it's working for people now since I haven't heard back for a while.

KarlGl commented 10 years ago

Using the latest on master fixed this issue for me.