2016-11-24 53 views
-1

Note: ruby 2.0.0p481, Rails 4.0.13減:: ParseError:未定義不能調用方法 '分裂' - Rails的4.0

執行:RAILS_ENV=development bundle exec rake assets:precompile

跟蹤:

DEPRECATION WARNING: Support for Rails < 4.1.0 will be dropped. (called from at /host_share/project/config/application.rb:9) rake aborted! Less::ParseError: Cannot call method 'split' of undefined (in /host_share/project/app/assets/stylesheets/main.css.less) at /home/vagrant/.rvm/gems/ruby-2.0.0-p481/gems/less-2.6.0/lib/less/js/lib/less/parser.js:604:31 /home/vagrant/.rvm/gems/ruby-2.0.0-p481/gems/less-2.6.0/lib/less/parser.rb:100:in `block in to_css'

我不知道什麼是錯?請幫幫我..

+1

您的'/ stylesheets/main.css.less'中存在問題。你可以發佈這個CSS文件。 – dnsh

回答

0

這裏的錯誤很明顯:在你的app/assets/stylesheets/main.css.less你ar e對未定義的對象執行.split()操作,因此會引發錯誤。進入該文件,搜索.split()方法,並檢查爲什麼您調用此方法的對象未定義。

0

轉到您的app/assets/stylesheets/main.css.less搜索split。從文件中刪除split,並檢查您正在調用的對象是否已拆分,以查看它是否不是nill

相關問題