Skip to content

Instantly share code, notes, and snippets.

@jerome-diver
Created February 10, 2020 16:31
Show Gist options
  • Save jerome-diver/d16e6db03f84b5f59e7082449a42c94e to your computer and use it in GitHub Desktop.
Save jerome-diver/d16e6db03f84b5f59e7082449a42c94e to your computer and use it in GitHub Desktop.
ruby-2.7 ActionView:Template:Error (undefined method 'start_with?' for /\.(?:svg|eot|woff|ttf)\z:Regexp)
Rails.apoplication.config.assets.precompile << (/\.(?:svg|eot|woff|ttf)\z)
@jerome-diver
Copy link
Author

this last line is inside file config/initializers/ of my Rails-5.4.2.1 application.
error message:
ruby-2.7 ActionView:Template:Error (undefined method 'start_with?' for /.(?:svg|eot|woff|ttf)\z:Regexp)
becuase of return /null for ::1 result.
I read about ruby-2.7 regexp changed and then give back unusual answer (compared to ruby-2.6).
SO i think it should be possible to do the same than before, but with a different regex code or a different approch to get files list to precompile for Rails assets ... I'm searching an help on this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment