Prev | Current Page 437 | Next

Brad Ediger

"Advanced Rails"


MacPorts users may have some difficulty with these steps; the default configuration
scripts look in the /usr and /usr/local trees for the client libraries installed in
step 1, while MacPorts installs into /opt/local. This can be fixed by passing configuration
parameters into gem, which are preceded by -- so they are not parsed
as options to gem itself:
$ sudo gem install sqlite3-ruby -- --with-sqlite-dir=/opt/local
Further Reading | 295
3. Verify the database connection information for the unit tests. ActiveRecord tests
require two database connections per adapter, to verify that ActiveRecord is able
to properly manage multiple simultaneous connections. If needed, modify the
connection specifications in activerecord/test/connections/native_adaptername/
connection.rb.
4. Create the unit test databases for MySQL and PostgreSQL. The SQLite and
SQLite3 databases will be automatically created upon first run, as they are
backed by a single file per database. For a default configuration (no modifications
to the above connection specifications), run the following Rake tasks from
the activerecord directory:
$ rake build_mysql_databases
$ rake build_postgresql_databases
For more complicated configurations, create the databases specified in the preceding
connection files, and ensure that the user specified in those files has full
access to those databases, or you will get permission errors.


Pages:
425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449