Prev | Current Page 459 | Next

Brad Ediger

"Advanced Rails"

In this section, we cover some
of the most common choices.
Subversion Configuration
Subversion usually needs a little bit of configuration to work with Rails. There are
some ???volatile??? files that change from development to production or within a
deployment. These files should be kept out of version control. In Subversion, a file is
ignored within a directory by setting a pattern matching the file as the value of the
svn:ignore property on the parent directory. For most Rails applications, the following
ignores are typically used:
$ svn propset svn:ignore database.yml config/
$ svn propset svn:ignore "*" log/ tmp/{cache,pids,sessions,sockets}
There is a Subversion client configuration that sets up many of these settings, and
will ignore those volatile files without the need for svn:ignore. It also sets up
autoprops, which sets the MIME type on files in the repository automatically. If you
work mainly with Rails projects, this can be a good choice. The config file is available
from http://3spoken.wordpress.com/rails-subversion-tng-config-file/.
As a rule, configuration specific to a particular Rails environment (excluding database
connection specifications, which are more specific to the developer and his environment)
should not be ignored, but rather should be placed in environment-specific
blocks. This allows the configuration to be versioned while still remaining environmentspecific.


Pages:
447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471