Closed SidorenkoD closed 2 years ago
Yeah, unfortunately it seems to be the case. I'm sorry for this! Here's a quick solution:
class Array
def filter(&block)
self.select(&block)
end
end
This will serve as polyfill for the filter
method (select
should be available in 2.5).
I've published lokalise_manager v2.2.1 which is used by lokalise_rails v4 and fixed that issue https://github.com/bodrovis/lokalise_manager/commit/9fc47fb7c5bcaa002c0ba77e40e60af492d57b5d Just to be on a safe side, you can manually include it into your Gemfile:
lokalise_rails, '~> 4'
lokalise_manager, '2.2.1'
Weeeell, yeah. Formally, this gem had Ruby 2.5 specified as a supported platform but actually I'm pretty sure it was a mistake from my side as it was never tested with that version, at least starting from v3. Ruby 2.5 was abandoned quite some time ago and I really don't have any plans to backport this gem for Ruby 2.5, to be honest. I'll see what can be done but can't make any promises :(
Perhaps, the simplest solution is to stay on v3 which is very similar to v4 (the main difference is that it doesn't use multithreading). In this case you should be good as it relies on Faraday 1.
Running of
rails lokalise_rails:import
raises#<NoMethodError: undefined method 'filter' for #<Array:...>>
The reason is usage of
Array#filter
here.Array#filter
was added in Ruby 2.6, while gemspec oflokalise_manager
v2.1.0 is meant to work on Ruby 2.5.0