Skip to content

kaminari-sinatra defines Rails constant, causing other gems to think Rails is being used #9

Open
@brucek

Description

@brucek

This is due to loading ActionView which requires Rails.

ActionView claims to not require Rails, but it uses the underlying rails-html-sanitizer gem, which says:

Rails HTML Sanitizer is only intended to be used with Rails applications. If you need similar functionality but aren't using Rails, consider using the underlying sanitization library Loofah directly.

This causes issues loading gems like for instance Papertrail as this line:

if defined?(Rails)
  require "paper_trail/frameworks/rails"

thinks Rails is available and then blows up.

The ideal world is to prevent the Rails constant from being loaded somehow, but at a minimum some documentation around this gem still requiring Rails would probably help clarify the dependency, esp since the name "kaminari-sinatra" kind of implies I can use Sinatra and not need Rails.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions