Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Trying to boot up a Rails app inside a Vagrant box (percise32) host machine is Windows 7. This is my Vagrantfile

Vagrant.configure('2') do |config|
  config.vm.box      = 'precise32'
  config.vm.box_url  = 'http://files.vagrantup.com/precise32.box'
  config.vm.hostname = 'rails-dev-box'

  config.vm.synched_folder "c:\rails_text", "/home/code"

  config.vm.network :forwarded_port, guest: 3000, host: 3003

  config.vm.provision :puppet do |puppet|
    puppet.manifests_path = 'puppet/manifests'
    puppet.module_path    = 'puppet/modules'
  end
end

When i try to run the app (code is syncing correctly) i am getting the following error on the Rails server output:

Errno::ETXTBSY in Welcome#index

Showing /home/code/app/views/layouts/application.html.erb where line #4 raised:
Text file busy - (/home/code/tmp/cache/sass/a0a09a036cf07b1cae262d60fa989a8e24765858/welcome.css.scssc20131001-1595-f6clpt, /home/code/cache/sass/a0a09a036cf07b1cae262d60fa989a8e24765858/welcome.css.scssc)
  (in /home/code/app/assets/stylesheets/welcome.css.scss)

Some articles suggested that moving my synced folder outside of the /vagrant root is the cure, but it seems that it is not the issue in my case since i am using /home/code

ideas welcome.

like image 960
Elad Meidar Avatar asked Oct 01 '13 19:10

Elad Meidar


2 Answers

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

like image 62
user2840051 Avatar answered Oct 20 '22 01:10

user2840051


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

like image 22
kairel Avatar answered Oct 20 '22 02:10

kairel