Closed hakunin closed 8 years ago
Hmm.. I think this has shown up before, but I don't fully understand it, can't remember the resolution, and don't use CircleCI often.
What I would assume is that the teaspoon assets aren't available in whatever environment circleCI is running the specs within.. locally try running RAILS_ENV=test rake teaspoon
, and see if you get the same results, we can work from there.
Thanks for the speedy reply. RAILS_ENV=test rake teaspoon
produces regular console output. I'll ask CircleCI guys since that might be issue created by them and report back.
The readme did say though that it runs smoothly with CircleCI, hopefully we'll be able to make it so.
It's kinda rough to debug from this angle since the output is just kinda missing, because Teaspoon can't do much unless it's loading the javascript. haha.
I think it must have to do with the assets not being loadable in that environment, but don't understand why they wouldn't be. There's also a lot of causes for this -- a quick search in the issues results in some pretty hefty issue threads, and it seems to usually be related to rails not understanding that the teaspoon assets should be precompiled/available.
It would be great to get a resolution from CircleCI. I'd love to have easy out of the box support for it if there's something that we can adjust.
So I haven't heard back from CircleCI, but I stubled upon a precompile hint in their guides and now I am a little bit closer:
my circle.yml:
test:
post:
- bundle exec rake assets:precompile
- bundle exec teaspoon
Ah, I thought I was getting a different error, but its the same one.
I found the problem!!
I had set the domain attributes in test environments, which overrided where the server was looking for the assets, making it impossible to find them, because CircleCI doesn't run the server on localhost:3000.
So in theory, if you don't have that set in your project, it should run with CircleCI just fine.
Just installed Teaspoon and my example test works both as
/teaspoon
and in command line (without any warnings), but not on CircleCI, any ideas?