ransack replacement?

39 views
Skip to first unread message

Joe Guerra

unread,
Aug 1, 2018, 4:50:40 PM8/1/18
to Ruby on Rails: Talk
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 :(

Thanks,
Joe


Colin Law

unread,
Aug 1, 2018, 4:57:50 PM8/1/18
to Ruby on Rails: Talk
On 1 August 2018 at 21:50, Joe Guerra <JGu...@jginfosys.com> wrote:
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 :(

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

Colin
 

Hassan Schroeder

unread,
Aug 1, 2018, 5:01:54 PM8/1/18
to rubyonrails-talk
On Wed, Aug 1, 2018 at 1:50 PM, Joe Guerra <JGu...@jginfosys.com> wrote:
> 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 :-)

> , and If I upgrade rails I'll break devise :(

? Why do you think that?

--
Hassan Schroeder ------------------------ hassan.s...@gmail.com
twitter: @hassan
Consulting Availability : Silicon Valley or remote

Joe Guerra

unread,
Aug 2, 2018, 10:18:23 AM8/2/18
to Ruby on Rails: Talk
Yes, I know.  Just trying to find compatible versions for ransack and devise.   Haven't figured it out yet.

Joe Guerra

unread,
Aug 2, 2018, 11:20:42 AM8/2/18
to Ruby on Rails: Talk
-----> 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 :( which crashed.

Hassan Schroeder

unread,
Aug 2, 2018, 12:07:49 PM8/2/18
to rubyonrails-talk
On Thu, Aug 2, 2018 at 8:20 AM, Joe Guerra <JGu...@jginfosys.com> wrote:

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

> That's my last heroku build :( which crashed.

>>> > the rails version I'm using (4.2.8)

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

And does your app run locally?

Joe Guerra

unread,
Aug 2, 2018, 1:39:56 PM8/2/18
to Ruby on Rails: Talk
I justed jumped to using rails '5.2.0' in my app.

Is that bad?

Hassan Schroeder

unread,
Aug 2, 2018, 2:28:59 PM8/2/18
to rubyonrails-talk
On Thu, Aug 2, 2018 at 10:39 AM, Joe Guerra <JGu...@jginfosys.com> wrote:
> 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 :-)

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

Joe Guerra

unread,
Aug 2, 2018, 2:40:57 PM8/2/18
to Ruby on Rails: Talk
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.

Joe Guerra

unread,
Aug 2, 2018, 3:36:20 PM8/2/18
to Ruby on Rails: Talk
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' .
Reply all
Reply to author
Forward
0 new messages