rails 4.2.0.beta4 → 4.2.0.rc1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (230) hide show
  1. checksums.yaml +4 -4
  2. data/guides/Rakefile +3 -1
  3. data/guides/bug_report_templates/action_controller_gem.rb +2 -2
  4. data/guides/bug_report_templates/action_controller_master.rb +2 -2
  5. data/guides/source/3_0_release_notes.md +2 -2
  6. data/guides/source/4_1_release_notes.md +1 -1
  7. data/guides/source/4_2_release_notes.md +250 -225
  8. data/guides/source/_welcome.html.erb +1 -1
  9. data/guides/source/action_controller_overview.md +6 -6
  10. data/guides/source/action_mailer_basics.md +26 -11
  11. data/guides/source/action_view_overview.md +0 -1
  12. data/guides/source/active_job_basics.md +29 -23
  13. data/guides/source/active_record_postgresql.md +2 -7
  14. data/guides/source/active_record_validations.md +1 -0
  15. data/guides/source/active_support_core_extensions.md +1 -1
  16. data/guides/source/active_support_instrumentation.md +5 -5
  17. data/guides/source/asset_pipeline.md +2 -2
  18. data/guides/source/association_basics.md +0 -2
  19. data/guides/source/command_line.md +6 -15
  20. data/guides/source/configuring.md +4 -4
  21. data/guides/source/documents.yaml +0 -1
  22. data/guides/source/engines.md +26 -15
  23. data/guides/source/form_helpers.md +10 -2
  24. data/guides/source/getting_started.md +9 -9
  25. data/guides/source/rails_on_rack.md +2 -2
  26. data/guides/source/ruby_on_rails_guides_guidelines.md +1 -0
  27. data/guides/source/security.md +1 -1
  28. data/guides/source/testing.md +80 -13
  29. data/guides/source/upgrading_ruby_on_rails.md +23 -20
  30. metadata +29 -229
  31. data/guides/output/2_2_release_notes.html +0 -724
  32. data/guides/output/2_3_release_notes.html +0 -870
  33. data/guides/output/3_0_release_notes.html +0 -773
  34. data/guides/output/3_1_release_notes.html +0 -740
  35. data/guides/output/3_2_release_notes.html +0 -797
  36. data/guides/output/4_0_release_notes.html +0 -523
  37. data/guides/output/4_1_release_notes.html +0 -806
  38. data/guides/output/4_2_release_notes.html +0 -728
  39. data/guides/output/Gemfile +0 -6
  40. data/guides/output/_license.html +0 -226
  41. data/guides/output/_welcome.html +0 -233
  42. data/guides/output/action_controller_overview.html +0 -1335
  43. data/guides/output/action_mailer_basics.html +0 -928
  44. data/guides/output/action_view_overview.html +0 -1509
  45. data/guides/output/active_job_basics.html +0 -546
  46. data/guides/output/active_model_basics.html +0 -438
  47. data/guides/output/active_record_basics.html +0 -594
  48. data/guides/output/active_record_callbacks.html +0 -592
  49. data/guides/output/active_record_migrations.html +0 -1123
  50. data/guides/output/active_record_postgresql.html +0 -675
  51. data/guides/output/active_record_querying.html +0 -1796
  52. data/guides/output/active_record_validations.html +0 -1301
  53. data/guides/output/active_support_core_extensions.html +0 -3450
  54. data/guides/output/active_support_instrumentation.html +0 -1121
  55. data/guides/output/api_documentation_guidelines.html +0 -498
  56. data/guides/output/asset_pipeline.html +0 -1167
  57. data/guides/output/association_basics.html +0 -2086
  58. data/guides/output/caching_with_rails.html +0 -553
  59. data/guides/output/command_line.html +0 -791
  60. data/guides/output/configuring.html +0 -1055
  61. data/guides/output/contributing_to_ruby_on_rails.html +0 -657
  62. data/guides/output/credits.html +0 -284
  63. data/guides/output/debugging_rails_applications.html +0 -1014
  64. data/guides/output/development_dependencies_install.html +0 -478
  65. data/guides/output/engines.html +0 -1438
  66. data/guides/output/form_helpers.html +0 -1074
  67. data/guides/output/generators.html +0 -838
  68. data/guides/output/getting_started.html +0 -2092
  69. data/guides/output/i18n.html +0 -1198
  70. data/guides/output/images/akshaysurve.jpg +0 -0
  71. data/guides/output/images/belongs_to.png +0 -0
  72. data/guides/output/images/book_icon.gif +0 -0
  73. data/guides/output/images/bullet.gif +0 -0
  74. data/guides/output/images/chapters_icon.gif +0 -0
  75. data/guides/output/images/check_bullet.gif +0 -0
  76. data/guides/output/images/credits_pic_blank.gif +0 -0
  77. data/guides/output/images/csrf.png +0 -0
  78. data/guides/output/images/edge_badge.png +0 -0
  79. data/guides/output/images/favicon.ico +0 -0
  80. data/guides/output/images/feature_tile.gif +0 -0
  81. data/guides/output/images/footer_tile.gif +0 -0
  82. data/guides/output/images/fxn.png +0 -0
  83. data/guides/output/images/getting_started/article_with_comments.png +0 -0
  84. data/guides/output/images/getting_started/challenge.png +0 -0
  85. data/guides/output/images/getting_started/confirm_dialog.png +0 -0
  86. data/guides/output/images/getting_started/forbidden_attributes_for_new_article.png +0 -0
  87. data/guides/output/images/getting_started/forbidden_attributes_for_new_post.png +0 -0
  88. data/guides/output/images/getting_started/form_with_errors.png +0 -0
  89. data/guides/output/images/getting_started/index_action_with_edit_link.png +0 -0
  90. data/guides/output/images/getting_started/new_article.png +0 -0
  91. data/guides/output/images/getting_started/new_post.png +0 -0
  92. data/guides/output/images/getting_started/post_with_comments.png +0 -0
  93. data/guides/output/images/getting_started/rails_welcome.png +0 -0
  94. data/guides/output/images/getting_started/routing_error_no_controller.png +0 -0
  95. data/guides/output/images/getting_started/routing_error_no_route_matches.png +0 -0
  96. data/guides/output/images/getting_started/show_action_for_articles.png +0 -0
  97. data/guides/output/images/getting_started/show_action_for_posts.png +0 -0
  98. data/guides/output/images/getting_started/template_is_missing_articles_new.png +0 -0
  99. data/guides/output/images/getting_started/template_is_missing_posts_new.png +0 -0
  100. data/guides/output/images/getting_started/undefined_method_post_path.png +0 -0
  101. data/guides/output/images/getting_started/unknown_action_create_for_articles.png +0 -0
  102. data/guides/output/images/getting_started/unknown_action_create_for_posts.png +0 -0
  103. data/guides/output/images/getting_started/unknown_action_new_for_articles.png +0 -0
  104. data/guides/output/images/getting_started/unknown_action_new_for_posts.png +0 -0
  105. data/guides/output/images/grey_bullet.gif +0 -0
  106. data/guides/output/images/habtm.png +0 -0
  107. data/guides/output/images/has_many.png +0 -0
  108. data/guides/output/images/has_many_through.png +0 -0
  109. data/guides/output/images/has_one.png +0 -0
  110. data/guides/output/images/has_one_through.png +0 -0
  111. data/guides/output/images/header_backdrop.png +0 -0
  112. data/guides/output/images/header_tile.gif +0 -0
  113. data/guides/output/images/i18n/demo_html_safe.png +0 -0
  114. data/guides/output/images/i18n/demo_localized_pirate.png +0 -0
  115. data/guides/output/images/i18n/demo_translated_en.png +0 -0
  116. data/guides/output/images/i18n/demo_translated_pirate.png +0 -0
  117. data/guides/output/images/i18n/demo_translation_missing.png +0 -0
  118. data/guides/output/images/i18n/demo_untranslated.png +0 -0
  119. data/guides/output/images/icons/README +0 -5
  120. data/guides/output/images/icons/callouts/1.png +0 -0
  121. data/guides/output/images/icons/callouts/10.png +0 -0
  122. data/guides/output/images/icons/callouts/11.png +0 -0
  123. data/guides/output/images/icons/callouts/12.png +0 -0
  124. data/guides/output/images/icons/callouts/13.png +0 -0
  125. data/guides/output/images/icons/callouts/14.png +0 -0
  126. data/guides/output/images/icons/callouts/15.png +0 -0
  127. data/guides/output/images/icons/callouts/2.png +0 -0
  128. data/guides/output/images/icons/callouts/3.png +0 -0
  129. data/guides/output/images/icons/callouts/4.png +0 -0
  130. data/guides/output/images/icons/callouts/5.png +0 -0
  131. data/guides/output/images/icons/callouts/6.png +0 -0
  132. data/guides/output/images/icons/callouts/7.png +0 -0
  133. data/guides/output/images/icons/callouts/8.png +0 -0
  134. data/guides/output/images/icons/callouts/9.png +0 -0
  135. data/guides/output/images/icons/caution.png +0 -0
  136. data/guides/output/images/icons/example.png +0 -0
  137. data/guides/output/images/icons/home.png +0 -0
  138. data/guides/output/images/icons/important.png +0 -0
  139. data/guides/output/images/icons/next.png +0 -0
  140. data/guides/output/images/icons/note.png +0 -0
  141. data/guides/output/images/icons/prev.png +0 -0
  142. data/guides/output/images/icons/tip.png +0 -0
  143. data/guides/output/images/icons/up.png +0 -0
  144. data/guides/output/images/icons/warning.png +0 -0
  145. data/guides/output/images/nav_arrow.gif +0 -0
  146. data/guides/output/images/oscardelben.jpg +0 -0
  147. data/guides/output/images/polymorphic.png +0 -0
  148. data/guides/output/images/radar.png +0 -0
  149. data/guides/output/images/rails4_features.png +0 -0
  150. data/guides/output/images/rails_guides_kindle_cover.jpg +0 -0
  151. data/guides/output/images/rails_guides_logo.gif +0 -0
  152. data/guides/output/images/rails_logo_remix.gif +0 -0
  153. data/guides/output/images/session_fixation.png +0 -0
  154. data/guides/output/images/tab_grey.gif +0 -0
  155. data/guides/output/images/tab_info.gif +0 -0
  156. data/guides/output/images/tab_note.gif +0 -0
  157. data/guides/output/images/tab_red.gif +0 -0
  158. data/guides/output/images/tab_yellow.gif +0 -0
  159. data/guides/output/images/tab_yellow.png +0 -0
  160. data/guides/output/images/vijaydev.jpg +0 -0
  161. data/guides/output/index.html +0 -354
  162. data/guides/output/initialization.html +0 -876
  163. data/guides/output/javascripts/guides.js +0 -59
  164. data/guides/output/javascripts/jquery.min.js +0 -4
  165. data/guides/output/javascripts/responsive-tables.js +0 -43
  166. data/guides/output/javascripts/syntaxhighlighter/shBrushAS3.js +0 -59
  167. data/guides/output/javascripts/syntaxhighlighter/shBrushAppleScript.js +0 -75
  168. data/guides/output/javascripts/syntaxhighlighter/shBrushBash.js +0 -59
  169. data/guides/output/javascripts/syntaxhighlighter/shBrushCSharp.js +0 -65
  170. data/guides/output/javascripts/syntaxhighlighter/shBrushColdFusion.js +0 -100
  171. data/guides/output/javascripts/syntaxhighlighter/shBrushCpp.js +0 -97
  172. data/guides/output/javascripts/syntaxhighlighter/shBrushCss.js +0 -91
  173. data/guides/output/javascripts/syntaxhighlighter/shBrushDelphi.js +0 -55
  174. data/guides/output/javascripts/syntaxhighlighter/shBrushDiff.js +0 -41
  175. data/guides/output/javascripts/syntaxhighlighter/shBrushErlang.js +0 -52
  176. data/guides/output/javascripts/syntaxhighlighter/shBrushGroovy.js +0 -67
  177. data/guides/output/javascripts/syntaxhighlighter/shBrushJScript.js +0 -52
  178. data/guides/output/javascripts/syntaxhighlighter/shBrushJava.js +0 -57
  179. data/guides/output/javascripts/syntaxhighlighter/shBrushJavaFX.js +0 -58
  180. data/guides/output/javascripts/syntaxhighlighter/shBrushPerl.js +0 -72
  181. data/guides/output/javascripts/syntaxhighlighter/shBrushPhp.js +0 -88
  182. data/guides/output/javascripts/syntaxhighlighter/shBrushPlain.js +0 -33
  183. data/guides/output/javascripts/syntaxhighlighter/shBrushPowerShell.js +0 -74
  184. data/guides/output/javascripts/syntaxhighlighter/shBrushPython.js +0 -64
  185. data/guides/output/javascripts/syntaxhighlighter/shBrushRuby.js +0 -55
  186. data/guides/output/javascripts/syntaxhighlighter/shBrushSass.js +0 -94
  187. data/guides/output/javascripts/syntaxhighlighter/shBrushScala.js +0 -51
  188. data/guides/output/javascripts/syntaxhighlighter/shBrushSql.js +0 -66
  189. data/guides/output/javascripts/syntaxhighlighter/shBrushVb.js +0 -56
  190. data/guides/output/javascripts/syntaxhighlighter/shBrushXml.js +0 -69
  191. data/guides/output/javascripts/syntaxhighlighter/shCore.js +0 -17
  192. data/guides/output/layout.html +0 -448
  193. data/guides/output/layouts_and_rendering.html +0 -1541
  194. data/guides/output/maintenance_policy.html +0 -257
  195. data/guides/output/migrations.html +0 -1360
  196. data/guides/output/nested_model_forms.html +0 -412
  197. data/guides/output/plugins.html +0 -644
  198. data/guides/output/rails_application_templates.html +0 -450
  199. data/guides/output/rails_on_rack.html +0 -547
  200. data/guides/output/routing.html +0 -1631
  201. data/guides/output/ruby_on_rails_guides_guidelines.html +0 -329
  202. data/guides/output/security.html +0 -935
  203. data/guides/output/stylesheets/fixes.css +0 -16
  204. data/guides/output/stylesheets/kindle.css +0 -11
  205. data/guides/output/stylesheets/main.css +0 -713
  206. data/guides/output/stylesheets/print.css +0 -52
  207. data/guides/output/stylesheets/reset.css +0 -43
  208. data/guides/output/stylesheets/responsive-tables.css +0 -50
  209. data/guides/output/stylesheets/style.css +0 -13
  210. data/guides/output/stylesheets/syntaxhighlighter/shCore.css +0 -226
  211. data/guides/output/stylesheets/syntaxhighlighter/shCoreDefault.css +0 -328
  212. data/guides/output/stylesheets/syntaxhighlighter/shCoreDjango.css +0 -331
  213. data/guides/output/stylesheets/syntaxhighlighter/shCoreEclipse.css +0 -339
  214. data/guides/output/stylesheets/syntaxhighlighter/shCoreEmacs.css +0 -324
  215. data/guides/output/stylesheets/syntaxhighlighter/shCoreFadeToGrey.css +0 -328
  216. data/guides/output/stylesheets/syntaxhighlighter/shCoreMDUltra.css +0 -324
  217. data/guides/output/stylesheets/syntaxhighlighter/shCoreMidnight.css +0 -324
  218. data/guides/output/stylesheets/syntaxhighlighter/shCoreRDark.css +0 -324
  219. data/guides/output/stylesheets/syntaxhighlighter/shThemeDefault.css +0 -117
  220. data/guides/output/stylesheets/syntaxhighlighter/shThemeDjango.css +0 -120
  221. data/guides/output/stylesheets/syntaxhighlighter/shThemeEclipse.css +0 -128
  222. data/guides/output/stylesheets/syntaxhighlighter/shThemeEmacs.css +0 -113
  223. data/guides/output/stylesheets/syntaxhighlighter/shThemeFadeToGrey.css +0 -117
  224. data/guides/output/stylesheets/syntaxhighlighter/shThemeMDUltra.css +0 -113
  225. data/guides/output/stylesheets/syntaxhighlighter/shThemeMidnight.css +0 -113
  226. data/guides/output/stylesheets/syntaxhighlighter/shThemeRDark.css +0 -113
  227. data/guides/output/stylesheets/syntaxhighlighter/shThemeRailsGuides.css +0 -116
  228. data/guides/output/testing.html +0 -1350
  229. data/guides/output/upgrading_ruby_on_rails.html +0 -1135
  230. data/guides/output/working_with_javascript_in_rails.html +0 -587
@@ -1,478 +0,0 @@
1
- <!DOCTYPE html>
2
-
3
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4
- <head>
5
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
6
- <meta name="viewport" content="width=device-width, initial-scale=1"/>
7
-
8
- <title>Development Dependencies Install — Ruby on Rails Guides</title>
9
- <link rel="stylesheet" type="text/css" href="stylesheets/style.css" />
10
- <link rel="stylesheet" type="text/css" href="stylesheets/print.css" media="print" />
11
-
12
- <link rel="stylesheet" type="text/css" href="stylesheets/syntaxhighlighter/shCore.css" />
13
- <link rel="stylesheet" type="text/css" href="stylesheets/syntaxhighlighter/shThemeRailsGuides.css" />
14
-
15
- <link rel="stylesheet" type="text/css" href="stylesheets/fixes.css" />
16
-
17
- <link href="images/favicon.ico" rel="shortcut icon" type="image/x-icon" />
18
- </head>
19
- <body class="guide">
20
- <div id="topNav">
21
- <div class="wrapper">
22
- <strong class="more-info-label">More at <a href="http://rubyonrails.org/">rubyonrails.org:</a> </strong>
23
- <span class="red-button more-info-button">
24
- More Ruby on Rails
25
- </span>
26
- <ul class="more-info-links s-hidden">
27
- <li class="more-info"><a href="http://rubyonrails.org/">Overview</a></li>
28
- <li class="more-info"><a href="http://rubyonrails.org/download">Download</a></li>
29
- <li class="more-info"><a href="http://rubyonrails.org/deploy">Deploy</a></li>
30
- <li class="more-info"><a href="https://github.com/rails/rails">Code</a></li>
31
- <li class="more-info"><a href="http://rubyonrails.org/screencasts">Screencasts</a></li>
32
- <li class="more-info"><a href="http://rubyonrails.org/documentation">Documentation</a></li>
33
- <li class="more-info"><a href="http://rubyonrails.org/community">Community</a></li>
34
- <li class="more-info"><a href="http://weblog.rubyonrails.org/">Blog</a></li>
35
- </ul>
36
- </div>
37
- </div>
38
- <div id="header">
39
- <div class="wrapper clearfix">
40
- <h1><a href="index.html" title="Return to home page">Guides.rubyonrails.org</a></h1>
41
- <ul class="nav">
42
- <li><a class="nav-item" href="index.html">Home</a></li>
43
- <li class="guides-index guides-index-large">
44
- <a href="index.html" id="guidesMenu" class="guides-index-item nav-item">Guides Index</a>
45
- <div id="guides" class="clearfix" style="display: none;">
46
- <hr />
47
- <dl class="L">
48
- <dt>Start Here</dt>
49
- <dd><a href="getting_started.html">Getting Started with Rails</a></dd>
50
- <dt>Models</dt>
51
- <dd><a href="active_record_basics.html">Active Record Basics</a></dd>
52
- <dd><a href="active_record_migrations.html">Active Record Migrations</a></dd>
53
- <dd><a href="active_record_validations.html">Active Record Validations</a></dd>
54
- <dd><a href="active_record_callbacks.html">Active Record Callbacks</a></dd>
55
- <dd><a href="association_basics.html">Active Record Associations</a></dd>
56
- <dd><a href="active_record_querying.html">Active Record Query Interface</a></dd>
57
- <dt>Views</dt>
58
- <dd><a href="layouts_and_rendering.html">Layouts and Rendering in Rails</a></dd>
59
- <dd><a href="form_helpers.html">Action View Form Helpers</a></dd>
60
- <dt>Controllers</dt>
61
- <dd><a href="action_controller_overview.html">Action Controller Overview</a></dd>
62
- <dd><a href="routing.html">Rails Routing from the Outside In</a></dd>
63
- </dl>
64
- <dl class="R">
65
- <dt>Digging Deeper</dt>
66
- <dd><a href="active_support_core_extensions.html">Active Support Core Extensions</a></dd>
67
- <dd><a href="i18n.html">Rails Internationalization API</a></dd>
68
- <dd><a href="action_mailer_basics.html">Action Mailer Basics</a></dd>
69
- <dd><a href="active_job_basics.html">Active Job Basics</a></dd>
70
- <dd><a href="security.html">Securing Rails Applications</a></dd>
71
- <dd><a href="debugging_rails_applications.html">Debugging Rails Applications</a></dd>
72
- <dd><a href="configuring.html">Configuring Rails Applications</a></dd>
73
- <dd><a href="command_line.html">Rails Command Line Tools and Rake Tasks</a></dd>
74
- <dd><a href="asset_pipeline.html">Asset Pipeline</a></dd>
75
- <dd><a href="working_with_javascript_in_rails.html">Working with JavaScript in Rails</a></dd>
76
- <dt>Extending Rails</dt>
77
- <dd><a href="rails_on_rack.html">Rails on Rack</a></dd>
78
- <dd><a href="generators.html">Creating and Customizing Rails Generators</a></dd>
79
- <dt>Contributing to Ruby on Rails</dt>
80
- <dd><a href="contributing_to_ruby_on_rails.html">Contributing to Ruby on Rails</a></dd>
81
- <dd><a href="api_documentation_guidelines.html">API Documentation Guidelines</a></dd>
82
- <dd><a href="ruby_on_rails_guides_guidelines.html">Ruby on Rails Guides Guidelines</a></dd>
83
- <dt>Maintenance Policy</dt>
84
- <dd><a href="maintenance_policy.html">Maintenance Policy</a></dd>
85
- <dt>Release Notes</dt>
86
- <dd><a href="upgrading_ruby_on_rails.html">Upgrading Ruby on Rails</a></dd>
87
- <dd><a href="4_1_release_notes.html">Ruby on Rails 4.1 Release Notes</a></dd>
88
- <dd><a href="4_0_release_notes.html">Ruby on Rails 4.0 Release Notes</a></dd>
89
- <dd><a href="3_2_release_notes.html">Ruby on Rails 3.2 Release Notes</a></dd>
90
- <dd><a href="3_1_release_notes.html">Ruby on Rails 3.1 Release Notes</a></dd>
91
- <dd><a href="3_0_release_notes.html">Ruby on Rails 3.0 Release Notes</a></dd>
92
- <dd><a href="2_3_release_notes.html">Ruby on Rails 2.3 Release Notes</a></dd>
93
- <dd><a href="2_2_release_notes.html">Ruby on Rails 2.2 Release Notes</a></dd>
94
- </dl>
95
- </div>
96
- </li>
97
- <li><a class="nav-item" href="contributing_to_ruby_on_rails.html">Contribute</a></li>
98
- <li><a class="nav-item" href="credits.html">Credits</a></li>
99
- <li class="guides-index guides-index-small">
100
- <select class="guides-index-item nav-item">
101
- <option value="index.html">Guides Index</option>
102
- <optgroup label="Start Here">
103
- <option value="getting_started.html">Getting Started with Rails</option>
104
- </optgroup>
105
- <optgroup label="Models">
106
- <option value="active_record_basics.html">Active Record Basics</option>
107
- <option value="active_record_migrations.html">Active Record Migrations</option>
108
- <option value="active_record_validations.html">Active Record Validations</option>
109
- <option value="active_record_callbacks.html">Active Record Callbacks</option>
110
- <option value="association_basics.html">Active Record Associations</option>
111
- <option value="active_record_querying.html">Active Record Query Interface</option>
112
- </optgroup>
113
- <optgroup label="Views">
114
- <option value="layouts_and_rendering.html">Layouts and Rendering in Rails</option>
115
- <option value="form_helpers.html">Action View Form Helpers</option>
116
- </optgroup>
117
- <optgroup label="Controllers">
118
- <option value="action_controller_overview.html">Action Controller Overview</option>
119
- <option value="routing.html">Rails Routing from the Outside In</option>
120
- </optgroup>
121
- <optgroup label="Digging Deeper">
122
- <option value="active_support_core_extensions.html">Active Support Core Extensions</option>
123
- <option value="i18n.html">Rails Internationalization API</option>
124
- <option value="action_mailer_basics.html">Action Mailer Basics</option>
125
- <option value="active_job_basics.html">Active Job Basics</option>
126
- <option value="security.html">Securing Rails Applications</option>
127
- <option value="debugging_rails_applications.html">Debugging Rails Applications</option>
128
- <option value="configuring.html">Configuring Rails Applications</option>
129
- <option value="command_line.html">Rails Command Line Tools and Rake Tasks</option>
130
- <option value="asset_pipeline.html">Asset Pipeline</option>
131
- <option value="working_with_javascript_in_rails.html">Working with JavaScript in Rails</option>
132
- </optgroup>
133
- <optgroup label="Extending Rails">
134
- <option value="rails_on_rack.html">Rails on Rack</option>
135
- <option value="generators.html">Creating and Customizing Rails Generators</option>
136
- </optgroup>
137
- <optgroup label="Contributing to Ruby on Rails">
138
- <option value="contributing_to_ruby_on_rails.html">Contributing to Ruby on Rails</option>
139
- <option value="api_documentation_guidelines.html">API Documentation Guidelines</option>
140
- <option value="ruby_on_rails_guides_guidelines.html">Ruby on Rails Guides Guidelines</option>
141
- </optgroup>
142
- <optgroup label="Maintenance Policy">
143
- <option value="maintenance_policy.html">Maintenance Policy</option>
144
- </optgroup>
145
- <optgroup label="Release Notes">
146
- <option value="upgrading_ruby_on_rails.html">Upgrading Ruby on Rails</option>
147
- <option value="4_1_release_notes.html">Ruby on Rails 4.1 Release Notes</option>
148
- <option value="4_0_release_notes.html">Ruby on Rails 4.0 Release Notes</option>
149
- <option value="3_2_release_notes.html">Ruby on Rails 3.2 Release Notes</option>
150
- <option value="3_1_release_notes.html">Ruby on Rails 3.1 Release Notes</option>
151
- <option value="3_0_release_notes.html">Ruby on Rails 3.0 Release Notes</option>
152
- <option value="2_3_release_notes.html">Ruby on Rails 2.3 Release Notes</option>
153
- <option value="2_2_release_notes.html">Ruby on Rails 2.2 Release Notes</option>
154
- </optgroup>
155
- </select>
156
- </li>
157
- </ul>
158
- </div>
159
- </div>
160
- <hr class="hide" />
161
-
162
- <div id="feature">
163
- <div class="wrapper">
164
- <h2>Development Dependencies Install</h2><p>This guide covers how to setup an environment for Ruby on Rails core development.</p><p>After reading this guide, you will know:</p>
165
- <ul>
166
- <li>How to set up your machine for Rails development</li>
167
- <li>How to run specific groups of unit tests from the Rails test suite</li>
168
- <li>How the ActiveRecord portion of the Rails test suite operates</li>
169
- </ul>
170
-
171
-
172
- <div id="subCol">
173
- <h3 class="chapter"><img src="images/chapters_icon.gif" alt="" />Chapters</h3>
174
- <ol class="chapters">
175
- <li><a href="#the-easy-way">The Easy Way</a></li>
176
- <li>
177
- <a href="#the-hard-way">The Hard Way</a>
178
-
179
- <ul>
180
- <li><a href="#install-git">Install Git</a></li>
181
- <li><a href="#clone-the-ruby-on-rails-repository">Clone the Ruby on Rails Repository</a></li>
182
- <li><a href="#set-up-and-run-the-tests">Set up and Run the Tests</a></li>
183
- <li><a href="#active-record-setup">Active Record Setup</a></li>
184
- </ul>
185
- </li>
186
- </ol>
187
-
188
- </div>
189
-
190
- </div>
191
- </div>
192
-
193
- <div id="container">
194
- <div class="wrapper">
195
- <div id="mainCol">
196
- <h3 id="the-easy-way">1 The Easy Way</h3><p>The easiest and recommended way to get a development environment ready to hack is to use the <a href="https://github.com/rails/rails-dev-box">Rails development box</a>.</p><h3 id="the-hard-way">2 The Hard Way</h3><p>In case you can't use the Rails development box, see section above, these are the steps to manually build a development box for Ruby on Rails core development.</p><h4 id="install-git">2.1 Install Git</h4><p>Ruby on Rails uses Git for source code control. The <a href="http://git-scm.com/">Git homepage</a> has installation instructions. There are a variety of resources on the net that will help you get familiar with Git:</p>
197
- <ul>
198
- <li>
199
- <a href="http://try.github.io/">Try Git course</a> is an interactive course that will teach you the basics.</li>
200
- <li>The <a href="http://git-scm.com/documentation">official Documentation</a> is pretty comprehensive and also contains some videos with the basics of Git</li>
201
- <li>
202
- <a href="http://schacon.github.io/git/everyday.html">Everyday Git</a> will teach you just enough about Git to get by.</li>
203
- <li>The <a href="https://peepcode.com/products/git">PeepCode screencast</a> on Git is easier to follow.</li>
204
- <li>
205
- <a href="http://help.github.com">GitHub</a> offers links to a variety of Git resources.</li>
206
- <li>
207
- <a href="http://git-scm.com/book">Pro Git</a> is an entire book about Git with a Creative Commons license.</li>
208
- </ul>
209
- <h4 id="clone-the-ruby-on-rails-repository">2.2 Clone the Ruby on Rails Repository</h4><p>Navigate to the folder where you want the Ruby on Rails source code (it will create its own <code>rails</code> subdirectory) and run:</p><div class="code_container">
210
- <pre class="brush: plain; gutter: false; toolbar: false">
211
- $ git clone git://github.com/rails/rails.git
212
- $ cd rails
213
-
214
- </pre>
215
- </div>
216
- <h4 id="set-up-and-run-the-tests">2.3 Set up and Run the Tests</h4><p>The test suite must pass with any submitted code. No matter whether you are writing a new patch, or evaluating someone else's, you need to be able to run the tests.</p><p>Install first libxml2 and libxslt together with their development files for Nokogiri. In Ubuntu that's</p><div class="code_container">
217
- <pre class="brush: plain; gutter: false; toolbar: false">
218
- $ sudo apt-get install libxml2 libxml2-dev libxslt1-dev
219
-
220
- </pre>
221
- </div>
222
- <p>If you are on Fedora or CentOS, you can run</p><div class="code_container">
223
- <pre class="brush: plain; gutter: false; toolbar: false">
224
- $ sudo yum install libxml2 libxml2-devel libxslt libxslt-devel
225
-
226
- </pre>
227
- </div>
228
- <p>If you are running Arch Linux, you're done with:</p><div class="code_container">
229
- <pre class="brush: plain; gutter: false; toolbar: false">
230
- $ sudo pacman -S libxml2 libxslt
231
-
232
- </pre>
233
- </div>
234
- <p>On FreeBSD, you just have to run:</p><div class="code_container">
235
- <pre class="brush: plain; gutter: false; toolbar: false">
236
- # pkg_add -r libxml2 libxslt
237
-
238
- </pre>
239
- </div>
240
- <p>Alternatively, you can install the <code>textproc/libxml2</code> and <code>textproc/libxslt</code>
241
- ports.</p><p>If you have any problems with these libraries, you can install them manually by compiling the source code. Just follow the instructions at the <a href="http://nokogiri.org/tutorials/installing_nokogiri.html#red_hat__centos">Red Hat/CentOS section of the Nokogiri tutorials</a> .</p><p>Also, SQLite3 and its development files for the <code>sqlite3-ruby</code> gem - in Ubuntu you're done with just</p><div class="code_container">
242
- <pre class="brush: plain; gutter: false; toolbar: false">
243
- $ sudo apt-get install sqlite3 libsqlite3-dev
244
-
245
- </pre>
246
- </div>
247
- <p>And if you are on Fedora or CentOS, you're done with</p><div class="code_container">
248
- <pre class="brush: plain; gutter: false; toolbar: false">
249
- $ sudo yum install sqlite3 sqlite3-devel
250
-
251
- </pre>
252
- </div>
253
- <p>If you are on Arch Linux, you will need to run:</p><div class="code_container">
254
- <pre class="brush: plain; gutter: false; toolbar: false">
255
- $ sudo pacman -S sqlite
256
-
257
- </pre>
258
- </div>
259
- <p>For FreeBSD users, you're done with:</p><div class="code_container">
260
- <pre class="brush: plain; gutter: false; toolbar: false">
261
- # pkg_add -r sqlite3
262
-
263
- </pre>
264
- </div>
265
- <p>Or compile the <code>databases/sqlite3</code> port.</p><p>Get a recent version of <a href="http://bundler.io/">Bundler</a></p><div class="code_container">
266
- <pre class="brush: plain; gutter: false; toolbar: false">
267
- $ gem install bundler
268
- $ gem update bundler
269
-
270
- </pre>
271
- </div>
272
- <p>and run:</p><div class="code_container">
273
- <pre class="brush: plain; gutter: false; toolbar: false">
274
- $ bundle install --without db
275
-
276
- </pre>
277
- </div>
278
- <p>This command will install all dependencies except the MySQL and PostgreSQL Ruby drivers. We will come back to these soon.</p><div class="note"><p>If you would like to run the tests that use memcached, you need to ensure that you have it installed and running.</p></div><p>You can use <a href="http://brew.sh/">Homebrew</a> to install memcached on OSX:</p><div class="code_container">
279
- <pre class="brush: plain; gutter: false; toolbar: false">
280
- $ brew install memcached
281
-
282
- </pre>
283
- </div>
284
- <p>On Ubuntu you can install it with apt-get:</p><div class="code_container">
285
- <pre class="brush: plain; gutter: false; toolbar: false">
286
- $ sudo apt-get install memcached
287
-
288
- </pre>
289
- </div>
290
- <p>Or use yum on Fedora or CentOS:</p><div class="code_container">
291
- <pre class="brush: plain; gutter: false; toolbar: false">
292
- $ sudo yum install memcached
293
-
294
- </pre>
295
- </div>
296
- <p>With the dependencies now installed, you can run the test suite with:</p><div class="code_container">
297
- <pre class="brush: plain; gutter: false; toolbar: false">
298
- $ bundle exec rake test
299
-
300
- </pre>
301
- </div>
302
- <p>You can also run tests for a specific component, like Action Pack, by going into its directory and executing the same command:</p><div class="code_container">
303
- <pre class="brush: plain; gutter: false; toolbar: false">
304
- $ cd actionpack
305
- $ bundle exec rake test
306
-
307
- </pre>
308
- </div>
309
- <p>If you want to run the tests located in a specific directory use the <code>TEST_DIR</code> environment variable. For example, this will run the tests in the <code>railties/test/generators</code> directory only:</p><div class="code_container">
310
- <pre class="brush: plain; gutter: false; toolbar: false">
311
- $ cd railties
312
- $ TEST_DIR=generators bundle exec rake test
313
-
314
- </pre>
315
- </div>
316
- <p>You can run the tests for a particular file by using:</p><div class="code_container">
317
- <pre class="brush: plain; gutter: false; toolbar: false">
318
- $ cd actionpack
319
- $ bundle exec ruby -Itest test/template/form_helper_test.rb
320
-
321
- </pre>
322
- </div>
323
- <p>Or, you can run a single test in a particular file:</p><div class="code_container">
324
- <pre class="brush: plain; gutter: false; toolbar: false">
325
- $ cd actionpack
326
- $ bundle exec ruby -Itest path/to/test.rb -n test_name
327
-
328
- </pre>
329
- </div>
330
- <h4 id="active-record-setup">2.4 Active Record Setup</h4><p>The test suite of Active Record attempts to run four times: once for SQLite3, once for each of the two MySQL gems (<code>mysql</code> and <code>mysql2</code>), and once for PostgreSQL. We are going to see now how to set up the environment for them.</p><div class="warning"><p>If you're working with Active Record code, you <em>must</em> ensure that the tests pass for at least MySQL, PostgreSQL, and SQLite3. Subtle differences between the various adapters have been behind the rejection of many patches that looked OK when tested only against MySQL.</p></div><h5 id="database-configuration">2.4.1 Database Configuration</h5><p>The Active Record test suite requires a custom config file: <code>activerecord/test/config.yml</code>. An example is provided in <code>activerecord/test/config.example.yml</code> which can be copied and used as needed for your environment.</p><h5 id="mysql-and-postgresql">2.4.2 MySQL and PostgreSQL</h5><p>To be able to run the suite for MySQL and PostgreSQL we need their gems. Install first the servers, their client libraries, and their development files. In Ubuntu just run</p><div class="code_container">
331
- <pre class="brush: plain; gutter: false; toolbar: false">
332
- $ sudo apt-get install mysql-server libmysqlclient15-dev
333
- $ sudo apt-get install postgresql postgresql-client postgresql-contrib libpq-dev
334
-
335
- </pre>
336
- </div>
337
- <p>On Fedora or CentOS, just run:</p><div class="code_container">
338
- <pre class="brush: plain; gutter: false; toolbar: false">
339
- $ sudo yum install mysql-server mysql-devel
340
- $ sudo yum install postgresql-server postgresql-devel
341
-
342
- </pre>
343
- </div>
344
- <p>If you are running Arch Linux, MySQL isn't supported anymore so you will need to
345
- use MariaDB instead (see <a href="https://www.archlinux.org/news/mariadb-replaces-mysql-in-repositories/">this announcement</a>):</p><div class="code_container">
346
- <pre class="brush: plain; gutter: false; toolbar: false">
347
- $ sudo pacman -S mariadb libmariadbclient mariadb-clients
348
- $ sudo pacman -S postgresql postgresql-libs
349
-
350
- </pre>
351
- </div>
352
- <p>FreeBSD users will have to run the following:</p><div class="code_container">
353
- <pre class="brush: plain; gutter: false; toolbar: false">
354
- # pkg_add -r mysql56-client mysql56-server
355
- # pkg_add -r postgresql92-client postgresql92-server
356
-
357
- </pre>
358
- </div>
359
- <p>You can use <a href="http://brew.sh/">Homebrew</a> to install MySQL and PostgreSQL on OSX:</p><div class="code_container">
360
- <pre class="brush: plain; gutter: false; toolbar: false">
361
- $ brew install mysql
362
- $ brew install postgresql
363
-
364
- </pre>
365
- </div>
366
- <p>Follow instructions given by <a href="http://brew.sh/">Homebrew</a> to start these.</p><p>Or install them through ports (they are located under the <code>databases</code> folder).
367
- If you run into troubles during the installation of MySQL, please see
368
- <a href="http://dev.mysql.com/doc/refman/5.1/en/freebsd-installation.html">the MySQL documentation</a>.</p><p>After that, run:</p><div class="code_container">
369
- <pre class="brush: plain; gutter: false; toolbar: false">
370
- $ rm .bundle/config
371
- $ bundle install
372
-
373
- </pre>
374
- </div>
375
- <p>First, we need to delete <code>.bundle/config</code> because Bundler remembers in that file that we didn't want to install the "db" group (alternatively you can edit the file).</p><p>In order to be able to run the test suite against MySQL you need to create a user named <code>rails</code> with privileges on the test databases:</p><div class="code_container">
376
- <pre class="brush: plain; gutter: false; toolbar: false">
377
- $ mysql -uroot -p
378
-
379
- mysql&gt; CREATE USER 'rails'@'localhost';
380
- mysql&gt; GRANT ALL PRIVILEGES ON activerecord_unittest.*
381
- to 'rails'@'localhost';
382
- mysql&gt; GRANT ALL PRIVILEGES ON activerecord_unittest2.*
383
- to 'rails'@'localhost';
384
- mysql&gt; GRANT ALL PRIVILEGES ON inexistent_activerecord_unittest.*
385
- to 'rails'@'localhost';
386
-
387
- </pre>
388
- </div>
389
- <p>and create the test databases:</p><div class="code_container">
390
- <pre class="brush: plain; gutter: false; toolbar: false">
391
- $ cd activerecord
392
- $ bundle exec rake db:mysql:build
393
-
394
- </pre>
395
- </div>
396
- <p>PostgreSQL's authentication works differently. A simple way to set up the development environment for example is to run with your development account
397
- This is not needed when installed via <a href="http://brew.sh">Homebrew</a>.</p><div class="code_container">
398
- <pre class="brush: plain; gutter: false; toolbar: false">
399
- $ sudo -u postgres createuser --superuser $USER
400
-
401
- </pre>
402
- </div>
403
- <p>And for OS X (when installed via <a href="http://brew.sh">Homebrew</a>)
404
- <code>bash
405
- $ createuser --superuser $USER
406
- </code></p><p>and then create the test databases with</p><div class="code_container">
407
- <pre class="brush: plain; gutter: false; toolbar: false">
408
- $ cd activerecord
409
- $ bundle exec rake db:postgresql:build
410
-
411
- </pre>
412
- </div>
413
- <p>It is possible to build databases for both PostgreSQL and MySQL with</p><div class="code_container">
414
- <pre class="brush: plain; gutter: false; toolbar: false">
415
- $ cd activerecord
416
- $ bundle exec rake db:create
417
-
418
- </pre>
419
- </div>
420
- <p>You can cleanup the databases using</p><div class="code_container">
421
- <pre class="brush: plain; gutter: false; toolbar: false">
422
- $ cd activerecord
423
- $ bundle exec rake db:drop
424
-
425
- </pre>
426
- </div>
427
- <div class="note"><p>Using the rake task to create the test databases ensures they have the correct character set and collation.</p></div><div class="note"><p>You'll see the following warning (or localized warning) during activating HStore extension in PostgreSQL 9.1.x or earlier: "WARNING: =&gt; is deprecated as an operator".</p></div><p>If you're using another database, check the file <code>activerecord/test/config.yml</code> or <code>activerecord/test/config.example.yml</code> for default connection information. You can edit <code>activerecord/test/config.yml</code> to provide different credentials on your machine if you must, but obviously you should not push any such changes back to Rails.</p>
428
-
429
- <h3>Feedback</h3>
430
- <p>
431
- You're encouraged to help improve the quality of this guide.
432
- </p>
433
- <p>
434
- Please contribute if you see any typos or factual errors.
435
- To get started, you can read our <a href="http://edgeguides.rubyonrails.org/contributing_to_ruby_on_rails.html#contributing-to-the-rails-documentation">documentation contributions</a> section.
436
- </p>
437
- <p>
438
- You may also find incomplete content, or stuff that is not up to date.
439
- Please do add any missing documentation for master. Make sure to check
440
- <a href="http://edgeguides.rubyonrails.org">Edge Guides</a> first to verify
441
- if the issues are already fixed or not on the master branch.
442
- Check the <a href="ruby_on_rails_guides_guidelines.html">Ruby on Rails Guides Guidelines</a>
443
- for style and conventions.
444
- </p>
445
- <p>
446
- If for whatever reason you spot something to fix but cannot patch it yourself, please
447
- <a href="https://github.com/rails/rails/issues">open an issue</a>.
448
- </p>
449
- <p>And last but not least, any kind of discussion regarding Ruby on Rails
450
- documentation is very welcome in the <a href="http://groups.google.com/group/rubyonrails-docs">rubyonrails-docs mailing list</a>.
451
- </p>
452
- </div>
453
- </div>
454
- </div>
455
-
456
- <hr class="hide" />
457
- <div id="footer">
458
- <div class="wrapper">
459
- <p>This work is licensed under a <a href="https://creativecommons.org/licenses/by-sa/4.0/">Creative Commons Attribution-ShareAlike 4.0 International</a> License</p>
460
- <p>"Rails", "Ruby on Rails", and the Rails logo are trademarks of David Heinemeier Hansson. All rights reserved.</p>
461
-
462
- </div>
463
- </div>
464
-
465
- <script type="text/javascript" src="javascripts/jquery.min.js"></script>
466
- <script type="text/javascript" src="javascripts/responsive-tables.js"></script>
467
- <script type="text/javascript" src="javascripts/guides.js"></script>
468
- <script type="text/javascript" src="javascripts/syntaxhighlighter/shCore.js"></script>
469
- <script type="text/javascript" src="javascripts/syntaxhighlighter/shBrushRuby.js"></script>
470
- <script type="text/javascript" src="javascripts/syntaxhighlighter/shBrushXml.js"></script>
471
- <script type="text/javascript" src="javascripts/syntaxhighlighter/shBrushSql.js"></script>
472
- <script type="text/javascript" src="javascripts/syntaxhighlighter/shBrushPlain.js"></script>
473
- <script type="text/javascript">
474
- SyntaxHighlighter.all();
475
- $(guidesIndex.bind);
476
- </script>
477
- </body>
478
- </html>