feedparser 1.2.0 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (61) hide show
  1. checksums.yaml +4 -4
  2. data/Manifest.txt +2 -50
  3. data/README.md +71 -9
  4. data/Rakefile +1 -1
  5. data/lib/feedparser.rb +2 -0
  6. data/lib/feedparser/builder/microformats.rb +264 -0
  7. data/lib/feedparser/parser.rb +27 -0
  8. data/lib/feedparser/version.rb +2 -2
  9. data/test/helper.rb +3 -57
  10. data/test/test_microformats.rb +52 -0
  11. metadata +10 -56
  12. data/test/feeds/books/nostarch.rss +0 -125
  13. data/test/feeds/books/oreilly.feedburner.atom +0 -387
  14. data/test/feeds/books/pragprog.rss +0 -148
  15. data/test/feeds/byparker.json +0 -643
  16. data/test/feeds/daringfireball.atom +0 -1873
  17. data/test/feeds/daringfireball.json +0 -619
  18. data/test/feeds/googlegroups.atom +0 -37
  19. data/test/feeds/googlegroups2.atom +0 -27
  20. data/test/feeds/headius.atom +0 -123
  21. data/test/feeds/inessential.json +0 -182
  22. data/test/feeds/intertwingly.atom +0 -1197
  23. data/test/feeds/jsonfeed.json +0 -37
  24. data/test/feeds/lambdatheultimate.rss +0 -288
  25. data/test/feeds/learnenough.feedburner.atom +0 -747
  26. data/test/feeds/news/nytimes-blogs-bits.rss +0 -333
  27. data/test/feeds/news/nytimes-paul-krugman.rss +0 -60
  28. data/test/feeds/news/nytimes-tech.rss +0 -653
  29. data/test/feeds/news/nytimes-thomas-l-friedman.rss +0 -80
  30. data/test/feeds/news/nytimes.rss +0 -607
  31. data/test/feeds/news/washingtonpost-blogs-innovations.rss +0 -183
  32. data/test/feeds/news/washingtonpost-politics.rss +0 -35
  33. data/test/feeds/news/washingtonpost-world.rss +0 -29
  34. data/test/feeds/ongoing.atom +0 -1619
  35. data/test/feeds/osm/blog.openstreetmap.rss +0 -252
  36. data/test/feeds/osm/blogs.openstreetmap.rss +0 -585
  37. data/test/feeds/osm/mapbox.rss +0 -1883
  38. data/test/feeds/railstutorial.feedburner.atom +0 -656
  39. data/test/feeds/rubyflow.feedburner.rss +0 -120
  40. data/test/feeds/rubymine.feedburner.rss +0 -314
  41. data/test/feeds/rubyonrails.atom +0 -1241
  42. data/test/feeds/scripting.rss +0 -881
  43. data/test/feeds/sitepoint.rss +0 -218
  44. data/test/feeds/spec/atom/author.atom +0 -48
  45. data/test/feeds/spec/atom/authors.atom +0 -70
  46. data/test/feeds/spec/atom/categories.atom +0 -66
  47. data/test/feeds/spec/json/example.json +0 -36
  48. data/test/feeds/spec/json/microblog.json +0 -43
  49. data/test/feeds/spec/json/tags.json +0 -33
  50. data/test/feeds/spec/rss/author.rss +0 -41
  51. data/test/feeds/spec/rss/categories.rss +0 -64
  52. data/test/feeds/spec/rss/creator.rss +0 -38
  53. data/test/feeds/xkcd.atom +0 -48
  54. data/test/feeds/xkcd.rss +0 -55
  55. data/test/test_atom.rb +0 -27
  56. data/test/test_authors.rb +0 -26
  57. data/test/test_books.rb +0 -25
  58. data/test/test_feeds.rb +0 -29
  59. data/test/test_json.rb +0 -27
  60. data/test/test_rss.rb +0 -26
  61. data/test/test_tags.rb +0 -25
@@ -1,656 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?>
3
- <?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?>
4
- <feed
5
- xmlns="http://www.w3.org/2005/Atom"
6
- xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0">
7
-
8
- <title><![CDATA[Ruby on Rails Tutorial News]]></title>
9
-
10
- <link href="http://news.railstutorial.org/" />
11
- <updated>2014-12-05T07:19:26-08:00</updated>
12
- <id>http://news.railstutorial.org/</id>
13
- <author>
14
- <name><![CDATA[Michael Hartl]]></name>
15
-
16
- </author>
17
- <generator uri="http://octopress.org/">Octopress</generator>
18
-
19
-
20
- <atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/atom+xml" href="http://feeds.feedburner.com/railstutorial" /><feedburner:info uri="railstutorial" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><feedburner:emailServiceId>railstutorial</feedburner:emailServiceId><feedburner:feedburnerHostname>https://feedburner.google.com</feedburner:feedburnerHostname>
21
- <entry>
22
- <title type="html"><![CDATA[Launch of the Ruby on Rails Tutorial screencasts (3rd edition)]]></title>
23
- <link href="http://feedproxy.google.com/~r/railstutorial/~3/GRG2NKC_Uwg/" />
24
- <updated>2014-12-01T00:00:00-08:00</updated>
25
- <id>http://news.railstutorial.org/rails_tutorial_3rd_ed_screencasts</id>
26
- <content type="html">&lt;p&gt;&lt;a href="http://en.wikipedia.org/wiki/Wikipedia:Too_long;_didn%27t_read"&gt;&lt;strong&gt;tl;dr&lt;/strong&gt;&lt;/a&gt;: The &lt;a href="http://screencasts.railstutorial.org/"&gt;3rd Edition of the Ruby on Rails Tutorial screencast series&lt;/a&gt; is now available. Designed to complement the book &lt;a href="http://www.railstutorial.org/book"&gt;&lt;em&gt;Ruby on Rails Tutorial: Learn Web Development with Rails&lt;/em&gt;&lt;/a&gt;, the Rails Tutorial screencast series consists of 12 lessons (one for each chapter of the book), totaling more than 15 hours of HD video. A &lt;a href="http://youtu.be/BCebRWbP3n8"&gt;teaser trailer&lt;/a&gt; and a &lt;a href="http://youtu.be/zrOf4lXzF4E"&gt;full sample lesson&lt;/a&gt; are also available. As part of the launch, you can get &lt;a href="https://www.softcover.io/buy/28fdb94f/ruby_on_rails_tutorial_3rd_edition?code=screencast_launch&amp;amp;option=html_ebooks_screencasts"&gt;20% off all Rails Tutorial products through the end of this week (Friday, December 5)&lt;/a&gt;.&lt;/p&gt;
27
-
28
- &lt;p&gt;&lt;a href="https://news.ycombinator.com/item?id=8688714"&gt;Discuss this post at Hacker News&lt;/a&gt;&lt;/p&gt;
29
-
30
- &lt;p&gt;I&amp;#8217;m pleased to announce the launch of the &lt;a href="http://screencasts.railstutorial.org/"&gt;3rd Edition of the Ruby on Rails Tutorial screencasts&lt;/a&gt;. The new screencasts have been recorded from scratch and are designed to get you started with professional-grade Ruby on Rails web development as fast as possible. Based on the &lt;a href="http://www.railstutorial.org/book"&gt;&lt;em&gt;Ruby on Rails Tutorial&lt;/em&gt; book&lt;/a&gt;, the 3rd edition screencasts should be especially useful for Rails Tutorial readers who want to see exactly how to develop (or at least how &lt;em&gt;I&lt;/em&gt; develop) Ruby on Rails web apps.&lt;/p&gt;
31
-
32
- &lt;p&gt;The 3rd edition of the Ruby on Rails Tutorial screencast series has been extensively revised from previous versions. Here are some of the changes:&lt;/p&gt;
33
-
34
- &lt;ol&gt;
35
- &lt;li&gt;&lt;p&gt;&lt;strong&gt;Use of a standard &lt;a href="http://c9.io/"&gt;integrated development environment in the cloud&lt;/a&gt;&lt;/strong&gt;, with a pre-configured workspace specifically tailored to the needs of the Ruby on Rails Tutorial. Use of the custom &lt;a href="http://c9.io/"&gt;Cloud9 IDE&lt;/a&gt; environment allows you to see exactly how to follow every step of the Rails Tutorial using the same development environment shown in the screencasts.&lt;/p&gt;&lt;/li&gt;
36
- &lt;li&gt;&lt;p&gt;&lt;strong&gt;100% default stack&lt;/strong&gt;. The 3rd edition of the Ruby on Rails Tutorial screencasts uses the default Rails choices for all relevant technologies, thereby substantially reducing the configuration necessary to get started.&lt;/p&gt;&lt;/li&gt;
37
- &lt;li&gt;&lt;p&gt;&lt;strong&gt;Lighter-weight testing approach.&lt;/strong&gt; The 3rd edition still covers test-driven development (TDD), but uses it more sparingly and judiciously. The more forbidding &amp;#8220;wall of tests&amp;#8221; sections have been eliminated, with concise and expressive integration tests (usually written after the application code) taking their place.&lt;/p&gt;&lt;/li&gt;
38
- &lt;li&gt;&lt;p&gt;&lt;strong&gt;A fully revised lesson on login and authentication.&lt;/strong&gt; The newly revised Lesson 8 covers all three of the most common login models on the Web: session expiration upon browser close, &lt;em&gt;automatically&lt;/em&gt; remembering users, and &lt;em&gt;optionally&lt;/em&gt; remembering users with a &amp;#8220;remember me&amp;#8221; checkbox.&lt;/p&gt;&lt;/li&gt;
39
- &lt;li&gt;&lt;p&gt;&lt;strong&gt;An all-new section on image upload.&lt;/strong&gt; Lesson 11 now shows how to add pictures to the Twitter-style &amp;#8220;microposts&amp;#8221; developed in the tutorial&amp;#8217;s main sample application. Topics include client- and server-side image validations, automatic image resizing, and using a cloud storage service (&lt;a href="http://aws.amazon.com/s3/"&gt;Amazon S3&lt;/a&gt;) in production.&lt;/p&gt;&lt;/li&gt;
40
- &lt;li&gt;&lt;p&gt;&lt;strong&gt;An all-new lesson on account activation and password resets, including sending email with Rails.&lt;/strong&gt; The all-new Lesson 10 considerably extends the core sample application by adding account activation (thereby verifying the account&amp;#8217;s email address) and allowing users to reset forgotten passwords. In the process, the chapter covers how to send email with Rails, both in development (using the server log) and in production (using &lt;a href="http://mbsy.co/sendgrid/10342175"&gt;SendGrid&lt;/a&gt;).&lt;/p&gt;&lt;/li&gt;
41
- &lt;/ol&gt;
42
-
43
-
44
- &lt;p&gt;Each lesson in the screencast series corresponds to a chapter in the book, which appear as follows (links are to the &lt;a href="http://www.railstutorial.org/book"&gt;online version of the book&lt;/a&gt;, which as always is available for free):&lt;/p&gt;
45
-
46
- &lt;ul&gt;
47
- &lt;li&gt;&lt;p&gt;&lt;a href="http://www.railstutorial.org/book/beginning"&gt;Chapter 1: From zero to deploy&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
48
- &lt;li&gt;&lt;p&gt;&lt;a href="http://www.railstutorial.org/book/toy_app"&gt;Chapter 2: A toy app&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
49
- &lt;li&gt;&lt;p&gt;&lt;a href="http://www.railstutorial.org/book/static_pages"&gt;Chapter 3: Mostly static pages&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
50
- &lt;li&gt;&lt;p&gt;&lt;a href="http://www.railstutorial.org/book/rails_flavored_ruby"&gt;Chapter 4: Rails-flavored Ruby&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
51
- &lt;li&gt;&lt;p&gt;&lt;a href="http://www.railstutorial.org/book/filling_in_the_layout"&gt;Chapter 5: Filling in the layout&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
52
- &lt;li&gt;&lt;p&gt;&lt;a href="http://www.railstutorial.org/book/modeling_users"&gt;Chapter 6: Modeling users&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
53
- &lt;li&gt;&lt;p&gt;&lt;a href="http://www.railstutorial.org/book/sign_up"&gt;Chapter 7: Sign up&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
54
- &lt;li&gt;&lt;p&gt;&lt;a href="http://www.railstutorial.org/book/log_in_log_out"&gt;Chapter 8: Log in, log out&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
55
- &lt;li&gt;&lt;p&gt;&lt;a href="http://www.railstutorial.org/book/updating_and_deleting_users"&gt;Chapter 9: Updating, showing, and deleting users&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
56
- &lt;li&gt;&lt;p&gt;&lt;a href="http://www.railstutorial.org/book/account_activation_password_reset"&gt;Chapter 10: Account activation and password reset&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
57
- &lt;li&gt;&lt;p&gt;&lt;a href="http://www.railstutorial.org/book/user_microposts"&gt;Chapter 11: User microposts&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
58
- &lt;li&gt;&lt;p&gt;&lt;a href="http://www.railstutorial.org/book/following_users"&gt;Chapter 12: Following users&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
59
- &lt;/ul&gt;
60
-
61
-
62
- &lt;p&gt;As a reminder, you can get a &lt;a href="https://www.softcover.io/buy/28fdb94f/ruby_on_rails_tutorial_3rd_edition?code=screencast_launch&amp;amp;option=html_ebooks_screencasts"&gt;&lt;strong&gt;20% discount&lt;/strong&gt; on any purchase through the end of the week&lt;/a&gt; (Friday, December 5).&lt;/p&gt;
63
- &lt;img src="//feeds.feedburner.com/~r/railstutorial/~4/GRG2NKC_Uwg" height="1" width="1" alt=""/&gt;</content>
64
- <feedburner:origLink>http://news.railstutorial.org/rails_tutorial_3rd_ed_screencasts/</feedburner:origLink></entry>
65
-
66
- <entry>
67
- <title type="html"><![CDATA[The Rails Tutorial and Heroku Cedar-14]]></title>
68
- <link href="http://feedproxy.google.com/~r/railstutorial/~3/6CCzPXWiMwM/" />
69
- <updated>2014-11-04T00:00:00-08:00</updated>
70
- <id>http://news.railstutorial.org/heroku-update</id>
71
- <content type="html">&lt;p&gt;&lt;strong&gt;UPDATE&lt;/strong&gt;: Due to continuing annoyance, I&amp;#8217;ve determined that, in the case of the Rails Tutorial, the costs of specifying a particular version of Ruby in the &lt;code&gt;Gemfile&lt;/code&gt; don&amp;#8217;t justify the benefits. The &lt;em&gt;Ruby on Rails Tutorial&lt;/em&gt; book has been &lt;a href="https://www.railstutorial.org/book/sign_up#sec-ruby_version_number"&gt;updated accordingly&lt;/a&gt;. As a result, there is no need to follow the steps below to install a new version of Ruby.&lt;/p&gt;
72
-
73
- &lt;p&gt;This is a quick update for users of the &lt;a href="http://www.railstutorial.org/"&gt;3rd Edition of the &lt;em&gt;Ruby on Rails Tutorial&lt;/em&gt; &lt;/a&gt;, especially those deploying to Heroku from the &lt;a href="http://c9.io"&gt;Cloud9 IDE&lt;/a&gt;, but it&amp;#8217;s potentially useful to anyone deploying Ruby apps to Heroku. Heroku&amp;#8217;s recently announced &lt;a href="https://blog.heroku.com/archives/2014/11/4/cedar_14_now_generally_available"&gt;Cedar-14 stack&lt;/a&gt; is incompatible with all but the most recent version of each Ruby sequence, meaning (for example) that it works with Ruby 2.1.4 but not with 2.1.3. Unfortunately, this makes it incompatible with the local Ruby versions on many systems, including Cloud9&amp;#8217;s default, which as of this writing is Ruby 2.1.1. In such cases, Heroku deployments to the new stack won&amp;#8217;t work. Here are the kinds of errors you might see:&lt;/p&gt;
74
-
75
- &lt;figure class='code'&gt;&lt;div class="highlight"&gt;&lt;table&gt;&lt;tr&gt;&lt;td class="gutter"&gt;&lt;pre class="line-numbers"&gt;&lt;span class='line-number'&gt;1&lt;/span&gt;
76
- &lt;span class='line-number'&gt;2&lt;/span&gt;
77
- &lt;span class='line-number'&gt;3&lt;/span&gt;
78
- &lt;/pre&gt;&lt;/td&gt;&lt;td class='code'&gt;&lt;pre&gt;&lt;code class=''&gt;&lt;span class='line'&gt;local/Cloud9 =&amp;gt; Your Ruby version is 2.1.1, but your Gemfile specified 2.1.4
79
- &lt;/span&gt;&lt;span class='line'&gt;
80
- &lt;/span&gt;&lt;span class='line'&gt;Heroku =&amp;gt; Only the most recent version of Ruby 2.1 is supported on Cedar-14&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;/figure&gt;
81
-
82
-
83
- &lt;p&gt;For the benefit of Rails Tutorial readers, I&amp;#8217;ve gotten in touch with Cloud9 support and expect that they will eventually be able to change the default Ruby version for Rails Tutorial workspaces. &lt;strong&gt;UPDATE:&lt;/strong&gt; This has now happened, so new workspaces will get Ruby 2.1.4 automatically, but existing workspaces will still have to be updated manually. You can do this with the &lt;a href="http://rvm.io/"&gt;Ruby Version Manager&lt;/a&gt; as follows:&lt;/p&gt;
84
-
85
- &lt;figure class='code'&gt;&lt;div class="highlight"&gt;&lt;table&gt;&lt;tr&gt;&lt;td class="gutter"&gt;&lt;pre class="line-numbers"&gt;&lt;span class='line-number'&gt;1&lt;/span&gt;
86
- &lt;span class='line-number'&gt;2&lt;/span&gt;
87
- &lt;span class='line-number'&gt;3&lt;/span&gt;
88
- &lt;/pre&gt;&lt;/td&gt;&lt;td class='code'&gt;&lt;pre&gt;&lt;code class=''&gt;&lt;span class='line'&gt;$ rvm install 2.1.4
89
- &lt;/span&gt;&lt;span class='line'&gt;&amp;lt;get a beverage of your choice and wait a while&amp;gt;
90
- &lt;/span&gt;&lt;span class='line'&gt;$ rvm use 2.1.4&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;/figure&gt;
91
-
92
-
93
- &lt;p&gt;Then change your &lt;code&gt;Gemfile&lt;/code&gt; to use the line &lt;code&gt;ruby '2.1.4'&lt;/code&gt; and re-deploy:&lt;/p&gt;
94
-
95
- &lt;figure class='code'&gt;&lt;div class="highlight"&gt;&lt;table&gt;&lt;tr&gt;&lt;td class="gutter"&gt;&lt;pre class="line-numbers"&gt;&lt;span class='line-number'&gt;1&lt;/span&gt;
96
- &lt;span class='line-number'&gt;2&lt;/span&gt;
97
- &lt;span class='line-number'&gt;3&lt;/span&gt;
98
- &lt;/pre&gt;&lt;/td&gt;&lt;td class='code'&gt;&lt;pre&gt;&lt;code class=''&gt;&lt;span class='line'&gt;&amp;lt;update Gemfile&amp;gt;
99
- &lt;/span&gt;&lt;span class='line'&gt;$ git commit -am "Update Ruby version"
100
- &lt;/span&gt;&lt;span class='line'&gt;$ git push heroku&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;/figure&gt;
101
-
102
-
103
- &lt;p&gt;You may also have to restart any Rails servers, consoles, or Spring servers (&lt;code&gt;spring stop&lt;/code&gt;) in order to get them to use the new version of Ruby.&lt;/p&gt;
104
-
105
- &lt;p&gt;By the way, if you&amp;#8217;re using &lt;code&gt;rbenv&lt;/code&gt; on a local machine (as I am) and need to upgrade to the latest Ruby version, here are the steps you might follow:&lt;/p&gt;
106
-
107
- &lt;figure class='code'&gt;&lt;div class="highlight"&gt;&lt;table&gt;&lt;tr&gt;&lt;td class="gutter"&gt;&lt;pre class="line-numbers"&gt;&lt;span class='line-number'&gt;1&lt;/span&gt;
108
- &lt;span class='line-number'&gt;2&lt;/span&gt;
109
- &lt;span class='line-number'&gt;3&lt;/span&gt;
110
- &lt;/pre&gt;&lt;/td&gt;&lt;td class='code'&gt;&lt;pre&gt;&lt;code class=''&gt;&lt;span class='line'&gt;$ cd ~/.rbenv/plugins/ruby-build/
111
- &lt;/span&gt;&lt;span class='line'&gt;$ git pull
112
- &lt;/span&gt;&lt;span class='line'&gt;$ rbenv install 2.1.4&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;/figure&gt;
113
-
114
- &lt;img src="//feeds.feedburner.com/~r/railstutorial/~4/6CCzPXWiMwM" height="1" width="1" alt=""/&gt;</content>
115
- <feedburner:origLink>http://news.railstutorial.org/heroku-update/</feedburner:origLink></entry>
116
-
117
- <entry>
118
- <title type="html"><![CDATA[Launch of the 3rd Edition of the Ruby on Rails Tutorial book]]></title>
119
- <link href="http://feedproxy.google.com/~r/railstutorial/~3/aGLrPyy4Juk/" />
120
- <updated>2014-10-15T00:00:00-07:00</updated>
121
- <id>http://news.railstutorial.org/rails_tutorial_3rd_ed_screencast_access</id>
122
- <content type="html">&lt;p&gt;&lt;strong&gt;tl;dr&lt;/strong&gt;: The &lt;a href="http://www.railstutorial.org/"&gt;3rd Edition of the &lt;em&gt;Ruby on Rails Tutorial&lt;/em&gt; book&lt;/a&gt; is out, together with early access to the screencasts (currently in preparation). &lt;a href="https://www.softcover.io/buy/28fdb94f/ruby_on_rails_tutorial_3rd_edition?code=ebook_launch"&gt;Click here&lt;/a&gt; to get an automatic &lt;strong&gt;10% discount&lt;/strong&gt; on any purchase through the end of October.&lt;/p&gt;
123
-
124
- &lt;p&gt;I&amp;#8217;m pleased to announce the launch of the 3rd Edition of the &lt;em&gt;Ruby on Rails Tutorial&lt;/em&gt; book, together with early access to the screencasts (which are currently in preparation). Here are the main product bundles:&lt;/p&gt;
125
-
126
- &lt;ul&gt;
127
- &lt;li&gt;&lt;a href="http://www.railstutorial.org/#html_ebook_and_solutions_manual"&gt;Rails Tutorial ebooks&lt;/a&gt; (including &lt;strong&gt;full solutions manual&lt;/strong&gt;): &lt;strong&gt;$49&lt;/strong&gt; ($44.10 with &lt;a href="https://www.softcover.io/buy/28fdb94f/ruby_on_rails_tutorial_3rd_edition?code=ebook_launch"&gt;discount&lt;/a&gt;)&lt;/li&gt;
128
- &lt;li&gt;&lt;a href="http://www.railstutorial.org/#html_ebooks_and_early_screencast_access"&gt;Rails Tutorial ebooks, solutions manual, early screencast access&lt;/a&gt; (currently Lessons 1–4, will eventually include all 12 lessons): &lt;strong&gt;$149&lt;/strong&gt; ($134.10 with &lt;a href="https://www.softcover.io/buy/28fdb94f/ruby_on_rails_tutorial_3rd_edition?code=ebook_launch"&gt;discount&lt;/a&gt;)&lt;/li&gt;
129
- &lt;li&gt;&lt;a href="http://www.railstutorial.org/#html_ebooks_early_screencast_access_all_previous_versions"&gt;All Rails Tutorial ebooks and screencasts&lt;/a&gt;, including the 3rd edition, 2nd edition, 1st edition, and Rails 4.0 supplement: &lt;strong&gt;$299&lt;/strong&gt; ($269.10 with &lt;a href="https://www.softcover.io/buy/28fdb94f/ruby_on_rails_tutorial_3rd_edition?code=ebook_launch"&gt;discount&lt;/a&gt;)&lt;/li&gt;
130
- &lt;/ul&gt;
131
-
132
-
133
- &lt;p&gt;As a special launch offer, you can &lt;a href="https://www.softcover.io/buy/28fdb94f/ruby_on_rails_tutorial_3rd_edition?code=ebook_launch"&gt;click here&lt;/a&gt; to get an automatic &lt;strong&gt;10% discount&lt;/strong&gt; on any purchase through the end of October.&lt;/p&gt;
134
-
135
- &lt;p&gt;The full screencast series included with every screencasts purchase, including the completed lessons (currently Lessons 1–4) and immediate access to new lessons as I finish them. I hope to finish the full twelve-lesson screencast series by the end of November.&lt;/p&gt;
136
-
137
- &lt;p&gt;The 3rd edition of the &lt;em&gt;Ruby on Rails Tutorial&lt;/em&gt; has been extensively revised from previous versions. Here are some of the changes:&lt;/p&gt;
138
-
139
- &lt;ol&gt;
140
- &lt;li&gt;&lt;p&gt;&lt;strong&gt;Use of a standard &lt;a href="http://c9.io/"&gt;integrated development environment in the cloud&lt;/a&gt;&lt;/strong&gt;, with a pre-configured workspace specifically tailored to the needs of the &lt;em&gt;Ruby on Rails Tutorial&lt;/em&gt;. Use of the custom &lt;a href="http://c9.io/"&gt;Cloud9 IDE&lt;/a&gt; environment eliminates the installation and configuration overhead encountered in previous editions, while also providing the text editor, terminal window, and filesystem navigation necessary to complete the book&amp;#8217;s three example applications.&lt;/p&gt;&lt;/li&gt;
141
- &lt;li&gt;&lt;p&gt;&lt;strong&gt;100% default stack&lt;/strong&gt;. The 3rd edition of the &lt;em&gt;Ruby on Rails Tutorial&lt;/em&gt; uses the default Rails choices for all relevant technologies, thereby substantially reducing the configuration necessary to get started. The excellent but syntactically heavy RSpec testing framework has been replaced with the default Rails testing stack (MiniTest), making for a much gentler introduction to testing than in previous editions.&lt;/p&gt;&lt;/li&gt;
142
- &lt;li&gt;&lt;p&gt;&lt;strong&gt;Lighter-weight testing approach.&lt;/strong&gt; The 3rd edition still covers test-driven development (TDD), but uses it more sparingly and judiciously. The more forbidding &amp;#8220;wall of tests&amp;#8221; sections have been eliminated, with concise and expressive integration tests (usually written after the application code) taking their place.&lt;/p&gt;&lt;/li&gt;
143
- &lt;li&gt;&lt;strong&gt;A completely rewritten chapter on login and authentication.&lt;/strong&gt; The newly revised Chapter 8 covers all three of the most common login models on the Web: session expiration upon browser close, &lt;em&gt;automatically&lt;/em&gt; remembering users, and &lt;em&gt;optionally&lt;/em&gt; remembering users with a &amp;#8220;remember me&amp;#8221; checkbox.&lt;/li&gt;
144
- &lt;li&gt;&lt;strong&gt;An all-new section on image upload.&lt;/strong&gt; Chapter 11 now shows how to add pictures to the Twitter-style &amp;#8220;microposts&amp;#8221; developed in the tutorial&amp;#8217;s main sample application. Topics include client- and server-side image validations, automatic image resizing, and using a cloud storage service (&lt;a href="http://aws.amazon.com/s3/"&gt;Amazon S3&lt;/a&gt;) in production.&lt;/li&gt;
145
- &lt;li&gt;&lt;strong&gt;An all-new chapter on account activation and password resets, including sending email with Rails.&lt;/strong&gt; The all-new Chapter 10 considerably extends the core sample application by adding account activation (thereby verifying the account&amp;#8217;s email address) and allowing users to reset forgotten passwords. In the process, the chapter covers how to send email with Rails, both in development (using the server log) and in production (using &lt;a href="http://mbsy.co/sendgrid/10342175"&gt;SendGrid&lt;/a&gt;).&lt;/li&gt;
146
- &lt;/ol&gt;
147
-
148
-
149
- &lt;p&gt;The final chapter list appears as follows (links are to the &lt;a href="http://www.railstutorial.org/book"&gt;online version of the book&lt;/a&gt;, which as always is available for free):&lt;/p&gt;
150
-
151
- &lt;ul&gt;
152
- &lt;li&gt;&lt;p&gt;&lt;a href="http://www.railstutorial.org/book/beginning"&gt;Chapter 1: From zero to deploy&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
153
- &lt;li&gt;&lt;p&gt;&lt;a href="http://www.railstutorial.org/book/toy_app"&gt;Chapter 2: A toy app&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
154
- &lt;li&gt;&lt;p&gt;&lt;a href="http://www.railstutorial.org/book/static_pages"&gt;Chapter 3: Mostly static pages&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
155
- &lt;li&gt;&lt;p&gt;&lt;a href="http://www.railstutorial.org/book/rails_flavored_ruby"&gt;Chapter 4: Rails-flavored Ruby&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
156
- &lt;li&gt;&lt;p&gt;&lt;a href="http://www.railstutorial.org/book/filling_in_the_layout"&gt;Chapter 5: Filling in the layout&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
157
- &lt;li&gt;&lt;p&gt;&lt;a href="http://www.railstutorial.org/book/modeling_users"&gt;Chapter 6: Modeling users&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
158
- &lt;li&gt;&lt;p&gt;&lt;a href="http://www.railstutorial.org/book/sign_up"&gt;Chapter 7: Sign up&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
159
- &lt;li&gt;&lt;p&gt;&lt;a href="http://www.railstutorial.org/book/log_in_log_out"&gt;Chapter 8: Log in, log out&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
160
- &lt;li&gt;&lt;p&gt;&lt;a href="http://www.railstutorial.org/book/updating_and_deleting_users"&gt;Chapter 9: Updating, showing, and deleting users&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
161
- &lt;li&gt;&lt;p&gt;&lt;a href="http://www.railstutorial.org/book/account_activation_password_reset"&gt;Chapter 10: Account activation and password reset&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
162
- &lt;li&gt;&lt;p&gt;&lt;a href="http://www.railstutorial.org/book/user_microposts"&gt;Chapter 11: User microposts&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
163
- &lt;li&gt;&lt;p&gt;&lt;a href="http://www.railstutorial.org/book/following_users"&gt;Chapter 12: Following users&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
164
- &lt;/ul&gt;
165
-
166
-
167
- &lt;p&gt;As a reminder, you can &lt;a href="https://www.softcover.io/buy/28fdb94f/ruby_on_rails_tutorial_3rd_edition?code=ebook_launch"&gt;click here&lt;/a&gt; to get an automatic &lt;strong&gt;10% discount&lt;/strong&gt; on any purchase through the end of October.&lt;/p&gt;
168
-
169
- &lt;p&gt;&lt;a href="https://news.ycombinator.com/item?id=8460670"&gt;Discuss this post at Hacker News&lt;/a&gt;&lt;/p&gt;
170
- &lt;img src="//feeds.feedburner.com/~r/railstutorial/~4/aGLrPyy4Juk" height="1" width="1" alt=""/&gt;</content>
171
- <feedburner:origLink>http://news.railstutorial.org/rails_tutorial_3rd_ed_screencast_access/</feedburner:origLink></entry>
172
-
173
- <entry>
174
- <title type="html"><![CDATA[Full draft of the Rails Tutorial 3rd Ed.]]></title>
175
- <link href="http://feedproxy.google.com/~r/railstutorial/~3/3jz9O7w8knw/" />
176
- <updated>2014-09-12T00:00:00-07:00</updated>
177
- <id>http://news.railstutorial.org/rails_tutorial_full_draft</id>
178
- <content type="html">&lt;p&gt;&lt;a href="http://draft.railstutorial.org/book/updating_and_deleting_users"&gt;Drafts of Chapters 9–12&lt;/a&gt; from the &lt;a href="http://draft.railstutorial.org/"&gt;&lt;em&gt;Ruby on Rails Tutorial (3rd Ed.)&lt;/em&gt;&lt;/a&gt; are now available:&lt;/p&gt;
179
-
180
- &lt;ul&gt;
181
- &lt;li&gt;&lt;p&gt;&lt;a href="http://draft.railstutorial.org/book/updating_and_deleting_users"&gt;Chapter 9: Updating, showing, and deleting users&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
182
- &lt;li&gt;&lt;p&gt;&lt;a href="http://draft.railstutorial.org/book/account_activation_password_reset"&gt;Chapter 10: Account activation and password reset&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
183
- &lt;li&gt;&lt;p&gt;&lt;a href="http://draft.railstutorial.org/book/user_microposts"&gt;Chapter 11: User microposts&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
184
- &lt;li&gt;&lt;p&gt;&lt;a href="http://draft.railstutorial.org/book/following_users"&gt;Chapter 12: Following users&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
185
- &lt;/ul&gt;
186
-
187
-
188
- &lt;p&gt;Chapters 9, 11, and 12 have been extensively revised for the 3rd edition, and Chapter 10 is completely new. With this release, the 3rd edition draft is now available in its entirety; see the &lt;a href="http://news.railstutorial.org/rails_tutorial_3rd_edition/"&gt;main 3rd edition announcement post&lt;/a&gt; for more details, and &lt;a href="http://draft.railstutorial.org/#email"&gt;sign up here&lt;/a&gt; for priority notifications and an exclusive coupon code.&lt;/p&gt;
189
-
190
- &lt;p&gt;I hope to launch ebooks sales of the 3rd edition within a few weeks. All current customers will get upgrade discounts, with especially generous discounts for those who made recent purchases.&lt;/p&gt;
191
- &lt;img src="//feeds.feedburner.com/~r/railstutorial/~4/3jz9O7w8knw" height="1" width="1" alt=""/&gt;</content>
192
- <feedburner:origLink>http://news.railstutorial.org/rails_tutorial_full_draft/</feedburner:origLink></entry>
193
-
194
- <entry>
195
- <title type="html"><![CDATA[Drafts of Chapters 5–8 from the Rails Tutorial 3rd Ed.]]></title>
196
- <link href="http://feedproxy.google.com/~r/railstutorial/~3/bRZ1jw2ECIc/" />
197
- <updated>2014-09-02T00:00:00-07:00</updated>
198
- <id>http://news.railstutorial.org/rails_tutorial_draft_second_launch</id>
199
- <content type="html">&lt;p&gt;&lt;a href="http://draft.railstutorial.org/book/filling_in_the_layout"&gt;Drafts of Chapters 5–8&lt;/a&gt; from the &lt;a href="http://draft.railstutorial.org/"&gt;&lt;em&gt;Ruby on Rails Tutorial (3rd Ed.)&lt;/em&gt;&lt;/a&gt; are now available:&lt;/p&gt;
200
-
201
- &lt;ul&gt;
202
- &lt;li&gt;&lt;p&gt;&lt;a href="http://draft.railstutorial.org/book/filling_in_the_layout"&gt;Chapter 5: Filling in the layout&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
203
- &lt;li&gt;&lt;p&gt;&lt;a href="http://draft.railstutorial.org/book/modeling_users"&gt;Chapter 6: Modeling users&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
204
- &lt;li&gt;&lt;p&gt;&lt;a href="http://draft.railstutorial.org/book/sign_up"&gt;Chapter 7: Sign up&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
205
- &lt;li&gt;&lt;p&gt;&lt;a href="http://draft.railstutorial.org/book/log_in_log_out"&gt;Chapter 8: Log in, log out&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
206
- &lt;/ul&gt;
207
-
208
-
209
- &lt;p&gt;All four of these chapters has been extensively revised, and the last has been almost completely rewritten. It now includes all three of the most common login models (temporary sessions, automatic persistent sessions, and optional persistent sessions with a &amp;#8220;remember me&amp;#8221; checkbox). See the &lt;a href="http://news.railstutorial.org/rails_tutorial_3rd_edition/"&gt;main 3rd edition announcement post&lt;/a&gt; for more details, and &lt;a href="http://draft.railstutorial.org/#email"&gt;sign up here&lt;/a&gt; for priority notifications and an exclusive coupon code.&lt;/p&gt;
210
- &lt;img src="//feeds.feedburner.com/~r/railstutorial/~4/bRZ1jw2ECIc" height="1" width="1" alt=""/&gt;</content>
211
- <feedburner:origLink>http://news.railstutorial.org/rails_tutorial_draft_second_launch/</feedburner:origLink></entry>
212
-
213
- <entry>
214
- <title type="html"><![CDATA[Draft chapters of the Ruby on Rails Tutorial (3rd Ed.)]]></title>
215
- <link href="http://feedproxy.google.com/~r/railstutorial/~3/5ykIjl8K7io/" />
216
- <updated>2014-08-27T00:00:00-07:00</updated>
217
- <id>http://news.railstutorial.org/rails_tutorial_3rd_edition</id>
218
- <content type="html">&lt;p&gt;&lt;strong&gt;tl;dr:&lt;/strong&gt; &lt;a href="http://draft.railstutorial.org/book"&gt;Draft chapters&lt;/a&gt; of the 3rd edition of the &lt;em&gt;Ruby on Rails Tutorial&lt;/em&gt; are now available. I believe it&amp;#8217;s the best edition yet. &lt;a href="http://draft.railstutorial.org/#email"&gt;Sign up here&lt;/a&gt; for priority notifications and an exclusive coupon code.&lt;/p&gt;
219
-
220
- &lt;p&gt;In the past few years, the &lt;a href="http://www.railstutorial.org/"&gt;&lt;em&gt;Ruby on Rails Tutorial&lt;/em&gt; book&lt;/a&gt; has become one of the leading introductions to web development. Both the 1st and 2nd editions have found broad audiences, and now I&amp;#8217;m pleased to offer draft chapters of the 3rd edition, called &lt;em&gt;Ruby on Rails Tutorial: Learn Web Development with Rails&lt;/em&gt;. For reasons detailed below, I believe it&amp;#8217;s the best edition yet. A draft of the full manuscript is currently available:&lt;/p&gt;
221
-
222
- &lt;ul&gt;
223
- &lt;li&gt;&lt;p&gt;&lt;a href="http://draft.railstutorial.org/book/beginning"&gt;Chapter 1: From zero to deploy&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
224
- &lt;li&gt;&lt;p&gt;&lt;a href="http://draft.railstutorial.org/book/toy_app"&gt;Chapter 2: A toy app&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
225
- &lt;li&gt;&lt;p&gt;&lt;a href="http://draft.railstutorial.org/book/static_pages"&gt;Chapter 3: Mostly static pages&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
226
- &lt;li&gt;&lt;p&gt;&lt;a href="http://draft.railstutorial.org/book/rails_flavored_ruby"&gt;Chapter 4: Rails-flavored Ruby&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
227
- &lt;li&gt;&lt;p&gt;&lt;a href="http://draft.railstutorial.org/book/filling_in_the_layout"&gt;Chapter 5: Filling in the layout&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
228
- &lt;li&gt;&lt;p&gt;&lt;a href="http://draft.railstutorial.org/book/modeling_users"&gt;Chapter 6: Modeling users&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
229
- &lt;li&gt;&lt;p&gt;&lt;a href="http://draft.railstutorial.org/book/sign_up"&gt;Chapter 7: Sign up&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
230
- &lt;li&gt;&lt;p&gt;&lt;a href="http://draft.railstutorial.org/book/log_in_log_out"&gt;Chapter 8: Log in, log out&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
231
- &lt;li&gt;&lt;p&gt;&lt;a href="http://draft.railstutorial.org/book/updating_and_deleting_users"&gt;Chapter 9: Updating, showing, and deleting users&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
232
- &lt;li&gt;&lt;p&gt;&lt;a href="http://draft.railstutorial.org/book/account_activation_password_reset"&gt;Chapter 10: Account activation and password reset&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
233
- &lt;li&gt;&lt;p&gt;&lt;a href="http://draft.railstutorial.org/book/user_microposts"&gt;Chapter 11: User microposts&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
234
- &lt;li&gt;&lt;p&gt;&lt;a href="http://draft.railstutorial.org/book/following_users"&gt;Chapter 12: Following users&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
235
- &lt;/ul&gt;
236
-
237
-
238
- &lt;p&gt;The 3rd edition of the &lt;em&gt;Ruby on Rails Tutorial&lt;/em&gt; will follow the same basic model as previous editions: a free online version, with ebooks and screencasts available for purchase. I also plan to produce a solutions manual for the book&amp;#8217;s exercises, which will probably be included with one or more product bundles.&lt;/p&gt;
239
-
240
- &lt;p&gt;Perhaps the most surprising feature of the 3rd edition is that it is simultaneously &lt;strong&gt;easier&lt;/strong&gt; and &lt;strong&gt;more advanced&lt;/strong&gt; than previous editions. Whereas previous editions required readers to climb (sometimes unavoidable) brick walls, the 3rd edition is more like a ramp: smoothly increasing in difficulty, but ultimately reaching a greater height than before.&lt;/p&gt;
241
-
242
- &lt;p&gt;Here are the main factors that make the 3rd edition &lt;strong&gt;easier&lt;/strong&gt;:&lt;/p&gt;
243
-
244
- &lt;ol&gt;
245
- &lt;li&gt;&lt;p&gt;&lt;strong&gt;Use of a standard &lt;a href="http://c9.io/"&gt;integrated development environment in the cloud&lt;/a&gt;&lt;/strong&gt;, with a pre-configured workspace specifically tailored to the needs of the &lt;em&gt;Ruby on Rails Tutorial&lt;/em&gt;. Use of the custom &lt;a href="http://c9.io/"&gt;Cloud9 IDE&lt;/a&gt; environment eliminates the installation and configuration overhead encountered in previous editions, while also providing the text editor, terminal window, and filesystem navigation necessary to complete the book&amp;#8217;s three example applications.&lt;/p&gt;&lt;/li&gt;
246
- &lt;li&gt;&lt;p&gt;&lt;strong&gt;100% default stack&lt;/strong&gt;. The 3rd edition of the &lt;em&gt;Ruby on Rails Tutorial&lt;/em&gt; uses the default Rails choices for all relevant technologies, thereby substantially reducing the configuration necessary to get started. The excellent but syntactically heavy RSpec testing framework has been replaced with the default Rails testing stack (MiniTest), making for a much gentler introduction to testing than in previous editions.&lt;/p&gt;&lt;/li&gt;
247
- &lt;li&gt;&lt;p&gt;&lt;strong&gt;Lighter-weight testing approach.&lt;/strong&gt; The 3rd edition still covers test-driven development (TDD), but uses it more sparingly and judiciously. The more forbidding &amp;#8220;wall of tests&amp;#8221; sections have been eliminated, with concise and expressive integration tests (usually written after the application code) taking their place.&lt;/p&gt;&lt;/li&gt;
248
- &lt;li&gt;&lt;p&gt;&lt;strong&gt;Less emphasis on version-specific features.&lt;/strong&gt; Rather than trying to incorporate mini-tutorials on new features for each version of Rails, the 3rd edition focuses on the most general principles of web development. This means that, although the tutorial does use the most recent Rails release, this fact is incidental, and it is not tightly coupled to the details of any particular version.&lt;/p&gt;&lt;/li&gt;
249
- &lt;li&gt;&lt;p&gt;&lt;strong&gt;Highlighted lines and red/green indicators.&lt;/strong&gt; By making use of features of the underlying &lt;a href="http://www.softcover.io/"&gt;Softcover self-publishing platform&lt;/a&gt;, the 3rd edition of the &lt;em&gt;Ruby on Rails Tutorial&lt;/em&gt; now includes highlighted lines in many code samples, allowing readers to see at a glance which parts of the code are most important. In addition, many code listings now include explicit labels indicating whether the test suite should be passing or failing at that point in the tutorial, thereby orienting the reader and making the exposition much easier to follow. (See &lt;a href="http://draft.railstutorial.org/book/static_pages#code-about_test"&gt;Listing 3.12&lt;/a&gt; for an example.)&lt;/p&gt;&lt;/li&gt;
250
- &lt;/ol&gt;
251
-
252
-
253
- &lt;p&gt;Meanwhile, these are the main factors that make the 3rd edition &lt;strong&gt;more advanced&lt;/strong&gt;:&lt;/p&gt;
254
-
255
- &lt;ol&gt;
256
- &lt;li&gt;&lt;strong&gt;A completely rewritten chapter on login and authentication.&lt;/strong&gt; The newly revised Chapter 8 covers all three of the most common login models on the Web: session expiration upon browser close, &lt;em&gt;automatically&lt;/em&gt; remembering users, and &lt;em&gt;optionally&lt;/em&gt; remembering users with a &amp;#8220;remember me&amp;#8221; checkbox.&lt;/li&gt;
257
- &lt;li&gt;&lt;strong&gt;An all-new section on image upload.&lt;/strong&gt; Chapter 11 now shows how to add pictures to the Twitter-style &amp;#8220;microposts&amp;#8221; developed in the tutorial&amp;#8217;s main sample application. Topics include client- and server-side image validations, automatic image resizing, and using a cloud storage service (&lt;a href="http://aws.amazon.com/s3/"&gt;Amazon S3&lt;/a&gt;) in production.&lt;/li&gt;
258
- &lt;li&gt;&lt;strong&gt;An all-new chapter on account activation and password resets, including sending email with Rails.&lt;/strong&gt; The all-new Chapter 10 considerably extends the core sample application by adding account activation (thereby verifying the account&amp;#8217;s email address) and allowing users to reset forgotten passwords. In the process, the chapter covers how to send email with Rails, both in development (using the server log) and in production (using &lt;a href="http://mbsy.co/sendgrid/10342175"&gt;SendGrid&lt;/a&gt;).&lt;/li&gt;
259
- &lt;/ol&gt;
260
-
261
-
262
- &lt;p&gt;I&amp;#8217;m more excited about the 3rd edition of the &lt;em&gt;Ruby on Rails Tutorial&lt;/em&gt; than about any previous version. As reflected the new subtitle, &lt;em&gt;Learn Web Development with Rails&lt;/em&gt;, I believe that the &lt;em&gt;Ruby on Rails Tutorial&lt;/em&gt; constitutes not only a solid introduction to Rails, but also a thorough general introduction to web development. It wouldn&amp;#8217;t be nearly as good as it is, though, without the contributions of hundreds (perhaps thousands) of readers who have taken the time to write in with bug &amp;amp; typo reports and other suggestions. As with previous editions, I thus look forward to getting feedback on the &lt;a href="http://draft.railstutorial.org/book"&gt;draft chapters of the 3rd edition of the &lt;em&gt;Ruby on Rails Tutorial&lt;/em&gt;&lt;/a&gt;. And don&amp;#8217;t forget to &lt;a href="http://draft.railstutorial.org/#email"&gt;sign up here&lt;/a&gt; for priority notifications and an exclusive coupon code.&lt;/p&gt;
263
- &lt;img src="//feeds.feedburner.com/~r/railstutorial/~4/5ykIjl8K7io" height="1" width="1" alt=""/&gt;</content>
264
- <feedburner:origLink>http://news.railstutorial.org/rails_tutorial_3rd_edition/</feedburner:origLink></entry>
265
-
266
- <entry>
267
- <title type="html"><![CDATA[Softcover – A publishing platform based on the Rails Tutorial]]></title>
268
- <link href="http://feedproxy.google.com/~r/railstutorial/~3/o58qX2aNDhU/" />
269
- <updated>2014-03-05T00:00:00-08:00</updated>
270
- <id>http://news.railstutorial.org/softcover_launch</id>
271
- <content type="html">&lt;p&gt;When I published the &lt;a href="http://www.railsinside.com/tutorials/363-railstutorial-org-michael-hartls-awesome-new-rails-tutorial.html"&gt;first four chapters&lt;/a&gt; of the &lt;a href="http://ruby.railstutorial.org/"&gt;Ruby on Rails Tutorial&lt;/a&gt; in 2009, it represented an experiment: would it be possible to give away a book for free online while still making a successful product business? The answer, happily, turned out to be &lt;em&gt;yes&lt;/em&gt;. I have been pleased at how many people have been able to use the &lt;a href="http://ruby.railstutorial.org/ruby-on-rails-tutorial-book"&gt;free online version of the &lt;em&gt;Ruby on Rails Tutorial&lt;/em&gt; book&lt;/a&gt; to learn web development. At the same time, right from the beginning sales of the &lt;a href="http://railstutorial.org/#buy"&gt;Rails Tutorial ebooks and screencast videos&lt;/a&gt; have made it profitable as well. It&amp;#8217;s been deeply gratifying to be able to play a role in lowering the financial barrier to acquiring such a valuable skill as web development while still building a sustainable business.&lt;/p&gt;
272
-
273
- &lt;p&gt;Now, I&amp;#8217;m pleased to announce &lt;a href="http://www.softcover.io/"&gt;Softcover&lt;/a&gt;, a publishing platform based on the Rails Tutorial production system and business model. Using Softcover, authors can build multi-format ebooks (HTML, EPUB, MOBI, and PDF) from common source files, optionally bundle them with media like screencast videos, and publish them to Softcover’s integrated sales platform with a single command. Of course, Softcover also outputs an HTML version of each book&amp;mdash;which, as with the Rails Tutorial, authors can (optionally) make available for free online.&lt;/p&gt;
274
-
275
- &lt;p&gt;To see what a full product on Softcover looks like, check out &lt;a href="http://conqueringthecommandline.com/"&gt;Conquering the Command Line&lt;/a&gt;, a book and screencast series on Linux and Unix commands by author Mark Bates, which (like the Rails Tutorial) includes a &lt;a href="http://conqueringthecommandline.com/book"&gt;free online version&lt;/a&gt;. In addition, there is already a version of the Rails Tutorial book that builds on Softcover, and in the coming weeks I plan to move the full tutorial over to the Softcover platform (taking care to preserve things like legacy download links). Watch for an announcement once the change-over is complete.&lt;/p&gt;
276
-
277
- &lt;p&gt;My hope is that Softcover will help allow many other authors to replicate the success of the Ruby on Rails Tutorial. If you&amp;#8217;re interested in using Softcover yourself, you can learn a little more about it on the &lt;a href="http://www.softcover.io/"&gt;Softcover home page&lt;/a&gt;. Then &lt;a href="https://www.softcover.io/account/sign_up"&gt;sign up for an account&lt;/a&gt; and follow the instructions on the start page.&lt;/p&gt;
278
- &lt;img src="//feeds.feedburner.com/~r/railstutorial/~4/o58qX2aNDhU" height="1" width="1" alt=""/&gt;</content>
279
- <feedburner:origLink>http://news.railstutorial.org/softcover_launch/</feedburner:origLink></entry>
280
-
281
- <entry>
282
- <title type="html"><![CDATA[Japanese translation of the Rails Tutorial]]></title>
283
- <link href="http://feedproxy.google.com/~r/railstutorial/~3/bdCEMG13ovM/" />
284
- <updated>2013-11-21T00:00:00-08:00</updated>
285
- <id>http://news.railstutorial.org/japanese_translation</id>
286
- <content type="html">&lt;p&gt;I&amp;#8217;m pleased to announce the availability of a translation of the &lt;a href="http://ruby.railstutorial.org/"&gt;Ruby on Rails Tutorial&lt;/a&gt; to Japanese, the native language of Ruby creator Yukihiro &amp;#8220;Matz&amp;#8221; Matsumoto. I&amp;#8217;ve had the pleasure of meeting Matz and several other Japanese Ruby developers over the years, and they&amp;#8217;ve always impressed me both with their technical brilliance and their friendliness. I consider it a great honor that &lt;a href="http://railstutorial.jp/#contributors"&gt;Yohei Yasukawa, Shozo Hatta, and their fellow contributors&lt;/a&gt; have chosen to translate the Rails Tutorial to Japanese, and I thank them for their excellent work.&lt;/p&gt;
287
-
288
- &lt;p&gt;As with the &lt;a href="http://ruby.railstutorial.org/book"&gt;English version of the Rails Tutorial&lt;/a&gt;, the Japanese translation is available &lt;a href="http://railstutorial.jp/"&gt;for free online as HTML&lt;/a&gt;; with my blessing, the Japanese translators are also offering &lt;a href="http://tatsu-zine.com/books/railstutorial"&gt;ebook sales of the translation&lt;/a&gt;, the proceeds of which go to support their efforts. If you are a Japanese speaker, please check it out!&lt;/p&gt;
289
- &lt;img src="//feeds.feedburner.com/~r/railstutorial/~4/bdCEMG13ovM" height="1" width="1" alt=""/&gt;</content>
290
- <feedburner:origLink>http://news.railstutorial.org/japanese_translation/</feedburner:origLink></entry>
291
-
292
- <entry>
293
- <title type="html"><![CDATA[Rails Tutorial updated for Rails 4.0.1]]></title>
294
- <link href="http://feedproxy.google.com/~r/railstutorial/~3/-WLquUriGUM/" />
295
- <updated>2013-11-01T00:00:00-07:00</updated>
296
- <id>http://news.railstutorial.org/rails_4_0_1</id>
297
- <content type="html">&lt;p&gt;I&amp;#8217;ve just updated the &lt;a href="http://ruby.railstutorial.org/book"&gt;&lt;em&gt;Ruby on Rails Tutorial&lt;/em&gt; book&lt;/a&gt; for the newest Rails release, &lt;a href="http://weblog.rubyonrails.org/2013/11/1/Rails-4-0-1-has-been-released/"&gt;Rails 4.0.1&lt;/a&gt;. If you&amp;#8217;re updating your sample_app to Rails 4.0.1, you&amp;#8217;ll need to change &lt;code&gt;rails&lt;/code&gt; to &lt;code&gt;4.0.1&lt;/code&gt; and &lt;code&gt;bcrypt-ruby&lt;/code&gt; to &lt;code&gt;3.1.2&lt;/code&gt;, as seen in the &lt;a href="https://github.com/railstutorial/sample_app_rails_4/blob/master/Gemfile"&gt;reference sample app Gemfile&lt;/a&gt;:&lt;/p&gt;
298
-
299
- &lt;figure class='code'&gt;&lt;figcaption&gt;&lt;span&gt;&lt;/span&gt;&lt;/figcaption&gt;&lt;div class="highlight"&gt;&lt;table&gt;&lt;tr&gt;&lt;td class="gutter"&gt;&lt;pre class="line-numbers"&gt;&lt;span class='line-number'&gt;1&lt;/span&gt;
300
- &lt;span class='line-number'&gt;2&lt;/span&gt;
301
- &lt;span class='line-number'&gt;3&lt;/span&gt;
302
- &lt;span class='line-number'&gt;4&lt;/span&gt;
303
- &lt;span class='line-number'&gt;5&lt;/span&gt;
304
- &lt;span class='line-number'&gt;6&lt;/span&gt;
305
- &lt;span class='line-number'&gt;7&lt;/span&gt;
306
- &lt;span class='line-number'&gt;8&lt;/span&gt;
307
- &lt;span class='line-number'&gt;9&lt;/span&gt;
308
- &lt;span class='line-number'&gt;10&lt;/span&gt;
309
- &lt;/pre&gt;&lt;/td&gt;&lt;td class='code'&gt;&lt;pre&gt;&lt;code class='ruby'&gt;&lt;span class='line'&gt;&lt;span class="n"&gt;source&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;https://rubygems.org&amp;#39;&lt;/span&gt;
310
- &lt;/span&gt;&lt;span class='line'&gt;&lt;span class="n"&gt;ruby&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;2.0.0&amp;#39;&lt;/span&gt;
311
- &lt;/span&gt;&lt;span class='line'&gt;&lt;span class="c1"&gt;#ruby-gemset=railstutorial_rails_4_0&lt;/span&gt;
312
- &lt;/span&gt;&lt;span class='line'&gt;
313
- &lt;/span&gt;&lt;span class='line'&gt;&lt;span class="n"&gt;gem&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;rails&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;4.0.1&amp;#39;&lt;/span&gt;
314
- &lt;/span&gt;&lt;span class='line'&gt;&lt;span class="n"&gt;gem&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;bootstrap-sass&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;2.3.2.0&amp;#39;&lt;/span&gt;
315
- &lt;/span&gt;&lt;span class='line'&gt;&lt;span class="n"&gt;gem&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;bcrypt-ruby&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;3.1.2&amp;#39;&lt;/span&gt;
316
- &lt;/span&gt;&lt;span class='line'&gt;&lt;span class="o"&gt;.&lt;/span&gt;
317
- &lt;/span&gt;&lt;span class='line'&gt;&lt;span class="o"&gt;.&lt;/span&gt;
318
- &lt;/span&gt;&lt;span class='line'&gt;&lt;span class="o"&gt;.&lt;/span&gt;
319
- &lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;/figure&gt;
320
-
321
-
322
- &lt;p&gt;Then run&lt;/p&gt;
323
-
324
- &lt;figure class='code'&gt;&lt;figcaption&gt;&lt;span&gt;&lt;/span&gt;&lt;/figcaption&gt;&lt;div class="highlight"&gt;&lt;table&gt;&lt;tr&gt;&lt;td class="gutter"&gt;&lt;pre class="line-numbers"&gt;&lt;span class='line-number'&gt;1&lt;/span&gt;
325
- &lt;span class='line-number'&gt;2&lt;/span&gt;
326
- &lt;span class='line-number'&gt;3&lt;/span&gt;
327
- &lt;span class='line-number'&gt;4&lt;/span&gt;
328
- &lt;/pre&gt;&lt;/td&gt;&lt;td class='code'&gt;&lt;pre&gt;&lt;code class='ruby'&gt;&lt;span class='line'&gt;&lt;span class="n"&gt;bundle&lt;/span&gt; &lt;span class="n"&gt;install&lt;/span&gt;
329
- &lt;/span&gt;&lt;span class='line'&gt;&lt;span class="n"&gt;bundle&lt;/span&gt; &lt;span class="n"&gt;update&lt;/span&gt;
330
- &lt;/span&gt;&lt;span class='line'&gt;&lt;span class="n"&gt;bundle&lt;/span&gt; &lt;span class="n"&gt;install&lt;/span&gt;
331
- &lt;/span&gt;&lt;span class='line'&gt;&lt;span class="n"&gt;rspec&lt;/span&gt; &lt;span class="n"&gt;spec&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;
332
- &lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;/figure&gt;
333
-
334
-
335
- &lt;p&gt;(I&amp;#8217;m actually not sure if both calls to &lt;code&gt;bundle install&lt;/code&gt; are necessary, but they can&amp;#8217;t hurt.)&lt;/p&gt;
336
-
337
- &lt;p&gt;As far as I can tell, there are no changes between Rails 4.0.0 and 4.0.1 that affect the Rails Tutorial, but please &lt;a href="http://railstutorial.org/contact"&gt;let me know&lt;/a&gt; if you run into any issues.&lt;/p&gt;
338
- &lt;img src="//feeds.feedburner.com/~r/railstutorial/~4/-WLquUriGUM" height="1" width="1" alt=""/&gt;</content>
339
- <feedburner:origLink>http://news.railstutorial.org/rails_4_0_1/</feedburner:origLink></entry>
340
-
341
- <entry>
342
- <title type="html"><![CDATA[Rails 4.0 ebooks and supplementary screencasts]]></title>
343
- <link href="http://feedproxy.google.com/~r/railstutorial/~3/Lst9kJ55jE4/" />
344
- <updated>2013-07-16T00:00:00-07:00</updated>
345
- <id>http://news.railstutorial.org/rails_4_0_supplement</id>
346
- <content type="html">&lt;p&gt;&lt;a href="http://www.urbandictionary.com/define.php?term=tl%3Bdr"&gt;&lt;strong&gt;tl;dr&lt;/strong&gt;&lt;/a&gt;: &lt;a href="http://railstutorial.org/#buy"&gt;Rails Tutorial products updated for Rails 4.0&lt;/a&gt; are now available. Current customers should check their email for generous coupon codes; new customers can use the code &lt;strong&gt;rails4launch&lt;/strong&gt; by Monday, July 22, to get a 25% launch discount.&lt;/p&gt;
347
-
348
- &lt;p&gt;I&amp;#8217;ve just launched sales of two new products, motivated by the recent release of Rails&amp;nbsp;4.0. The first product is the &lt;a href="http://railstutorial.org/#ebooks"&gt;Rails&amp;nbsp;4.0 version of the &lt;em&gt;Ruby on Rails Tutorial&lt;/em&gt; book&lt;/a&gt; in the three most popular ebook formats (PDF/EPUB/MOBI) . As noted in a &lt;a href="http://news.railstutorial.org/rails-tutorial-for-rails-4-0-final/"&gt;previous post&lt;/a&gt;, the 4.0 version is not a completely new edition, but it is 100% compatible with Rails 4.0 and covers a significant number of new features (now listed in &lt;a href="http://railstutorial.org/book#sidebar-diffs"&gt;Box&amp;nbsp;1.1 of the new version&lt;/a&gt;).&lt;/p&gt;
349
-
350
- &lt;p&gt;The second new product is a pair of &lt;a href="http://railstutorial.org/#supplement"&gt;supplementary screencasts on Rails&amp;nbsp;4.0&lt;/a&gt; based on an all-new &lt;a href="http://railstutorial.org/chapters/supplement?version=3.2#top"&gt;supplementary chapter&lt;/a&gt; that is part of an enhanced 2nd edition of the book. The supplementary screencasts include a live demo of upgrading the Rails Tutorial sample application from Rails&amp;nbsp;3.2 to Rails&amp;nbsp;4.0, a discussion of the new strong parameters technique for preventing mass assignment vulnerabilities, and two new security updates (dynamic secret tokens and encrypted remember tokens). Note that, in keeping with the tutorial&amp;#8217;s principal goal of being a general introduction to web development, the new chapter and screencasts do not attempt to cover all the new features in Rails&amp;nbsp;4.0. For those interested in keeping up-to-date with the latest Rails techniques, I recommend &lt;a href="http://railscasts.com/"&gt;RailsCasts&lt;/a&gt;.&lt;/p&gt;
351
-
352
- &lt;p&gt;As usual, the full text of the book is available for free online, including the &lt;a href="http://railstutorial.org/book"&gt;Rails&amp;nbsp;4.0 version&lt;/a&gt; and the &lt;a href="http://railstutorial.org/chapters/supplement?version=3.2#top"&gt;supplementary chapter&lt;/a&gt;.&lt;/p&gt;
353
-
354
- &lt;p&gt;To meet the needs of the largest number of customers, the new products are available in several ways:&lt;/p&gt;
355
-
356
- &lt;ul&gt;
357
- &lt;li&gt;&lt;p&gt;The &lt;a href="http://railstutorial.org/#ebooks"&gt;ebooks&lt;/a&gt; now include both the full Rails&amp;nbsp;4.0 version and the 2nd edition with the new supplementary chapter. &lt;strong&gt;Recommended for current ebook customers and new customers who don&amp;#8217;t want screencasts&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
358
- &lt;li&gt;&lt;p&gt;The &lt;a href="http://railstutorial.org/#bundle"&gt;ebook/screencast bundle&lt;/a&gt; now includes the enhanced 2nd edition book, the 4.0 version of the book, and the Rails&amp;nbsp;4.0 supplementary screencasts, as well as the full 1st and 2nd edition screencast series. &lt;strong&gt;Recommended for new customers who learn well from screencasts&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
359
- &lt;li&gt;&lt;p&gt;A new &lt;a href="http://railstutorial.org/#supplement"&gt;supplement bundle&lt;/a&gt; combines the enhanced 2nd edition book, the 4.0 version of the book, and the Rails&amp;nbsp;4.0 supplementary screencasts. &lt;strong&gt;Recommended for current ebook/screencast customers&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
360
- &lt;/ul&gt;
361
-
362
-
363
- &lt;p&gt;If you do decide to &lt;a href="http://railstutorial.org/#buy"&gt;buy a Rails 4.0 product&lt;/a&gt;, be sure to use the code &lt;strong&gt;rails4launch&lt;/strong&gt; by Monday, July 22, to get a 25% launch discount, unless you are current customer. Current &lt;em&gt;Rails Tutorial&lt;/em&gt; customers should check their email to find coupon codes for special discounts on the new products. (You might notice that the prices have gone up with the addition of the new products; the discounts are large enough that current customers are still better off having bought things earlier rather than later.)&lt;/p&gt;
364
- &lt;img src="//feeds.feedburner.com/~r/railstutorial/~4/Lst9kJ55jE4" height="1" width="1" alt=""/&gt;</content>
365
- <feedburner:origLink>http://news.railstutorial.org/rails_4_0_supplement/</feedburner:origLink></entry>
366
-
367
- <entry>
368
- <title type="html"><![CDATA[One more test post]]></title>
369
- <link href="http://feedproxy.google.com/~r/railstutorial/~3/2UBdHakjcZM/" />
370
- <updated>2013-07-07T00:00:00-07:00</updated>
371
- <id>http://news.railstutorial.org/one-more-test-post</id>
372
- <content type="html">&lt;p&gt;The recent &lt;a href="http://news.railstutorial.org/switch-to-heroku/"&gt;switch to Heroku&lt;/a&gt; ferreted out an annoying bug in the &lt;a href="http://news.railstutorial.org/"&gt;Rails Tutorial News Feed&lt;/a&gt;, namely, hard-coded GitHub Pages URLs deep in the site&amp;#8217;s configuration. All the links on the site itself were fine, but the Atom feed had the obsolete GitHub Pages addresses. I&amp;#8217;m glad to find out about this, as I certainly never meant to expose those URLs, preferring to use custom subdomains (e.g., &lt;a href="http://news.railstutorial.org/"&gt;news.railstutorial.org&lt;/a&gt;) whenever possible. So, the prophecy in my &lt;a href="http://news.railstutorial.org/switch-to-heroku/"&gt;last post&lt;/a&gt; that this sort of issue wouldn&amp;#8217;t soon happen again has gone unfulfilled, but I&amp;#8217;m optimistic that &lt;em&gt;this&lt;/em&gt; is indeed the last time.&lt;/p&gt;
373
-
374
- &lt;p&gt;I&amp;#8217;ve changed over the feed to use the proper news.railstutorial.org URLs, but it might take a few days for all the caches with the old feed to expire. Thanks for your patience, and sorry for all the noise.&lt;/p&gt;
375
- &lt;img src="//feeds.feedburner.com/~r/railstutorial/~4/2UBdHakjcZM" height="1" width="1" alt=""/&gt;</content>
376
- <feedburner:origLink>http://news.railstutorial.org/one-more-test-post/</feedburner:origLink></entry>
377
-
378
- <entry>
379
- <title type="html"><![CDATA[Switching the news feed to Heroku]]></title>
380
- <link href="http://feedproxy.google.com/~r/railstutorial/~3/If0RI9wObxk/" />
381
- <updated>2013-07-05T00:00:00-07:00</updated>
382
- <id>http://news.railstutorial.org/switch-to-heroku</id>
383
- <content type="html">&lt;p&gt;After having some trouble with the refresh times on GitHub Pages, a few days ago I switched the Rails Tutorial News Feed over to Heroku. Some of you may have noticed a large number of unread articles in your feed reader or email summary; this change from Pages to Heroku is the reason why, as it forced a regeneration of the site&amp;#8217;s Atom feed. Now I&amp;#8217;ve discovered that a few posts got lost in the transition; I&amp;#8217;ve added them back, which means another chunk of &amp;#8220;unread&amp;#8221; items may show up in your reader or inbox. The Heroku site is now working well, though, so I&amp;#8217;m optimistic that this kind of thing won&amp;#8217;t happen again any time soon.&lt;/p&gt;
384
- &lt;img src="//feeds.feedburner.com/~r/railstutorial/~4/If0RI9wObxk" height="1" width="1" alt=""/&gt;</content>
385
- <feedburner:origLink>http://news.railstutorial.org/switch-to-heroku/</feedburner:origLink></entry>
386
-
387
- <entry>
388
- <title type="html"><![CDATA[A more secure remember token]]></title>
389
- <link href="http://feedproxy.google.com/~r/railstutorial/~3/wAMbS1Ih47A/" />
390
- <updated>2013-07-01T00:00:00-07:00</updated>
391
- <id>http://news.railstutorial.org/secure-remember-token</id>
392
- <content type="html">&lt;p&gt;I recently received a helpful email from reader Yuri Krichevsky pointing out a way to improve the security of the &amp;#8220;remember me&amp;#8221; tokens used in the &lt;a href="http://ruby.railstutorial.org/ruby-on-rails-tutorial-book?version=4.0"&gt;Ruby on Rails Tutorial book&lt;/a&gt;. Since I&amp;#8217;m gearing up to release the Rails 4.0&amp;ndash;compatible version, I decided to go ahead and implement the more secure method. The result appears starting in &lt;a href="http://ruby.railstutorial.org/chapters/sign-in-sign-out?version=4.0#sec-remember_me"&gt;Section 8.2.1&lt;/a&gt; of the new version, with the corresponding &lt;a href="https://github.com/railstutorial/sample_app_rails_4/"&gt;sample app code&lt;/a&gt; available on GitHub. I&amp;#8217;ve edited it carefully, but there were a lot of little changes, so it&amp;#8217;s possible some errors slipped through. If you get the chance, please take a look at it and let me know if it works as advertised.&lt;/p&gt;
393
- &lt;img src="//feeds.feedburner.com/~r/railstutorial/~4/wAMbS1Ih47A" height="1" width="1" alt=""/&gt;</content>
394
- <feedburner:origLink>http://news.railstutorial.org/secure-remember-token/</feedburner:origLink></entry>
395
-
396
- <entry>
397
- <title type="html"><![CDATA[Rails Tutorial for Rails 4.0 final]]></title>
398
- <link href="http://feedproxy.google.com/~r/railstutorial/~3/am7pzwwgBWE/" />
399
- <updated>2013-06-25T00:00:00-07:00</updated>
400
- <id>http://news.railstutorial.org/rails-tutorial-for-rails-4-0-final</id>
401
- <content type="html">&lt;p&gt;I&amp;#8217;ve updated the &lt;a href="http://ruby.railstutorial.org/ruby-on-rails-tutorial-book?version=4.0"&gt;Ruby on Rails Tutorial book&lt;/a&gt; to use the &lt;a href="http://weblog.rubyonrails.org/2013/6/25/Rails-4-0-final/"&gt;recently released Rails 4.0 final&lt;/a&gt;. I&amp;#8217;ll give people a chance to look at it for a week or two and then switch it over to the default at &lt;a href="http://railstutorial.org/"&gt;railstutorial.org&lt;/a&gt;. I also plan to produce a supplementary screencast on Rails 4.0, updating the book&amp;#8217;s &lt;a href="https://github.com/railstutorial/sample_app_rails_4/"&gt;sample app&lt;/a&gt; and covering some of the relevant diffs with Rails 3.2.&lt;/p&gt;
402
-
403
- &lt;p&gt;Within a few weeks, I expect to release the supplementary screencast and ebook of the &lt;a href="http://ruby.railstutorial.org/ruby-on-rails-tutorial-book?version=4.0"&gt;4.0 version&lt;/a&gt; as a standalone product, available at a large discount to current customers. Once I feel the changes in Rails justify the effort (probably later this year), I plan to produce a full new 3rd edition and a new screencast series. These will also be available at a discount to current customers.&lt;/p&gt;
404
-
405
- &lt;p&gt;The full 3rd edition will include everything in the current version, as well as some optional updates to the RSpec syntax for integration tests and probably some coverage of Turbolinks and Russian-doll caching. I also anticipate there being a new Rails release or two before then, presumably bringing some additional changes.&lt;/p&gt;
406
-
407
- &lt;p&gt;It&amp;#8217;s worth bearing in mind that the purpose of the Rails Tutorial is to teach &lt;em&gt;web development&lt;/em&gt; with Rails, not principally to keep people up-to-date on the latest Rails techniques. In the context of an introductory tutorial, the differences between Rails 3.2 and Rails 4.0 are minor. If you are already an experienced Rails developer and want to keep up with latest techniques in Rails, I recommend Ryan Bates&amp;#8217;s &lt;a href="http://railscasts.com/"&gt;RailsCasts&lt;/a&gt;.&lt;/p&gt;
408
- &lt;img src="//feeds.feedburner.com/~r/railstutorial/~4/am7pzwwgBWE" height="1" width="1" alt=""/&gt;</content>
409
- <feedburner:origLink>http://news.railstutorial.org/rails-tutorial-for-rails-4-0-final/</feedburner:origLink></entry>
410
-
411
- <entry>
412
- <title type="html"><![CDATA[RubyMine Tips Screencast]]></title>
413
- <link href="http://feedproxy.google.com/~r/railstutorial/~3/GmAJUmBqfi4/" />
414
- <updated>2013-05-30T00:00:00-07:00</updated>
415
- <id>http://news.railstutorial.org/rubymine-tips</id>
416
- <content type="html">&lt;p&gt;My preferred text editor for Ruby on Rails development is Sublime Text&amp;nbsp;2, but I keep hearing great things about &lt;a href="http://www.jetbrains.com/ruby/"&gt;RubyMine&lt;/a&gt;. In advance of the release of the 2nd edition of the &lt;a href="http://ruby.railstutorial.org/ruby-on-rails-tutorial-book"&gt;Ruby on Rails Tutorial book&lt;/a&gt;, last year I released a short &lt;a href="http://youtu.be/05x1Jk4rT1A"&gt;Sublime Text 2 for Rails screencast&lt;/a&gt;; I&amp;#8217;m pleased to announce that &lt;a href="http://railsonmaui.com/"&gt;Justin Gordon&lt;/a&gt; (&lt;a href="http://twitter.com/railsonmaui"&gt;@railsonmaui&lt;/a&gt;) has produced a companion &lt;a href="http://www.railsonmaui.com/tips/rubymine.html"&gt;RubyMine tips screencast&lt;/a&gt; that does a great job of showing off what RubyMine can do, especially in the context of a Ruby on Rails application. I encourage everyone with an interest in using an IDE for Rails development to &lt;a href="http://www.railsonmaui.com/tips/rubymine.html"&gt;check out Justin&amp;#8217;s screencast&lt;/a&gt;.&lt;/p&gt;
417
- &lt;img src="//feeds.feedburner.com/~r/railstutorial/~4/GmAJUmBqfi4" height="1" width="1" alt=""/&gt;</content>
418
- <feedburner:origLink>http://news.railstutorial.org/rubymine-tips/</feedburner:origLink></entry>
419
-
420
- <entry>
421
- <title type="html"><![CDATA[Rails Tutorial for Rails 4.0 RC1]]></title>
422
- <link href="http://feedproxy.google.com/~r/railstutorial/~3/U7xmTNwWLqQ/" />
423
- <updated>2013-05-15T00:00:00-07:00</updated>
424
- <id>http://news.railstutorial.org/rails-tutorial-for-rails-4-0-rc</id>
425
- <content type="html">&lt;p&gt;After some &lt;a href="http://news.railstutorial.org/failing-rails-4-0-rc1/"&gt;initial hiccups&lt;/a&gt;, I&amp;#8217;ve finished preparing a version of the &lt;a href="http://ruby.railstutorial.org/ruby-on-rails-tutorial-book?version=4.0"&gt;Ruby on Rails Tutorial compatible with the first Rails 4.0 release candidate&lt;/a&gt;. Interested readers can take a look at it and &lt;a href="http://railstutorial.org/contact"&gt;let me know&lt;/a&gt; if anything doesn&amp;#8217;t work.&lt;/p&gt;
426
- &lt;img src="//feeds.feedburner.com/~r/railstutorial/~4/U7xmTNwWLqQ" height="1" width="1" alt=""/&gt;</content>
427
- <feedburner:origLink>http://news.railstutorial.org/rails-tutorial-for-rails-4-0-rc/</feedburner:origLink></entry>
428
-
429
- <entry>
430
- <title type="html"><![CDATA[Rails 4.0 Release Candidate 1]]></title>
431
- <link href="http://feedproxy.google.com/~r/railstutorial/~3/pfvjhrIetIM/" />
432
- <updated>2013-05-10T00:00:00-07:00</updated>
433
- <id>http://news.railstutorial.org/failing-rails-4-0-rc1</id>
434
- <content type="html">&lt;p&gt;&lt;strong&gt;Update:&lt;/strong&gt; &lt;a href="https://github.com/steveklabnik"&gt;Steve Klabnik&lt;/a&gt; has solved the problem discussed in the post below by &lt;a href="https://github.com/rails/rails/issues/10563#issuecomment-17780709"&gt;noting&lt;/a&gt; that the latest version of the rspec-rails gem (2.13.1) has fixes specific to Rails 4.0. After upgrading the Gemfile to use this version, I have confirmed that the issue described in the post is fixed. Thanks, Steve!&lt;/p&gt;
435
-
436
- &lt;p&gt;The first Rails 4.0 release candidate, &lt;a href="http://weblog.rubyonrails.org/2013/5/1/Rails-4-0-release-candidate-1/"&gt;Rails 4.0 RC1&lt;/a&gt;, is now available. Unfortunately, although the Rails Tutorial sample app appears to run fine under the RC, a large number of tests fail. Most of the failing tests appear to be related to the test database not being rolled back properly. I&amp;#8217;m posting the details here both to solicit assistance and to serve as a reference for the &lt;a href="https://github.com/rails/rails/issues/10563"&gt;issue&lt;/a&gt; I&amp;#8217;ve filed on the Rails issue tracker at GitHub. This issue is currently the main obstacle blocking the preparation of the Rails&amp;nbsp;4.0–compatible version of the &lt;a href="http://railstutorial.org/book"&gt;Ruby on Rails Tutorial book&lt;/a&gt;.&lt;/p&gt;
437
-
438
- &lt;h2&gt;Isolating the issue&lt;/h2&gt;
439
-
440
- &lt;p&gt;To isolate the issue, I&amp;#8217;ve prepared a minimial &lt;a href="https://github.com/mhartl/failing_app_rails_4_0_rc1"&gt;failing app&lt;/a&gt;. To reproduce the error I&amp;#8217;m seeing, first clone it from GitHub:&lt;/p&gt;
441
-
442
- &lt;figure class='code'&gt;&lt;div class="highlight"&gt;&lt;table&gt;&lt;tr&gt;&lt;td class="gutter"&gt;&lt;pre class="line-numbers"&gt;&lt;span class='line-number'&gt;1&lt;/span&gt;
443
- &lt;/pre&gt;&lt;/td&gt;&lt;td class='code'&gt;&lt;pre&gt;&lt;code class=''&gt;&lt;span class='line'&gt;git clone https://github.com/mhartl/failing_app_rails_4_0_rc1.git&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;/figure&gt;
444
-
445
-
446
- &lt;p&gt;Then install the gems and migrate the database:&lt;/p&gt;
447
-
448
- &lt;figure class='code'&gt;&lt;div class="highlight"&gt;&lt;table&gt;&lt;tr&gt;&lt;td class="gutter"&gt;&lt;pre class="line-numbers"&gt;&lt;span class='line-number'&gt;1&lt;/span&gt;
449
- &lt;span class='line-number'&gt;2&lt;/span&gt;
450
- &lt;span class='line-number'&gt;3&lt;/span&gt;
451
- &lt;span class='line-number'&gt;4&lt;/span&gt;
452
- &lt;span class='line-number'&gt;5&lt;/span&gt;
453
- &lt;/pre&gt;&lt;/td&gt;&lt;td class='code'&gt;&lt;pre&gt;&lt;code class=''&gt;&lt;span class='line'&gt;cd failing_app_rails_4_0_rc1
454
- &lt;/span&gt;&lt;span class='line'&gt;rvm use 2.0.0@rails_4_0_rc1 --create
455
- &lt;/span&gt;&lt;span class='line'&gt;gem install bundler
456
- &lt;/span&gt;&lt;span class='line'&gt;bundle
457
- &lt;/span&gt;&lt;span class='line'&gt;rake db:migrate&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;/figure&gt;
458
-
459
-
460
- &lt;h2&gt;Preparing the test database&lt;/h2&gt;
461
-
462
- &lt;p&gt;So far, so good. The first problem comes from trying to run the tests after preparing the test database:&lt;/p&gt;
463
-
464
- &lt;figure class='code'&gt;&lt;div class="highlight"&gt;&lt;table&gt;&lt;tr&gt;&lt;td class="gutter"&gt;&lt;pre class="line-numbers"&gt;&lt;span class='line-number'&gt;1&lt;/span&gt;
465
- &lt;span class='line-number'&gt;2&lt;/span&gt;
466
- &lt;/pre&gt;&lt;/td&gt;&lt;td class='code'&gt;&lt;pre&gt;&lt;code class=''&gt;&lt;span class='line'&gt;rake db:test:prepare
467
- &lt;/span&gt;&lt;span class='line'&gt;rspec spec/&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;/figure&gt;
468
-
469
-
470
- &lt;p&gt;Unfortunately, this doesn&amp;#8217;t work. Instead, I get an error:&lt;/p&gt;
471
-
472
- &lt;figure class='code'&gt;&lt;div class="highlight"&gt;&lt;table&gt;&lt;tr&gt;&lt;td class="gutter"&gt;&lt;pre class="line-numbers"&gt;&lt;span class='line-number'&gt;1&lt;/span&gt;
473
- &lt;span class='line-number'&gt;2&lt;/span&gt;
474
- &lt;span class='line-number'&gt;3&lt;/span&gt;
475
- &lt;span class='line-number'&gt;4&lt;/span&gt;
476
- &lt;/pre&gt;&lt;/td&gt;&lt;td class='code'&gt;&lt;pre&gt;&lt;code class=''&gt;&lt;span class='line'&gt;/Users/mhartl/.rvm/gems/ruby-2.0.0-p0@rails_4_0_rc1/gems/activerecord-
477
- &lt;/span&gt;&lt;span class='line'&gt;4.0.0.rc1/lib/active_record/migration.rb:376:in `check_pending!':
478
- &lt;/span&gt;&lt;span class='line'&gt;Migrations are pending; run 'rake db:migrate RAILS_ENV=test' to resolve
479
- &lt;/span&gt;&lt;span class='line'&gt;this issue. (ActiveRecord::PendingMigrationError)&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;/figure&gt;
480
-
481
-
482
- &lt;p&gt;I have never had to run &lt;code&gt;rake db:migrate RAILS_ENV=test&lt;/code&gt; in the course of normal Rails application development. To my knowledge, this should automatically be handled by&lt;/p&gt;
483
-
484
- &lt;figure class='code'&gt;&lt;div class="highlight"&gt;&lt;table&gt;&lt;tr&gt;&lt;td class="gutter"&gt;&lt;pre class="line-numbers"&gt;&lt;span class='line-number'&gt;1&lt;/span&gt;
485
- &lt;/pre&gt;&lt;/td&gt;&lt;td class='code'&gt;&lt;pre&gt;&lt;code class=''&gt;&lt;span class='line'&gt;rake db:test:prepare&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;/figure&gt;
486
-
487
-
488
- &lt;p&gt;But to proceed I had to run it:&lt;/p&gt;
489
-
490
- &lt;figure class='code'&gt;&lt;div class="highlight"&gt;&lt;table&gt;&lt;tr&gt;&lt;td class="gutter"&gt;&lt;pre class="line-numbers"&gt;&lt;span class='line-number'&gt;1&lt;/span&gt;
491
- &lt;/pre&gt;&lt;/td&gt;&lt;td class='code'&gt;&lt;pre&gt;&lt;code class=''&gt;&lt;span class='line'&gt;rake db:migrate RAILS_ENV=test&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;/figure&gt;
492
-
493
-
494
- &lt;h2&gt;Passing test, then failing test&lt;/h2&gt;
495
-
496
- &lt;p&gt;The test now passes:&lt;/p&gt;
497
-
498
- &lt;figure class='code'&gt;&lt;div class="highlight"&gt;&lt;table&gt;&lt;tr&gt;&lt;td class="gutter"&gt;&lt;pre class="line-numbers"&gt;&lt;span class='line-number'&gt;1&lt;/span&gt;
499
- &lt;span class='line-number'&gt;2&lt;/span&gt;
500
- &lt;span class='line-number'&gt;3&lt;/span&gt;
501
- &lt;span class='line-number'&gt;4&lt;/span&gt;
502
- &lt;span class='line-number'&gt;5&lt;/span&gt;
503
- &lt;/pre&gt;&lt;/td&gt;&lt;td class='code'&gt;&lt;pre&gt;&lt;code class=''&gt;&lt;span class='line'&gt;$ rspec spec/
504
- &lt;/span&gt;&lt;span class='line'&gt;.
505
- &lt;/span&gt;&lt;span class='line'&gt;
506
- &lt;/span&gt;&lt;span class='line'&gt;Finished in 0.03903 seconds
507
- &lt;/span&gt;&lt;span class='line'&gt;1 example, 0 failures&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;/figure&gt;
508
-
509
-
510
- &lt;p&gt;Unfortunately, running the test a second time produces an error:&lt;/p&gt;
511
-
512
- &lt;figure class='code'&gt;&lt;div class="highlight"&gt;&lt;table&gt;&lt;tr&gt;&lt;td class="gutter"&gt;&lt;pre class="line-numbers"&gt;&lt;span class='line-number'&gt;1&lt;/span&gt;
513
- &lt;span class='line-number'&gt;2&lt;/span&gt;
514
- &lt;span class='line-number'&gt;3&lt;/span&gt;
515
- &lt;span class='line-number'&gt;4&lt;/span&gt;
516
- &lt;span class='line-number'&gt;5&lt;/span&gt;
517
- &lt;span class='line-number'&gt;6&lt;/span&gt;
518
- &lt;span class='line-number'&gt;7&lt;/span&gt;
519
- &lt;span class='line-number'&gt;8&lt;/span&gt;
520
- &lt;span class='line-number'&gt;9&lt;/span&gt;
521
- &lt;span class='line-number'&gt;10&lt;/span&gt;
522
- &lt;span class='line-number'&gt;11&lt;/span&gt;
523
- &lt;span class='line-number'&gt;12&lt;/span&gt;
524
- &lt;span class='line-number'&gt;13&lt;/span&gt;
525
- &lt;span class='line-number'&gt;14&lt;/span&gt;
526
- &lt;span class='line-number'&gt;15&lt;/span&gt;
527
- &lt;/pre&gt;&lt;/td&gt;&lt;td class='code'&gt;&lt;pre&gt;&lt;code class=''&gt;&lt;span class='line'&gt;$ rspec spec/
528
- &lt;/span&gt;&lt;span class='line'&gt;F
529
- &lt;/span&gt;&lt;span class='line'&gt;
530
- &lt;/span&gt;&lt;span class='line'&gt;Failures:
531
- &lt;/span&gt;&lt;span class='line'&gt;
532
- &lt;/span&gt;&lt;span class='line'&gt; 1) User should save the user
533
- &lt;/span&gt;&lt;span class='line'&gt; Failure/Error: expect { user.save! }.not_to raise_error
534
- &lt;/span&gt;&lt;span class='line'&gt; expected no Exception, got #&amp;lt;ActiveRecord::RecordInvalid: Validation
535
- &lt;/span&gt;&lt;span class='line'&gt; failed: Email has already been taken&amp;gt; with backtrace:
536
- &lt;/span&gt;&lt;span class='line'&gt; # ./spec/models/user_spec.rb:6:in `block (3 levels) in &amp;lt;top (required)&amp;gt;'
537
- &lt;/span&gt;&lt;span class='line'&gt; # ./spec/models/user_spec.rb:6:in `block (2 levels) in &amp;lt;top (required)&amp;gt;'
538
- &lt;/span&gt;&lt;span class='line'&gt; # ./spec/models/user_spec.rb:6:in `block (2 levels) in &amp;lt;top (required)&amp;gt;'
539
- &lt;/span&gt;&lt;span class='line'&gt;
540
- &lt;/span&gt;&lt;span class='line'&gt;Finished in 0.03405 seconds
541
- &lt;/span&gt;&lt;span class='line'&gt;1 example, 1 failure&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;/figure&gt;
542
-
543
-
544
- &lt;h2&gt;Email uniqueness&lt;/h2&gt;
545
-
546
- &lt;p&gt;If you look at the &lt;a href="https://github.com/mhartl/failing_app_rails_4_0_rc1"&gt;source code&lt;/a&gt;, you&amp;#8217;ll see that the &amp;#8220;app&amp;#8221; is really just a User model that enforces email uniqueness:&lt;/p&gt;
547
-
548
- &lt;figure class='code'&gt;&lt;figcaption&gt;&lt;span&gt;&lt;/span&gt;&lt;/figcaption&gt;&lt;div class="highlight"&gt;&lt;table&gt;&lt;tr&gt;&lt;td class="gutter"&gt;&lt;pre class="line-numbers"&gt;&lt;span class='line-number'&gt;1&lt;/span&gt;
549
- &lt;span class='line-number'&gt;2&lt;/span&gt;
550
- &lt;span class='line-number'&gt;3&lt;/span&gt;
551
- &lt;span class='line-number'&gt;4&lt;/span&gt;
552
- &lt;/pre&gt;&lt;/td&gt;&lt;td class='code'&gt;&lt;pre&gt;&lt;code class='ruby'&gt;&lt;span class='line'&gt;&lt;span class="c1"&gt;# app/models/user.rb&lt;/span&gt;
553
- &lt;/span&gt;&lt;span class='line'&gt;&lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;User&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="ss"&gt;ActiveRecord&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="ss"&gt;:Base&lt;/span&gt;
554
- &lt;/span&gt;&lt;span class='line'&gt; &lt;span class="n"&gt;validates&lt;/span&gt; &lt;span class="ss"&gt;:email&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="ss"&gt;uniqueness&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kp"&gt;true&lt;/span&gt;
555
- &lt;/span&gt;&lt;span class='line'&gt;&lt;span class="k"&gt;end&lt;/span&gt;
556
- &lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;/figure&gt;
557
-
558
-
559
- &lt;p&gt;The corrsponding test just tries to save the user:&lt;/p&gt;
560
-
561
- &lt;figure class='code'&gt;&lt;figcaption&gt;&lt;span&gt;&lt;/span&gt;&lt;/figcaption&gt;&lt;div class="highlight"&gt;&lt;table&gt;&lt;tr&gt;&lt;td class="gutter"&gt;&lt;pre class="line-numbers"&gt;&lt;span class='line-number'&gt;1&lt;/span&gt;
562
- &lt;span class='line-number'&gt;2&lt;/span&gt;
563
- &lt;span class='line-number'&gt;3&lt;/span&gt;
564
- &lt;span class='line-number'&gt;4&lt;/span&gt;
565
- &lt;span class='line-number'&gt;5&lt;/span&gt;
566
- &lt;span class='line-number'&gt;6&lt;/span&gt;
567
- &lt;span class='line-number'&gt;7&lt;/span&gt;
568
- &lt;span class='line-number'&gt;8&lt;/span&gt;
569
- &lt;span class='line-number'&gt;9&lt;/span&gt;
570
- &lt;/pre&gt;&lt;/td&gt;&lt;td class='code'&gt;&lt;pre&gt;&lt;code class='ruby'&gt;&lt;span class='line'&gt;&lt;span class="c1"&gt;# spec/models/user_spec.rb&lt;/span&gt;
571
- &lt;/span&gt;&lt;span class='line'&gt;&lt;span class="nb"&gt;require&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;spec_helper&amp;#39;&lt;/span&gt;
572
- &lt;/span&gt;&lt;span class='line'&gt;
573
- &lt;/span&gt;&lt;span class='line'&gt;&lt;span class="n"&gt;describe&lt;/span&gt; &lt;span class="no"&gt;User&lt;/span&gt; &lt;span class="k"&gt;do&lt;/span&gt;
574
- &lt;/span&gt;&lt;span class='line'&gt; &lt;span class="n"&gt;let&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="ss"&gt;:user&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="no"&gt;User&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;new&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="ss"&gt;email&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;user@example.com&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
575
- &lt;/span&gt;&lt;span class='line'&gt; &lt;span class="n"&gt;it&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;should save the user&amp;quot;&lt;/span&gt; &lt;span class="k"&gt;do&lt;/span&gt;
576
- &lt;/span&gt;&lt;span class='line'&gt; &lt;span class="n"&gt;expect&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;user&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;save!&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;not_to&lt;/span&gt; &lt;span class="n"&gt;raise_error&lt;/span&gt;
577
- &lt;/span&gt;&lt;span class='line'&gt; &lt;span class="k"&gt;end&lt;/span&gt;
578
- &lt;/span&gt;&lt;span class='line'&gt;&lt;span class="k"&gt;end&lt;/span&gt;
579
- &lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;/figure&gt;
580
-
581
-
582
- &lt;p&gt;After excuting the test, Rails should roll back the test database, but instead it is persisting from invocation to invocation, resulting in a violation of the email uniqueness constraint the second time through.&lt;/p&gt;
583
-
584
- &lt;h2&gt;Reproducing the error&lt;/h2&gt;
585
-
586
- &lt;p&gt;We can reproduce the error by removing the test database, re-migrating, and running the test again (twice):&lt;/p&gt;
587
-
588
- &lt;figure class='code'&gt;&lt;figcaption&gt;&lt;span&gt;&lt;/span&gt;&lt;/figcaption&gt;&lt;div class="highlight"&gt;&lt;table&gt;&lt;tr&gt;&lt;td class="gutter"&gt;&lt;pre class="line-numbers"&gt;&lt;span class='line-number'&gt;1&lt;/span&gt;
589
- &lt;span class='line-number'&gt;2&lt;/span&gt;
590
- &lt;span class='line-number'&gt;3&lt;/span&gt;
591
- &lt;span class='line-number'&gt;4&lt;/span&gt;
592
- &lt;span class='line-number'&gt;5&lt;/span&gt;
593
- &lt;/pre&gt;&lt;/td&gt;&lt;td class='code'&gt;&lt;pre&gt;&lt;code class='ruby'&gt;&lt;span class='line'&gt;&lt;span class="err"&gt;$&lt;/span&gt; &lt;span class="n"&gt;rm&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;f&lt;/span&gt; &lt;span class="n"&gt;db&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nb"&gt;test&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;sqlite3&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="n"&gt;rake&lt;/span&gt; &lt;span class="ss"&gt;db&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="n"&gt;migrate&lt;/span&gt; &lt;span class="no"&gt;RAILS_ENV&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nb"&gt;test&lt;/span&gt;
594
- &lt;/span&gt;&lt;span class='line'&gt;&lt;span class="err"&gt;$&lt;/span&gt; &lt;span class="n"&gt;rspec&lt;/span&gt; &lt;span class="n"&gt;spec&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;
595
- &lt;/span&gt;&lt;span class='line'&gt;&lt;span class="c1"&gt;# test passes&lt;/span&gt;
596
- &lt;/span&gt;&lt;span class='line'&gt;&lt;span class="err"&gt;$&lt;/span&gt; &lt;span class="n"&gt;rspec&lt;/span&gt; &lt;span class="n"&gt;spec&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;
597
- &lt;/span&gt;&lt;span class='line'&gt;&lt;span class="c1"&gt;# test fails&lt;/span&gt;
598
- &lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;/figure&gt;
599
-
600
-
601
- &lt;p&gt;Any help in solving this issue would be much appreciated (admin at railstutorial dot org).&lt;/p&gt;
602
- &lt;img src="//feeds.feedburner.com/~r/railstutorial/~4/pfvjhrIetIM" height="1" width="1" alt=""/&gt;</content>
603
- <feedburner:origLink>http://news.railstutorial.org/failing-rails-4-0-rc1/</feedburner:origLink></entry>
604
-
605
- <entry>
606
- <title type="html"><![CDATA[Rails Tutorial Russian translation]]></title>
607
- <link href="http://feedproxy.google.com/~r/railstutorial/~3/cAvzhs9_ZZY/" />
608
- <updated>2013-04-05T00:00:00-07:00</updated>
609
- <id>http://news.railstutorial.org/rails-tutorial-russian-translation</id>
610
- <content type="html">&lt;p&gt;Hot on the heels of the &lt;a href="http://railstutorial-china.org/"&gt;Chinese version&lt;/a&gt;, I&amp;#8217;m pleased to announce the availability of a &lt;a href="http://railstutorial.ru/"&gt;Russian translation of the Ruby on Rails Tutorial&lt;/a&gt;. I&amp;#8217;d like to thank translator Alexey Razuvaev (Алексей Разуваев) for his initiative and outstanding work. As with the &lt;a href="http://railstutorial.org/book"&gt;English version&lt;/a&gt;, the Russian translation is available for free online as HTML. If you are a Russian speaker, please &lt;a href="http://railstutorial.ru/"&gt;check it out&lt;/a&gt;!&lt;/p&gt;
611
- &lt;img src="//feeds.feedburner.com/~r/railstutorial/~4/cAvzhs9_ZZY" height="1" width="1" alt=""/&gt;</content>
612
- <feedburner:origLink>http://news.railstutorial.org/rails-tutorial-russian-translation/</feedburner:origLink></entry>
613
-
614
- <entry>
615
- <title type="html"><![CDATA[The Ruby on Rails Tutorial for Rails 4.0 (beta)]]></title>
616
- <link href="http://feedproxy.google.com/~r/railstutorial/~3/dffThsPVJwA/" />
617
- <updated>2013-03-20T00:00:00-07:00</updated>
618
- <id>http://news.railstutorial.org/ruby-on-rails-tutorial-rails-4-beta</id>
619
- <content type="html">&lt;p&gt;&lt;strong&gt;tl;dr:&lt;/strong&gt; A &lt;a href="http://ruby.railstutorial.org/ruby-on-rails-tutorial-book?version=4.0#top"&gt;Rails 4.0&amp;ndash;compatible version of the &lt;em&gt;Ruby on Rails Tutorial&lt;/em&gt; book&lt;/a&gt; is now available online. Sales of the ebook and a supplementary screencast will start after the final version of Rails&amp;nbsp;4.0 is released (available at a large discount to current customers). A new third edition is planned for later this year (with upgrade discounts for current customers). &lt;a href="http://feedburner.google.com/fb/a/mailverify?uri=railstutorial&amp;amp;loc=en_US"&gt;Subscribe&lt;/a&gt; to get email notifications of future announcements.&lt;/p&gt;
620
-
621
- &lt;p&gt;&lt;strong&gt;I&amp;#8217;m pleased to announce&lt;/strong&gt; the availability of &lt;a href="http://ruby.railstutorial.org/ruby-on-rails-tutorial-book?version=4.0#top"&gt;a full draft of the &lt;em&gt;Ruby on Rails Tutorial&lt;/em&gt; book updated for Rails 4.0&lt;/a&gt;. Changes include updates to all relevant gems, the use of some newer features of &lt;a href="https://github.com/jnicklas/capybara"&gt;Capybara&lt;/a&gt;, &lt;a href="http://blog.remarkablelabs.com/2012/12/what-s-new-in-active-record-rails-4-countdown-to-2013"&gt;new-style scopes&lt;/a&gt;, &lt;a href="http://blog.remarkablelabs.com/2012/12/what-s-new-in-active-record-rails-4-countdown-to-2013"&gt;updated Active Record finders&lt;/a&gt;, and coverage of the new &lt;a href="http://weblog.rubyonrails.org/2012/3/21/strong-parameters/"&gt;strong parameters&lt;/a&gt; feature to prevent &lt;a href="http://guides.rubyonrails.org/security.html#mass-assignment"&gt;mass assignment vulnerabilities&lt;/a&gt;. Previous versions have benefited tremendously from the book&amp;#8217;s many eagle-eyed readers, so please &lt;a href="http://railstutorial.org/contact"&gt;email me&lt;/a&gt; with any typos or bugs you find in the new version.&lt;/p&gt;
622
-
623
- &lt;p&gt;&lt;em&gt;Warning&lt;/em&gt;: Rails&amp;nbsp;4.0 is currently in beta, and this is bleeding-edge stuff, so you may get cut. For example, as of this writing Spork doesn&amp;#8217;t work with Rails&amp;nbsp;4. To work around this, the Gemfile in the book pulls directly from a fork I made of a repository that fixes the issue (and whose pull request hasn&amp;#8217;t yet been accepted). Another example, needed to work around changes in Capybara, is to pull the XPath and Capybara libraries directly from the latest master branches on GitHub, which introduces a significant risk of instability. And there are surely other examples ready to surprise the unwary.&lt;/p&gt;
624
-
625
- &lt;p&gt;Once the situation has stabilized a bit, I plan to make a short supplementary screencast highlighting the relevant changes and showing how the sample app works with Rails&amp;nbsp;4. When that happens, I will make sales of the Rails&amp;nbsp;4 version ebooks (PDF/EPUB/MOBI) available as well.&lt;/p&gt;
626
-
627
- &lt;p&gt;Once I feel the changes in Rails justify the effort, I plan to release a complete revision with a new screencast series. That will involve some more extensive changes, including the incorporation of a new spec syntax supported by the latest version of RSpec (so-called &lt;em&gt;feature specs&lt;/em&gt;). I expect this to happen some time later this year.&lt;/p&gt;
628
-
629
- &lt;p&gt;To get future announcements delivered to your inbox, &lt;a href="http://feedburner.google.com/fb/a/mailverify?uri=railstutorial&amp;amp;loc=en_US"&gt;subscribe&lt;/a&gt; to get email notifications. (Google apparently doesn&amp;#8217;t believe in RSS, but I do, so you can also &lt;a href="http://feeds.feedburner.com/railstutorial"&gt;subscribe to the news feed&lt;/a&gt;.)&lt;/p&gt;
630
- &lt;img src="//feeds.feedburner.com/~r/railstutorial/~4/dffThsPVJwA" height="1" width="1" alt=""/&gt;</content>
631
- <feedburner:origLink>http://news.railstutorial.org/ruby-on-rails-tutorial-rails-4-beta/</feedburner:origLink></entry>
632
-
633
- <entry>
634
- <title type="html"><![CDATA[Rails Tutorial Chinese translation]]></title>
635
- <link href="http://feedproxy.google.com/~r/railstutorial/~3/9X98w215r0k/" />
636
- <updated>2013-03-13T00:00:00-07:00</updated>
637
- <id>http://news.railstutorial.org/rails-tutorial-chinese-translation</id>
638
- <content type="html">&lt;p&gt;I&amp;#8217;m pleased to announce the availability of a &lt;a href="http://railstutorial-china.org/"&gt;Chinese translation of the Ruby on Rails Tutorial&lt;/a&gt;. I&amp;#8217;d like to thank translator Andor Chen for his outstanding work. I deserve none of the credit; Andor reached out to me and asked if it was OK to translate the book, and I happily agreed. (All I did was contribute a &lt;a href="http://railstutorial-china.org/preface.html"&gt;short preface&lt;/a&gt;.) As with the English version, the Chinese translation is available for free online as HTML; with my blessing, Andor is also offering ebook sales of the translation, the proceeds of which go directly to him. If you are a Chinese speaker, please &lt;a href="http://railstutorial-china.org/"&gt;check it out&lt;/a&gt;!&lt;/p&gt;
639
- &lt;img src="//feeds.feedburner.com/~r/railstutorial/~4/9X98w215r0k" height="1" width="1" alt=""/&gt;</content>
640
- <feedburner:origLink>http://news.railstutorial.org/rails-tutorial-chinese-translation/</feedburner:origLink></entry>
641
-
642
- </feed>
643
-
644
- ---
645
-
646
- feed.format: atom
647
- feed.title: Ruby on Rails Tutorial News
648
- feed.url: http://news.railstutorial.org/
649
-
650
- feed.generator.name: Octopress
651
- feed.generator.url: http://octopress.org/
652
-
653
-
654
- feed.items[0].title: Launch of the Ruby on Rails Tutorial screencasts (3rd edition)
655
- feed.items[0].url: http://feedproxy.google.com/~r/railstutorial/~3/GRG2NKC_Uwg/
656
- feed.items[0].id: http://news.railstutorial.org/rails_tutorial_3rd_ed_screencasts