brendon / ranked-model

An acts_as_sortable/acts_as_list replacement built for Rails 4+
https://github.com/mixonic/ranked-model
MIT License
1.09k stars 134 forks source link

added Rails6 to CI #154

Closed walf443 closed 5 years ago

walf443 commented 5 years ago

Rails 6.0.0rc2 was released. https://weblog.rubyonrails.org/2019/7/30/Rails-6-0-rc2-released/

I'd like to check this gem working with Rails6 before it will be released.

brendon commented 5 years ago

Hi @walf443, thanks for your persistence with this! :) Nearly there it would seem. Just an incompatibility with Postgres and Rails 6. Can you change the travis config to use a newer Postgres? I guess it'll have to be one that works backward with the old versions of Rails too.

Also, your code formatter has had a field day with brackets. Personally I prefer not to bracket arguments. Can you revert those changes as that just adds noise to the PR. :)

walf443 commented 5 years ago

@brendon Does it mean reverting update_attribute changes? or update_attribute is OK, but coding style is not ok, so I should fix it?

update_attribute changes is for depreaction warnings for Rails 6.1. https://rubyinrails.com/2019/04/09/rails-6-1-activerecord-deprecates-update-attributes-methods/

brendon commented 5 years ago

Sorry I didn't notice that :) Yes update is fine, but just remove the brackets :)

brendon commented 5 years ago

You could try this instead: https://docs.travis-ci.com/user/database-setup/#using-a-different-postgresql-version

brendon commented 5 years ago

This is proving to be a painful one! :)

brendon commented 5 years ago

I restarted the one failing test.

We shouldn't have to override from peer to md5 if we just connect to the database using the correct user. Has that user changed?

walf443 commented 5 years ago

That code does not exist, it cannot connect by postgresql user. See also https://github.com/travis-ci/travis-ci/issues/9624#issuecomment-389537036

brendon commented 5 years ago

I see :) Looks like the latest commit broke the build. The one before it seemed ok though :)

brendon commented 5 years ago

Just checking, do we need Postgres 10? Or can we get away with the latest 9?

walf443 commented 5 years ago

@brendon Postgresq10 need for Rails6. Rails 6 postgresql adapter does not suport under postgresql 9.3

walf443 commented 5 years ago

see https://travis-ci.org/mixonic/ranked-model/jobs/571110005

RuntimeError:
  Your version of PostgreSQL (90224) is too old. Active Record supports PostgreSQL >= 9.3.
# ./gemfiles/vendor/bundle/ruby/2.5.0/gems/activerecord-6.0.0.rc2/lib/active_record/connection_adapters/postgresql_adapter.rb:457:in `check_version'
brendon commented 5 years ago

You could use Postgres 9.6.15?

walf443 commented 5 years ago

https://github.com/travis-ci/travis-ci/issues/4264#issuecomment-263550556 hmm. OK. I'll try it.

brendon commented 5 years ago

Talk about a long haul! Thank you so much @walf443 for your persistence on this one. Many would have long ago abandoned the effort! :)

I'll merge this quickly before it turns red again!! :D