ransack replacement?

Hi, what should I use to replace ransack with? It’s no longer supported in the rails version I’m using (4.2.8), and If I upgrade rails I’ll break devise :frowning:

Thanks,

Joe

Can't you just stick with the version of ransack that runs with 4.2.8?

Colin

Hi, what should I use to replace ransack with? It's no longer supported in the rails version I'm using (4.2.8)

That Rails version is already unsupported, so maybe it's time to address upgrading anyway :slight_smile:

, and If I upgrade rails I'll break devise :frowning:

? Why do you think that?

Yes, I know. Just trying to find compatible versions for ransack and devise. Haven’t figured it out yet.

-----> Ruby app detected
-----> Compiling Ruby/Rails
-----> Using Ruby version: ruby-2.4.1

###### WARNING:

Removing `Gemfile.lock` because it was generated on Windows.
Bundler will do a full resolve so native gems are handled properly.
This may result in unexpected gem versions being used in your app.
In rare occasions Bundler may not be able to resolve your dependencies at all.
https://devcenter.heroku.com/articles/bundler-windows-gemfile

-----> Installing dependencies using bundler 1.15.2
Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4
The git source `git://github.com/activerecord-hackery/ransack.git` uses the `git` protocol, which transmits data without encryption. Disable this warning with `bundle config git.allow_insecure true`, or switch to the `https` protocol to keep your data secure.
The git source `git://github.com/galetahub/ckeditor.git` uses the `git` protocol, which transmits data without encryption. Disable this warning with `bundle config git.allow_insecure true`, or switch to the `https` protocol to keep your data secure.
Fetching git://github.com/activerecord-hackery/ransack.git
Fetching git://github.com/galetahub/ckeditor.git
Fetching gem metadata from https://rubygems.org/........
Fetching version metadata from https://rubygems.org/..
Fetching dependency metadata from https://rubygems.org/.
Resolving dependencies...
Bundler could not find compatible versions for gem "activemodel":
In Gemfile:
rails (= 5.2.0) was resolved to 5.2.0, which depends on
activemodel (= 5.2.0)

rails (= 5.2.0) was resolved to 5.2.0, which depends on
activemodel (= 5.2.0)

simple_form (>= 3.2.1, ~> 3.2) was resolved to 3.2.1, which depends on
activemodel (< 5.1, > 4)
Bundler Output: The git source `git://github.com/activerecord-hackery/ransack.git` uses the `git` protocol, which transmits data without encryption. Disable this warning with `bundle config git.allow_insecure true`, or switch to the `https` protocol to keep your data secure.
The git source `git://github.com/galetahub/ckeditor.git` uses the `git` protocol, which transmits data without encryption. Disable this warning with `bundle config git.allow_insecure true`, or switch to the `https` protocol to keep your data secure.
Fetching git://github.com/activerecord-hackery/ransack.git
Fetching git://github.com/galetahub/ckeditor.git
Fetching gem metadata from https://rubygems.org/........
Fetching version metadata from https://rubygems.org/..
Fetching dependency metadata from https://rubygems.org/.
Resolving dependencies...
Bundler could not find compatible versions for gem "activemodel":
In Gemfile:
rails (= 5.2.0) was resolved to 5.2.0, which depends on
activemodel (= 5.2.0)

rails (= 5.2.0) was resolved to 5.2.0, which depends on
activemodel (= 5.2.0)

simple_form (>= 3.2.1, ~> 3.2) was resolved to 3.2.1, which depends on
activemodel (< 5.1, > 4)

!
! Failed to install gems via Bundler.
!
! Push rejected, failed to compile Ruby app.

! Push failed

That’s my last heroku build :frowning: which crashed.

What steps did you take to get from 4.2.8 to 5.2.0?

And does your app run locally?

I justed jumped to using rails ‘5.2.0’ in my app.

Is that bad?

Depends on whether you think "can't even start" is a "bad" thing :slight_smile:

Jumping 3 versions like that is unlikely to ever work. The least painful way to upgrade is to

1) move to the last available dot release of your current version     e.g. 4.2.8 -> 4.2.10

2) fix *all* the deprecation warnings

3) move up ONE major/minor version, e.g. latest 5.0 (5.0.7)

4) run your tests and fix anything that broke

5) run `bundle outdated` and see what gems are candidates for     being updated

&lather.rinse.repeat

Thanks, I kind of figured out how to approach the rebuild.

I’ve commented out the ransack gem , until I work my way up to rails 5.2.0.

and then I’ll include it into the build again.

ok, great. I got my rails version all the way upto 5.07, and I put ransack back. But had to remove the gem ‘auto-session-timeout-warning’ .