Open hakanai opened 1 year ago
Okay, having dug a bit deeper now... flay loads the plugins explicitly itself, so whether the file is required by bundler or not is irrelevant.
But what's happening is - flay gets a list of the files containing plugins. This contains:
Because their plugins comes after flay_actionpack, anything flay_actionpack does to try and override erb behaviour will be stomped by the base one which errors out on Rails erb files.
Given that gem is not respecting the order the gems are required in the Gemfile, I'm not sure what I can do to work around this one.
There's this line:
https://github.com/UncleGene/flay-actionpack/blob/master/lib/flay_actionpack.rb#L6
Which at first glance seems like it might be there to work around this issue. But at the time the plugin loads the value in @@plugins
is []
, so nothing happens.
If instead it appended it to the list, then it might make everything work? That's the only theory I've got.
I have a project where flay is failing on Rails ERb files.
So I added
to
Gemfile
, but it still failed to parse ERb files.Investigating with
ruby -d
, Bundler appears to be trying to load:'flay-actionpack'
'flay/actionpack'
But the actual file is 'flay_actionpack.rb' so neither of those is going to work.
The code in Bundler responsible for this is: https://github.com/rubygems/bundler/blob/master/lib/bundler/runtime.rb#L65-L94
Clearly it must have worked at some point in the past, so my guess is that perhaps Bundler changed its mind on what separators it was going to permit?