jwhitley / requirejs-rails

RequireJS support for your Rails 3 or 4 application
MIT License
592 stars 202 forks source link

Version 0.9.6 broken #221

Closed dtognazzini closed 9 years ago

dtognazzini commented 9 years ago
NameError: uninitialized constant ActionView::Helpers::AssetUrlHelper
/me/.rvm/gems/ruby-2.1.5/gems/requirejs-rails-0.9.6/lib/requirejs/rails/view_proxy.rb:5:in `<class:ViewProxy>'
/me/.rvm/gems/ruby-2.1.5/gems/requirejs-rails-0.9.6/lib/requirejs/rails/view_proxy.rb:3:in `<module:Rails>'
/me/.rvm/gems/ruby-2.1.5/gems/requirejs-rails-0.9.6/lib/requirejs/rails/view_proxy.rb:2:in `<module:Requirejs>'
/me/.rvm/gems/ruby-2.1.5/gems/requirejs-rails-0.9.6/lib/requirejs/rails/view_proxy.rb:1:in `<top (required)>'
/me/.rvm/gems/ruby-2.1.5/gems/requirejs-rails-0.9.6/app/helpers/requirejs_helper.rb:2:in `<top (required)>'
/me/.rvm/gems/ruby-2.1.5/gems/actionpack-3.2.20/lib/abstract_controller/helpers.rb:135:in `block in modules_for_helpers'
/me/.rvm/gems/ruby-2.1.5/gems/actionpack-3.2.20/lib/abstract_controller/helpers.rb:131:in `map!'
/me/.rvm/gems/ruby-2.1.5/gems/actionpack-3.2.20/lib/abstract_controller/helpers.rb:131:in `modules_for_helpers'
/me/.rvm/gems/ruby-2.1.5/gems/actionpack-3.2.20/lib/action_controller/metal/helpers.rb:92:in `modules_for_helpers'
/me/.rvm/gems/ruby-2.1.5/gems/actionpack-3.2.20/lib/abstract_controller/helpers.rb:95:in `helper'
/me/.rvm/gems/ruby-2.1.5/gems/actionpack-3.2.20/lib/action_controller/railties/paths.rb:18:in `block (2 levels) in with'
dtognazzini commented 9 years ago

Duplicate of #210

chenxeed commented 9 years ago

Hi i also get the problem when try to precompile in development.

run RAILS_ENV=development rake assets:precompile

NoMethodError: undefined method `[]' for nil:NilClass
/Users/albert/.rvm/gems/ruby-2.2.1/gems/requirejs-rails-0.9.6/lib/tasks/requirejs-rails_tasks.rake:101:in `block (3 levels) in <top (required)>'
carsomyr commented 9 years ago

@dtognazzini Could you try the master branch? I already closed #210.

carsomyr commented 9 years ago

@chenxeed That's odd. Could you provide a sample Rails project so that I can reproduce?

medyo commented 9 years ago

Same bug as @chenxeed ! I reproduced the bug just by creating new project, adding requirejs gem then rake assets:precompile. here is a demo app : https://gitlab.com/medyo/demo-requirejs

Edit: the version 0.9.5 works fine

dtognazzini commented 9 years ago

How about using semver?

carsomyr commented 9 years ago

@dtognazzini I've been working on cleaning up the codebase. When this happens, just file semantic versioning as a separate issue.

carsomyr commented 9 years ago

@chenxeed @medyo @dtognazzini Could you guys point your Gemfiles to the master branch and try again?

medyo commented 9 years ago

Thanks @carsomyr the master branch works perfectly.

md5 commented 9 years ago

I'll just add that I ran into the same issue and that using master (specifically commit f1016f05fbd7baabb5feb198a7abb1a37441deae) worked for me as well.