Christmas Nugget
December 25th, 2006 -
If you haven’t read my article about my edge Rails script or read a very similiar article on the Ruby Advent Calendar then you might want to take a look at this.
I’ve rewritten my Edge Rails script so that it can also commit your new edge rails application to your subversion repository. The syntax is just like the last script except with an added parameter. Here is its:
./set_rails my_project_name postgres http://svn.robertrevans.com/myproject
The script takes three parameters this time, instead of the two it took before. For those who haven’t seen this, a quick overview:
- Parameter 1 (my_project_name) is the name that you want your project to be named
- Parameter 2 (postgres) is the name of the database that you will be using – ex. mysql, sqlite, etc
- Parameter 3 (http://svn.robertrevans.com/myproject) is the location of your subversion repository that you want to import your project into
While the script is running, it will stop and ask you for your name/password for the subversion repository. Other than that, you can sit back and let it do all the work for you.
There is another cool addition to this script: it writes a script for you to run after you check out your initial subversion checkin(import). That script will also be imported into your subversion repo.
Once you checkout your project after the initial check in, go to the your project directory, and type:
./set_svn
This will run the second script that was created in the first script to set Rails to use externals and to create your database.yml file and the log and tmp files. These won’t be checked into your subversion repository. The script will end with committing the changes to your repository.
This should make it even easier to go through all the initial Rails setup. Download it and enjoy!
Tags: rails 101
Comments
Robert
January 17th, 2007
Thanks Peter, glad you like it!
Commenting has been turned off.
Peter Berkenbosch
January 17th, 2007
Really nice script Robert,
I rewrote the script so I can use it on my windows box with google code hosted projects.
Thanks
Peter.