New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
compass compile .sasss-cache file full path length over 255 will failed #1791
Comments
maybe it is the same problem #1642 |
Follow steps:
Now, compass -v output 1.0.1, sass -v output 3.4.1. compile output .sass-cache/75fcaf1b4852ceb732871195e41567cc2a7 I don't know why, have a magic? |
Do you need the newest sass version? just do gem uninstall compass-import-once -a gem install sass -v 3.2.14 and via compass watch in the folder everything works on a windows machine. |
@Shupal Thank your replay :D |
i'm still having this problem on Windows 7, i don't have the option to use the older version. |
@novascreen Since problem itself is about too long paths generated by Compass - it maybe helpful to move your .sass-cache somewhere closer to root path. It can be done for example by using Bundler to get local copy of Compass in your project and move project itself somewhere in root of the disk. I use Bundler in my projects (on Windows 7) with Compass 1.0.1 and SASS 3.4 and my cache paths looks like
Local configuration for Bundler in
Compilation is called from command line as Hope it will help somehow :) |
Verified. On Windows 7 with latest Compass and dependencies I changed |
Thanks @rask. That worked for me too. |
Had the same problem. solved it by modifying config.rb. Added: cache_path = "c:\temp\sass" solved it |
I just re-installed compass and it works fine now |
Had to revert to previous version of compass to fix error when importing css3 from compass. Fix found at: Compass/compass#1791 Other than that, updated the scss for the recipes on the main page. Currently experimenting with border-radius on the recipes. Currently overusing them, doesn't look too nice, but I'm not sure what to do with them.
@HeshamElghndour the issue still open, so it is useless to reinstall the sass |
@rask THX! You ara my god. Solve it. |
From what I've learned this error happens because Windows Win32 file system API limits the maximum path length internally to around 255 characters. There is nothing applications can do other than bypass the restrictions by choosing shorter folder/file names. The same issue kept happening with NodeJS's npm v2, where the node_modules directory could go hundreds of directories deep, which resulted in the same problem as presented in this issue. npm v3 fixed this by using a flatter node_modules structure. The Win32 API truncates all file paths to the ~255 character limit, resulting in missing file/folder errors even though the actual files are there and browsable in software that does not rely on the said Win32 API. |
Just to note, I am on Windows 10 Ruby 2.4.0 and I needed to escape my slashes in config.rb |
it works!! oh my god! THXS ,@rask |
Hi,
I install RubyInstaller Ruby 2.0.0-p481 (x64) and install Compass:
C:\Users\Bruce>compass -v
Compass 1.0.1 (Polaris)
I use Compass in Sublime Text 3 - Compass build system ( https://github.com/whatwedo/Sublime-Text-2-Compass-Build-System )
Compass build System command path is : C:\Users{username}\AppData\Roaming\Sublime Text 3\Packages\Compass, It's long. It's call "compass compile '%fileDir%' --boring" from build.cmd command.
If .sass-cache file full path over 255 words will failed, like this:
C:\Users\Bruce\AppData\Roaming\Sublime Text 3\Packages\Compass>compass compile 'E:\cpproject' --boring
error E:/cpproject/sass/test.scss (C:/Ruby200-x64/lib/ruby/2.0.0/tempfile.rb:146:in `initialize': No such file or directory - C:/Users/Bruce/AppData/Roaming/Sublime Text 3/Packages/Compass/.sass-cache/75fcaf1b4852ceb732871195e41567cc2a7
d8997/C%058%092Ruby200-x64%092lib%092ruby%092gems%0922.0.0%092gems%092compass-core-1.0.1%092stylesheets%092compass%092_s
upport.scssc20140825-5800-ni3jly)
Compilation failed in 1 files.
Path length is 262.
If .sass-cache file full path less 255 words, compile will succeed.
This is trace infomation:
C:\Users\Bruce\AppData\Roaming\Sublime Text 3\Packages\Compass>compass compile 'E:\cpproject' --trace
write E:/cpproject/stylesheets/ie.css
Errno::ENOENT on line ["146"] of C: No such file or directory - C:/Users/Bruce/AppData/Roaming/Sublime Text 3/Packages/C
ompass/.sass-cache/75fcaf1b4852ceb732871195e41567cc2a7d8997/C%058%092Ruby200-x64%092lib%092ruby%092gems%0922.0.0%092gems
%092compass-core-1.0.1%092stylesheets%092compass%092_support.scssc20140825-1356-1sd988d
C:/Ruby200-x64/lib/ruby/2.0.0/tempfile.rb:146:in 'open'
C:/Ruby200-x64/lib/ruby/2.0.0/tempfile.rb:146:in 'block in initialize'
C:/Ruby200-x64/lib/ruby/2.0.0/tmpdir.rb:142:in 'create'
C:/Ruby200-x64/lib/ruby/2.0.0/tempfile.rb:136:in 'initialize'
C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/sass-3.4.1/lib/sass/util.rb:1193:in 'new'
C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/sass-3.4.1/lib/sass/util.rb:1193:in 'atomic_create_and_write_file'
C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/sass-3.4.1/lib/sass/cache_stores/filesystem.rb:39:in '_store'
C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/sass-3.4.1/lib/sass/cache_stores/base.rb:51:in 'store'
C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/sass-3.4.1/lib/sass/cache_stores/chain.rb:19:in 'block in store'
C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/sass-3.4.1/lib/sass/cache_stores/chain.rb:19:in 'each'
C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/sass-3.4.1/lib/sass/cache_stores/chain.rb:19:in 'store'
C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/sass-3.4.1/lib/sass/engine.rb:404:in '_to_tree'
C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/sass-3.4.1/lib/sass/engine.rb:299:in 'to_tree'
C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/sass-3.4.1/lib/sass/plugin/staleness_checker.rb:178:in 'block in compute_depen
dencies'
C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/sass-3.4.1/lib/sass/tree/node.rb:193:in 'block (2 levels) in each'
C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/sass-3.4.1/lib/sass/tree/node.rb:192:in 'each'
C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/sass-3.4.1/lib/sass/tree/node.rb:193:in 'block in each'
C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/sass-3.4.1/lib/sass/tree/node.rb:193:in 'each'
C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/sass-3.4.1/lib/sass/tree/node.rb:193:in 'each'
C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/sass-3.4.1/lib/sass/plugin/staleness_checker.rb:174:in 'grep'
C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/sass-3.4.1/lib/sass/plugin/staleness_checker.rb:174:in 'compute_dependencies'
C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/sass-3.4.1/lib/sass/plugin/staleness_checker.rb:149:in 'dependencies'
C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/sass-3.4.1/lib/sass/plugin/staleness_checker.rb:125:in 'dependencies_stale?'
C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/sass-3.4.1/lib/sass/plugin/staleness_checker.rb:166:in 'block in dependency_up
dated?'
C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/sass-3.4.1/lib/sass/plugin/staleness_checker.rb:125:in 'each'
C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/sass-3.4.1/lib/sass/plugin/staleness_checker.rb:125:in 'any?'
C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/sass-3.4.1/lib/sass/plugin/staleness_checker.rb:125:in 'dependencies_stale?'
C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/sass-3.4.1/lib/sass/plugin/staleness_checker.rb:166:in 'block in dependency_up
dated?'
C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/sass-3.4.1/lib/sass/plugin/staleness_checker.rb:125:in 'each'
C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/sass-3.4.1/lib/sass/plugin/staleness_checker.rb:125:in 'any?'
C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/sass-3.4.1/lib/sass/plugin/staleness_checker.rb:125:in 'dependencies_stale?'
C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/sass-3.4.1/lib/sass/plugin/staleness_checker.rb:166:in 'block in dependency_up
dated?'
C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/sass-3.4.1/lib/sass/plugin/staleness_checker.rb:81:in 'call'
C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/sass-3.4.1/lib/sass/plugin/staleness_checker.rb:81:in 'stylesheet_modified_sin
ce?'
C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/sass-3.4.1/lib/sass/plugin/staleness_checker.rb:69:in 'stylesheet_needs_update
?'
C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/sass-3.4.1/lib/sass/plugin/compiler.rb:211:in 'block in update_stylesheets'
C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/sass-3.4.1/lib/sass/plugin/compiler.rb:209:in 'each'
C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/sass-3.4.1/lib/sass/plugin/compiler.rb:209:in 'update_stylesheets'
C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/compass-1.0.1/lib/compass/sass_compiler.rb:40:in 'compile!'
C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/compass-1.0.1/lib/compass/commands/update_project.rb:49:in 'perform'
C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/compass-1.0.1/lib/compass/commands/base.rb:18:in 'execute'
C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/compass-1.0.1/lib/compass/commands/project_base.rb:19:in 'execute'
C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/compass-1.0.1/lib/compass/exec/sub_command_ui.rb:43:in 'perform!'
C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/compass-1.0.1/lib/compass/exec/sub_command_ui.rb:15:in 'run!'
C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/compass-1.0.1/bin/compass:30:in 'block in <top (required)>'
C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/compass-1.0.1/bin/compass:44:in 'call'
C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/compass-1.0.1/bin/compass:44:in '<top (required)>'
C:/Ruby200-x64/bin/compass:23:in 'load'
C:/Ruby200-x64/bin/compass:23:in '<main>'
Thanks
The text was updated successfully, but these errors were encountered: