Does FileUtils require an unavailable Ruby version?

I'm building my first Rails app and want to enable FileUtils to manage my google API (I got it to work in a standalone script).

However, when I add FileUtils to my gemfile and use bundle install

, I get the following error:

ERROR: Error installing fileutils: fileutils requires Ruby version> = 2.5.0dev.

And the most stable Ruby version is 2.4.1.

So what am I missing?

+3


source to share


3 answers


Can't you use the version in the standard library ? I'm not sure why you need to add this to your gem file.

You can use it with any standard Ruby installation:



require 'fileutils'

      

+5


source


So what am I missing?

You are missing the fact that the stdlib gemification has just started and is targeting Ruby 2.5 / 3.0, so naturally these gems are demanding.



If you are not using Ruby 2.5, just use the stdlib version.

+2


source


If you really need to specify the fileutils file in your gemfile, use:

gem 'fileutils', '0.7'

      

as 0.7.1 requires new Ruby according to   https://rubygems.org/gems/fileutils/versions/0.7.1

+1


source







All Articles