You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello:
Our Project raise syntax error after update version 3.4.0 today, the following is the error message it has showed:
/mime-types-3.4.0/lib/mime/types/cache.rb:26: syntax error, unexpected tIDENTIFIER, expecting '(' (SyntaxError)
Could not load MIME::Types cache: invalid version
/mime-types-3.4.0/lib/mime/types/cache.rb:32: syntax error, unexpected tIDENTIFIER, expecting '('
Could not load MIME::Types cache: #{e}
We try to add " in line 26 and 32 in cache.rb:
MIME::Types.logger.warn <<~WARNING.chomp
"Could not load MIME::Types cache: invalid version"
WARNING
MIME::Types.logger.warn <<~WARNING.chomp
"Could not load MIME::Types cache: #{e}"
WARNING
and it appear another error:
/mime/types/registry.rb:49: syntax error, unexpected tIDENTIFIER, expecting keyword_end (SyntaxError)
($RUBY_MIME_TYPES_LAZY_LOAD) is deprecated and will be remov...
and so do we to registry.rb in line 49, it works:
MIME::Types.logger.warn <<~WARNING.chomp
"Lazy loading ($RUBY_MIME_TYPES_LAZY_LOAD) is deprecated and will be removed."
WARNING
we are not sure this is right way to fix the error or not, could you please help us confirm this issue? Thank You!
Best Regard!
The text was updated successfully, but these errors were encountered:
Rather than try to fix the syntax, should https://github.com/mime-types/ruby-mime-types/blob/main/mime-types.gemspec#L20 be updated to reference 2.3 as the minimum version rather than 2.0? Assuming it's possible do a bugfix release and yank 3.4.0 so that installs on older rubies for some older distros will ignore the more recent releases?
While 2.2 is no longer supported for security fixes by the security developers, ruby 2.0 is in centos 7 which has security updates until 2024.
Fixed a Ruby < 2.3 incompatibility introduced by the use of
standardrb, where `<<-` heredocs were converted to `<<~` heredocs. These
have been reverted back to `<<-` with the indentation kept and
a `.strip` call to prevent excess whitespace.
Resolves#159
Hello:
Our Project raise syntax error after update version 3.4.0 today, the following is the error message it has showed:
We try to add " in line 26 and 32 in cache.rb:
and it appear another error:
and so do we to registry.rb in line 49, it works:
we are not sure this is right way to fix the error or not, could you please help us confirm this issue? Thank You!
Best Regard!
The text was updated successfully, but these errors were encountered: