Ruby on Rails Tutorial News

Learn Enough Git to Be Dangerous

There may be no more powerful (but mysterious) modern software tool than Git, a version control system that helps developers track a project’s changes while dramatically improving collaboration. Learning Git is important enough that it’s integrated into the Ruby on Rails Tutorial, but many people have asked me for a standalone introduction to this important technology.

I’m pleased to announce that it’s here: Learn Enough™ Git to Be Dangerous (get a 15% launch discount here). Unlike the integrated material in the Rails Tutorial, the material in Learn Enough™ Git to Be Dangerous is completely self-contained, and its only prerequisites are familiarity with the Unix command line and a text editor.

Learn Enough™ Git to Be Dangerous focuses on Git essentials without getting bogged down in lots of heavy theory. It includes many concrete examples of how to use the most important Git commands, including:

  • git status
  • git add
  • git commit
  • git diff
  • git push
  • git pull
  • git checkout
  • git branch
  • git merge

Learn Enough™ Git to Be Dangerous also includes an extended example of collaboration with Git, showing you how to use Git in the context of two developers working together on the same project.

Finally, Learn Enough™ Git to Be Dangerous includes an amazing surprise bonus at the end of the tutorial that you won’t want to miss.

As usual, there’s a free online version of Learn Enough™ Git to Be Dangerous, so you can check it out and see in detail what it covers. The ebook versions (EPUB, MOBI, PDF) will normally be available for purchase for $9, but I’m offering a 15% launch discount through Thursday, February 11.

I appreciate any feedback or suggestions you may have, whether you’re a relative beginner or an expert. I especially appreciate bug and typo reports (no matter how small). With the streamlined publication process made possible by the Softcover toolchain, I can usually deploy corrections within minutes of receiving them. Please email any feedback to michael@learnenough.com. And remember that you can get a 15% launch discount on the Learn Enough™ Git to Be Dangerous ebooks through Thursday, February 11.

Discuss this post on Hacker News

Learn Enough Text Editor to Be Dangerous ebooks

Having incorporated helpful reader feedback (thanks!) on the draft of Learn Enough™ Text Editor to Be Dangerous, I’ve just released the final version, including PDF, EPUB, and MOBI ebooks. The price is just $9, and with a PDF that runs to well over 100 pages, that’s less than ten cents per page!

Learn Enough™ Text Editor to Be Dangerous is part of a series of Learn Enough™ to Be Dangerous tutorials designed to complement and expand on the prerequisites to the Ruby on Rails Tutorial. As noted before, Learn Enough™ Text Editor to Be Dangerous is an introduction to text editors that assumes no prerequisites other than a familiarity with the Unix command line (such as that provided by Learn Enough™ Command Line to Be Dangerous). Topics include Minimum Viable Vim, an introduction to “modern” text editors like Atom and Sublime Text, and more advanced features like editing source code and global find and replace.

As always, I appreciate any feedback or suggestions you may have, whether you’re a relative beginner or an expert. I especially appreciate bug and typo reports (no matter how small). With the streamlined publication process made possible by the Softcover toolchain, I can usually deploy corrections within minutes of receiving them. Please email any feedback to michael@learnenough.com. And remember that you can get a 33% launch discount on the Learn Enough™ Text Editor to Be Dangerous ebooks through Monday, December 14.

Discuss this post on Hacker News

Draft of Learn Enough™ Text Editor to Be Dangerous

I’m pleased to announce the availability of a draft of Learn Enough™ Text Editor to Be Dangerous, an introduction to text editors that assumes no prerequisites other than a familiarity with the Unix command line (such as that provided by Learn Enough™ Command Line to Be Dangerous). Topics include Minimum Viable Vim, an introduction to “modern” text editors like Atom and Sublime Text, and more advanced features like editing source code and global find and replace.

Learn Enough™ Text Editor to Be Dangerous is the second in a series of Learn Enough™ to Be Dangerous tutorials designed to fulfill the prerequisites of the Ruby on Rails Tutorial. As with the Ruby on Rails Tutorial book, the Learn Enough™ Text Editor to Be Dangerous draft is available in a free online version, and I appreciate any feedback or suggestions you may have, whether you’re a relative beginner or an expert. I especially appreciate bug and typo reports (no matter how small). Please email any feedback to admin@railstutorial.org. After getting feedback on the draft, I expect to incorporate the changes and release a more polished version some time in the next few weeks.

Learn Enough™ Command Line to Be Dangerous ebooks

Ebooks for the Learn Enough™ Command Line to Be Dangerous tutorial are now available for sale in all three common formats (EPUB, MOBI, and PDF). As noted before, Learn Enough™ Command Line to Be Dangerous is a short (78-page) introduction to the Unix command line that assumes no prerequisites other than general computer knowledge, and is the first in a series of Learn Enough™ to Be Dangerous tutorials designed to fulfill the prerequisites of the Ruby on Rails Tutorial. The content of the ebooks is the same as the free online version, but many people find ebooks more convenient and like the sense of ownership that comes from having their own copies.

In other news, I’ve recently launched a newly redesigned version of my personal website (michaelhartl.com). I plan to start making occasional posts on both technical and non-technical subjects of interest to students of the Rails Tutorial and the Learn Enough tutorials. My plan is to send out notifications to my main lists, so if you’re reading this message you should automatically receive notifications when new posts are ready. (If you’re not on any of my lists, you can join one now.)

Finally, at some point I plan to make screencasts to complement the text of the Learn Enough™ Command Line to Be Dangerous tutorial. I’ll be offering generous discounts to anyone who buys the ebooks. Of course, I’ll send a notification to this list when the screencasts are ready.

Discuss this post on Hacker News

Draft of Learn Enough™ Command Line to Be Dangerous

I’m pleased to announce the availability of a draft of Learn Enough™ Command Line to Be Dangerous, a short introduction to the Unix command line that assumes no prerequisites other than general computer knowledge. It’s the first in a series of Learn Enough™ to Be Dangerous tutorials designed to fulfill the prerequisites of the Ruby on Rails Tutorial. As with the Rails Tutorial book, the Learn Enough™ Command Line to Be Dangerous draft is available in a free online version, and I appreciate any feedback or suggestions you may have, whether you’re a relative beginner to the command line or an expert. I especially appreciate bug and typo reports (no matter how small). Please email any feedback to admin@railstutorial.org.

After getting feedback on the draft, I expect to incorporate the changes and release a more polished version some time in the next few weeks. The offer described here still stands, and anyone who leaves a Rails Tutorial review at railstutorial.org before the final release will get free bonus copies of the EPUB, MOBI, and PDF versions of the command-line tutorial. (I also ask that you leave the same review at Amazon, but this is not required to get the free bonus.)

P.S. Daniel Kehoe, creator of the Rails Apps tutorials, is running a Kickstarter for Rails Composer, a “Rails generator on steroids.” Daniel is a great supporter of the Rails community, so please consider backing his project. Rewards for backers include more advanced Rails tutorials suitable for those who have finished the Ruby on Rails Tutorial.

P.P.S. Remember to check out the draft of Learn Enough™ Command Line to Be Dangerous and send any feedback to admin@railstutorial.org.

Rails Tutorial print edition and a reward for railstutorial.org reviews

Summary: The Ruby on Rails Tutorial print edition is out. Please leave a review at Amazon, and get a bonus reward for leaving a review at railstutorial.org. Update: The bonus offer has expired, but of course I still appreciate new reviews!

Greetings, all! I’ve got a bunch of exciting Rails Tutorial–related announcements planned for the coming months, but first I’ve got one that’s long overdue: the Ruby on Rails Tutorial print edition is out, and currently available at Amazon.com. It’s actually been out for a while, but the first print run at Amazon sold out fast, and I didn’t want to send an announcement until they’d restocked the supplies. That bottleneck has now been cleared, so anyone who wants a print version of the book should head to Amazon and pick up a copy. (The content is essentially the same as the version available via railstutorial.org, but a lot of people like owning a physical copy as well.)

To help keep up sales momentum, I hope you’ll take the time to leave a couple of reviews. The steps are simple:

  1. Leave a review at railstutorial.org. (This requires a Softcover account, which has your email address, which in turn is how I’ll know where to send the free command-line tutorial. If you bought the 3rd edition from railstutorial.org, you already have a Softcover account; otherwise, you will probably have to make one.)
  2. Leave a review at Amazon (no purchase necessary; can be based on electronic version from railstutorial.org)

I have a special reward for those who complete Step 1, which is a free copy of Learn Enough™ Command Line to Be Dangerous, an upcoming tutorial on the Unix command line. (I’d appreciate it if you completed Step 2 as well, but leaving an Amazon review is not necessary to get the reward.) There is no need to take further action once you leave a review at railstutorial.org; as long as your email address there is correct, you will automatically receive a copy of the command-line product when it’s ready. Thanks!

Cheers,

Michael

P.S. Rails 5 is slated to come out in the fall or winter (though no one knows exactly when). To answer the inevitable question: yes, I’m planning to update the Rails Tutorial accordingly. (Because the Rails Tutorial is designed to teach web development generally rather than Rails specifically, any changes will be aimed at compatibility rather than at covering new features.) Whether the upgrade is free or a paid supplement depends on how extensive the changes are; I’m cautiously optimistic I’ll be able to get away with minor updates, but there’s no way to know until Rails 5 actually ships. I’ll plan to send out an announcement with more details when the time comes.

P.P.S. Get the Ruby on Rails Tutorial print edition and/or leave a review to get a free copy of Learn Enough™ Command Line to Be Dangerous!

Launch of the Ruby on Rails Tutorial screencasts (3rd edition)

tl;dr: The 3rd Edition of the Ruby on Rails Tutorial screencast series is now available. Designed to complement the book Ruby on Rails Tutorial: Learn Web Development with Rails, 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 teaser trailer and a full sample lesson are also available. As part of the launch, you can get 20% off all Rails Tutorial products through the end of this week (Friday, December 5).

Discuss this post at Hacker News

I’m pleased to announce the launch of the 3rd Edition of the Ruby on Rails Tutorial screencasts. 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 Ruby on Rails Tutorial book, the 3rd edition screencasts should be especially useful for Rails Tutorial readers who want to see exactly how to develop (or at least how I develop) Ruby on Rails web apps.

The 3rd edition of the Ruby on Rails Tutorial screencast series has been extensively revised from previous versions. Here are some of the changes:

  1. Use of a standard integrated development environment in the cloud, with a pre-configured workspace specifically tailored to the needs of the Ruby on Rails Tutorial. Use of the custom Cloud9 IDE environment allows you to see exactly how to follow every step of the Rails Tutorial using the same development environment shown in the screencasts.

  2. 100% default stack. 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.

  3. Lighter-weight testing approach. The 3rd edition still covers test-driven development (TDD), but uses it more sparingly and judiciously. The more forbidding “wall of tests” sections have been eliminated, with concise and expressive integration tests (usually written after the application code) taking their place.

  4. A fully revised lesson on login and authentication. The newly revised Lesson 8 covers all three of the most common login models on the Web: session expiration upon browser close, automatically remembering users, and optionally remembering users with a “remember me” checkbox.

  5. An all-new section on image upload. Lesson 11 now shows how to add pictures to the Twitter-style “microposts” developed in the tutorial’s main sample application. Topics include client- and server-side image validations, automatic image resizing, and using a cloud storage service (Amazon S3) in production.

  6. An all-new lesson on account activation and password resets, including sending email with Rails. The all-new Lesson 10 considerably extends the core sample application by adding account activation (thereby verifying the account’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 SendGrid).

Each lesson in the screencast series corresponds to a chapter in the book, which appear as follows (links are to the online version of the book, which as always is available for free):

As a reminder, you can get a 20% discount on any purchase through the end of the week (Friday, December 5).

The Rails Tutorial and Heroku Cedar-14

UPDATE: Due to continuing annoyance, I’ve determined that, in the case of the Rails Tutorial, the costs of specifying a particular version of Ruby in the Gemfile don’t justify the benefits. The Ruby on Rails Tutorial book has been updated accordingly. As a result, there is no need to follow the steps below to install a new version of Ruby.

This is a quick update for users of the 3rd Edition of the Ruby on Rails Tutorial , especially those deploying to Heroku from the Cloud9 IDE, but it’s potentially useful to anyone deploying Ruby apps to Heroku. Heroku’s recently announced Cedar-14 stack 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’s default, which as of this writing is Ruby 2.1.1. In such cases, Heroku deployments to the new stack won’t work. Here are the kinds of errors you might see:

1
2
3
local/Cloud9 => Your Ruby version is 2.1.1, but your Gemfile specified 2.1.4

Heroku => Only the most recent version of Ruby 2.1 is supported on Cedar-14

For the benefit of Rails Tutorial readers, I’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. UPDATE: 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 Ruby Version Manager as follows:

1
2
3
$ rvm install 2.1.4
<get a beverage of your choice and wait a while>
$ rvm use 2.1.4

Then change your Gemfile to use the line ruby '2.1.4' and re-deploy:

1
2
3
<update Gemfile>
$ git commit -am "Update Ruby version"
$ git push heroku

You may also have to restart any Rails servers, consoles, or Spring servers (spring stop) in order to get them to use the new version of Ruby.

By the way, if you’re using rbenv on a local machine (as I am) and need to upgrade to the latest Ruby version, here are the steps you might follow:

1
2
3
$ cd ~/.rbenv/plugins/ruby-build/
$ git pull
$ rbenv install 2.1.4

Launch of the 3rd Edition of the Ruby on Rails Tutorial book

tl;dr: The 3rd Edition of the Ruby on Rails Tutorial book is out, together with early access to the screencasts (currently in preparation). Click here to get an automatic 10% discount on any purchase through the end of October.

I’m pleased to announce the launch of the 3rd Edition of the Ruby on Rails Tutorial book, together with early access to the screencasts (which are currently in preparation). Here are the main product bundles:

As a special launch offer, you can click here to get an automatic 10% discount on any purchase through the end of October.

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.

The 3rd edition of the Ruby on Rails Tutorial has been extensively revised from previous versions. Here are some of the changes:

  1. Use of a standard integrated development environment in the cloud, with a pre-configured workspace specifically tailored to the needs of the Ruby on Rails Tutorial. Use of the custom Cloud9 IDE 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’s three example applications.

  2. 100% default stack. The 3rd edition of the Ruby on Rails Tutorial 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.

  3. Lighter-weight testing approach. The 3rd edition still covers test-driven development (TDD), but uses it more sparingly and judiciously. The more forbidding “wall of tests” sections have been eliminated, with concise and expressive integration tests (usually written after the application code) taking their place.

  4. A completely rewritten chapter on login and authentication. The newly revised Chapter 8 covers all three of the most common login models on the Web: session expiration upon browser close, automatically remembering users, and optionally remembering users with a “remember me” checkbox.
  5. An all-new section on image upload. Chapter 11 now shows how to add pictures to the Twitter-style “microposts” developed in the tutorial’s main sample application. Topics include client- and server-side image validations, automatic image resizing, and using a cloud storage service (Amazon S3) in production.
  6. An all-new chapter on account activation and password resets, including sending email with Rails. The all-new Chapter 10 considerably extends the core sample application by adding account activation (thereby verifying the account’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 SendGrid).

The final chapter list appears as follows (links are to the online version of the book, which as always is available for free):

As a reminder, you can click here to get an automatic 10% discount on any purchase through the end of October.

Discuss this post at Hacker News

Full draft of the Rails Tutorial 3rd Ed.

Drafts of Chapters 9–12 from the Ruby on Rails Tutorial (3rd Ed.) are now available:

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 main 3rd edition announcement post for more details, and sign up here for priority notifications and an exclusive coupon code.

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.