mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Merge branch 'master' of github.com:rails/docrails
This commit is contained in:
commit
ab0cbff07e
4 changed files with 18 additions and 12 deletions
|
@ -36,7 +36,7 @@ module ActiveSupport
|
|||
# string.
|
||||
#
|
||||
# If passed an optional +locale+ parameter, the word will be
|
||||
# pluralized using rules defined for that language. By default,
|
||||
# singularized using rules defined for that language. By default,
|
||||
# this parameter is set to <tt>:en</tt>.
|
||||
#
|
||||
# 'posts'.singularize # => "post"
|
||||
|
|
|
@ -765,8 +765,8 @@ headers.
|
|||
For Apache:
|
||||
|
||||
```apache
|
||||
# The Expires* directives requires the Apache module `mod_expires` to be
|
||||
# enabled.
|
||||
# The Expires* directives requires the Apache module
|
||||
# `mod_expires` to be enabled.
|
||||
<Location /assets/>
|
||||
# Use of ETag is discouraged when Last-Modified is present
|
||||
Header unset ETag FileETag None
|
||||
|
|
|
@ -86,7 +86,6 @@ And if you are on Fedora or CentOS, you're done with
|
|||
$ sudo yum install sqlite3 sqlite3-devel
|
||||
```
|
||||
|
||||
<<<<<<< HEAD
|
||||
If you are on Arch Linux, you will need to run:
|
||||
|
||||
```bash
|
||||
|
@ -101,8 +100,6 @@ For FreeBSD users, you're done with:
|
|||
|
||||
Or compile the `databases/sqlite3` port.
|
||||
|
||||
=======
|
||||
>>>>>>> ec8ef1e1055c4e1598da13f49d30261f07f4a9b4
|
||||
Get a recent version of [Bundler](http://gembundler.com/)
|
||||
|
||||
```bash
|
||||
|
@ -158,13 +155,20 @@ $ cd railties
|
|||
$ TEST_DIR=generators bundle exec rake test
|
||||
```
|
||||
|
||||
You can run any single test separately too:
|
||||
You can run the tests for a particular file by using:
|
||||
|
||||
```bash
|
||||
$ cd actionpack
|
||||
$ bundle exec ruby -Itest test/template/form_helper_test.rb
|
||||
```
|
||||
|
||||
Or, you can run a single test in a particular file:
|
||||
|
||||
```bash
|
||||
$ cd actionpack
|
||||
$ bundle exec ruby -Itest path/to/test.rb -n test_name
|
||||
```
|
||||
|
||||
### Active Record Setup
|
||||
|
||||
The test suite of Active Record attempts to run four times: once for SQLite3, once for each of the two MySQL gems (`mysql` and `mysql2`), and once for PostgreSQL. We are going to see now how to set up the environment for them.
|
||||
|
@ -191,7 +195,6 @@ $ sudo yum install mysql-server mysql-devel
|
|||
$ sudo yum install postgresql-server postgresql-devel
|
||||
```
|
||||
|
||||
<<<<<<< HEAD
|
||||
If you are running Arch Linux, MySQL isn't supported anymore so you will need to
|
||||
use MariaDB instead (see [this announcement](https://www.archlinux.org/news/mariadb-replaces-mysql-in-repositories/)):
|
||||
|
||||
|
@ -211,8 +214,6 @@ Or install them through ports (they are located under the `databases` folder).
|
|||
If you run into troubles during the installation of MySQL, please see
|
||||
[the MySQL documentation](http://dev.mysql.com/doc/refman/5.1/en/freebsd-installation.html).
|
||||
|
||||
=======
|
||||
>>>>>>> ec8ef1e1055c4e1598da13f49d30261f07f4a9b4
|
||||
After that, run:
|
||||
|
||||
```bash
|
||||
|
|
|
@ -692,10 +692,15 @@ Neither of these Rake tasks do anything you could not do with `db:migrate`. They
|
|||
are simply more convenient, since you do not need to explicitly specify the
|
||||
version to migrate to.
|
||||
|
||||
### Setup the Database
|
||||
|
||||
The `rake db:setup` task will create the database, load the schema and initialize
|
||||
it with the seed data.
|
||||
|
||||
### Resetting the Database
|
||||
|
||||
The `rake db:reset` task will drop the database, recreate it and load the
|
||||
current schema into it.
|
||||
The `rake db:reset` task will drop the database and set it up again. This is
|
||||
functionally equivalent to `rake db:drop db:setup`.
|
||||
|
||||
NOTE: This is not the same as running all the migrations. It will only use the
|
||||
contents of the current schema.rb file. If a migration can't be rolled back,
|
||||
|
|
Loading…
Reference in a new issue