rubysamurai / material_design_lite-sass

Google's Material Design Lite with Material Icons and Roboto font for Ruby applications
MIT License
98 stars 10 forks source link

error when precompile assets (v1.0.4.1) #4

Closed sakeyu closed 9 years ago

sakeyu commented 9 years ago

This is error message:

ArgumentError: wrong number of arguments (0 for 1) /.../bundle/ruby/2.2.0/gems/autoprefixer-rails-5.2.1.3/lib/autoprefixer-rails/railtie.rb:24:in config' /.../tmp/build-144302011215992/vendor/bundle/ruby/2.2.0/gems/railties-4.2.3/lib/rails/railtie.rb:123:inconfig' /.../tmp/build-144302011215992/vendor/bundle/ruby/2.2.0/gems/autoprefixer-rails-5.2.1.3/lib/autoprefixer-rails/railtie.rb:13:in <class:Railtie>' /.../tmp/build-144302011215992/vendor/bundle/ruby/2.2.0/gems/autoprefixer-rails-5.2.1.3/lib/autoprefixer-rails/railtie.rb:7:inmodule:AutoprefixedRails'

rubysamurai commented 9 years ago

Could you please provide a full stack trace rake assets:clean assets:precompile --trace and also your Gemfile content.

sakeyu commented 9 years ago

$ RAILS_ENV="production" bundle exec rake assets:clean assets:precompile --trace

I compiled assets successful on my develop machine(mac os) ,but failed on production env(ubuntu). I don't know why.

Full stack:

rake aborted! ArgumentError: wrong number of arguments (0 for 1) /.../shared/bundle/ruby/2.2.0/gems/autoprefixer-rails-5.2.1.3/lib/autoprefixer-rails/railtie.rb:24:in config' /.../tmp/build-144302665023712/vendor/bundle/ruby/2.2.0/gems/railties-4.2.3/lib/rails/railtie.rb:123:inconfig' /.../tmp/build-144302665023712/vendor/bundle/ruby/2.2.0/gems/autoprefixer-rails-5.2.1.3/lib/autoprefixer-rails/railtie.rb:13:in <class:Railtie>' /.../tmp/build-144302665023712/vendor/bundle/ruby/2.2.0/gems/autoprefixer-rails-5.2.1.3/lib/autoprefixer-rails/railtie.rb:7:inmodule:AutoprefixedRails' /.../tmp/build-144302665023712/vendor/bundle/ruby/2.2.0/gems/autoprefixer-rails-5.2.1.3/lib/autoprefixer-rails/railtie.rb:6:in <top (required)>' /.../tmp/build-144302665023712/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.3/lib/active_support/dependencies.rb:274:inrequire' /.../tmp/build-144302665023712/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.3/lib/active_support/dependencies.rb:274:in block in require' /.../tmp/build-144302665023712/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.3/lib/active_support/dependencies.rb:240:inload_dependency' /.../tmp/build-144302665023712/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.3/lib/active_support/dependencies.rb:274:in require' /.../tmp/build-144302665023712/vendor/bundle/ruby/2.2.0/gems/material_design_lite-sass-1.0.4.1/lib/material_design_lite-sass.rb:41:inregister_rails_engine' /.../tmp/build-144302665023712/vendor/bundle/ruby/2.2.0/gems/material_design_lite-sass-1.0.4.1/lib/material_design_lite-sass.rb:6:in load!' /.../tmp/build-144302665023712/vendor/bundle/ruby/2.2.0/gems/material_design_lite-sass-1.0.4.1/lib/material_design_lite-sass.rb:53:in<top (required)>' /.../.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.10.5/lib/bundler/runtime.rb:76:in require' /.../.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.10.5/lib/bundler/runtime.rb:76:inblock (2 levels) in require' /.../.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.10.5/lib/bundler/runtime.rb:72:in each' /.../.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.10.5/lib/bundler/runtime.rb:72:inblock in require' /.../.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.10.5/lib/bundler/runtime.rb:61:in each' /.../.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.10.5/lib/bundler/runtime.rb:61:inrequire' /.../.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.10.5/lib/bundler.rb:134:in require' /.../tmp/build-144302665023712/config/application.rb:7:in<top (required)>' /.../tmp/build-144302665023712/Rakefile:4:in require' /.../tmp/build-144302665023712/Rakefile:4:in<top (required)>' /.../.rbenv/versions/2.2.2/lib/ruby/2.2.0/rake/rake_module.rb:28:in load' /.../.rbenv/versions/2.2.2/lib/ruby/2.2.0/rake/rake_module.rb:28:inload_rakefile' /.../.rbenv/versions/2.2.2/lib/ruby/2.2.0/rake/application.rb:689:in raw_load_rakefile' /.../.rbenv/versions/2.2.2/lib/ruby/2.2.0/rake/application.rb:94:inblock in load_rakefile' /.../.rbenv/versions/2.2.2/lib/ruby/2.2.0/rake/application.rb:176:in standard_exception_handling' /.../.rbenv/versions/2.2.2/lib/ruby/2.2.0/rake/application.rb:93:inload_rakefile' /.../.rbenv/versions/2.2.2/lib/ruby/2.2.0/rake/application.rb:77:in block in run' /.../.rbenv/versions/2.2.2/lib/ruby/2.2.0/rake/application.rb:176:instandard_exception_handling' /.../.rbenv/versions/2.2.2/lib/ruby/2.2.0/rake/application.rb:75:in run' /.../.rbenv/versions/2.2.2/bin/rake:33:in

'

and gemfile:

source 'https://rubygems.org'

gem 'rails', '4.2.3' gem 'mysql2', '0.3.18' gem 'redis-rails', '4.0.0'

gem 'psd', '3.3.3' gem 'xmp', :path => 'lib/xmp-0.2.0' gem 'resque', '1.25.2', :require => 'resque/server'

gem 'will_paginate', '~> 3.0.5' gem 'will-paginate-i18n', '0.1.15'

gem 'dropzonejs-rails', '0.7.1' gem 'carrierwave', '0.10.0' gem 'mini_magick', '4.2.9' gem 'carrierwave-aliyun', github: 'huacnlee/carrierwave-aliyun' gem 'messengerjs-rails', '~> 1.4.1'

gem 'rails-i18n', '4.0.4' gem 'devise-i18n', '0.12.1' gem 'devise', '3.5.1' gem 'activeadmin', '1.0.0.pre1'

gem 'therubyracer' gem 'sass-rails', '~> 5.0' gem 'jquery-rails', '4.0.4' gem 'yui-compressor', '0.12.0' gem 'coffee-rails', '4.1.0' gem 'paloma', '4.2.0' gem 'jquery-turbolinks', '2.1.0' gem 'turbolinks', '2.5.3' gem 'material_design_lite-sass', '1.0.4.1' gem 'nprogress-rails', '0.1.6.7' gem 'jbuilder', '~> 2.0'

gem 'bcrypt', '~> 3.1.7' gem 'unicorn', '4.9.0' gem 'china_region_fu', '0.0.6'

gem 'sdoc', '~> 0.4.0', group: :doc

group :development, :test do gem 'poltergeist' gem 'selenium-webdriver' gem 'capybara' gem 'sqlite3', '1.3.10' gem 'byebug' gem 'web-console', '~> 2.0' gem 'spring' gem 'intellij-coffee-script-debugger', :git => 'git://github.com/JetBrains/intellij-coffee-script-debugger.git' end

group :development do gem 'annotate', '2.6.10' gem 'mina', '0.3.7' gem 'mina-multistage', '1.0.1', require: false gem 'mina-nginx', '0.0.1', require: false gem 'mina-unicorn', '0.3.0', require: false end

rubysamurai commented 9 years ago

So far I can't reproduce the error. Can you please try version 1.0.4, like this: gem 'material_design_lite-sass', '1.0.4' to check if this issue is related to the latest gem's update or not.

sakeyu commented 9 years ago

I changed version to 1.0.4 and it works fine on both development and production environment.

rubysamurai commented 9 years ago

The issue seems to be with gem's autoprefixer integration. Could you please do one more test (I still can't reproduce the error). Use gems

gem 'material_design_lite-sass', '1.0.4'
gem 'autoprefixer-rails', '5.2.1.3'

And see if this works.

sakeyu commented 9 years ago

I use gems :

gem 'material_design_lite-sass', '1.0.4' gem 'autoprefixer-rails', '5.2.1.3'

and, it works fine.

rubysamurai commented 9 years ago

Made an adjustment to autoprefixer integration, please try this version

gem 'material_design_lite-sass', github: 'rubysamurai/material_design_lite-sass'
sakeyu commented 9 years ago

I change the mdl-sass gem source to github, and it works. Thanks a lot!

rubysamurai commented 9 years ago

Great! Just pushed new gem version 1.0.4.2 including this fix.