Rails app on percise32 vagrant box - assets get “text file busy” error (Errno::ETXTBSY)

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-05 05:26:04

Looks like the gem for Sass recently updated (like yesterday or today) Go to the Gemfile and set the sass version to 3.2.10, then bundle update

gem 'sass', '3.2.10' # 3.2.11 broke the app

Solution of user2840051 work .. You need to uninstall sass

gem uninstall sass

Choose version to uninstall

Modify your Gemfile with:

gem 'sass', '3.2.10'

And finally run:

bundle update sass

I got the same problem, after sass was upgraded to 3.2.12. My solution was to move sass cache out of synced folder to a proper linux filesystem:

options[:cache_location] = "/tmp/sass-cache"

I had the same problem with grunt/sass and vagrant.

Message was:

vagrant@precise32:~$ grunt
Running "sass:dist" (sass) task
Errno::ETXTBSY: Text file busy @ sys_fail2 - (./.sass-cache/8147710423c1a1d0096b06b58f36e8601f62e931/main.scssc20140302-6017-1phv8qn, ./.sass-cache/8147710423c1a1d0096b06b58f36e8601f62e931/main.scssc)
  Use --trace for backtrace.
Warning: Exited with error code 1 Use --force to continue.

Aborted due to warnings.

The fix is, to add cacheLocation option into Gruntfile.js, sample config below.

module.exports = function(grunt) {
    grunt.initConfig({

        sass: {
            dist: {
                options: {
                    style: 'compressed', // compact
                    lineNumbers : false, // true
                    cacheLocation: '/tmp/sass-cache'
                },
            },
        },
    });
}

As a general system-wide fix

gem uninstall sass
gem install sass -v 3.2.10
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!