I have gem installed both SASS and COMPASS using
gem install compass
I am trying to use the command
compass create .
to generate a compass project but when i do I get the following error.
Errno::EACCES on line ["897"] of C: Permission denied
This appears as it is trying to create the config.rb file
I am at a bit of a loss as it seems to be able to create both the stylesheets and sass directories
PS C:\Projects\tutorials\sass> compass create --trace
create config.rb
Errno::EACCES on line ["897"] of C: Permission denied - (C:/Projects/tutorials/sass/config.rb20140323-9028-1j0o9n1, C:/P
rojects/tutorials/sass/config.rb)
C:/Ruby193/lib/ruby/gems/1.9.1/gems/sass-3.2.18/lib/sass/util.rb:897:in `atomic_create_and_write_file'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/compass-0.12.4/lib/compass/actions.rb:58:in `write_file'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/compass-0.12.4/lib/compass/app_integration/stand_alone/installer.rb:20:in `write_c
onfiguration_files'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/compass-0.12.4/lib/compass/app_integration/stand_alone/installer.rb:35:in `prepare
'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/compass-0.12.4/lib/compass/installers/base.rb:32:in `run'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/compass-.12.4/lib/c ompass/commands/stamp_pattern.rb:75:in `perform'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/compass-0.12.4/lib/compass/commands/base.rb:18:in `execute'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/compass-0.12.4/lib/compass/commands/project_base.rb:19:in `execute'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/compass-0.12.4/lib/compass/exec/sub_command_ui.rb:43:in `perform!'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/compass-0.12.4/lib/compass/exec/sub_command_ui.rb:15:in `run!'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/compass-0.12.4/bin/compass:30:in `block in <top (required)>'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/compass-0.12.4/bin/compass:44:in `call'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/compass-0.12.4/bin/compass:44:in `<top (required)>'
C:/Ruby193/bin/compass:23:in `load'
C:/Ruby193/bin/compass:23:in `<main>'
any help anyone could give me to resolve this would be most appreciated
I've solved this issue by downgrading the compass version. then i've tryed to understand what was the error.
So the problem was version conflicts between sass 3.2.14 and 3.3.4 . compass 0.12.3 depends on 3.2.14 sass verison.
Have a look at this link Can't get sass + compass + susy installed due to version conflict
If you want to make things work with the latest compass version. you can uninstall all sass and compass version that you have. then look for the appropriate version between them.
This will things work perfectly.
And as a better solution you can work with this : http://bundler.io/ .
Kind regards.
you're right. and here you can find details about this issue: https://github.com/chriseppstein/compass/issues/1618#issuecomment-38397775
They are working to solve it.
I think I have found the issue in the util.rb file specified in the error, an attempt is made to change the permissions of the files I think this link may hold the answer.
stackoverflow answer
you can do this way :
gem install compass -v 0.12.3 --no-rdoc --no-ri
and install :
compass install blueprint
it work for me
Related
Running grunt serve which use to work I'm having this error message.
Running "compass:server" (compass) task
Warning: Command failed: compass --version
/usr/lib/ruby/gems/2.4.0/gems/bundler-1.13.7/lib/bundler/definition.rb:179:in `rescue in specs': Your bundle is locked to chunky_png (1.3.4), but that version could not be found in any of the sources listed in your Gemfile. If you haven't changed sources, that means the author of chunky_png (1.3.4) has removed it. You'll need to update your bundle to a different version of chunky_png (1.3.4) that hasn't been removed in order to install. (Bundler::GemNotFound)
from /usr/lib/ruby/gems/2.4.0/gems/bundler-1.13.7/lib/bundler/definition.rb:173:in `specs'
from /usr/lib/ruby/gems/2.4.0/gems/bundler-1.13.7/lib/bundler/definition.rb:233:in `specs_for'
from /usr/lib/ruby/gems/2.4.0/gems/bundler-1.13.7/lib/bundler/definition.rb:222:in `requested_specs'
from /usr/lib/ruby/gems/2.4.0/gems/bundler-1.13.7/lib/bundler/runtime.rb:118:in `block in definition_method'
from /usr/lib/ruby/gems/2.4.0/gems/bundler-1.13.7/lib/bundler/runtime.rb:19:in `setup'
from /usr/lib/ruby/gems/2.4.0/gems/bundler-1.13.7/lib/bundler.rb:99:in `setup'
from /usr/lib/ruby/gems/2.4.0/gems/bundler-1.13.7/lib/bundler/setup.rb:20:in `<top (required)>'
from /usr/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:133:in `require'
from /usr/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:133:in `rescue in require'
from /usr/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:40:in `require'
from /usr/bin/compass:6:in `<main>'
So on side I ran a compass --version and I obtain the same error Your bundle is locked to chunky_png (1.3.4), etc.
Trying to bundle install seems a bit useless...
$ bundle install
Could not locate Gemfile or .bundle/ directory
So I tried to reinstall ruby-compass because which compass sent me to /usr/bin/compass which is the one set by ruby-compass AUR package.
that did'nt solved the problem. Any idea around ?
solved by installing compass via pacgem
details of commands :
to install pacgem
cd ~/devel/aur.archlinux.org/ # or where ever you used to put your AUR
git clone https://aur.archlinux.org/pacgem.git
cd pacgem
cat PKGBUILD # at this point, it is recommended to personally check to PKGBUILD
makepkg -si
and answer y to all questions
install compass
pacgem compass
and answer y to all questions. It will install needed dependencies.
I'd like to make my octopress blog template with thoughtbot's bourbon & neat. I couldn't find any documentation that covers theming in octopress (or its root, jekyll) from scratch. So, I decided to customise octopress default theme.
I've added related gems to the Gemfile like:
gem 'compass', '~> 1.0.0.rc.1' # to make compass work with sass 3.3
gem 'sass', '~> 3.3' # unnecessary but better to be placed hier
gem 'bourbon'
gem 'refills'
gem 'neat'
gem 'bitters'
Then, I've copied default theme under .themes path like:
ls .themes/classic .themes/bourtlen # so, new theme name is bourtlen :)
I've made sass folder under bourtlen empty. Then inside sass, I've run:
bourbon install
All bourbon assets are now under sass. Then, I've added screen.scss under sass:
#import 'compass';
#import 'bourbon/bourbon';
#import 'base/base';
#import 'neat/neat';
#import 'custom/custom'; # for customization, it's also created in sass folder as _custom.scss
After all, I've installed my newborn theme, but when I hit command to generate the site, I got these warnings & errors:
❯ bin/rake generate --trace
** Invoke generate (first_time)
** Execute generate
## Generating Site with Jekyll
/home/ekrem/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/compass-0.12.2/lib/compass/sass_extensions/monkey_patches/browser_support.rb:1:in `require': cannot load such file -- sass/script/node (LoadError)
from /home/ekrem/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/compass-0.12.2/lib/compass/sass_extensions/monkey_patches/browser_support.rb:1:in `<top (required)>'
from /home/ekrem/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/compass-0.12.2/lib/compass/sass_extensions/monkey_patches.rb:2:in `require'
from /home/ekrem/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/compass-0.12.2/lib/compass/sass_extensions/monkey_patches.rb:2:in `block in <top (required)>'
from /home/ekrem/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/compass-0.12.2/lib/compass/sass_extensions/monkey_patches.rb:1:in `each'
from /home/ekrem/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/compass-0.12.2/lib/compass/sass_extensions/monkey_patches.rb:1:in `<top (required)>'
from /home/ekrem/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/compass-0.12.2/lib/compass/sass_extensions.rb:9:in `require'
from /home/ekrem/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/compass-0.12.2/lib/compass/sass_extensions.rb:9:in `<top (required)>'
from /home/ekrem/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/compass-0.12.2/lib/compass.rb:5:in `require'
from /home/ekrem/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/compass-0.12.2/lib/compass.rb:5:in `block in <top (required)>'
from /home/ekrem/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/compass-0.12.2/lib/compass.rb:4:in `each'
from /home/ekrem/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/compass-0.12.2/lib/compass.rb:4:in `<top (required)>'
from /home/ekrem/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/compass-0.12.2/bin/compass:20:in `require'
from /home/ekrem/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/compass-0.12.2/bin/compass:20:in `block in <top (required)>'
from /home/ekrem/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/compass-0.12.2/bin/compass:8:in `fallback_load_path'
from /home/ekrem/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/compass-0.12.2/bin/compass:19:in `<top (required)>'
from /home/ekrem/.rbenv/versions/2.1.1/bin/compass:23:in `load'
from /home/ekrem/.rbenv/versions/2.1.1/bin/compass:23:in `<main>'
Notice: for 10x faster LSI support, please install http://rb-gsl.rubyforge.org/
Configuration file: /home/ekrem/ws-rails/blog-new/_config.yml
Source: source
Destination: public
Generating...
Build Warning: Layout 'nil' requested in blog/categories/ruby/atom.xml does not exist.
Build Warning: Layout 'nil' requested in blog/categories/rails/atom.xml does not exist.
Build Warning: Layout 'nil' requested in blog/categories/ember/atom.xml does not exist.
Build Warning: Layout 'nil' requested in atom.xml does not exist.
Build Warning: Layout 'nil' requested in robots.txt does not exist.
Build Warning: Layout 'nil' requested in blog/categories/ruby/atom.xml does not exist.
Build Warning: Layout 'nil' requested in blog/categories/rails/atom.xml does not exist.
Build Warning: Layout 'nil' requested in blog/categories/ember/atom.xml does not exist.
done.
Site runs on local after all but no effect because of (probably) these errors & warnings. I wonder what is missing.
I am trying to do the exact same thing right now (setting up my custom Octopress theme using Bourbon and Neat) and I just managed to resolve the same issue you're experiencing.
The 'nil' error:
As detailed here since version 2.2 Jekyll has an issue with the layout validation, so you will manually have to change nil to null in 2 files:
source/atom.xml
source/_includes/custom/category_feed.xml
This will sort out Jekyll and it will stop hicking up :)
The Compass errors:
I had quite a bit of a nightmare when I was trying to upgrade Compass, so that Bourbon can be installed. It seems that Compass was locked to an old version of SASS, which was locked to an old version of listen, which could not be updated...
I eventually had to delete ALL versions of Compass I had installed, and then install version 1.0.1.
In my case another issue was that I had the gems installed globally, and not per project, so I had to add a .bundle/config file to tell Bundler where to clone the gems for the Octopress repo.
The contents of my Bundler config file:
---
BUNDLE_PATH: vendor/bundle
BUNDLE_DISABLE_SHARED_GEMS: '1'
After carrying out with these changes Octopress should be happy to work with Bourbon.
I hope it helps.
For the 'nil' warnings:
Create an empty "nil.html" file in the _layouts folder
(Jekyll started validating layouts...)
Any ideas on this error - the sass compilejust fails - have tried gem update --system and gem update and remove and reinstall sass gem
sudo sass --update --trace styles.scss overwrite styles.css
Password:
/Library/Ruby/Gems/1.8/gems/sass-3.2.11/bin/../lib/sass/../sass/plugin/staleness_checker.rb:27: uninitialized constant Sass::Plugin::StalenessChecker::Mutex (NameError)
from /Library/Ruby/Site/1.8/rubygems/core_ext/kernel_require.rb:53:in `gem_original_require'
from /Library/Ruby/Site/1.8/rubygems/core_ext/kernel_require.rb:53:in `require'
from /Library/Ruby/Gems/1.8/gems/sass-3.2.11/bin/../lib/sass/../sass/plugin/compiler.rb:7
from /Library/Ruby/Site/1.8/rubygems/core_ext/kernel_require.rb:53:in `gem_original_require'
from /Library/Ruby/Site/1.8/rubygems/core_ext/kernel_require.rb:53:in `require'
from /Library/Ruby/Gems/1.8/gems/sass-3.2.11/bin/../lib/sass/../sass/plugin.rb:4
from /Library/Ruby/Site/1.8/rubygems/core_ext/kernel_require.rb:53:in `gem_original_require'
from /Library/Ruby/Site/1.8/rubygems/core_ext/kernel_require.rb:53:in `require'
from /Library/Ruby/Gems/1.8/gems/sass-3.2.11/bin/../lib/sass/../sass/exec.rb:381:in `watch_or_update'
from /Library/Ruby/Gems/1.8/gems/sass-3.2.11/bin/../lib/sass/../sass/exec.rb:326:in `process_result'
from /Library/Ruby/Gems/1.8/gems/sass-3.2.11/bin/../lib/sass/../sass/exec.rb:41:in `parse'
from /Library/Ruby/Gems/1.8/gems/sass-3.2.11/bin/../lib/sass/../sass/exec.rb:21:in `parse!'
from /Library/Ruby/Gems/1.8/gems/sass-3.2.11/bin/sass:9
from /usr/bin/sass:23:in `load'
from /usr/bin/sass:23
This same issue started popping up for me today. I suppose there is something wrong with sass-3.2.11 or some configuration that I am not aware of.
To get past the issue for now I uninstalled the new version and installed an older version like so:
Uninstall sass
gem uninstall sass
Install version 3.2.10
gem install sass --version 3.2.10
Reinstall compass
gem install compass
This has been fixed in sass 3.2.12.
Sass Issue Queue
So all you need to do is update your sass gem
gem install sass
Should pull the latest version 3.2.12 or greater
i previously had updated the default OSX version with:
gem update --system
This created the problem - not a good idea to do on the 'out of the box' OSX version.
I would like to install compass through the terminal in mac. I installed sass. I now have Sass 3.3.0.alpha.175 (Bleeding Edge)
Then I tried to install compass with
sudo gem install compass
It gave me this warning
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rdoc/rdoc.rb:280: warning: conflicting chdir during another chdir block
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rdoc/rdoc.rb:287: warning: conflicting chdir during another chdir block
then stated the "1 gem installed"
When I run compass, it does not work, it gives me these lines:
/Library/Ruby/Site/1.8/rubygems/core_ext/kernel_require.rb:110:in `gem_original_require': no such file to load -- sass/script/node (LoadError)
from /Library/Ruby/Site/1.8/rubygems/core_ext/kernel_require.rb:110:in `require'
from /Library/Ruby/Gems/1.8/gems/compass-0.12.2/lib/compass/sass_extensions/monkey_patches/browser_support.rb:1
from /Library/Ruby/Site/1.8/rubygems/core_ext/kernel_require.rb:45:in `gem_original_require'
from /Library/Ruby/Site/1.8/rubygems/core_ext/kernel_require.rb:45:in `require'
from /Library/Ruby/Gems/1.8/gems/compass-0.12.2/lib/compass/sass_extensions/monkey_patches.rb:2
from /Library/Ruby/Gems/1.8/gems/compass-0.12.2/lib/compass/sass_extensions/monkey_patches.rb:1:in `each'
from /Library/Ruby/Gems/1.8/gems/compass-0.12.2/lib/compass/sass_extensions/monkey_patches.rb:1
from /Library/Ruby/Site/1.8/rubygems/core_ext/kernel_require.rb:45:in `gem_original_require'
from /Library/Ruby/Site/1.8/rubygems/core_ext/kernel_require.rb:45:in `require'
from /Library/Ruby/Gems/1.8/gems/compass-0.12.2/lib/compass/sass_extensions.rb:9
from /Library/Ruby/Site/1.8/rubygems/core_ext/kernel_require.rb:45:in `gem_original_require'
from /Library/Ruby/Site/1.8/rubygems/core_ext/kernel_require.rb:45:in `require'
from /Library/Ruby/Gems/1.8/gems/compass-0.12.2/lib/compass.rb:5
from /Library/Ruby/Gems/1.8/gems/compass-0.12.2/lib/compass.rb:4:in `each'
from /Library/Ruby/Gems/1.8/gems/compass-0.12.2/lib/compass.rb:4
from /Library/Ruby/Site/1.8/rubygems/core_ext/kernel_require.rb:45:in `gem_original_require'
from /Library/Ruby/Site/1.8/rubygems/core_ext/kernel_require.rb:45:in `require'
from /Library/Ruby/Gems/1.8/gems/compass-0.12.2/bin/compass:20
from /Library/Ruby/Gems/1.8/gems/compass-0.12.2/bin/compass:8:in `fallback_load_path'
from /Library/Ruby/Gems/1.8/gems/compass-0.12.2/bin/compass:19
from /usr/bin/compass:23:in `load'
from /usr/bin/compass:23
Is there a way to fix this?
Up to now I used codekit. But I would like to take advantage of sourcemaps and I believe the terminal is the only way to do it. I tried watching sass along with source maps and the result is beautiful (in that I could use chrome as an editor). But I'd like to add compass in there as well.
Is there a way to get this working?
I am using os version 10.8.3
Compass is not compatible with sass 3.3.0 alpha (see gem doc). You should uninstall compass and sass, and the reinstall using sudo gem install compass which will install sass as well (with the right version).
EDIT:
Just tried to install compass with rvm today (26 Feb 2017) and stumbled upon another error: Error compiling Compass LoadError on line [“179”] .. data.rb: Cannot load such file. This answer worked for me.
For what it's worth, if you're using RVM, then don't use sudo. Here's how I solved this problem (and I got here using Alexandre's answer):
1) $ gem uninstall sass
(say yes to prompts alerting you about dependancies, you're about to reinstall anyway)
2) $ gem install sass -v 3.2.10
after that, compass is working great
in my solution: I have installed ruby.
brew install ruby (I know already installed with mac) then
sudo gem install compass
I successfully installed Sass, but I'm having trouble importing Compass.
The following is the error detail:
*Syntax error: File to import not found or unreadable: compass.
Load path: H:/HTML/___keoFull/sass
.....
Backtrace:
mainKeo.scss:2
style.scss:2
C:/Ruby193/lib/ruby/gems/1.9.1/gems/sass-3.2.6/lib/sass/tree/import_node.rb:67:in `rescue in import'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/sass-3.2.6/lib/sass/tree/import_node.rb:45:in `import'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/sass-3.2.6/lib/sass/tree/import_node.rb:28:in `imported_file'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/sass-3.2.6/lib/sass/tree/import_node.rb:37:in `css_import?'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/sass-3.2.6/lib/sass/tree/visitors/perform.rb:217:in `visit_import'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/sass-3.2.6/lib/sass/tree/visitors/base.rb:37:in `visit'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/sass-3.2.6/lib/sass/tree/visitors/perform.rb:100:in `visit'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/sass-3.2.6/lib/sass/tree/visitors/perform.rb:227:in `block in visit_import'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/sass-3.2.6/lib/sass/tree/visitors/perform.rb:227:in `map'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/sass-3.2.6/lib/sass/tree/visitors/perform.rb:227:in `visit_import'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/sass-3.2.6/lib/sass/tree/visitors/base.rb:37:in `visit'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/sass-3.2.6/lib/sass/tree/visitors/perform.rb:100:in `visit'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/sass-3.2.6/lib/sass/tree/visitors/base.rb:53:in `block in visit_children'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/sass-3.2.6/lib/sass/tree/visitors/base.rb:53:in `map'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/sass-3.2.6/lib/sass/tree/visitors/base.rb:53:in `visit_children'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/sass-3.2.6/lib/sass/tree/visitors/perform.rb:109:in `block in visit_children'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/sass-3.2.6/lib/sass/tree/visitors/perform.rb:121:in `with_environment'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/sass-3.2.6/lib/sass/tree/visitors/perform.rb:108:in `visit_children'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/sass-3.2.6/lib/sass/tree/visitors/base.rb:37:in `block in visit'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/sass-3.2.6/lib/sass/tree/visitors/perform.rb:128:in `visit_root'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/sass-3.2.6/lib/sass/tree/visitors/base.rb:37:in `visit'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/sass-3.2.6/lib/sass/tree/visitors/perform.rb:100:in `visit'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/sass-3.2.6/lib/sass/tree/visitors/perform.rb:7:in `visit'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/sass-3.2.6/lib/sass/tree/root_node.rb:20:in `render'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/sass-3.2.6/lib/sass/engine.rb:315:in `_render'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/sass-3.2.6/lib/sass/engine.rb:262:in `render'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/sass-3.2.6/lib/sass/plugin/compiler.rb:341:in `update_stylesheet'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/sass-3.2.6/lib/sass/plugin/compiler.rb:203:in `block in update_stylesheets'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/sass-3.2.6/lib/sass/plugin/compiler.rb:201:in `each'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/sass-3.2.6/lib/sass/plugin/compiler.rb:201:in `update_stylesheets'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/sass-3.2.6/lib/sass/plugin/compiler.rb:235:in `watch'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/sass-3.2.6/lib/sass/plugin.rb:107:in `method_missing'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/sass-3.2.6/lib/sass/exec.rb:444:in `watch_or_update'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/sass-3.2.6/lib/sass/exec.rb:307:in `process_result'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/sass-3.2.6/lib/sass/exec.rb:41:in `parse'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/sass-3.2.6/lib/sass/exec.rb:21:in `parse!'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/sass-3.2.6/bin/sass:9:in `<top (required)>'*
Compass adjusts the way partials are imported. It allows importing components based solely on their name, without specifying the path.
Before you can do #import 'compass';, you should:
Install Compass as a Ruby gem:
gem install compass
After that, you should use Compass's own command line tool to compile your SASS code:
cd path/to/your/project/
compass compile
Note that Compass reqiures a configuration file called config.rb. You should create it for Compass to work.
The minimal config.rb can be as simple as this:
css_dir = "css"
sass_dir = "sass"
And your SASS code should reside in sass/.
Instead of creating a configuration file manually, you can create an empty Compass project with compass create <project-name> and then copy your SASS code inside it.
Note that if you want to use Compass extensions, you will have to:
require them from the config.rb;
import them from your SASS file.
More info here: http://compass-style.org/help/
I'm seeing this issue using Rails 4.0.2 and compass-rails 1.1.3
I got past this error by moving gem 'compass-rails' outside of the :assets group in my Gemfile
It looks something like this:
# stuff
gem 'compass-rails', '~> 1.1.3'
group :assets do
# more stuff
end
I was uninstalled compass 1.0.1 and install compass 0.12.7, this fix problem for me
$ sudo gem uninstall compass
$ sudo gem install compass -v 0.12.7
If you're like me and came here looking for a way to make sass --watch work with compass, the answer is to use Compass' version of watch, simply:
compass watch
If you're on a Mac and don't yet have the gem installed, you might run into errors when you try to install the Compass gem, due to permission problems that arise on OSX versions later than 10.11. Install ruby with Homebrew to get around this. See this answer for how to do that.
Alternatively you could just use CodeKit, but if you're stubborn like me and want to use Sublime Text and command line, this is the route to go.
In short, if you've installed the gem the run:
compass compile
in your rails root dir