views:

69

answers:

5

I'm currently developing a Rails project in my computer. I would Like to give a copy of project to my friend so that he can parallely work on the same project.

Does copying the project directory to other system , help this ? Or should I do more to carry the project to different systems.

+1  A: 

Assuming they have the server components installed (so they can test it), all you should need to do is provide the project directory.

Jess
+11  A: 
  1. Your friend will have to install ruby and all necessary gems. Copying project folder isn't gonna install them automatically.
  2. Using some version control system (e.g., Git) might be a better option than just copying a directory. This way you two will be able to join results of your work painlessly.
  3. Your code should be runnable on any given system, unless you use some platform-specific features (e.g., sendmail).
Nikita Rybak
@Saran Do not overlook step 2 here. Use source control!
jdl
Upvote to help stress the importance of VCS. :)
Robbie
A: 

You can also do

rake rails:freeze:gems
rake gems:unpack

This will copy rails and gems specified in environment.rb to vendor folder, so your friend won't have to install them.

jesper
+1  A: 

Rails uses the Bundler dependency manager. Rails 3 requires it, and you can choose to use it for Rails 2 and other ruby projects too. Even if you're still using Rails 2, you should use it to specify the gems that your project depends on so they can be installed in any environment where the project needs to be run. With bundler installed, all your partner needs to do is run:

bundle install

You will also be dependent on a database. For development, often sqlite is sufficient and ideal because it just uses an easily transportable file rather than having to create/dump/load and manage user access to something like mysql or postgres. You'll need to ensure that the database you're using is installed. Then, run:

rake db:create
rake db:migrate

Rather than just copying the project directory, it's essential that you use a version control system like Git so you can coordinate both your changes. It's the only reasonable way to track who changed what and not overwrite your partner's work.

Also, if you have more sophisticated needs for setting up a specific environment for your development app server, have a look at Vagrant: it can help you set up the recipe for building a virtual machine that your app runs in, complete with the installed database, version of ruby, gems, web server, and other utilities you may need.

Andrew Vit
This in addition to Nikita Rybak's answer.
Laz
A: 

Heroku cloud service will give you a free account for development. Git and deploying commands are a beauty to work with and will make learning about version control thouroghly enjoyable.

http://heroku.com