Closed sakeyu closed 9 years ago
Could you please provide a full stack trace rake assets:clean assets:precompile --trace
and also your Gemfile
content.
$ 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:in
config'
/.../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:in
module: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:in
require'
/.../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:in
load_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:in
register_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:in
block (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:in
block 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:in
require'
/.../.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:in
load_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:in
block 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:in
load_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:in
standard_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
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.
I changed version to 1.0.4 and it works fine on both development and production environment.
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.
I use gems :
gem 'material_design_lite-sass', '1.0.4' gem 'autoprefixer-rails', '5.2.1.3'
and, it works fine.
Made an adjustment to autoprefixer integration, please try this version
gem 'material_design_lite-sass', github: 'rubysamurai/material_design_lite-sass'
I change the mdl-sass gem source to github, and it works. Thanks a lot!
Great! Just pushed new gem version 1.0.4.2 including this fix.
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:in
config' /.../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:in
module:AutoprefixedRails'