Hello,

If you want to mount a local folder you can try this

mkdir -p /var/tmp/rails_temp /var/tmp/rails_log
mount --bind /var/tmp/rails_temp $RAILS_ENV/tmp/
mount --bind /var/tmp/rails_log $RAILS_ENV/log/

If that works, you can just use an script with run: "always" for that

Alvaro


On Wed, Jun 15, 2016 at 12:09 AM, 'Christian Aust' via Vagrant <
vagrant-up@googlegroups.com> wrote:

> Hi,
>
> I'm using Vagrant 1.8.1 on OSX with Virtualbox 5.0.20, plus ansible to
> provision the boxes. When running a Ruby on Rails 4.2 app within the guest
> from the shared folder, Rails creates a lot of files and IO underneath
> $RAILS_ENV/tmp/ and $RAILS_ENV/log/ In particular sprockets and sass are
> using those paths for caching.
>
> These changes are always synced back and forth when using vboxfs sharing.
> Running Rails like that is a lot slower than running it directly on my
> machine, by order of an magnitude.
>
> Using NFS for sharing will speed things up considerably. However it
> doesn't solve the problem but makes it less visible. A clean solution would
>
> * exclude certain paths from syncing, or
> * instruct Rails to use different tmp and log paths while running in a
> vagrant guest.
>
> Has anybody had any luck with either one, or maybe come up with a
> different solution? Regards
>
> Christian
>
> --
> This mailing list is governed under the HashiCorp Community Guidelines -
> https://www.hashicorp.com/community-guidelines.html. Behavior in
> violation of those guidelines may result in your removal from this mailing
> list.
>
> GitHub Issues: https://github.com/mitchellh/vagrant/issues
> IRC: #vagrant on Freenode
> ---
> You received this message because you are subscribed to the Google Groups
> "Vagrant" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to vagrant-up+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/vagrant-up/d4ce8127-96d6-4b02-b24d-a72d0b2eee7a%40googlegroups.com
> <https://groups.google.com/d/msgid/vagrant-up/d4ce8127-96d6-4b02-b24d-a72d0b2eee7a%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
This mailing list is governed under the HashiCorp Community Guidelines - 
https://www.hashicorp.com/community-guidelines.html. Behavior in violation of 
those guidelines may result in your removal from this mailing list.

GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
--- 
You received this message because you are subscribed to the Google Groups 
"Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vagrant-up+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vagrant-up/CAHqq0eyiab2Y30Db4F%2BU0Ptes%2BQspJvvs4ggDLVeWfo-tjWSCw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to