TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Using Vagrant and Chef for Reproducible, Isolated Rails Development Environments

57 pointsby tristanoneilover 10 years ago

9 comments

hackerboosover 10 years ago
This is pretty much what I do when developing as it&#x27;s a good idea to make your dev environment as close to production as possible.<p>I do however substitute chef for ansible as I found chef difficult to use on a single server (chef-solo was flakey) and bootstrapping is a pain.<p>For writing anisble playbooks to use with Vagrant I found the following post very useful - <a href="http://hakunin.com/six-ansible-practices" rel="nofollow">http:&#x2F;&#x2F;hakunin.com&#x2F;six-ansible-practices</a>
评论 #8341448 未加载
评论 #8341242 未加载
评论 #8340924 未加载
stavrusover 10 years ago
Just want to point out that if you&#x27;re using an encrypted filesystem, vagrant up will fail if NFS is enabled. The workaround is to use rsync to maintain the synced folders, a feature introduced in Vagrant 1.5. Just use vagrant rsync-auto to keep the guest folder in sync automatically with your local folder. If you modify files within the VM (like with a bundle install that modifies your Gemfile.lock or with rails generators), I recommend installing the vagrant-rsync-back plugin (<a href="https://github.com/smerrill/vagrant-rsync-back" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;smerrill&#x2F;vagrant-rsync-back</a>).
评论 #8340717 未加载
评论 #8341001 未加载
orenmazorover 10 years ago
We use this at work and it&#x27;s awesome. Solved a lot of big problems and a lot of little problems, like &quot;works on my machine but not prod&quot; and rebuilding your dev env when you switch machines. etc.<p>The one thing that became a problem was managing vmware (the plugin is a closed source one, so it was hard to debug any issue that came up with it - easily solved by writing our own open source one)
effover 10 years ago
My workflow is very similar, except with Vagrant + SaltStack for all my development images, which has saved me <i>so</i> much time when bringing new developers onto a project. Thumbs-up.<p>One thing that&#x27;s bitten me a few times is case-sensitivity when using NFS and HFS+ -- still wishing I could find a solution that didn&#x27;t require setting up an additional partition on my host machine.
vinceguidryover 10 years ago
I tried using Vagrant on my company Macbook but found it much slower than just running everything on OSX. Does anyone have any tips for improving the performance?
评论 #8340738 未加载
评论 #8341280 未加载
driverdanover 10 years ago
I use a fairly simple bash script to initialize my rails vagrant instances. Total of 34 lines including comments and didn&#x27;t require learning any new config tools.<p>While I&#x27;d favor using proper config management this was a much better use of my time.
评论 #8342117 未加载
TheMakeAover 10 years ago
We&#x27;re using Fig (and docker-osx) for this. One command to set up the environment and another to bring in a database copy. I recently formatted and upgraded to Yosemite and was able to get back to work in under a half hour.
neil_sover 10 years ago
Haha I was literally studying this yesterday. Vagrant Cloud&#x27;s search function is surprisingly broken, it was surprisingly hard to find a box running Ubuntu Trusty, Rails 4.1 and rbenv.
knicholesover 10 years ago
I may be missing something, but isn&#x27;t this what Docker is for?
评论 #8340989 未加载
评论 #8340866 未加载
评论 #8341005 未加载