Skip to content

'no implicit conversion of Hash into String (TypeError)' on Travis CI #365

Closed
@Jeehut

Description

@Jeehut

I'm currently working on an open source project where I use this gem alongside Devise. In my User class I included the following:

  # Include default devise modules.
  devise :database_authenticatable, :registerable,
          :recoverable, :rememberable, :trackable, :validatable,
          :confirmable, :omniauthable
  include DeviseTokenAuth::Concerns::User

I'm also using FactoryGirl in order to lint all my factories and added some specs to my project. When I run rspec on my development machine (tested with Ruby 2.1.7 and Ruby 2.2.2) then all specs pass successfully. But when I push my changes and things are run on Travis CI then I get the following error message:

/home/travis/build/Flinesoft/MovieAssistor/vendor/bundle/ruby/2.2.0/gems/factory_girl-4.5.0/lib/factory_girl/linter.rb:14:in `lint!': The following factories are invalid: (FactoryGirl::InvalidFactoryError)
* user - no implicit conversion of Hash into String (TypeError)

First I thought there's something wrong with my models. But after a few hours of trial-and-error style debugging I managed to locate the part that's causing this error: It's the above quoted code where I include the Devise and DeviseTokenAuth stuff into my User model.

I assume so because this commit fails on Travis CI (as you can see here) but the project was passing right before that commit (which you can see here).

Therefore my best guess is that something in this gem (or maybe even Devise directly?) is causing things to break on Travis CI. As it feels like a bug to me I'm posting this here instead of StackOverflow.

Feel free to checkout the 'fix-travis-ci-tests' branch in order to investigate further if needed.

I'm using v0.1.34 of devise_token_auth in a Rails 4.2.4 project.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions