Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI Issues #68

Closed
scarroll32 opened this issue Feb 27, 2017 · 4 comments
Closed

CI Issues #68

scarroll32 opened this issue Feb 27, 2017 · 4 comments

Comments

@scarroll32
Copy link
Contributor

Tests that are passing locally fail on the CI.

/home/travis/.rvm/rubies/ruby-2.3.1/bin/ruby -I/home/travis/build/crowdAI/crowdai/vendor/bundle/ruby/2.3.0/gems/rspec-core-3.5.4/lib:/home/travis/build/crowdAI/crowdai/vendor/bundle/ruby/2.3.0/gems/rspec-support-3.5.0/lib /home/travis/build/crowdAI/crowdai/vendor/bundle/ruby/2.3.0/gems/rspec-core-3.5.4/exe/rspec --pattern spec/\*\*\{,/\*/\*\*\}/\*_spec.rb
Coverage report generated for RSpec to /home/travis/build/crowdAI/crowdai/coverage. 659 / 1016 LOC (64.86%) covered.
/home/travis/build/crowdAI/crowdai/app/models/dataset_file_download.rb:8:in `<class:DatasetFileDownload>': uninitialized constant DatasetFileDownload::Resolv (NameError)
	from /home/travis/build/crowdAI/crowdai/app/models/dataset_file_download.rb:1:in `<top (required)>'
	from /home/travis/build/crowdAI/crowdai/vendor/bundle/ruby/2.3.0/gems/activesupport-5.0.0.1/lib/active_support/dependencies/interlock.rb:12:in `block in loading'

Strange, as the code is it failing on is part of the Ruby standard lib

  validates :ip_address,
            presence: true,
            uniqueness: false,
            format: { with: Regexp.union(Resolv::IPv4::Regex, Resolv::IPv6::Regex) }
@scarroll32
Copy link
Contributor Author

Travis CI is also failing on a Postgres jsonb column.

0.30s$ psql -c 'create database crowdai_test;' -U postgres
CREATE DATABASE
22.37s$ bundle exec rake
/home/travis/.rvm/rubies/ruby-2.3.1/bin/ruby -I/home/travis/build/crowdAI/crowdai/vendor/bundle/ruby/2.3.0/gems/rspec-core-3.5.4/lib:/home/travis/build/crowdAI/crowdai/vendor/bundle/ruby/2.3.0/gems/rspec-support-3.5.0/lib /home/travis/build/crowdAI/crowdai/vendor/bundle/ruby/2.3.0/gems/rspec-core-3.5.4/exe/rspec --pattern spec/\*\*\{,/\*/\*\*\}/\*_spec.rb
rails aborted!
ActiveRecord::StatementInvalid: PG::UndefinedObject: ERROR:  type "jsonb" does not exist
LINE 1: ...mestamp, "participant_id" integer, "options_json" jsonb, "ma...
                                                             ^
: CREATE TABLE "emails" ("id" serial primary key, "model_id" integer, "mailer" character varying, "recipients" text, "options" text, "status_cd" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "email_preferences_token" character varying, "token_expiration_dttm" timestamp, "participant_id" integer, "options_json" jsonb, "mailer_id" integer)
/home/travis/build/crowdAI/crowdai/vendor/bundle/ruby/2.3.0/gems/activerecord-

@scarroll32
Copy link
Contributor Author

travis-ci/travis-ci#2983

@scarroll32
Copy link
Contributor Author

Postgres issues solved by forcing Trusty & Postgres 9.6 in .travis.yml

language: ruby

sudo: required
dist: trusty
addons:
    postgresql: "9.6"
    
services:
    - postgresql

rvm:
  - 2.3.1

env:
  - DB=postgres

before_script:
  - psql -c 'create database crowdai_test;' -U postgres

before_install:
  - "export DISPLAY=:99.0"
  - "sh -e /etc/init.d/xvfb start"
  - sleep 3 # give xvfb some time to start

@scarroll32
Copy link
Contributor Author

Closed 534cacd

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

No branches or pull requests

1 participant