Joel VanderWerf wrote: > Max Williams wrote: >> I just broke my wife's website (my current side project) because i was >> using a gem and i forgot to install it on the server before updating all >> of the application code and restarting it. >> >> Can anyone suggest a good way, besides simply not being a doofus, to >> avoid doing this again? > > finger.tie(String) ? > > Seriously, something like > > gem list | grep -P -o '^\S+' > > will tell you what you've got, so you could write a little script that > does this on both hosts, and diffs to let you know what's missing. Or > take the output from one host and feed it to gem install on the other... Hi Joel, thanks! One problem with the second approach (i like the first approach) is that i don't want every gem on my local machine to also be on my server - just the ones required by the app. So, i guess that whatever the solution is it has to involve some file(s) in my app where my requires are listed. Eg when i do a require, raise a warning if the gem wasn't loaded. Then, when i restart the app, i see the warnings and can install the gems. Or even better, some kind of rake sort of task that installs the gems listed in the requires, which i run as part of my restart process. or something...just thinking aloud now really. -- Posted via http://www.ruby-forum.com/.