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

Seems incompatible with Rails 5 / Sprockets 3. #32

Closed
beechnut opened this issue Nov 16, 2016 · 4 comments · Fixed by #49
Closed

Seems incompatible with Rails 5 / Sprockets 3. #32

beechnut opened this issue Nov 16, 2016 · 4 comments · Fixed by #49

Comments

@beechnut
Copy link

Subject of the issue

Fails with sprockets 3 / Rails 5.

Your environment

  • version of less-rails-semantic_ui gem: 2.2.6.0
  • version of Rails: 5.0.0.1

Steps to reproduce

I added the following gems to my Gemfile and ran 'bundle install'.

gem 'less-rails-semantic_ui', '~> 2.2.6.0'
gem 'autoprefixer-rails'
gem 'sprockets', '~> 2'

The sprockets versioning is from @allthesignals' fix from #21, but on a Rails 5 app I got:

Bundler could not find compatible versions for gem "sprockets":
  In Gemfile:
    sprockets (~> 2)

    less-rails-semantic_ui (~> 2.2.6.0) was resolved to 2.2.6.0, which depends on
      less-rails (< 2.8.0, >= 2.6.0) was resolved to 2.7.1, which depends on
        sprockets (< 4, > 2)

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

Using Sprockets 3, I ran rails g semantic_ui:install and got the following error:

$ rails g semantic_ui:install
DEPRECATION WARNING: Sprockets method `register_engine` is deprecated.
Please register a mime type using `register_mime_type` then
use `register_compressor` or `register_transformer`.
https://github.com/rails/sprockets/blob/master/guides/extending_sprockets.md#supporting-all-versions-of-sprockets-in-processors
 (called from block in <class:Railtie> at /Users/matt/.rvm/gems/ruby-2.3.1@basin/gems/less-rails-2.7.1/lib/less/rails/railtie.rb:15)
DEPRECATION WARNING: You are using the a deprecated processor interface Less::Rails::ImportProcessor.
Please update your processor interface:
https://github.com/rails/sprockets/blob/master/guides/extending_sprockets.md#supporting-all-versions-of-sprockets-in-processors
 (called from block in <class:Railtie> at /Users/matt/.rvm/gems/ruby-2.3.1@basin/gems/less-rails-2.7.1/lib/less/rails/railtie.rb:20)
/Users/matt/.rvm/gems/ruby-2.3.1@basin/gems/autoprefixer-rails-2.2.0.20140804/lib/autoprefixer-rails/sprockets.rb:45:in `register': undefined method `register_postprocessor' for nil:NilClass (NoMethodError)
        from /Users/matt/.rvm/gems/ruby-2.3.1@basin/gems/autoprefixer-rails-2.2.0.20140804/lib/autoprefixer-rails/sprockets.rb:37:in `install'
        from /Users/matt/.rvm/gems/ruby-2.3.1@basin/gems/autoprefixer-rails-2.2.0.20140804/lib/autoprefixer-rails.rb:16:in `install'
        from /Users/matt/.rvm/gems/ruby-2.3.1@basin/gems/autoprefixer-rails-2.2.0.20140804/lib/autoprefixer-rails/railtie.rb:12:in `block in <class:Railtie>'
        from /Users/matt/.rvm/gems/ruby-2.3.1@basin/gems/railties-5.0.0.1/lib/rails/initializable.rb:30:in `instance_exec'
        from /Users/matt/.rvm/gems/ruby-2.3.1@basin/gems/railties-5.0.0.1/lib/rails/initializable.rb:30:in `run'
        from /Users/matt/.rvm/gems/ruby-2.3.1@basin/gems/railties-5.0.0.1/lib/rails/initializable.rb:55:in `block in run_initializers'
        from /Users/matt/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/tsort.rb:228:in `block in tsort_each'
        from /Users/matt/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component'
        from /Users/matt/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/tsort.rb:431:in `each_strongly_connected_component_from'
        from /Users/matt/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/tsort.rb:349:in `block in each_strongly_connected_component'
        from /Users/matt/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/tsort.rb:347:in `each'
        from /Users/matt/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/tsort.rb:347:in `call'
        from /Users/matt/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/tsort.rb:347:in `each_strongly_connected_component'
        from /Users/matt/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/tsort.rb:226:in `tsort_each'
        from /Users/matt/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/tsort.rb:205:in `tsort_each'
        from /Users/matt/.rvm/gems/ruby-2.3.1@basin/gems/railties-5.0.0.1/lib/rails/initializable.rb:54:in `run_initializers'
        from /Users/matt/.rvm/gems/ruby-2.3.1@basin/gems/railties-5.0.0.1/lib/rails/application.rb:352:in `initialize!'
        from /Users/matt/Documents/repos/unrest/basin/config/environment.rb:5:in `<top (required)>'
        from /Users/matt/.rvm/gems/ruby-2.3.1@basin/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:293:in `require'matt$
        from /Users/matt/.rvm/gems/ruby-2.3.1@basin/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:293:in `block in require'
        from /Users/matt/.rvm/gems/ruby-2.3.1@basin/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:259:in `load_dependency'
        from /Users/matt/.rvm/gems/ruby-2.3.1@basin/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:293:in `require'
        from /Users/matt/.rvm/gems/ruby-2.3.1@basin/gems/spring-2.0.0/lib/spring/application.rb:92:in `preload'
        from /Users/matt/.rvm/gems/ruby-2.3.1@basin/gems/spring-2.0.0/lib/spring/application.rb:143:in `serve'
        from /Users/matt/.rvm/gems/ruby-2.3.1@basin/gems/spring-2.0.0/lib/spring/application.rb:131:in `block in run'
        from /Users/matt/.rvm/gems/ruby-2.3.1@basin/gems/spring-2.0.0/lib/spring/application.rb:125:in `loop'
        from /Users/matt/.rvm/gems/ruby-2.3.1@basin/gems/spring-2.0.0/lib/spring/application.rb:125:in `run'
        from /Users/matt/.rvm/gems/ruby-2.3.1@basin/gems/spring-2.0.0/lib/spring/application/boot.rb:19:in `<top (required)>'
        from /Users/matt/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
        from /Users/matt/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
        from -e:1:in `<main>'

I followed the link listed in the issue -- https://github.com/rails/sprockets/blob/master/guides/extending_sprockets.md#supporting-all-versions-of-sprockets-in-processors -- but I'm super out of my element here -- I'm not familiar with sprockets interfaces at all, and don't even know where to begin.

@pongsanti
Copy link

@beechnut I noticed distant autoprefixer-rails version from the log

/Users/matt/.rvm/gems/ruby-2.3.1@basin/gems/autoprefixer-rails-2.2.0.20140804/lib/autoprefixer-rails/sprockets.rb:45:in register': undefined method register_postprocessor' for nil:NilClass (NoMethodError)

I guess you should update gem and try again. autoprefixer-rails gem The most current is 6.5.3

@dijonkitchen
Copy link
Contributor

dijonkitchen commented Dec 18, 2016

I still have a problem even with the latest versions. I also removed the versioning constraints and added therubyracer gem (didn't specify sprockets ~>2 though). See my PRs: #33 and #34

@onerinas
Copy link

@dijonkitchen Were you able to get rid of the warning?. I am getting this while starting the rails server.

@dijonkitchen
Copy link
Contributor

@onerinas I think we moved on from this and just used Semantic UI from the client-side as it's own package inline. It looks like only one of my PRs were merged, but that fix may help you.

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 a pull request may close this issue.

4 participants