When some gems are unavailable in an environment, for example on a production server, requiring them in a Rakefile will cause LoadError to be thrown. Wrap the require and task declaration in Rake.protect block to prevent that.
Required Ruby Version
>= 2.3.8
Required Rubygems Version
>= 2.6
Authors
Marek Tuchowski