question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Request] Use Travis CI

See original GitHub issue

It took me awhile to get the tests to run. I had to add require 'pathname' at the top of spec_helper.rb. I’m not sure how anyone can run the spec without that change.

As noted on Gitter, the first test run fails, while the second one (mostly) succeeds. I still have three tests failing consistently, though. I’d like to know if these tests are specific to my local environment, or if the spec is failing.

Ruby 2.4.2 Rails 5.1.4 Camaleon latest git version Phantomjs 2.1.1

Failures:

  1) PostTypeDecorator group url
     Failure/Error: send(url_to.gsub('-', '_'), *(args << options))

     NoMethodError:
       undefined method `host' for nil:NilClass
     # /Users/briankephart/.rvm/gems/ruby-2.4.2/gems/actionpack-5.1.4/lib/action_controller/metal/url_for.rb:30:in `url_options'
     # /Users/briankephart/.rvm/gems/ruby-2.4.2/gems/actionview-5.1.4/lib/action_view/routing_url_for.rb:122:in `url_options'
     # /Users/briankephart/.rvm/gems/ruby-2.4.2/gems/actionpack-5.1.4/lib/action_dispatch/routing/route_set.rb:259:in `call'
     # /Users/briankephart/.rvm/gems/ruby-2.4.2/gems/actionpack-5.1.4/lib/action_dispatch/routing/route_set.rb:325:in `block (2 levels) in define_url_helper'
     # ./app/helpers/camaleon_cms/frontend/application_helper.rb:34:in `cama_url_to_fixed'

     # /Users/briankephart/.rvm/gems/ruby-2.4.2/gems/draper-3.0.0/lib/draper/helper_proxy.rb:33:in `block in define_proxy'
     # /Users/briankephart/.rvm/gems/ruby-2.4.2/gems/draper-3.0.0/lib/draper/helper_proxy.rb:14:in `method_missing'
     # ./app/decorators/camaleon_cms/post_type_decorator.rb:28:in `the_group_url'
     # ./spec/decorators/post_type_spec.rb:6:in `block (2 levels) in <top (required)>'
     # ./spec/spec_helper.rb:189:in `block (3 levels) in <top (required)>'
     # /Users/briankephart/.rvm/gems/ruby-2.4.2/gems/database_cleaner-1.6.1/lib/database_cleaner/generic/base.rb:16:in `cleaning'
     # /Users/briankephart/.rvm/gems/ruby-2.4.2/gems/database_cleaner-1.6.1/lib/database_cleaner/base.rb:98:in `cleaning'
     # /Users/briankephart/.rvm/gems/ruby-2.4.2/gems/database_cleaner-1.6.1/lib/database_cleaner/configuration.rb:86:in `block (2 levels) in cleaning'
     # /Users/briankephart/.rvm/gems/ruby-2.4.2/gems/database_cleaner-1.6.1/lib/database_cleaner/configuration.rb:87:in `cleaning'
     # ./spec/spec_helper.rb:188:in `block (2 levels) in <top (required)>'

  2) PostTypeDecorator public url
     Failure/Error: send(url_to.gsub('-', '_'), *(args << options))

     NoMethodError:
       undefined method `host' for nil:NilClass
     # /Users/briankephart/.rvm/gems/ruby-2.4.2/gems/actionpack-5.1.4/lib/action_controller/metal/url_for.rb:30:in `url_options'
     # /Users/briankephart/.rvm/gems/ruby-2.4.2/gems/actionview-5.1.4/lib/action_view/routing_url_for.rb:122:in `url_options'
     # /Users/briankephart/.rvm/gems/ruby-2.4.2/gems/actionpack-5.1.4/lib/action_dispatch/routing/route_set.rb:259:in `call'
     # /Users/briankephart/.rvm/gems/ruby-2.4.2/gems/actionpack-5.1.4/lib/action_dispatch/routing/route_set.rb:325:in `block (2 levels) in define_url_helper'
     # ./app/helpers/camaleon_cms/frontend/application_helper.rb:34:in `cama_url_to_fixed'
     # /Users/briankephart/.rvm/gems/ruby-2.4.2/gems/draper-3.0.0/lib/draper/helper_proxy.rb:33:in `block in define_proxy'
     # ./app/decorators/camaleon_cms/post_type_decorator.rb:15:in `the_url'
     # ./spec/decorators/post_type_spec.rb:11:in `block (2 levels) in <top (required)>'
     # ./spec/spec_helper.rb:189:in `block (3 levels) in <top (required)>'
     # /Users/briankephart/.rvm/gems/ruby-2.4.2/gems/database_cleaner-1.6.1/lib/database_cleaner/generic/base.rb:16:in `cleaning'
     # /Users/briankephart/.rvm/gems/ruby-2.4.2/gems/database_cleaner-1.6.1/lib/database_cleaner/base.rb:98:in `cleaning'
     # /Users/briankephart/.rvm/gems/ruby-2.4.2/gems/database_cleaner-1.6.1/lib/database_cleaner/configuration.rb:86:in `block (2 levels) in cleaning'
     # /Users/briankephart/.rvm/gems/ruby-2.4.2/gems/database_cleaner-1.6.1/lib/database_cleaner/configuration.rb:87:in `cleaning'
     # ./spec/spec_helper.rb:188:in `block (2 levels) in <top (required)>'

  3) the signin process create edit post
     Failure/Error: send(url_to.gsub('-', '_'), *(args << options))

     NoMethodError:
       undefined method `host' for nil:NilClass
     # /Users/briankephart/.rvm/gems/ruby-2.4.2/gems/actionpack-5.1.4/lib/action_controller/metal/url_for.rb:30:in `url_options'
     # /Users/briankephart/.rvm/gems/ruby-2.4.2/gems/actionview-5.1.4/lib/action_view/routing_url_for.rb:122:in `url_options'
     # /Users/briankephart/.rvm/gems/ruby-2.4.2/gems/actionpack-5.1.4/lib/action_dispatch/routing/route_set.rb:259:in `call'
     # /Users/briankephart/.rvm/gems/ruby-2.4.2/gems/actionpack-5.1.4/lib/action_dispatch/routing/route_set.rb:325:in `block (2 levels) in define_url_helper'
     # ./app/helpers/camaleon_cms/frontend/application_helper.rb:34:in `cama_url_to_fixed'
     # /Users/briankephart/.rvm/gems/ruby-2.4.2/gems/draper-3.0.0/lib/draper/helper_proxy.rb:33:in `block in define_proxy'
     # ./app/decorators/camaleon_cms/post_decorator.rb:104:in `the_url'
     # ./app/decorators/camaleon_cms/post_decorator.rb:47:in `the_path'
     # ./spec/support/common.rb:62:in `get_content_attr'
     # ./spec/features/posts_spec.rb:33:in `block (2 levels) in <top (required)>'
     # ./spec/spec_helper.rb:189:in `block (3 levels) in <top (required)>'
     # /Users/briankephart/.rvm/gems/ruby-2.4.2/gems/database_cleaner-1.6.1/lib/database_cleaner/generic/base.rb:16:in `cleaning'
     # /Users/briankephart/.rvm/gems/ruby-2.4.2/gems/database_cleaner-1.6.1/lib/database_cleaner/base.rb:98:in `cleaning'
     # /Users/briankephart/.rvm/gems/ruby-2.4.2/gems/database_cleaner-1.6.1/lib/database_cleaner/configuration.rb:86:in `block (2 levels) in cleaning'
     # /Users/briankephart/.rvm/gems/ruby-2.4.2/gems/database_cleaner-1.6.1/lib/database_cleaner/configuration.rb:87:in `cleaning'
     # ./spec/spec_helper.rb:188:in `block (2 levels) in <top (required)>'

Finished in 3 minutes 42.4 seconds (files took 3.4 seconds to load)
86 examples, 3 failures

Failed examples:

rspec ./spec/decorators/post_type_spec.rb:4 # PostTypeDecorator group url
rspec ./spec/decorators/post_type_spec.rb:9 # PostTypeDecorator public url
rspec ./spec/features/posts_spec.rb:21 # the signin process create edit post

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
owen2345commented, May 15, 2018

Finally solved! Check here: https://travis-ci.org/owen2345/camaleon-cms

0reactions
brian-kephartcommented, May 16, 2018

Also, I just ran the test suite on my local machine with no errors for the first time ever. Thanks again!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Building Pull Requests - Travis CI Docs
Travis CI builds a pull request when it is first opened, and whenever commits are added to the pull request. Rather than build...
Read more >
Requests - API Developer Documentation - Travis CI
This will create a request for an individual repository, triggering a build to run on Travis CI. Use namespaced params in JSON format...
Read more >
API V2 Reference - Travis CI Docs
Making Requests. The first thing you need to know is what API URL endpoint to use: Travis CI for open source: For open...
Read more >
Request - API Developer Documentation - Travis CI
Travis -ci status message attached to the request. pull_request_mergeable, Unknown, The request's pull_request_mergeable. Standard Representation. Included when ...
Read more >
API is V3 - Travis CI Docs
Our API can be used to automate many of your Travis CI build processes: ... To use API V2.1 set the Accept header...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found