alchaplinsky / polymer-rails

Polymer and web components for Ruby on Rails
MIT License
286 stars 80 forks source link

rails -g polymer:install ERROR #47

Closed caseybaggz closed 9 years ago

caseybaggz commented 9 years ago

After adding gem to the Gemfile and running bundle, when trying to run rails g polymer:install I'm getting this error block:

/Users/caseybaggz/.rvm/gems/ruby-2.1.2/gems/polymer-rails-0.2.8/lib/polymer-rails/processors/components_processor.rb:5:in `<module:Rails>': uninitialized constant Sprockets::Processor (NameError)
    from /Users/caseybaggz/.rvm/gems/ruby-2.1.2/gems/polymer-rails-0.2.8/lib/polymer-rails/processors/components_processor.rb:4:in `<module:Polymer>'
    from /Users/caseybaggz/.rvm/gems/ruby-2.1.2/gems/polymer-rails-0.2.8/lib/polymer-rails/processors/components_processor.rb:3:in `<top (required)>'
    from /Users/caseybaggz/.rvm/gems/ruby-2.1.2/gems/polymer-rails-0.2.8/lib/polymer-rails.rb:4:in `require'
    from /Users/caseybaggz/.rvm/gems/ruby-2.1.2/gems/polymer-rails-0.2.8/lib/polymer-rails.rb:4:in `<top (required)>'
    from /Users/caseybaggz/.rvm/gems/ruby-2.1.2@global/gems/bundler-1.6.2/lib/bundler/runtime.rb:76:in `require'
    from /Users/caseybaggz/.rvm/gems/ruby-2.1.2@global/gems/bundler-1.6.2/lib/bundler/runtime.rb:76:in `block (2 levels) in require'
    from /Users/caseybaggz/.rvm/gems/ruby-2.1.2@global/gems/bundler-1.6.2/lib/bundler/runtime.rb:72:in `each'
    from /Users/caseybaggz/.rvm/gems/ruby-2.1.2@global/gems/bundler-1.6.2/lib/bundler/runtime.rb:72:in `block in require'
    from /Users/caseybaggz/.rvm/gems/ruby-2.1.2@global/gems/bundler-1.6.2/lib/bundler/runtime.rb:61:in `each'
    from /Users/caseybaggz/.rvm/gems/ruby-2.1.2@global/gems/bundler-1.6.2/lib/bundler/runtime.rb:61:in `require'
    from /Users/caseybaggz/.rvm/gems/ruby-2.1.2@global/gems/bundler-1.6.2/lib/bundler.rb:132:in `require'
    from /Users/caseybaggz/Desktop/second/config/application.rb:7:in `<top (required)>'
    from /Users/caseybaggz/.rvm/gems/ruby-2.1.2/gems/spring-1.3.6/lib/spring/application.rb:82:in `require'
    from /Users/caseybaggz/.rvm/gems/ruby-2.1.2/gems/spring-1.3.6/lib/spring/application.rb:82:in `preload'
    from /Users/caseybaggz/.rvm/gems/ruby-2.1.2/gems/spring-1.3.6/lib/spring/application.rb:143:in `serve'
    from /Users/caseybaggz/.rvm/gems/ruby-2.1.2/gems/spring-1.3.6/lib/spring/application.rb:131:in `block in run'
    from /Users/caseybaggz/.rvm/gems/ruby-2.1.2/gems/spring-1.3.6/lib/spring/application.rb:125:in `loop'
    from /Users/caseybaggz/.rvm/gems/ruby-2.1.2/gems/spring-1.3.6/lib/spring/application.rb:125:in `run'
    from /Users/caseybaggz/.rvm/gems/ruby-2.1.2/gems/spring-1.3.6/lib/spring/application/boot.rb:18:in `<top (required)>'
    from /Users/caseybaggz/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /Users/caseybaggz/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from -e:1:in `<main>'

This prevents me from using this gem of course. Hopefully see a fix soon? I'm an experienced Polymer dev, but a newbie for Rails. Looking forward to using this.

Also, when using 1.0, I get a bundle error:

Bundler could not find compatible versions for gem "sprockets":
  In Gemfile:
    polymer-rails (~> 1.0) ruby depends on
      sprockets (< 3.0.0) ruby

    sass-rails (~> 5.0) ruby depends on
      sprockets (3.2.0)

Using rails 4.2.1 to build my app.

xcaptain commented 9 years ago

You can try bundle show | grep sprocket to see if you have sprockets installed.

alchaplinsky commented 9 years ago

hey @caseybaggz polymer-rails doesn't work with sprockets 3.x.x yet. I'm planning to make needed changes soon, but for now to make it work you can specify gem 'sprockets', '2.11.3' in your Gemfile and run bundle update sprockets

caseybaggz commented 9 years ago

@alchapone that fixed it! Great man. Looking forward to seeing this gem stay healthy and active. Great work bringing the Polymer goodness to rails. :+1: