Skip to content
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

I was getting an odd error when trying to load anything (check http://oi5 #2

Closed
wants to merge 1 commit into from

Conversation

dariocravero
Copy link

I was getting an odd error when trying to load anything (check http://oi52.tinypic.com/2d7g9r6.jpg -strangely the error appears like an image :S!!).

Still, change the require to require 'sprockets' or adding sprockets/version (like the change I'm proposing here) works fine.

Is there a particular reason why you aren't requiring the whole library?

By the way, I've setup my app in the simplest way (as you specify on the docs).
Cheers!

…/oi52.tinypic.com/2d7g9r6.jpg -strangely the error appears like an image :S!!).


Still, change the require to require 'sprockets' or adding sprockets/version (like the change I'm proposing here) works fine.

Is there a particular reason why you aren't requiring the whole library?

By the way, I've setup my app in the simplest way (as you specify on the docs).
Cheers!
@vic
Copy link

vic commented Apr 17, 2012

+1 on merging this, I was getting the same error

`const_missing': uninitialized constant Sprockets::Base::Paths (NameError)
    from /Users/vic/.rvm/gems/ruby-1.9.3-p125/gems/sprockets-2.4.0/lib/sprockets/base.rb:13:in `<class:Base>'
    from /Users/vic/.rvm/gems/ruby-1.9.3-p125/bundler/gems/padrino-sprockets-9bf57c1fe1b0/lib/padrino/sprockets.rb:2:in `require'

I solved it by modifying the lib/padrino/sprockets.rb file to require sprockets instead of sprockets/environment, it seems sprockets.rb by itself will install all the autoloads needed for it to function so I'd say the offending line should read:

require 'sprockets'

FYI @nightsailer .. this issue looks like 6-months old, but it seems the error is still present on the padrino-sprockets i'm using from this repo master branch.

@gilbert
Copy link

gilbert commented Apr 18, 2012

+1. For the record, I'm getting the same error (new project, so latest version of everything):

`const_missing': uninitialized constant Sprockets::Base::Paths (NameError)
    from /Users/tapwater/.rvm/gems/ruby-1.9.2-p318/gems/sprockets-2.4.0/lib/sprockets/base.rb:13:in `<class:Base>'
    from /Users/tapwater/.rvm/gems/ruby-1.9.2-p318/gems/sprockets-2.4.0/lib/sprockets/base.rb:12:in `<module:Sprockets>'
    from /Users/tapwater/.rvm/gems/ruby-1.9.2-p318/gems/sprockets-2.4.0/lib/sprockets/base.rb:10:in `<top (required)>'

gilbert added a commit to gilbert/padrino-sprockets that referenced this pull request Apr 18, 2012
k2052 added a commit to k2052/padrino-sprockets that referenced this pull request Apr 20, 2012
@elianderson
Copy link

I doesn't look like this was merged in, I am seeing this issue on a fresh project, anyone find a resolution?

@vic
Copy link

vic commented May 17, 2012

@nightsailer any reason this hasn't be merged into master?

@nightsailer
Copy link
Owner

@vic Sorry, my wrong, it can't be merged automatically. I just manual fix that.

@basex
Copy link

basex commented Dec 11, 2012

To have the problem easily solved, add to your Gemfile

gem 'padrino-sprockets', :require => ["sprockets","padrino/sprockets"], :git => 'git://github.com/nightsailer/padrino-sprockets.git'

@wikimatze
Copy link
Collaborator

@basex that was the solution to exact the same problem I run into. I somebody going to fix this, because the thing above looks terrible in the Gemfile.

@wikimatze
Copy link
Collaborator

The README is fixed now and code mentioned in the commits here is integrated in the gem.

@wikimatze wikimatze closed this May 20, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants