Reputation: 1867
Working with a friend on a project in RoR. We've gotten our app deployed on heroku and both of our local machines after a lot of work getting everything set up to run on the different machines. Is there a more painless way to manage this going forward? I feel like we are going to run into this again and again.
I have a couple of ideas:
1.) Set up the app on a private server and do all of our development directly on the server (via ssh). Is this a common approach?
2.) Set up the app to be completely self contained. i.e. run everything including ruby, rails and all the gems we need directly from the app folder. If everything you need is in the project directory, seems like you could avoid problems where app works on one machine but not others due to slightly different ruby versions/gem versions etc.
3.) Clone my hard drive and send to my friend so that we are starting from exactly the same set up. Is there a way to copy the contents of an entire disk partition (running ubuntu) and then install on someone else's computer so that they can run the os from boot? Even though we're both running ubuntu we found that a lot of things that worked on my machine would not work on his and vice versa. Very bizarre.
Upvotes: 0
Views: 65
Reputation: 181
https://github.com/capistrano/capistrano/ is the most widely used deployment tool that allows you to deploy via SSH.
Additionally, you'll probably want to look at Bundler for managing gems and dependencies (http://gembundler.com/), which will make your life easier in terms of running on different machines.
You should consider using either RVM (https://rvm.io/) or rbenv (https://github.com/sstephenson/rbenv/) to further standardize your environment to include a specific ruby version.
Note that you can also use RVM to create "gemsets" which essentially creates a sandbox for a group of gems to isolate them to a specific project.
Upvotes: 1