compass-wordpress icon indicating copy to clipboard operation
compass-wordpress copied to clipboard

"Error: invalid option: -r" trying to follow instructions

Open ssteinerx opened this issue 12 years ago • 13 comments

From:

http://wynnnetherland.com/blog/sass-up-your-wordpress-themes-with-compass

compass -r compass-wordpress -f wordpress -p thematic my_wordpress_compass_test

Error: invalid option: -r /Library/Ruby/Gems/1.8/gems/compass-0.11.5/bin/compass:39:in exit': no implicit conversion from nil to integer (TypeError) from /Library/Ruby/Gems/1.8/gems/compass-0.11.5/bin/compass:39 from /usr/bin/compass:19:inload' from /usr/bin/compass:19

I'm not a Ruby guy, so this pretty much stops my ability to explore the library, any simple clues?

I've updated all my gems.

S

ssteinerx avatar Sep 05 '11 00:09 ssteinerx

I'm getting the same error... any genius that could tell us what could be the problem??

alex3rq avatar Sep 27 '11 01:09 alex3rq

I'm using compass 11.5 and getting the same error. This seems like it could be a problem with compass itself.

slikts avatar Oct 04 '11 20:10 slikts

Yeah, I'm getting the same error too. If anyone has/can figure this out it'd be good to post back here.

RyanMcG avatar Oct 16 '11 01:10 RyanMcG

If someone can find a solution for this problem this would be nice. I really want to test this extension!

WirSindBaerenstark avatar Nov 08 '11 23:11 WirSindBaerenstark

Getting the same problem.

fusepilot avatar Jan 05 '12 00:01 fusepilot

I guess you missed the "create" in he commandline - though I'm running into rvm problems using it, but this could be an rvm thang..

gunnarmagholder avatar Jan 27 '12 15:01 gunnarmagholder

Same problem. Today is my first day using compass, so no clue how to get around this. Is this project still alive?

anointed avatar Mar 12 '12 08:03 anointed

hmm same issue.

jtsternberg avatar May 18 '12 14:05 jtsternberg

Same issue.

priestap avatar Jun 22 '12 02:06 priestap

I slowly begin to doubt that this project is still cooking. :-/

gunnarmagholder avatar Jun 25 '12 19:06 gunnarmagholder

Same problem here. Please fix it. new to sass with compass. just following the blog post: http://wynnnetherland.com/journal/sass-up-your-wordpress-themes-with-compass

Allan-Gong avatar Sep 19 '12 02:09 Allan-Gong

dito. what's up with this?

wza avatar Mar 26 '13 17:03 wza

Don't waste your time on this. I did a while back. And I gave up, sass instead of scss, and even more errors. 8( I'm sticking to either hardcore Susy or Skeleton on WP.

This was what I did, until deciding to give up on it. (I realize only 10 minutes of my time, but I like to pick my battles.)

1 The compass command misses the command itself : "create" (like @gunnarmagholder already mentioned). That's why you get the Error: invalid option: -r.

Changing it into : compass create -r compass-wordpress -f wordpress -p thematic my_awesome_theme

resulted in : Gem::LoadError on line ["296"] of C: Could not find 'compass' (~> 0.8.17) - did find: [compass-0.12.0] Run with --trace to see the full backtrace

2 The gem is requiring Compass 0.8.17 through 0.8.99. Which I fixed by changing compass-wordpress.rb so it looked like this :

require 'rubygems'
#gem 'compass', '~> 0.8.17'
# "~> 0.8.17" : ">=0.8.17 and <0.9.
# "~> 0.12.0" : ">=0.12.0 and <0.13.0.
gem 'compass', '~> 0.12.0'
require 'compass'
require File.join(File.dirname(__FILE__), 'wordpress', 'compass_extension')

3 Running the command again resulted in : Error: ambiguous option: -f That's because the command format is ancient. Compass 0.8.17. Which I fixed by changing the command to : compass create P:\Downloads\compass-wp-test-project -r compass-wordpress -u wordpress Note: I dropped the word thematic from the command line, to get things going. (Otherwise error : "Too many arguments were specified.") Adding it as a 2nd framework resulted in the following compass create P:\Downloads\compass-wp-test -r compass-wordpress -u wordpress -u thematic No such framework: "thematic"

4 The new command compass create P:\Downloads\compass-wp-test -x sass -r compass-wordpress -u wordpress resulted in the following. The message Congratulations! Your compass project has been created. is of course BS, because the file screen.css contains a syntax error, and a battery of backtrace messages. Instead of CSS.

directory sass/
directory stylesheets/
   create config.rb
   create style.css
   create readme.txt
   create screen.sass
   create print.sass
   create print.css
WARNING on line 1 of C:/Ruby193/lib/ruby/gems/1.9.1/gems/compass-wordpress-0.1.4/sass/wordpress/thematic/extensions/_typography.sass:
This selector doesn't have any properties and will not be rendered.
WARNING on line 2 of C:/Ruby193/lib/ruby/gems/1.9.1/gems/compass-wordpress-0.1.4/sass/wordpress/thematic/extensions/_typography.sass:
This selector doesn't have any properties and will not be rendered.
WARNING on line 3 of C:/Ruby193/lib/ruby/gems/1.9.1/gems/compass-wordpress-0.1.4/sass/wordpress/thematic/extensions/_typography.sass:
This selector doesn't have any properties and will not be rendered.
WARNING on line 4 of C:/Ruby193/lib/ruby/gems/1.9.1/gems/compass-wordpress-0.1.4/sass/wordpress/thematic/extensions/_typography.sass:
This selector doesn't have any properties and will not be rendered.
WARNING on line 5 of C:/Ruby193/lib/ruby/gems/1.9.1/gems/compass-wordpress-0.1.4/sass/wordpress/thematic/extensions/_typography.sass:
This selector doesn't have any properties and will not be rendered.
WARNING on line 6 of C:/Ruby193/lib/ruby/gems/1.9.1/gems/compass-wordpress-0.1.4/sass/wordpress/thematic/extensions/_typography.sass:
This selector doesn't have any properties and will not be rendered.
WARNING on line 7 of C:/Ruby193/lib/ruby/gems/1.9.1/gems/compass-wordpress-0.1.4/sass/wordpress/thematic/extensions/_typography.sass:
This selector doesn't have any properties and will not be rendered.
WARNING on line 8 of C:/Ruby193/lib/ruby/gems/1.9.1/gems/compass-wordpress-0.1.4/sass/wordpress/thematic/extensions/_typography.sass:
This selector doesn't have any properties and will not be rendered.
WARNING on line 9 of C:/Ruby193/lib/ruby/gems/1.9.1/gems/compass-wordpress-0.1.4/sass/wordpress/thematic/extensions/_typography.sass:
This selector doesn't have any properties and will not be rendered.
    error sass/screen.sass (Line 20 of _typography.sass: Invalid CSS after "(": expected variable (e.g. $foo), was "!font_size = !b...")
   create screen.css

*********************************************************************
Congratulations! Your compass project has been created.

You may now add and edit sass stylesheets in the sass subdirectory of your project.

Sass files beginning with an underscore are called partials and won't be
compiled to CSS, but they can be imported into other sass stylesheets.

You can configure your project by editing the config.rb configuration file.

You must compile your sass stylesheets into CSS when they change.
This can be done in one of the following ways:
  1. To compile on demand:
     compass compile [path/to/project]
  2. To monitor your project for changes and automatically recompile:
     compass watch [path/to/project]

More Resources:
  * Website: http://compass-style.org/
  * Sass: http://sass-lang.com
  * Community: http://groups.google.com/group/compass-users/


To import your new stylesheets add the following lines of HTML (or equivalent) to your webpage:
<head>
  <link href="/stylesheets/screen.css" media="screen, projection" rel="stylesheet" type="text/css" />
  <link href="/stylesheets/print.css" media="print" rel="stylesheet" type="text/css" />
</head>```

RobertinoValue avatar Apr 07 '13 02:04 RobertinoValue