I just migrated my project files onto a new PC on the D:
drive whilst my programs (Git, Node Js, Ruby, etc) are on the C:
drive.
I have tri
Uninstall SASS: gem uninstall sass
Uninstall COMPASS: gem uninstall compass
Install --pre COMPASS version: gem install compass --pre
Install --pre SASS version: gem install sass --pre
I had the same problem. I did the suggested - uninstall & install with the --pre, however that didn't solve my problem. I've run into another problems after that. Well, what I did then is: I've uninstalled the compass and sass gem again. I deleted all compass related gems in the ruby/gems/ruby1.9.1/gems folder (which is probably not necessary, not sure) and than I installed: gem install compass --version "0.12.2" and gem install sass --version "3.2.10". I don't think that the versions here are too important as long as it is not the newest versions of these two. Now the important bit here is to: gem uninstall sass . It will ask you which version to wipe out or if all of them. Delete the newer one. The trick here is that compass installs automatically a newest version of sass. So if you install an older one it doesn't matter as there is already newer one with compass which will get used. Try it.
I was getting a similar error, but had a completely different resolution, so I thought it was worth sharing in case anyone else runs into my scenario.
I was actually getting permission denied because my source control had made my .css files read-only. The solution was simple enough, just check out the css files and everything went back to normal.
I was having this same issue for a while and eventually fixed it manually. After some digging, the issue appears to be that in util.rb, the temp file is being renamed before the file is closed. In Windows, this apparently isn't permitted (although not sure why I suddenly started getting the problem after it had been working on the past).
The fix for me was to edit util.rb (PATH_TO_RUBY\lib\ruby\gems\1.9.1\gems\sass-3.2.18\lib\sass\util.rb). I copied the line closing the temp file to before the permission change + rename on line 897. Here is the updated function as I now have it:
def atomic_create_and_write_file(filename, perms = 0666)
require 'tempfile'
tmpfile = Tempfile.new(File.basename(filename), File.dirname(filename))
tmpfile.binmode if tmpfile.respond_to?(:binmode)
result = yield tmpfile
tmpfile.flush # ensure all writes are flushed to the OS
begin
tmpfile.fsync # ensure all buffered data in the OS is sync'd to disk.
rescue NotImplementedError
# Not all OSes support fsync
end
tmpfile.close if tmpfile
# Make file readable and writeable to all but respect umask (usually 022).
File.chmod(perms & ~File.umask, tmpfile.path)
File.rename tmpfile.path, filename
result
ensure
# close and remove the tempfile if it still exists,
# presumably due to an error during write
tmpfile.close if tmpfile
tmpfile.unlink if tmpfile
end
One big caveat here is that I'm not a Ruby person and I'm sure there is probably a better way. But I just tried this mod quickly, and it worked, so I didn't put more into it.
It looks like a bug in the newest version of Sass.
Uninstalling Sass and Compass and installing the older versions fixes the issue.
There might be newer versions that do work, but here's what I've tested and know works.
gem uninstall compass
gem uninstall sass
gem install compass -v "0.12.2"
gem install sass -v "3.2.13"
I was having a similar issue and I was able to resolve it by un-installing both compass and sass:
gem uninstall compass
gem uninstall sass
Then, all you need to do is install compass:
gem install compass
sass is required as part of the compass install so there shouldn't be any need to install it separately. It appears that the issue I was facing was that there was a conflict between the version installed as part of the compass install and the one I installed manually.