modularscale / modularscale-sass

Modular scale calculator built into your Sass
http://www.modularscale.com
MIT License
1.98k stars 132 forks source link

NoMethodError on preprocessing: undefined method `keep_if' #68

Closed rpkoller closed 10 years ago

rpkoller commented 10 years ago

I have the following setup in my modular scale setting partial (using ms 2.0 alpha 4):

// Basic modular scale settings
//////////////////////////////////////////////////////////////////
$ms-base: 20px 44px;
$ms-ratio: $major-third $fifth;

$ms-base-mult-6: ms(-6);
$ms-base-mult-5: ms(-5);
$ms-base-mult-4: ms(-4);
$ms-base-mult-3: ms(-3);
$ms-base-mult-2: ms(-2);
$ms-base-mult-1: ms(-1);
$ms-base-mult0: ms(0);
$ms-base-mult1: ms(1);
$ms-base-mult2: ms(2);
$ms-base-mult3: ms(3);
$ms-base-mult4: ms(4);
$ms-base-mult5: ms(5);
$ms-base-mult6: ms(6);
$ms-base-mult7: ms(7);
$ms-base-mult8: ms(8);
$ms-base-mult9: ms(9);
$ms-base-mult10: ms(10);
$ms-base-mult11: ms(11);
$ms-base-mult12: ms(12);

// BP 750px modular scale settings
//////////////////////////////////////////////////////////////////
$ms-base: 24px 50px;
$ms-ratio: $golden $fifth;

$ms-750-mult-6: ms(-6);
$ms-750-mult-5: ms(-5);
$ms-750-mult-4: ms(-4);
$ms-750-mult-3: ms(-3);
$ms-750-mult-2: ms(-2);
$ms-750-mult-1: ms(-1);
$ms-750-mult0: ms(0);
$ms-750-mult1: ms(1);
$ms-750-mult2: ms(2);
$ms-750-mult3: ms(3);
$ms-750-mult4: ms(4);
$ms-750-mult5: ms(5);
$ms-750-mult6: ms(6);
$ms-750-mult7: ms(7);
$ms-750-mult8: ms(8);
$ms-750-mult9: ms(9);
$ms-750-mult10: ms(10);
$ms-750-mult11: ms(11);
$ms-750-mult12: ms(12);

When i try to preprocess the project i get the following on compass watch --trace:

[danton@localhost][schmideinander] compass watch --trace
>>> Change detected at 18:18:25 to: style.scss
NoMethodError on line 112 of /Library/Ruby/Gems/1.8/gems/modular-scale-2.0.0.alpha4/lib/modular-scale.rb: undefined method `keep_if' for #<Array:0x107c709e0>
  /Library/Ruby/Gems/1.8/gems/sass-3.2.13/lib/sass/../sass/script/funcall.rb:112:in `send'
  /Library/Ruby/Gems/1.8/gems/sass-3.2.13/lib/sass/../sass/script/funcall.rb:112:in `_perform'
  /Library/Ruby/Gems/1.8/gems/sass-3.2.13/lib/sass/../sass/script/node.rb:40:in `perform'
  /Library/Ruby/Gems/1.8/gems/sass-3.2.13/lib/sass/../sass/script/operation.rb:73:in `_perform'
  /Library/Ruby/Gems/1.8/gems/sass-3.2.13/lib/sass/../sass/script/node.rb:40:in `perform'
  /Library/Ruby/Gems/1.8/gems/sass-3.2.13/lib/sass/../sass/tree/visitors/perform.rb:305:in `visit_return'
  /Library/Ruby/Gems/1.8/gems/sass-3.2.13/lib/sass/../sass/tree/visitors/base.rb:37:in `send'
  /Library/Ruby/Gems/1.8/gems/sass-3.2.13/lib/sass/../sass/tree/visitors/base.rb:37:in `visit'
  /Library/Ruby/Gems/1.8/gems/sass-3.2.13/lib/sass/../sass/tree/visitors/perform.rb:100:in `visit'
  /Library/Ruby/Gems/1.8/gems/sass-3.2.13/lib/sass/../sass/tree/visitors/base.rb:53:in `visit_children'
  /Library/Ruby/Gems/1.8/gems/sass-3.2.13/lib/sass/../sass/tree/visitors/base.rb:53:in `map'
  /Library/Ruby/Gems/1.8/gems/sass-3.2.13/lib/sass/../sass/tree/visitors/base.rb:53:in `visit_children'
  /Library/Ruby/Gems/1.8/gems/sass-3.2.13/lib/sass/../sass/tree/visitors/perform.rb:109:in `visit_children'
  /Library/Ruby/Gems/1.8/gems/sass-3.2.13/lib/sass/../sass/tree/visitors/perform.rb:121:in `with_environment'
  /Library/Ruby/Gems/1.8/gems/sass-3.2.13/lib/sass/../sass/tree/visitors/perform.rb:108:in `visit_children'
  /Library/Ruby/Gems/1.8/gems/sass-3.2.13/lib/sass/../sass/tree/visitors/base.rb:37:in `visit'
  /Library/Ruby/Gems/1.8/gems/sass-3.2.13/lib/sass/../sass/tree/visitors/perform.rb:205:in `visit_if'
  /Library/Ruby/Gems/1.8/gems/sass-3.2.13/lib/sass/../sass/tree/visitors/base.rb:37:in `send'
  /Library/Ruby/Gems/1.8/gems/sass-3.2.13/lib/sass/../sass/tree/visitors/base.rb:37:in `visit'
  /Library/Ruby/Gems/1.8/gems/sass-3.2.13/lib/sass/../sass/tree/visitors/perform.rb:100:in `visit'
  /Library/Ruby/Gems/1.8/gems/sass-3.2.13/lib/sass/../sass/tree/visitors/perform.rb:7:in `send'
  /Library/Ruby/Gems/1.8/gems/sass-3.2.13/lib/sass/../sass/tree/visitors/perform.rb:7:in `visit'
  /Library/Ruby/Gems/1.8/gems/sass-3.2.13/lib/sass/../sass/script/funcall.rb:237:in `perform_sass_fn'
  /Library/Ruby/Gems/1.8/gems/sass-3.2.13/lib/sass/../sass/script/funcall.rb:237:in `each'
  /Library/Ruby/Gems/1.8/gems/sass-3.2.13/lib/sass/../sass/script/funcall.rb:237:in `perform_sass_fn'
  /Library/Ruby/Gems/1.8/gems/sass-3.2.13/lib/sass/../sass/script/funcall.rb:236:in `catch'
  /Library/Ruby/Gems/1.8/gems/sass-3.2.13/lib/sass/../sass/script/funcall.rb:236:in `perform_sass_fn'
  /Library/Ruby/Gems/1.8/gems/sass-3.2.13/lib/sass/../sass/tree/visitors/perform.rb:70:in `perform_arguments'
  /Library/Ruby/Gems/1.8/gems/sass-3.2.13/lib/sass/../sass/script/funcall.rb:235:in `perform_sass_fn'
  /Library/Ruby/Gems/1.8/gems/sass-3.2.13/lib/sass/../sass/script/funcall.rb:103:in `_perform'
  /Library/Ruby/Gems/1.8/gems/sass-3.2.13/lib/sass/../sass/script/node.rb:40:in `perform'
  /Library/Ruby/Gems/1.8/gems/sass-3.2.13/lib/sass/../sass/tree/visitors/perform.rb:327:in `visit_variable'
  /Library/Ruby/Gems/1.8/gems/sass-3.2.13/lib/sass/../sass/tree/visitors/base.rb:37:in `send'
  /Library/Ruby/Gems/1.8/gems/sass-3.2.13/lib/sass/../sass/tree/visitors/base.rb:37:in `visit'
  /Library/Ruby/Gems/1.8/gems/sass-3.2.13/lib/sass/../sass/tree/visitors/perform.rb:100:in `visit'
  /Library/Ruby/Gems/1.8/gems/sass-3.2.13/lib/sass/../sass/tree/visitors/perform.rb:227:in `visit_import'
  /Library/Ruby/Gems/1.8/gems/sass-3.2.13/lib/sass/../sass/tree/visitors/perform.rb:227:in `map'
  /Library/Ruby/Gems/1.8/gems/sass-3.2.13/lib/sass/../sass/tree/visitors/perform.rb:227:in `visit_import'
  /Library/Ruby/Gems/1.8/gems/sass-3.2.13/lib/sass/../sass/tree/visitors/base.rb:37:in `send'
  /Library/Ruby/Gems/1.8/gems/sass-3.2.13/lib/sass/../sass/tree/visitors/base.rb:37:in `visit'
  /Library/Ruby/Gems/1.8/gems/sass-3.2.13/lib/sass/../sass/tree/visitors/perform.rb:100:in `visit'
  /Library/Ruby/Gems/1.8/gems/sass-3.2.13/lib/sass/../sass/tree/visitors/perform.rb:227:in `visit_import'
  /Library/Ruby/Gems/1.8/gems/sass-3.2.13/lib/sass/../sass/tree/visitors/perform.rb:227:in `map'
  /Library/Ruby/Gems/1.8/gems/sass-3.2.13/lib/sass/../sass/tree/visitors/perform.rb:227:in `visit_import'
  /Library/Ruby/Gems/1.8/gems/sass-3.2.13/lib/sass/../sass/tree/visitors/base.rb:37:in `send'
  /Library/Ruby/Gems/1.8/gems/sass-3.2.13/lib/sass/../sass/tree/visitors/base.rb:37:in `visit'
  /Library/Ruby/Gems/1.8/gems/sass-3.2.13/lib/sass/../sass/tree/visitors/perform.rb:100:in `visit'
  /Library/Ruby/Gems/1.8/gems/sass-3.2.13/lib/sass/../sass/tree/visitors/base.rb:53:in `visit_children'
  /Library/Ruby/Gems/1.8/gems/sass-3.2.13/lib/sass/../sass/tree/visitors/base.rb:53:in `map'
  /Library/Ruby/Gems/1.8/gems/sass-3.2.13/lib/sass/../sass/tree/visitors/base.rb:53:in `visit_children'
  /Library/Ruby/Gems/1.8/gems/sass-3.2.13/lib/sass/../sass/tree/visitors/perform.rb:109:in `visit_children'
  /Library/Ruby/Gems/1.8/gems/sass-3.2.13/lib/sass/../sass/tree/visitors/perform.rb:121:in `with_environment'
  /Library/Ruby/Gems/1.8/gems/sass-3.2.13/lib/sass/../sass/tree/visitors/perform.rb:108:in `visit_children'
  /Library/Ruby/Gems/1.8/gems/sass-3.2.13/lib/sass/../sass/tree/visitors/base.rb:37:in `visit'
  /Library/Ruby/Gems/1.8/gems/sass-3.2.13/lib/sass/../sass/tree/visitors/perform.rb:128:in `visit_root'
  /Library/Ruby/Gems/1.8/gems/sass-3.2.13/lib/sass/../sass/tree/visitors/base.rb:37:in `send'
  /Library/Ruby/Gems/1.8/gems/sass-3.2.13/lib/sass/../sass/tree/visitors/base.rb:37:in `visit'
  /Library/Ruby/Gems/1.8/gems/sass-3.2.13/lib/sass/../sass/tree/visitors/perform.rb:100:in `visit'
  /Library/Ruby/Gems/1.8/gems/sass-3.2.13/lib/sass/../sass/tree/visitors/perform.rb:7:in `send'
  /Library/Ruby/Gems/1.8/gems/sass-3.2.13/lib/sass/../sass/tree/visitors/perform.rb:7:in `visit'
  /Library/Ruby/Gems/1.8/gems/sass-3.2.13/lib/sass/../sass/tree/root_node.rb:20:in `render'
  /Library/Ruby/Gems/1.8/gems/sass-3.2.13/lib/sass/../sass/engine.rb:315:in `_render'
  /Library/Ruby/Gems/1.8/gems/sass-3.2.13/lib/sass/../sass/engine.rb:262:in `render'
  /Library/Ruby/Gems/1.8/gems/compass-0.12.2/lib/compass/compiler.rb:140:in `compile'
  /Library/Ruby/Gems/1.8/gems/compass-0.12.2/lib/compass/compiler.rb:126:in `timed'
  /Library/Ruby/Gems/1.8/gems/compass-0.12.2/lib/compass/compiler.rb:139:in `compile'
  /Library/Ruby/Gems/1.8/gems/compass-0.12.2/lib/compass/logger.rb:45:in `red'
  /Library/Ruby/Gems/1.8/gems/compass-0.12.2/lib/compass/compiler.rb:138:in `compile'
  /Library/Ruby/Gems/1.8/gems/compass-0.12.2/lib/compass/compiler.rb:118:in `compile_if_required'
  /Library/Ruby/Gems/1.8/gems/compass-0.12.2/lib/compass/compiler.rb:103:in `run'
  /Library/Ruby/Gems/1.8/gems/compass-0.12.2/lib/compass/compiler.rb:101:in `each'
  /Library/Ruby/Gems/1.8/gems/compass-0.12.2/lib/compass/compiler.rb:101:in `run'
  /Library/Ruby/Gems/1.8/gems/compass-0.12.2/lib/compass/compiler.rb:126:in `timed'
  /Library/Ruby/Gems/1.8/gems/compass-0.12.2/lib/compass/compiler.rb:100:in `run'
  /Library/Ruby/Gems/1.8/gems/compass-0.12.2/lib/compass/commands/watch_project.rb:147:in `recompile'
  /Library/Ruby/Gems/1.8/gems/compass-0.12.2/lib/compass/commands/watch_project.rb:68:in `perform'
  /Library/Ruby/Gems/1.8/gems/compass-0.12.2/lib/compass/commands/base.rb:18:in `execute'
  /Library/Ruby/Gems/1.8/gems/compass-0.12.2/lib/compass/commands/project_base.rb:19:in `execute'
  /Library/Ruby/Gems/1.8/gems/compass-0.12.2/lib/compass/exec/sub_command_ui.rb:43:in `perform!'
  /Library/Ruby/Gems/1.8/gems/compass-0.12.2/lib/compass/exec/sub_command_ui.rb:15:in `run!'
  /Library/Ruby/Gems/1.8/gems/compass-0.12.2/bin/compass:30
  /Library/Ruby/Gems/1.8/gems/compass-0.12.2/bin/compass:44:in `call'
  /Library/Ruby/Gems/1.8/gems/compass-0.12.2/bin/compass:44
  /usr/bin/compass:19:in `load'
  /usr/bin/compass:19
>>> Compass is polling for changes. Press Ctrl-C to Stop.
>>> Change detected at 18:18:59 to: init/_mscale.scss
NoMethodError on line 112 of /Library/Ruby/Gems/1.8/gems/modular-scale-2.0.0.alpha4/lib/modular-scale.rb: undefined method `keep_if' for #<Array:0x107aee720>
  /Library/Ruby/Gems/1.8/gems/sass-3.2.13/lib/sass/../sass/script/funcall.rb:112:in `send'
  /Library/Ruby/Gems/1.8/gems/sass-3.2.13/lib/sass/../sass/script/funcall.rb:112:in `_perform'
  /Library/Ruby/Gems/1.8/gems/sass-3.2.13/lib/sass/../sass/script/node.rb:40:in `perform'
  /Library/Ruby/Gems/1.8/gems/sass-3.2.13/lib/sass/../sass/script/operation.rb:73:in `_perform'
  /Library/Ruby/Gems/1.8/gems/sass-3.2.13/lib/sass/../sass/script/node.rb:40:in `perform'
  /Library/Ruby/Gems/1.8/gems/sass-3.2.13/lib/sass/../sass/tree/visitors/perform.rb:305:in `visit_return'
  /Library/Ruby/Gems/1.8/gems/sass-3.2.13/lib/sass/../sass/tree/visitors/base.rb:37:in `send'
  /Library/Ruby/Gems/1.8/gems/sass-3.2.13/lib/sass/../sass/tree/visitors/base.rb:37:in `visit'
  /Library/Ruby/Gems/1.8/gems/sass-3.2.13/lib/sass/../sass/tree/visitors/perform.rb:100:in `visit'
  /Library/Ruby/Gems/1.8/gems/sass-3.2.13/lib/sass/../sass/tree/visitors/base.rb:53:in `visit_children'
  /Library/Ruby/Gems/1.8/gems/sass-3.2.13/lib/sass/../sass/tree/visitors/base.rb:53:in `map'
  /Library/Ruby/Gems/1.8/gems/sass-3.2.13/lib/sass/../sass/tree/visitors/base.rb:53:in `visit_children'
  /Library/Ruby/Gems/1.8/gems/sass-3.2.13/lib/sass/../sass/tree/visitors/perform.rb:109:in `visit_children'
  /Library/Ruby/Gems/1.8/gems/sass-3.2.13/lib/sass/../sass/tree/visitors/perform.rb:121:in `with_environment'
  /Library/Ruby/Gems/1.8/gems/sass-3.2.13/lib/sass/../sass/tree/visitors/perform.rb:108:in `visit_children'
  /Library/Ruby/Gems/1.8/gems/sass-3.2.13/lib/sass/../sass/tree/visitors/base.rb:37:in `visit'
  /Library/Ruby/Gems/1.8/gems/sass-3.2.13/lib/sass/../sass/tree/visitors/perform.rb:205:in `visit_if'
  /Library/Ruby/Gems/1.8/gems/sass-3.2.13/lib/sass/../sass/tree/visitors/base.rb:37:in `send'
  /Library/Ruby/Gems/1.8/gems/sass-3.2.13/lib/sass/../sass/tree/visitors/base.rb:37:in `visit'
  /Library/Ruby/Gems/1.8/gems/sass-3.2.13/lib/sass/../sass/tree/visitors/perform.rb:100:in `visit'
  /Library/Ruby/Gems/1.8/gems/sass-3.2.13/lib/sass/../sass/tree/visitors/perform.rb:7:in `send'
  /Library/Ruby/Gems/1.8/gems/sass-3.2.13/lib/sass/../sass/tree/visitors/perform.rb:7:in `visit'
  /Library/Ruby/Gems/1.8/gems/sass-3.2.13/lib/sass/../sass/script/funcall.rb:237:in `perform_sass_fn'
  /Library/Ruby/Gems/1.8/gems/sass-3.2.13/lib/sass/../sass/script/funcall.rb:237:in `each'
  /Library/Ruby/Gems/1.8/gems/sass-3.2.13/lib/sass/../sass/script/funcall.rb:237:in `perform_sass_fn'
  /Library/Ruby/Gems/1.8/gems/sass-3.2.13/lib/sass/../sass/script/funcall.rb:236:in `catch'
  /Library/Ruby/Gems/1.8/gems/sass-3.2.13/lib/sass/../sass/script/funcall.rb:236:in `perform_sass_fn'
  /Library/Ruby/Gems/1.8/gems/sass-3.2.13/lib/sass/../sass/tree/visitors/perform.rb:70:in `perform_arguments'
  /Library/Ruby/Gems/1.8/gems/sass-3.2.13/lib/sass/../sass/script/funcall.rb:235:in `perform_sass_fn'
  /Library/Ruby/Gems/1.8/gems/sass-3.2.13/lib/sass/../sass/script/funcall.rb:103:in `_perform'
  /Library/Ruby/Gems/1.8/gems/sass-3.2.13/lib/sass/../sass/script/node.rb:40:in `perform'
  /Library/Ruby/Gems/1.8/gems/sass-3.2.13/lib/sass/../sass/tree/visitors/perform.rb:327:in `visit_variable'
  /Library/Ruby/Gems/1.8/gems/sass-3.2.13/lib/sass/../sass/tree/visitors/base.rb:37:in `send'
  /Library/Ruby/Gems/1.8/gems/sass-3.2.13/lib/sass/../sass/tree/visitors/base.rb:37:in `visit'
  /Library/Ruby/Gems/1.8/gems/sass-3.2.13/lib/sass/../sass/tree/visitors/perform.rb:100:in `visit'
  /Library/Ruby/Gems/1.8/gems/sass-3.2.13/lib/sass/../sass/tree/visitors/perform.rb:227:in `visit_import'
  /Library/Ruby/Gems/1.8/gems/sass-3.2.13/lib/sass/../sass/tree/visitors/perform.rb:227:in `map'
  /Library/Ruby/Gems/1.8/gems/sass-3.2.13/lib/sass/../sass/tree/visitors/perform.rb:227:in `visit_import'
  /Library/Ruby/Gems/1.8/gems/sass-3.2.13/lib/sass/../sass/tree/visitors/base.rb:37:in `send'
  /Library/Ruby/Gems/1.8/gems/sass-3.2.13/lib/sass/../sass/tree/visitors/base.rb:37:in `visit'
  /Library/Ruby/Gems/1.8/gems/sass-3.2.13/lib/sass/../sass/tree/visitors/perform.rb:100:in `visit'
  /Library/Ruby/Gems/1.8/gems/sass-3.2.13/lib/sass/../sass/tree/visitors/perform.rb:227:in `visit_import'
  /Library/Ruby/Gems/1.8/gems/sass-3.2.13/lib/sass/../sass/tree/visitors/perform.rb:227:in `map'
  /Library/Ruby/Gems/1.8/gems/sass-3.2.13/lib/sass/../sass/tree/visitors/perform.rb:227:in `visit_import'
  /Library/Ruby/Gems/1.8/gems/sass-3.2.13/lib/sass/../sass/tree/visitors/base.rb:37:in `send'
  /Library/Ruby/Gems/1.8/gems/sass-3.2.13/lib/sass/../sass/tree/visitors/base.rb:37:in `visit'
  /Library/Ruby/Gems/1.8/gems/sass-3.2.13/lib/sass/../sass/tree/visitors/perform.rb:100:in `visit'
  /Library/Ruby/Gems/1.8/gems/sass-3.2.13/lib/sass/../sass/tree/visitors/base.rb:53:in `visit_children'
  /Library/Ruby/Gems/1.8/gems/sass-3.2.13/lib/sass/../sass/tree/visitors/base.rb:53:in `map'
  /Library/Ruby/Gems/1.8/gems/sass-3.2.13/lib/sass/../sass/tree/visitors/base.rb:53:in `visit_children'
  /Library/Ruby/Gems/1.8/gems/sass-3.2.13/lib/sass/../sass/tree/visitors/perform.rb:109:in `visit_children'
  /Library/Ruby/Gems/1.8/gems/sass-3.2.13/lib/sass/../sass/tree/visitors/perform.rb:121:in `with_environment'
  /Library/Ruby/Gems/1.8/gems/sass-3.2.13/lib/sass/../sass/tree/visitors/perform.rb:108:in `visit_children'
  /Library/Ruby/Gems/1.8/gems/sass-3.2.13/lib/sass/../sass/tree/visitors/base.rb:37:in `visit'
  /Library/Ruby/Gems/1.8/gems/sass-3.2.13/lib/sass/../sass/tree/visitors/perform.rb:128:in `visit_root'
  /Library/Ruby/Gems/1.8/gems/sass-3.2.13/lib/sass/../sass/tree/visitors/base.rb:37:in `send'
  /Library/Ruby/Gems/1.8/gems/sass-3.2.13/lib/sass/../sass/tree/visitors/base.rb:37:in `visit'
  /Library/Ruby/Gems/1.8/gems/sass-3.2.13/lib/sass/../sass/tree/visitors/perform.rb:100:in `visit'
  /Library/Ruby/Gems/1.8/gems/sass-3.2.13/lib/sass/../sass/tree/visitors/perform.rb:7:in `send'
  /Library/Ruby/Gems/1.8/gems/sass-3.2.13/lib/sass/../sass/tree/visitors/perform.rb:7:in `visit'
  /Library/Ruby/Gems/1.8/gems/sass-3.2.13/lib/sass/../sass/tree/root_node.rb:20:in `render'
  /Library/Ruby/Gems/1.8/gems/sass-3.2.13/lib/sass/../sass/engine.rb:315:in `_render'
  /Library/Ruby/Gems/1.8/gems/sass-3.2.13/lib/sass/../sass/engine.rb:262:in `render'
  /Library/Ruby/Gems/1.8/gems/compass-0.12.2/lib/compass/compiler.rb:140:in `compile'
  /Library/Ruby/Gems/1.8/gems/compass-0.12.2/lib/compass/compiler.rb:126:in `timed'
  /Library/Ruby/Gems/1.8/gems/compass-0.12.2/lib/compass/compiler.rb:139:in `compile'
  /Library/Ruby/Gems/1.8/gems/compass-0.12.2/lib/compass/logger.rb:45:in `red'
  /Library/Ruby/Gems/1.8/gems/compass-0.12.2/lib/compass/compiler.rb:138:in `compile'
  /Library/Ruby/Gems/1.8/gems/compass-0.12.2/lib/compass/compiler.rb:118:in `compile_if_required'
  /Library/Ruby/Gems/1.8/gems/compass-0.12.2/lib/compass/compiler.rb:103:in `run'
  /Library/Ruby/Gems/1.8/gems/compass-0.12.2/lib/compass/compiler.rb:101:in `each'
  /Library/Ruby/Gems/1.8/gems/compass-0.12.2/lib/compass/compiler.rb:101:in `run'
  /Library/Ruby/Gems/1.8/gems/compass-0.12.2/lib/compass/compiler.rb:126:in `timed'
  /Library/Ruby/Gems/1.8/gems/compass-0.12.2/lib/compass/compiler.rb:100:in `run'
  /Library/Ruby/Gems/1.8/gems/compass-0.12.2/lib/compass/commands/watch_project.rb:147:in `recompile'
  /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `to_proc'
  /Library/Ruby/Gems/1.8/gems/fssm-0.2.10/lib/fssm/path.rb:73:in `call'
  /Library/Ruby/Gems/1.8/gems/fssm-0.2.10/lib/fssm/path.rb:73:in `run_callback'
  /Library/Ruby/Gems/1.8/gems/fssm-0.2.10/lib/fssm/path.rb:55:in `callback_action'
  /Library/Ruby/Gems/1.8/gems/fssm-0.2.10/lib/fssm/path.rb:35:in `update'
  /Library/Ruby/Gems/1.8/gems/fssm-0.2.10/lib/fssm/state/directory.rb:39:in `modified'
  /Library/Ruby/Gems/1.8/gems/fssm-0.2.10/lib/fssm/state/directory.rb:37:in `each'
  /Library/Ruby/Gems/1.8/gems/fssm-0.2.10/lib/fssm/state/directory.rb:37:in `modified'
  /Library/Ruby/Gems/1.8/gems/fssm-0.2.10/lib/fssm/state/directory.rb:18:in `refresh'
  /Library/Ruby/Gems/1.8/gems/fssm-0.2.10/lib/fssm/backends/polling.rb:17:in `run'
  /Library/Ruby/Gems/1.8/gems/fssm-0.2.10/lib/fssm/backends/polling.rb:17:in `each'
  /Library/Ruby/Gems/1.8/gems/fssm-0.2.10/lib/fssm/backends/polling.rb:17:in `run'
  /Library/Ruby/Gems/1.8/gems/fssm-0.2.10/lib/fssm/backends/polling.rb:15:in `loop'
  /Library/Ruby/Gems/1.8/gems/fssm-0.2.10/lib/fssm/backends/polling.rb:15:in `run'
  /Library/Ruby/Gems/1.8/gems/fssm-0.2.10/lib/fssm/monitor.rb:26:in `run'
  /Library/Ruby/Gems/1.8/gems/fssm-0.2.10/lib/fssm.rb:70:in `monitor'
  /Library/Ruby/Gems/1.8/gems/compass-0.12.2/lib/compass/commands/watch_project.rb:87:in `perform'
  /Library/Ruby/Gems/1.8/gems/compass-0.12.2/lib/compass/commands/base.rb:18:in `execute'
  /Library/Ruby/Gems/1.8/gems/compass-0.12.2/lib/compass/commands/project_base.rb:19:in `execute'
  /Library/Ruby/Gems/1.8/gems/compass-0.12.2/lib/compass/exec/sub_command_ui.rb:43:in `perform!'
  /Library/Ruby/Gems/1.8/gems/compass-0.12.2/lib/compass/exec/sub_command_ui.rb:15:in `run!'
  /Library/Ruby/Gems/1.8/gems/compass-0.12.2/bin/compass:30
  /Library/Ruby/Gems/1.8/gems/compass-0.12.2/bin/compass:44:in `call'
  /Library/Ruby/Gems/1.8/gems/compass-0.12.2/bin/compass:44
  /usr/bin/compass:19:in `load'
  /usr/bin/compass:19

If you need any further infos let me know. Best regards Ralf

rpkoller commented 10 years ago

Also happens if i comment out the second scale computation and only go with the basic one at first.

rpkoller commented 10 years ago

Ok using negative values as input for ms() seems to be the problem. if i comment out those lines everything works.

scottkellum commented 10 years ago

Thanks, sounds like an issue in my Ruby calculator. I will check it later.

scottkellum commented 10 years ago

Should be fixed now

rpkoller commented 10 years ago

@scottkellum hmmmmm i've tried alpha5, assuming my installed version was installed properly regarding the other issue i've posted few minutes ago, then the issue with the keep_if method still persists on my side :(

i've did another trace in the terminal:

NoMethodError on line 112 of /Library/Ruby/Gems/1.8/gems/modular-scale-2.0.0.alpha5/lib/modular-scale.rb: undefined method `keep_if' for #<Array:0x1078403c0>
  /Library/Ruby/Gems/1.8/gems/sass-3.2.13/lib/sass/../sass/script/funcall.rb:112:in `send'
  /Library/Ruby/Gems/1.8/gems/sass-3.2.13/lib/sass/../sass/script/funcall.rb:112:in `_perform'
  /Library/Ruby/Gems/1.8/gems/sass-3.2.13/lib/sass/../sass/script/node.rb:40:in `perform'
  /Library/Ruby/Gems/1.8/gems/sass-3.2.13/lib/sass/../sass/script/operation.rb:73:in `_perform'
  /Library/Ruby/Gems/1.8/gems/sass-3.2.13/lib/sass/../sass/script/node.rb:40:in `perform'
  /Library/Ruby/Gems/1.8/gems/sass-3.2.13/lib/sass/../sass/tree/visitors/perform.rb:305:in `visit_return'
  /Library/Ruby/Gems/1.8/gems/sass-3.2.13/lib/sass/../sass/tree/visitors/base.rb:37:in `send'
  /Library/Ruby/Gems/1.8/gems/sass-3.2.13/lib/sass/../sass/tree/visitors/base.rb:37:in `visit'
  /Library/Ruby/Gems/1.8/gems/sass-3.2.13/lib/sass/../sass/tree/visitors/perform.rb:100:in `visit'
  /Library/Ruby/Gems/1.8/gems/sass-3.2.13/lib/sass/../sass/tree/visitors/base.rb:53:in `visit_children'
  /Library/Ruby/Gems/1.8/gems/sass-3.2.13/lib/sass/../sass/tree/visitors/base.rb:53:in `map'
  /Library/Ruby/Gems/1.8/gems/sass-3.2.13/lib/sass/../sass/tree/visitors/base.rb:53:in `visit_children'
  /Library/Ruby/Gems/1.8/gems/sass-3.2.13/lib/sass/../sass/tree/visitors/perform.rb:109:in `visit_children'
  /Library/Ruby/Gems/1.8/gems/sass-3.2.13/lib/sass/../sass/tree/visitors/perform.rb:121:in `with_environment'
  /Library/Ruby/Gems/1.8/gems/sass-3.2.13/lib/sass/../sass/tree/visitors/perform.rb:108:in `visit_children'
  /Library/Ruby/Gems/1.8/gems/sass-3.2.13/lib/sass/../sass/tree/visitors/base.rb:37:in `visit'
  /Library/Ruby/Gems/1.8/gems/sass-3.2.13/lib/sass/../sass/tree/visitors/perform.rb:205:in `visit_if'
  /Library/Ruby/Gems/1.8/gems/sass-3.2.13/lib/sass/../sass/tree/visitors/base.rb:37:in `send'
  /Library/Ruby/Gems/1.8/gems/sass-3.2.13/lib/sass/../sass/tree/visitors/base.rb:37:in `visit'
  /Library/Ruby/Gems/1.8/gems/sass-3.2.13/lib/sass/../sass/tree/visitors/perform.rb:100:in `visit'
  /Library/Ruby/Gems/1.8/gems/sass-3.2.13/lib/sass/../sass/tree/visitors/perform.rb:7:in `send'
  /Library/Ruby/Gems/1.8/gems/sass-3.2.13/lib/sass/../sass/tree/visitors/perform.rb:7:in `visit'
  /Library/Ruby/Gems/1.8/gems/sass-3.2.13/lib/sass/../sass/script/funcall.rb:237:in `perform_sass_fn'
  /Library/Ruby/Gems/1.8/gems/sass-3.2.13/lib/sass/../sass/script/funcall.rb:237:in `each'
  /Library/Ruby/Gems/1.8/gems/sass-3.2.13/lib/sass/../sass/script/funcall.rb:237:in `perform_sass_fn'
  /Library/Ruby/Gems/1.8/gems/sass-3.2.13/lib/sass/../sass/script/funcall.rb:236:in `catch'
  /Library/Ruby/Gems/1.8/gems/sass-3.2.13/lib/sass/../sass/script/funcall.rb:236:in `perform_sass_fn'
  /Library/Ruby/Gems/1.8/gems/sass-3.2.13/lib/sass/../sass/tree/visitors/perform.rb:70:in `perform_arguments'
  /Library/Ruby/Gems/1.8/gems/sass-3.2.13/lib/sass/../sass/script/funcall.rb:235:in `perform_sass_fn'
  /Library/Ruby/Gems/1.8/gems/sass-3.2.13/lib/sass/../sass/script/funcall.rb:103:in `_perform'
  /Library/Ruby/Gems/1.8/gems/sass-3.2.13/lib/sass/../sass/script/node.rb:40:in `perform'
  /Library/Ruby/Gems/1.8/gems/sass-3.2.13/lib/sass/../sass/tree/visitors/perform.rb:327:in `visit_variable'
  /Library/Ruby/Gems/1.8/gems/sass-3.2.13/lib/sass/../sass/tree/visitors/base.rb:37:in `send'
  /Library/Ruby/Gems/1.8/gems/sass-3.2.13/lib/sass/../sass/tree/visitors/base.rb:37:in `visit'
  /Library/Ruby/Gems/1.8/gems/sass-3.2.13/lib/sass/../sass/tree/visitors/perform.rb:100:in `visit'
  /Library/Ruby/Gems/1.8/gems/sass-3.2.13/lib/sass/../sass/tree/visitors/base.rb:53:in `visit_children'
  /Library/Ruby/Gems/1.8/gems/sass-3.2.13/lib/sass/../sass/tree/visitors/base.rb:53:in `map'
  /Library/Ruby/Gems/1.8/gems/sass-3.2.13/lib/sass/../sass/tree/visitors/base.rb:53:in `visit_children'
  /Library/Ruby/Gems/1.8/gems/sass-3.2.13/lib/sass/../sass/tree/visitors/perform.rb:109:in `visit_children'
  /Library/Ruby/Gems/1.8/gems/sass-3.2.13/lib/sass/../sass/tree/visitors/perform.rb:121:in `with_environment'
  /Library/Ruby/Gems/1.8/gems/sass-3.2.13/lib/sass/../sass/tree/visitors/perform.rb:108:in `visit_children'
  /Library/Ruby/Gems/1.8/gems/sass-3.2.13/lib/sass/../sass/tree/visitors/base.rb:37:in `visit'
  /Library/Ruby/Gems/1.8/gems/sass-3.2.13/lib/sass/../sass/tree/visitors/perform.rb:128:in `visit_root'
  /Library/Ruby/Gems/1.8/gems/sass-3.2.13/lib/sass/../sass/tree/visitors/base.rb:37:in `send'
  /Library/Ruby/Gems/1.8/gems/sass-3.2.13/lib/sass/../sass/tree/visitors/base.rb:37:in `visit'
  /Library/Ruby/Gems/1.8/gems/sass-3.2.13/lib/sass/../sass/tree/visitors/perform.rb:100:in `visit'
  /Library/Ruby/Gems/1.8/gems/sass-3.2.13/lib/sass/../sass/tree/visitors/perform.rb:7:in `send'
  /Library/Ruby/Gems/1.8/gems/sass-3.2.13/lib/sass/../sass/tree/visitors/perform.rb:7:in `visit'
  /Library/Ruby/Gems/1.8/gems/sass-3.2.13/lib/sass/../sass/tree/root_node.rb:20:in `render'
  /Library/Ruby/Gems/1.8/gems/sass-3.2.13/lib/sass/../sass/engine.rb:315:in `_render'
  /Library/Ruby/Gems/1.8/gems/sass-3.2.13/lib/sass/../sass/engine.rb:262:in `render'
  /Library/Ruby/Gems/1.8/gems/compass-0.12.2/lib/compass/compiler.rb:140:in `compile'
  /Library/Ruby/Gems/1.8/gems/compass-0.12.2/lib/compass/compiler.rb:126:in `timed'
  /Library/Ruby/Gems/1.8/gems/compass-0.12.2/lib/compass/compiler.rb:139:in `compile'
  /Library/Ruby/Gems/1.8/gems/compass-0.12.2/lib/compass/logger.rb:45:in `red'
  /Library/Ruby/Gems/1.8/gems/compass-0.12.2/lib/compass/compiler.rb:138:in `compile'
  /Library/Ruby/Gems/1.8/gems/compass-0.12.2/lib/compass/compiler.rb:118:in `compile_if_required'
  /Library/Ruby/Gems/1.8/gems/compass-0.12.2/lib/compass/compiler.rb:103:in `run'
  /Library/Ruby/Gems/1.8/gems/compass-0.12.2/lib/compass/compiler.rb:101:in `each'
  /Library/Ruby/Gems/1.8/gems/compass-0.12.2/lib/compass/compiler.rb:101:in `run'
  /Library/Ruby/Gems/1.8/gems/compass-0.12.2/lib/compass/compiler.rb:126:in `timed'
  /Library/Ruby/Gems/1.8/gems/compass-0.12.2/lib/compass/compiler.rb:100:in `run'
  /Library/Ruby/Gems/1.8/gems/compass-0.12.2/lib/compass/commands/watch_project.rb:147:in `recompile'
  /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `to_proc'
  /Library/Ruby/Gems/1.8/gems/fssm-0.2.10/lib/fssm/path.rb:73:in `call'
  /Library/Ruby/Gems/1.8/gems/fssm-0.2.10/lib/fssm/path.rb:73:in `run_callback'
  /Library/Ruby/Gems/1.8/gems/fssm-0.2.10/lib/fssm/path.rb:55:in `callback_action'
  /Library/Ruby/Gems/1.8/gems/fssm-0.2.10/lib/fssm/path.rb:35:in `update'
  /Library/Ruby/Gems/1.8/gems/fssm-0.2.10/lib/fssm/state/directory.rb:39:in `modified'
  /Library/Ruby/Gems/1.8/gems/fssm-0.2.10/lib/fssm/state/directory.rb:37:in `each'
  /Library/Ruby/Gems/1.8/gems/fssm-0.2.10/lib/fssm/state/directory.rb:37:in `modified'
  /Library/Ruby/Gems/1.8/gems/fssm-0.2.10/lib/fssm/state/directory.rb:18:in `refresh'
  /Library/Ruby/Gems/1.8/gems/fssm-0.2.10/lib/fssm/backends/polling.rb:17:in `run'
  /Library/Ruby/Gems/1.8/gems/fssm-0.2.10/lib/fssm/backends/polling.rb:17:in `each'
  /Library/Ruby/Gems/1.8/gems/fssm-0.2.10/lib/fssm/backends/polling.rb:17:in `run'
  /Library/Ruby/Gems/1.8/gems/fssm-0.2.10/lib/fssm/backends/polling.rb:15:in `loop'
  /Library/Ruby/Gems/1.8/gems/fssm-0.2.10/lib/fssm/backends/polling.rb:15:in `run'
  /Library/Ruby/Gems/1.8/gems/fssm-0.2.10/lib/fssm/monitor.rb:26:in `run'
  /Library/Ruby/Gems/1.8/gems/fssm-0.2.10/lib/fssm.rb:70:in `monitor'
  /Library/Ruby/Gems/1.8/gems/compass-0.12.2/lib/compass/commands/watch_project.rb:87:in `perform'
  /Library/Ruby/Gems/1.8/gems/compass-0.12.2/lib/compass/commands/base.rb:18:in `execute'
  /Library/Ruby/Gems/1.8/gems/compass-0.12.2/lib/compass/commands/project_base.rb:19:in `execute'
  /Library/Ruby/Gems/1.8/gems/compass-0.12.2/lib/compass/exec/sub_command_ui.rb:43:in `perform!'
  /Library/Ruby/Gems/1.8/gems/compass-0.12.2/lib/compass/exec/sub_command_ui.rb:15:in `run!'
  /Library/Ruby/Gems/1.8/gems/compass-0.12.2/bin/compass:30
  /Library/Ruby/Gems/1.8/gems/compass-0.12.2/bin/compass:44:in `call'
  /Library/Ruby/Gems/1.8/gems/compass-0.12.2/bin/compass:44
  /usr/bin/compass:19:in `load'
  /usr/bin/compass:19

if you need any more infos let me know.

scottkellum commented 10 years ago

I am unable to replicate this in Compass 0.12 and Sass 3.2.

Please try using Bundler to manage your gems.

rpkoller commented 10 years ago

only problem is i am using codekit and i thought bundler wouldn't work with it?

scottkellum commented 10 years ago

@rpkoller I would install via copying the latest release into place. Managing gems via codekit is unfortunately difficult.

rpkoller commented 10 years ago

damn so far i rely onto Codekit for live reload, minification, preprocessing and so on. :(

scottkellum commented 10 years ago

Sorry :( it should work just fine when copy/pasted into place. You can also use Bower. So many install options.

rpkoller commented 10 years ago

@scottkellum oh bower works as standalone too? always had in the back of my mind that ruby is somehow required therefor i thought the errors would happen in every installation scenario. but well installed with bower one second ago and changed settings on my testproject from ms v1 to ms v2 and everything works fine now! cool cool cool. i am glad and relieved :)

on a side note the lists display fine now. for a single scale, for merged scales and as well cross checked the single results with www.modularscale.com . all fine now! cool! well done! thanks!

scottkellum commented 10 years ago

@rpkoller As of v2.x ruby is no longer required for modular scale. It even works with Libsass!

michelvermeulen commented 10 years ago

Hi,

I have the same issue when I compile my SASS files as a Git hook, whenever I have negative values like ms(-2) :

NoMethodError on line 118 of /var/lib/gems/1.8/gems/modular-scale-2.0.4/lib/modular-scale.rb: undefined method `keep_if' for #Array:0x7fdac2554ca0

The weird thing is it happens when I push from my computer, but if I execute the hook on my remote machine, it compiles correctly.

Do you have any idea?

EDIT

Tried with SASS base only, and it works... It's been working for a while with the compass version, I have no clue why today it's not working anymore...

scottkellum commented 10 years ago

@vermichou If you are upgrading from an older version, please follow the upgrade steps: https://github.com/Team-Sass/modular-scale#upgrading-from-1x-to-2x