basecamp / marginalia

Attach comments to ActiveRecord's SQL queries

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Rails 5 / Ruby 2.5 bug

shaneog opened this issue · comments

I receive the calling line of usr/local/lib/ruby/2.5.0/monitor.rb:226:in 'mon_synchronize' using Rails 5 and Ruby 2.5, which is not useful.

I've added a PRto add Ruby 2.5 support to the test suite, to see if there are breaking tests.

Versions:
Rails: 5.1.6
Ruby: 2.5.1
Marginalia: 1.5.0

OT: is this project maintained any more?

commented

@shaneog Have you gotten it to work with Rails 5.2 and Ruby 2.5.1?

cc: @arthurnn Should one expect this to work with the latest versions of Rails & Ruby?

I'm still seeing this on Ruby 2.5

With Ruby 2.5.1, Rails 5.2.0 and marginalia 1.5.0 I don't see this bug. Also I'm not using any customization on marginalia.

Ruby 2.5.5, Rails 5.1.7, marginalia 1.8.0, seeing this bug.

You can work around this by defining your own lines to ignore.

# See https://github.com/basecamp/marginalia/blob/master/lib/marginalia/comment.rb#L109
# Our addition excludes:  "/usr/local/lib/ruby/2.5.0/monitor.rb:226:in `mon_synchronize'"
Marginalia::Comment.lines_to_ignore = /\.rvm|gem|vendor\/|marginalia|rbenv|\/monitor.rb.*mon_synchronize/