alchaplinsky / polymer-rails

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

Error from running rails g polymer:install #88

Open dshukertjr opened 7 years ago

dshukertjr commented 7 years ago

I'm new to using rails and polymer, and I followed the instruction in the README.md, but $rails g polymer:install command did not work.

Here is the output from running $rails g polymer:install

/Users/someuser/.rvm/gems/ruby-2.3.3/gems/bundler-1.14.4/lib/bundler/runtime.rb:94:in `rescue in block (2 levels) in require': There was an error while trying to load the gem 'polymer-rails'.
Gem Load Error is: uninitialized constant Sprockets::Processor
Backtrace for gem load error is:
/Users/someuser/.rvm/gems/ruby-2.3.3/gems/polymer-rails-0.2.8/lib/polymer-rails/processors/components_processor.rb:5:in `<module:Rails>'
/Users/someuser/.rvm/gems/ruby-2.3.3/gems/polymer-rails-0.2.8/lib/polymer-rails/processors/components_processor.rb:4:in `<module:Polymer>'
/Users/someuser/.rvm/gems/ruby-2.3.3/gems/polymer-rails-0.2.8/lib/polymer-rails/processors/components_processor.rb:3:in `<top (required)>'
/Users/someuser/.rvm/gems/ruby-2.3.3/gems/polymer-rails-0.2.8/lib/polymer-rails.rb:4:in `<top (required)>'
/Users/someuser/.rvm/gems/ruby-2.3.3/gems/bundler-1.14.4/lib/bundler/runtime.rb:91:in `require'
/Users/someuser/.rvm/gems/ruby-2.3.3/gems/bundler-1.14.4/lib/bundler/runtime.rb:91:in `block (2 levels) in require'
/Users/someuser/.rvm/gems/ruby-2.3.3/gems/bundler-1.14.4/lib/bundler/runtime.rb:86:in `each'
/Users/someuser/.rvm/gems/ruby-2.3.3/gems/bundler-1.14.4/lib/bundler/runtime.rb:86:in `block in require'
/Users/someuser/.rvm/gems/ruby-2.3.3/gems/bundler-1.14.4/lib/bundler/runtime.rb:75:in `each'
/Users/someuser/.rvm/gems/ruby-2.3.3/gems/bundler-1.14.4/lib/bundler/runtime.rb:75:in `require'
/Users/someuser/.rvm/gems/ruby-2.3.3/gems/bundler-1.14.4/lib/bundler.rb:107:in `require'
/Users/someuser/Dropbox/railsapp/taskmanage/config/application.rb:7:in `<top (required)>'
/Users/someuser/.rvm/gems/ruby-2.3.3/gems/spring-2.0.1/lib/spring/application.rb:82:in `require'
/Users/someuser/.rvm/gems/ruby-2.3.3/gems/spring-2.0.1/lib/spring/application.rb:82:in `preload'
/Users/someuser/.rvm/gems/ruby-2.3.3/gems/spring-2.0.1/lib/spring/application.rb:143:in `serve'
/Users/someuser/.rvm/gems/ruby-2.3.3/gems/spring-2.0.1/lib/spring/application.rb:131:in `block in run'
/Users/someuser/.rvm/gems/ruby-2.3.3/gems/spring-2.0.1/lib/spring/application.rb:125:in `loop'
/Users/someuser/.rvm/gems/ruby-2.3.3/gems/spring-2.0.1/lib/spring/application.rb:125:in `run'
/Users/someuser/.rvm/gems/ruby-2.3.3/gems/spring-2.0.1/lib/spring/application/boot.rb:19:in `<top (required)>'
/Users/someuser/.rvm/rubies/ruby-2.3.3/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
/Users/someuser/.rvm/rubies/ruby-2.3.3/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
-e:1:in `<main>'
Bundler Error Backtrace:
 (Bundler::GemRequireError)
    from /Users/someuser/.rvm/gems/ruby-2.3.3/gems/bundler-1.14.4/lib/bundler/runtime.rb:90:in `block (2 levels) in require'
    from /Users/someuser/.rvm/gems/ruby-2.3.3/gems/bundler-1.14.4/lib/bundler/runtime.rb:86:in `each'
    from /Users/someuser/.rvm/gems/ruby-2.3.3/gems/bundler-1.14.4/lib/bundler/runtime.rb:86:in `block in require'
    from /Users/someuser/.rvm/gems/ruby-2.3.3/gems/bundler-1.14.4/lib/bundler/runtime.rb:75:in `each'
    from /Users/someuser/.rvm/gems/ruby-2.3.3/gems/bundler-1.14.4/lib/bundler/runtime.rb:75:in `require'
    from /Users/someuser/.rvm/gems/ruby-2.3.3/gems/bundler-1.14.4/lib/bundler.rb:107:in `require'
    from /Users/someuser/Dropbox/railsapp/taskmanage/config/application.rb:7:in `<top (required)>'
    from /Users/someuser/.rvm/gems/ruby-2.3.3/gems/spring-2.0.1/lib/spring/application.rb:82:in `require'
    from /Users/someuser/.rvm/gems/ruby-2.3.3/gems/spring-2.0.1/lib/spring/application.rb:82:in `preload'
    from /Users/someuser/.rvm/gems/ruby-2.3.3/gems/spring-2.0.1/lib/spring/application.rb:143:in `serve'
    from /Users/someuser/.rvm/gems/ruby-2.3.3/gems/spring-2.0.1/lib/spring/application.rb:131:in `block in run'
    from /Users/someuser/.rvm/gems/ruby-2.3.3/gems/spring-2.0.1/lib/spring/application.rb:125:in `loop'
    from /Users/someuser/.rvm/gems/ruby-2.3.3/gems/spring-2.0.1/lib/spring/application.rb:125:in `run'
    from /Users/someuser/.rvm/gems/ruby-2.3.3/gems/spring-2.0.1/lib/spring/application/boot.rb:19:in `<top (required)>'
    from /Users/someuser/.rvm/rubies/ruby-2.3.3/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /Users/someuser/.rvm/rubies/ruby-2.3.3/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from -e:1:in `<main>'

Now, after getting this, I googled for some clue, and found out that using sprocket version 3 or higher would result in an error like this. So I inserted the following into my gem file

gem 'sprockets', "< 3.0.0"

which resulted in this error message when I run $ bundle update sprockets

`Bundler could not find compatible versions for gem "sprockets": In Gemfile: sprockets (< 3.0.0)

rails (~> 5.0.1) was resolved to 5.0.2, which depends on
  sprockets-rails (>= 2.0.0) was resolved to 3.2.0, which depends on
    sprockets (>= 3.0.0)

`

At this point, I am kind of stuck. Does this mean polymer does not work on rails 5.0.1? Do I have to use rails version 4?