Comments (11)
Works fine in my environment (rvm + Ruby 1.9.2 + Rails 3.0.3, bundler 1.0.6, awesome_print 0.3.1). Rails console loads ok as well. What's your setup?
$ rails s -u
=> Booting WEBrick
=> Rails 3.0.3 application starting in development on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
You need to install ruby-debug to run the server in debugging mode. With gems, use 'gem install ruby-debug'
Exiting
$ rails s
=> Booting WEBrick
=> Rails 3.0.3 application starting in development on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
[2010-11-16 18:44:51] INFO WEBrick 1.3.1
[2010-11-16 18:44:51] INFO ruby 1.9.2 (2010-08-18) [x86_64-darwin10.4.0]
[2010-11-16 18:44:51] INFO WEBrick::HTTPServer#start: pid=4451 port=3000
from awesome_print.
Seems like incompatibility with liquid gem. A quick fix is as follows (Ruby 1.8.7+):
# gems/awesome_print-0.3.1/lib/ap/core_ext/object.rb
class Object #:nodoc:
methods.grep(/methods$/) do |name|
next if name.to_s.include? 'instance' # Instance methods are trapped in Class.
next if method(name).owner == Module # <-- ADD THIS
from awesome_print.
Thanks, will try that in the morning & let you know.
from awesome_print.
yep, looks like that worked. Should that fix get pushed out in the next version?
from awesome_print.
Probably. I'm going to think some more what is the best way to handle it.
from awesome_print.
thanks for the fix
from awesome_print.
@michael, since there is still no 0.3.2 with this fix, would you happen to know what the latest version I could use in our Gemfile that doesn't have this issue?
from awesome_print.
Oh, you can tell Bundler to install it straight from the Github:
gem 'awesome_print', '>= 0.3.1', :git => "git://github.com/michaeldv/awesome_print.git"
from awesome_print.
Sure, but is this fix in GitHub? I don't see it in the commit logs.
So since we use Liquid, I've moved AP back to the 0.2.x line for now.
from awesome_print.
Hi,
Here's a bit cleaner fix (see core_ext/object.rb and core_ext/class.rb):
michaeldv/awesome_print@2562c2b
Basically I replaced methods.grep (which mistakingly includes #liquid_methods) with explicit list of methods that I want to override. Obviously #liquid_methods is not among them ;-)
Best,
Michael
from awesome_print.
Perfect.
from awesome_print.
Related Issues (20)
- Proc.new is deprecated HOT 5
- irb: ArgumentError (wrong number of arguments (given 1, expected 0)) HOT 2
- Output of non-empty Hash object fails when using Ruby 3.0 HOT 1
- 1.9 release HOT 12
- Array#uniq is not working on pry with `AwesomePrint.pry!` HOT 5
- Ruby 2.7.0 compatibility HOT 2
- problem with rails and ruby 3.0.0 HOT 2
- ArgumentError (wrong number of arguments (given 1, expected 0)) HOT 4
- undefined method `marshal_dump` for `ActiveModel::Errors` HOT 6
- Getting FrozenError (can't modify frozen String: "false") after upgrading to Ruby 2.7.3 using awesome_print (1.9.2) HOT 5
- Plain Ruby Objects are not formatted properly HOT 2
- Hi, can I put `.aprc` under ~/.config/awesome_print/aprc?
- `.pry!` does nothing in rails console
- Don't override/monkey patch `String` class HOT 3
- Provide a way of specifying custom formatting on user-created classes/objects HOT 2
- object_id option not operating as expected
- Maintained fork: amazing-print/amazing_print
- Pretty print object as executable code
- ap.awesome_sequel_dataset(ds) Arguments Error
- ActiveRecord methods with `ap` displays nothing
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from awesome_print.