preston / railroady

Ruby on Rails 3/4/5 model and controller UML class diagram generator. (`brew/port/apt-get install graphviz` before use!)
Other
1.71k stars 142 forks source link

exception can't modify frozen String raised while trying to load model #124

Open laiskajoonas opened 6 years ago

laiskajoonas commented 6 years ago

I'm trying to run railroady on my rails 5.2 project, but I get bunch of exceptions complaining about the frozen literals and the model diagram does not have the relations correctly. frozen_string_literal: true stanza is recommended by rubocop. Is there a way to circumvent this problem? Other than removing all froze_string_literal lines from the project. I'm running railroady with following parameters:

railroady \ -e app/models/,\ --hide-types --hide-through --hide-magic --include-concerns -m -M

The Warning is as follows:

Warning: exception can't modify frozen String raised while trying to load model class app/models/

estani commented 5 years ago

Same thing here. The resulting Diagram is just a bunch of boxes with no lines/arrows relating them.

I tried disabling it globally RUBYOPT=--disable-frozen-string-literal but this didn't help.

chaumo commented 1 year ago

Maybe too late but in case anyone wants to dig in deeper, I've had this problem on models using 'acts_as_votable/acts_as_voter' from acts_as_votable gem Temp commenting those lines works, so haven't tried to update that gem (using 0.12.1), maybe it's fixed with newer versions