mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Merge pull request #31293 from ydakuka/fix-gemfile-guides
Cosmetic changes for Gemfile [ci skip]
This commit is contained in:
commit
81b2aed360
11 changed files with 28 additions and 28 deletions
|
@ -36,7 +36,7 @@ TIP: Note that Ruby 1.8.7 p248 and p249 have marshalling bugs that crash Rails.
|
|||
* `coffee-rails ~> 3.2.1`
|
||||
* `uglifier >= 1.0.3`
|
||||
|
||||
* Rails 3.2 deprecates `vendor/plugins` and Rails 4.0 will remove them completely. You can start replacing these plugins by extracting them as gems and adding them in your Gemfile. If you choose not to make them gems, you can move them into, say, `lib/my_plugin/*` and add an appropriate initializer in `config/initializers/my_plugin.rb`.
|
||||
* Rails 3.2 deprecates `vendor/plugins` and Rails 4.0 will remove them completely. You can start replacing these plugins by extracting them as gems and adding them in your `Gemfile`. If you choose not to make them gems, you can move them into, say, `lib/my_plugin/*` and add an appropriate initializer in `config/initializers/my_plugin.rb`.
|
||||
|
||||
* There are a couple of new configuration changes you'd want to add in `config/environments/development.rb`:
|
||||
|
||||
|
@ -156,7 +156,7 @@ Railties
|
|||
|
||||
will create indexes for `title` and `author` with the latter being a unique index. Some types such as decimal accept custom options. In the example, `price` will be a decimal column with precision and scale set to 7 and 2 respectively.
|
||||
|
||||
* Turn gem has been removed from default Gemfile.
|
||||
* Turn gem has been removed from default `Gemfile`.
|
||||
|
||||
* Remove old plugin generator `rails generate plugin` in favor of `rails plugin new` command.
|
||||
|
||||
|
|
|
@ -274,7 +274,7 @@ for detailed changes.
|
|||
* The [Spring application
|
||||
preloader](https://github.com/rails/spring) is now installed
|
||||
by default for new applications. It uses the development group of
|
||||
the Gemfile, so will not be installed in
|
||||
the `Gemfile`, so will not be installed in
|
||||
production. ([Pull Request](https://github.com/rails/rails/pull/12958))
|
||||
|
||||
* `BACKTRACE` environment variable to show unfiltered backtraces for test
|
||||
|
|
|
@ -368,7 +368,7 @@ Please refer to the [Changelog][railties] for detailed changes.
|
|||
|
||||
### Notable changes
|
||||
|
||||
* Introduced `web-console` in the default application Gemfile.
|
||||
* Introduced `web-console` in the default application `Gemfile`.
|
||||
([Pull Request](https://github.com/rails/rails/pull/11667))
|
||||
|
||||
* Added a `required` option to the model generator for associations.
|
||||
|
|
|
@ -149,10 +149,10 @@ end
|
|||
|
||||
#### Jbuilder
|
||||
[Jbuilder](https://github.com/rails/jbuilder) is a gem that's
|
||||
maintained by the Rails team and included in the default Rails Gemfile.
|
||||
maintained by the Rails team and included in the default Rails `Gemfile`.
|
||||
It's similar to Builder, but is used to generate JSON, instead of XML.
|
||||
|
||||
If you don't have it, you can add the following to your Gemfile:
|
||||
If you don't have it, you can add the following to your `Gemfile`:
|
||||
|
||||
```ruby
|
||||
gem 'jbuilder'
|
||||
|
|
|
@ -35,7 +35,7 @@ rails new appname --skip-sprockets
|
|||
```
|
||||
|
||||
Rails automatically adds the `sass-rails`, `coffee-rails` and `uglifier`
|
||||
gems to your Gemfile, which are used by Sprockets for asset compression:
|
||||
gems to your `Gemfile`, which are used by Sprockets for asset compression:
|
||||
|
||||
```ruby
|
||||
gem 'sass-rails'
|
||||
|
@ -44,8 +44,8 @@ gem 'coffee-rails'
|
|||
```
|
||||
|
||||
Using the `--skip-sprockets` option will prevent Rails from adding
|
||||
them to your Gemfile, so if you later want to enable
|
||||
the asset pipeline you will have to add those gems to your Gemfile. Also,
|
||||
them to your `Gemfile`, so if you later want to enable
|
||||
the asset pipeline you will have to add those gems to your `Gemfile`. Also,
|
||||
creating an application with the `--skip-sprockets` option will generate
|
||||
a slightly different `config/application.rb` file, with a require statement
|
||||
for the sprockets railtie that is commented-out. You will have to remove
|
||||
|
@ -850,7 +850,7 @@ This mode uses more memory, performs more poorly than the default and is not
|
|||
recommended.
|
||||
|
||||
If you are deploying a production application to a system without any
|
||||
pre-existing JavaScript runtimes, you may want to add one to your Gemfile:
|
||||
pre-existing JavaScript runtimes, you may want to add one to your `Gemfile`:
|
||||
|
||||
```ruby
|
||||
group :production do
|
||||
|
|
|
@ -32,7 +32,7 @@ Basic Caching
|
|||
This is an introduction to three types of caching techniques: page, action and
|
||||
fragment caching. By default Rails provides fragment caching. In order to use
|
||||
page and action caching you will need to add `actionpack-page_caching` and
|
||||
`actionpack-action_caching` to your Gemfile.
|
||||
`actionpack-action_caching` to your `Gemfile`.
|
||||
|
||||
By default, caching is only enabled in your production environment. To play
|
||||
around with caching locally you'll want to enable caching in your local
|
||||
|
|
|
@ -977,7 +977,7 @@ en:
|
|||
```
|
||||
|
||||
NOTE: In order to use this helper, you need to install [DynamicForm](https://github.com/joelmoss/dynamic_form)
|
||||
gem by adding this line to your Gemfile: `gem 'dynamic_form'`.
|
||||
gem by adding this line to your `Gemfile`: `gem 'dynamic_form'`.
|
||||
|
||||
### Translations for Action Mailer E-Mail Subjects
|
||||
|
||||
|
|
|
@ -93,7 +93,7 @@ require 'bundler/setup' # Set up gems listed in the Gemfile.
|
|||
|
||||
In a standard Rails application, there's a `Gemfile` which declares all
|
||||
dependencies of the application. `config/boot.rb` sets
|
||||
`ENV['BUNDLE_GEMFILE']` to the location of this file. If the Gemfile
|
||||
`ENV['BUNDLE_GEMFILE']` to the location of this file. If the `Gemfile`
|
||||
exists, then `bundler/setup` is required. The require is used by Bundler to
|
||||
configure the load path for your Gemfile's dependencies.
|
||||
|
||||
|
|
|
@ -645,7 +645,7 @@ system tests should live.
|
|||
|
||||
If you want to change the default settings you can change what the system
|
||||
tests are "driven by". Say you want to change the driver from Selenium to
|
||||
Poltergeist. First add the `poltergeist` gem to your Gemfile. Then in your
|
||||
Poltergeist. First add the `poltergeist` gem to your `Gemfile`. Then in your
|
||||
`application_system_test_case.rb` file do the following:
|
||||
|
||||
```ruby
|
||||
|
|
|
@ -45,7 +45,7 @@ TIP: Ruby 1.8.7 p248 and p249 have marshaling bugs that crash Rails. Ruby Enterp
|
|||
### The Update Task
|
||||
|
||||
Rails provides the `app:update` task (`rake rails:update` on 4.2 and earlier). After updating the Rails version
|
||||
in the Gemfile, run this task.
|
||||
in the `Gemfile`, run this task.
|
||||
This will help you with the creation of new files and changes of old files in an
|
||||
interactive session.
|
||||
|
||||
|
@ -179,7 +179,7 @@ See [#19034](https://github.com/rails/rails/pull/19034) for more details.
|
|||
|
||||
`assigns` and `assert_template` have been extracted to the `rails-controller-testing` gem. To
|
||||
continue using these methods in your controller tests, add `gem 'rails-controller-testing'` to
|
||||
your Gemfile.
|
||||
your `Gemfile`.
|
||||
|
||||
If you are using Rspec for testing, please see the extra configuration required in the gem's
|
||||
documentation.
|
||||
|
@ -212,7 +212,7 @@ true.
|
|||
|
||||
`ActiveModel::Serializers::Xml` has been extracted from Rails to the `activemodel-serializers-xml`
|
||||
gem. To continue using XML serialization in your application, add `gem 'activemodel-serializers-xml'`
|
||||
to your Gemfile.
|
||||
to your `Gemfile`.
|
||||
|
||||
### Removed Support for Legacy `mysql` Database Adapter
|
||||
|
||||
|
@ -278,7 +278,7 @@ You can now just call the dependency once with a wildcard.
|
|||
|
||||
### `ActionView::Helpers::RecordTagHelper` moved to external gem (record_tag_helper)
|
||||
|
||||
`content_tag_for` and `div_for` have been removed in favor of just using `content_tag`. To continue using the older methods, add the `record_tag_helper` gem to your Gemfile:
|
||||
`content_tag_for` and `div_for` have been removed in favor of just using `content_tag`. To continue using the older methods, add the `record_tag_helper` gem to your `Gemfile`:
|
||||
|
||||
```ruby
|
||||
gem 'record_tag_helper', '~> 1.0'
|
||||
|
@ -415,7 +415,7 @@ First, add `gem 'web-console', '~> 2.0'` to the `:development` group in your `Ge
|
|||
|
||||
### Responders
|
||||
|
||||
`respond_with` and the class-level `respond_to` methods have been extracted to the `responders` gem. To use them, simply add `gem 'responders', '~> 2.0'` to your Gemfile. Calls to `respond_with` and `respond_to` (again, at the class level) will no longer work without having included the `responders` gem in your dependencies:
|
||||
`respond_with` and the class-level `respond_to` methods have been extracted to the `responders` gem. To use them, simply add `gem 'responders', '~> 2.0'` to your `Gemfile`. Calls to `respond_with` and `respond_to` (again, at the class level) will no longer work without having included the `responders` gem in your dependencies:
|
||||
|
||||
```ruby
|
||||
# app/controllers/users_controller.rb
|
||||
|
@ -559,7 +559,7 @@ Read the [gem's readme](https://github.com/rails/rails-html-sanitizer) for more
|
|||
The documentation for `PermitScrubber` and `TargetScrubber` explains how you
|
||||
can gain complete control over when and how elements should be stripped.
|
||||
|
||||
If your application needs to use the old sanitizer implementation, include `rails-deprecated_sanitizer` in your Gemfile:
|
||||
If your application needs to use the old sanitizer implementation, include `rails-deprecated_sanitizer` in your `Gemfile`:
|
||||
|
||||
```ruby
|
||||
gem 'rails-deprecated_sanitizer'
|
||||
|
@ -617,7 +617,7 @@ migration DSL counterpart.
|
|||
|
||||
The migration procedure is as follows:
|
||||
|
||||
1. remove `gem "foreigner"` from the Gemfile.
|
||||
1. remove `gem "foreigner"` from the `Gemfile`.
|
||||
2. run `bundle install`.
|
||||
3. run `bin/rake db:schema:dump`.
|
||||
4. make sure that `db/schema.rb` contains every foreign key definition with
|
||||
|
@ -769,7 +769,7 @@ and has been removed from Rails.
|
|||
|
||||
If your application currently depends on MultiJSON directly, you have a few options:
|
||||
|
||||
1. Add 'multi_json' to your Gemfile. Note that this might cease to work in the future
|
||||
1. Add 'multi_json' to your `Gemfile`. Note that this might cease to work in the future
|
||||
|
||||
2. Migrate away from MultiJSON by using `obj.to_json`, and `JSON.parse(str)` instead.
|
||||
|
||||
|
@ -810,7 +810,7 @@ part of the rewrite, the following features have been removed from the encoder:
|
|||
|
||||
If your application depends on one of these features, you can get them back by
|
||||
adding the [`activesupport-json_encoder`](https://github.com/rails/activesupport-json_encoder)
|
||||
gem to your Gemfile.
|
||||
gem to your `Gemfile`.
|
||||
|
||||
#### JSON representation of Time objects
|
||||
|
||||
|
@ -1135,7 +1135,7 @@ full support for the last few changes in the specification.
|
|||
|
||||
### Gemfile
|
||||
|
||||
Rails 4.0 removed the `assets` group from Gemfile. You'd need to remove that
|
||||
Rails 4.0 removed the `assets` group from `Gemfile`. You'd need to remove that
|
||||
line from your `Gemfile` when upgrading. You should also update your application
|
||||
file (in `config/application.rb`):
|
||||
|
||||
|
@ -1147,7 +1147,7 @@ Bundler.require(*Rails.groups)
|
|||
|
||||
### vendor/plugins
|
||||
|
||||
Rails 4.0 no longer supports loading plugins from `vendor/plugins`. You must replace any plugins by extracting them to gems and adding them to your Gemfile. If you choose not to make them gems, you can move them into, say, `lib/my_plugin/*` and add an appropriate initializer in `config/initializers/my_plugin.rb`.
|
||||
Rails 4.0 no longer supports loading plugins from `vendor/plugins`. You must replace any plugins by extracting them to gems and adding them to your `Gemfile`. If you choose not to make them gems, you can move them into, say, `lib/my_plugin/*` and add an appropriate initializer in `config/initializers/my_plugin.rb`.
|
||||
|
||||
### Active Record
|
||||
|
||||
|
@ -1214,7 +1214,7 @@ end
|
|||
|
||||
### Active Resource
|
||||
|
||||
Rails 4.0 extracted Active Resource to its own gem. If you still need the feature you can add the [Active Resource gem](https://github.com/rails/activeresource) in your Gemfile.
|
||||
Rails 4.0 extracted Active Resource to its own gem. If you still need the feature you can add the [Active Resource gem](https://github.com/rails/activeresource) in your `Gemfile`.
|
||||
|
||||
### Active Model
|
||||
|
||||
|
@ -1414,7 +1414,7 @@ config.active_record.mass_assignment_sanitizer = :strict
|
|||
|
||||
### vendor/plugins
|
||||
|
||||
Rails 3.2 deprecates `vendor/plugins` and Rails 4.0 will remove them completely. While it's not strictly necessary as part of a Rails 3.2 upgrade, you can start replacing any plugins by extracting them to gems and adding them to your Gemfile. If you choose not to make them gems, you can move them into, say, `lib/my_plugin/*` and add an appropriate initializer in `config/initializers/my_plugin.rb`.
|
||||
Rails 3.2 deprecates `vendor/plugins` and Rails 4.0 will remove them completely. While it's not strictly necessary as part of a Rails 3.2 upgrade, you can start replacing any plugins by extracting them to gems and adding them to your `Gemfile`. If you choose not to make them gems, you can move them into, say, `lib/my_plugin/*` and add an appropriate initializer in `config/initializers/my_plugin.rb`.
|
||||
|
||||
### Active Record
|
||||
|
||||
|
|
|
@ -492,7 +492,7 @@ replace the entire `<body>` of the page with the `<body>` of the response. It
|
|||
will then use PushState to change the URL to the correct one, preserving
|
||||
refresh semantics and giving you pretty URLs.
|
||||
|
||||
The only thing you have to do to enable Turbolinks is have it in your Gemfile,
|
||||
The only thing you have to do to enable Turbolinks is have it in your `Gemfile`,
|
||||
and put `//= require turbolinks` in your JavaScript manifest, which is usually
|
||||
`app/assets/javascripts/application.js`.
|
||||
|
||||
|
|
Loading…
Reference in a new issue