-
Notifications
You must be signed in to change notification settings - Fork 88
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pry-rails doesn't pretty print devise models #83
Comments
Problem seems to be restricted to Active Record methods:
|
I'm also experiencing this issue and I'm not sure where to start looking for a solution. Did you happen to find a fix? |
No solution, instead I switched to Jazz Hands: Works great with a few caveats: 1 - I have noticed some issues with binding.pry (e.g. if I mistype a 2 - Also have seen line-wrapping issues when I'm using iTerm2 with multiple This is my setup: gem 'jazz_hands', github: 'nixme/jazz_hands', branch: On Tue, Oct 25, 2016 at 1:34 PM, Fred Sladkey [email protected]
|
Okay, thanks! Nice to have an alternative. I realized my issue may have something to do with using rails 5 but haven't tried to replicate it in earlier versions. If I find a solution or explanation I'll post here. |
As luck would have it jazz_hands appears to be incompatible with Rails 5, as it requires Railties < 5, while Rails 5 requires Railties = 5. Doesn't seem as though either pry-rails or jazz_hands are maintained any longer. Are there alternatives out there?? |
Try this for a fix: gem 'pry-rails' ... and in your .pryrc, add this (ref):
|
+1 User no longer pretty prints. Using devise as well. |
Caused by Devise authenticable module having custom inspect method: PP then tries its best to do something, but hasn't got line breaks or anything, as per https://github.com/ruby/ruby/blob/trunk/lib/pp.rb#L295-L321 Solution is to either use awesome_print as formatter OR define custom pretty_print method, check the docs here http://ruby-doc.org/stdlib-2.0.0/libdoc/pp/rdoc/PP.html |
@rycwilson it works perfectly ! |
After using these two gems together successfully for the last year, suddenly the console won't pretty print either of my devise models. All other models print in the console as expected, but User and Admin print in the traditional rails/irb fashion.
Curiously this manifests in a dev branch but not in my master branch, so I suppose that gives me hope for tracking down the problem. Gemfiles are identical - both contain pry-rails 0.3.4 and pry 0.10.4. Precisely nothing was changed in user.rb or admin.rb prior to this problem appearing.
Any tips for debugging?
The text was updated successfully, but these errors were encountered: