Comments (12)
Please install the latest v1.0.1
HTH
Michael
from awesome_print.
Will do that, thanks Michael!
from awesome_print.
Hmm...didnt' resolve it in fact. Has it been a known issue before?
/Users/grimen/.rvm/gems/ruby-1.9.3-p0/gems/awesome_print-1.0.1/lib/awesome_print/ext/action_view.rb:18:in `<top (required)>': uninitialized constant ActionView::Base (NameError)
from /Users/grimen/.rvm/gems/ruby-1.9.3-p0/gems/awesome_print-1.0.1/lib/awesome_print.rb:26:in `<top (required)>'
from /Users/grimen/.rvm/gems/ruby-1.9.3-p0/gems/bundler-1.1.rc/lib/bundler/runtime.rb:68:in `require'
from /Users/grimen/.rvm/gems/ruby-1.9.3-p0/gems/bundler-1.1.rc/lib/bundler/runtime.rb:68:in `block (2 levels) in require'
from /Users/grimen/.rvm/gems/ruby-1.9.3-p0/gems/bundler-1.1.rc/lib/bundler/runtime.rb:66:in `each'
from /Users/grimen/.rvm/gems/ruby-1.9.3-p0/gems/bundler-1.1.rc/lib/bundler/runtime.rb:66:in `block in require'
from /Users/grimen/.rvm/gems/ruby-1.9.3-p0/gems/bundler-1.1.rc/lib/bundler/runtime.rb:55:in `each'
from /Users/grimen/.rvm/gems/ruby-1.9.3-p0/gems/bundler-1.1.rc/lib/bundler/runtime.rb:55:in `require'
from /Users/grimen/.rvm/gems/ruby-1.9.3-p0/gems/bundler-1.1.rc/lib/bundler.rb:128:in `require'
from /Users/grimen/Dropbox/Development/projects/merchii/merchii-api/config/environment.rb:16:in `<top (required)>'
from /Users/grimen/Dropbox/Development/projects/merchii/merchii-api/app.rb:1:in `require'
from /Users/grimen/Dropbox/Development/projects/merchii/merchii-api/app.rb:1:in `<top (required)>'
from /Users/grimen/Dropbox/Development/projects/merchii/merchii-api/spec/spec_helper.rb:13:in `require'
from /Users/grimen/Dropbox/Development/projects/merchii/merchii-api/spec/spec_helper.rb:13:in `<top (required)>'
from /Users/grimen/Dropbox/Development/projects/merchii/merchii-api/spec/api_spec.rb:1:in `require'
from /Users/grimen/Dropbox/Development/projects/merchii/merchii-api/spec/api_spec.rb:1:in `<top (required)>'
from /Users/grimen/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/rake_test_loader.rb:10:in `require'
from /Users/grimen/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/rake_test_loader.rb:10:in `block (2 levels) in <main>'
from /Users/grimen/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/rake_test_loader.rb:9:in `each'
from /Users/grimen/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/rake_test_loader.rb:9:in `block in <main>'
from /Users/grimen/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/rake_test_loader.rb:4:in `select'
from /Users/grimen/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/rake_test_loader.rb:4:in `<main>'
from awesome_print.
How do you load awesome_print gem? The rake command and Rails version would also be helpful. There's a check whether ActionView is defined in https://github.com/michaeldv/awesome_print/blob/master/lib/awesome_print.rb, so it must be something rather unusual.
Michael
from awesome_print.
...and no, this is is a new issue, nobody has reported it before.
from awesome_print.
I'm using it within a Sinatra-app. I noticed it started to appear when I temporarily injected Devise for experimental things - which depends on Rails. But either way it should not break like this, must be something funky with the dependency loading within the gem parts that depend on ActionView. Haven't checked the internals of 'awesome_print' yet so cannot say much about it. I removed ap as dependency now as I'm in middle of stuff (no time to dig deeper), but I think this one should be kept an eye on as a gem should not clash like this with optional dependencies.
from awesome_print.
I think changing:
require File.dirname(FILE) + "/awesome_print/ext/action_view" if defined?(ActionView)
to
require File.dirname(FILE) + "/awesome_print/ext/action_view" if defined?(ActionView::Base)
in awesome_print/lib/awesome_print.rb should fix your issue. Please confirm when you have a chance so I could add it in the next release.
Thanks,
Michael
from awesome_print.
I am having a similar issue. I tried the fix above but it has not resolved the issue. After adding the required code to my ~/.irbrc I get:
Loading development environment (Rails 3.1.0)
cannot load such file -- awesome_print
1.9.3p0 :001 >
from awesome_print.
Is awesome_print gem part of :development group in your Gemfile and Gemfile.lock?
from awesome_print.
No, I was installing the gem directly with rvmsudo gem install awesome_print. When I added it to my gemfile I get the error
Errno::EACCES: Permission denied - /Users/*****/.rvm/gems/ruby-1.9.3-p0/gems/awesome_print-1.0.1/CHANGELOG
An error occured while installing awesome_print (1.0.1), and Bundler cannot continue.
Make sure that gem install awesome_print -v '1.0.1'
succeeds before bundling.
from awesome_print.
That's why it doesn't get loaded. Please make sure the gem is installed properly.
from awesome_print.
How do I get the gem to install properly? I don't have a permission
issue with any other gems.
Sent from my iPhone
On Dec 8, 2011, at 9:00 PM, Michael Dvorkin
[email protected]
wrote:
That's why it doesn't get loaded. Please make sure the gem is installed properly.
Reply to this email directly or view it on GitHub:
https://github.com/michaeldv/awesome_print/issues/62#issuecomment-3074466
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.