
The Ruby on Rails Tutorial, now with Twitter's Bootstrap - mhartl
http://news.railstutorial.org/ruby-on-rails-tutorial-now-with-twitters-boot
======
joedev
Developers moaning about Bootstrap have fallen into the common trap of seeing
apps through developers' eyes.

Please consider that: 1\. Almost no one in the world has heard of Bootstrap.
Though it's captured our mindshare as developers, most of our users will not
know nor care if the app is Bootstrap or not. 2\. The vast majority of web
apps still will not be Bootstrap apps.

Basically none of the general public will say "Hey, this is a Bootstrap'ed
application, I'm not using it." They just do not know nor care what Bootstrap
is. If it looks professional and works as they expect, they will be happy. If
they're happy, I'm happy.

~~~
mechanical_fish
The moans are a useful sign of ripeness. So few things are great and tenacious
enough to both earn and endure the moans of fashionable early adopters.

~~~
rjsamson
Great point mechanical_fish, that really sums up the reality of Bootstrap I
think.

------
DanielKehoe
Michael Hartl's book stands out because he keeps it current, a challenge given
fast-evolving Rails development practices.

Last year I set out to create a set of example apps to bridge the gap between
Michael Hartl's excellent tutorial and the piecemeal advice found on experts'
blogs and Stack Overflow. The example apps are accompanied by tutorials
(walkthroughs, really, not as thorough or informative as Hartl's book) and
show how to set up a Rails app with authentication libraries (either Devise or
OmniAuth), RSpec, Cucumber, and popular options such as MongoDB or Haml. Each
has a companion application template that serves to generate a starter app.
Like Michael Hartl, my contributors and I have seen increasing interest in
Twitter Bootstrap and recently updated the app templates to offer a choice of
front-end frameworks, including Zurb Foundation and Twitter Bootstrap (either
Less or Sass versions). It seems Twitter Bootstrap for the front end is
catching on -- fast -- for the same reasons Rails has succeeded on the back
end: convention over configuration and a well-crafted implementation of
commonly-used functionality.

Here are the RailsApps example apps, now with Twitter Bootstrap:
<http://railsapps.github.com/>

------
msluyter
I think this tutorial is a treasure. It's a great introduction to the entire
rails ecosystem, including TDD, git, heroku, and the like. I went through the
3.0 version a while ago, but so slowly (as in, a chapter every couple of
weeks) that I forgot a lot of it. To those like myself, working through this
in your off hours, I recommend keeping Anki (or equivalent) open and adding
notes as you go.

~~~
mirceagoia
I am proud to say it mentions my Ruby on Rails installation guide for Ubuntu
and Mint here: [http://ruby.railstutorial.org/ruby-on-rails-tutorial-
book?ve...](http://ruby.railstutorial.org/ruby-on-rails-tutorial-
book?version=3.2) (the guide itself is here
[http://www.mirceagoia.com/2011/11/ruby-on-rails-
installation...](http://www.mirceagoia.com/2011/11/ruby-on-rails-installation-
ubuntu-linux-mint/) ).

~~~
darksaga
I actually used it when I was getting going with Rails. Trying to install
rails on Windows was a nightmare. Your tutorial was so easy to follow and was
invaluable right after I had switched over to Mint from Mandriva.

~~~
mirceagoia
Thank you very much for using it. I had my share of frustrations installing
RoR on Linux so I am glad my tutorial is helping others.

------
starfox
This is why I stick with Rails; for the mindshare. There are many reasons to
be critical of Rails, but the bottom line is that other people generously
contribute work like this on a regular basis, making me instantly more
valuable to employers or clients.

~~~
tikhonj
This is a good point, and it's one of the main reasons I prefer open source in
general: this is true for almost all fairly active open source projects.
However, I'm not sure how this differentiates Rails from some of the other
popular web frameworks.

~~~
lunaru
Rails is now pretty old (in tech years) and one reason for active
participation and contribution to the community is that the Rails team
continues promote forward movement in the framework. So Rails is also always
new.

A lot of the stuff people moan about (e.g. lack of backwards compatibility and
constant breaking changes) is also what keeps it fresh. It's not hard to
introduce new best practices because the old ones are continually tossed out.
This can't be said for a lot of open source projects that value stability over
change. (For some projects, stability is rightfully more important).

------
kcima
When I tutor beginners in Rails, I always make them walk through this tutorial
first. Step by step. Without using copy & paste.

I really like tutoring and I am more than happy to help folks who want to
build the next big thing.

However, first I make people write down their idea, set it aside, and forget
about it. I tell them not to try to adapt this tutorial to their own idea, but
just follow it to the letter and build the example application. It doesn't
take that long.

Before anything, you need to know what you need to know. This tutorial has
been and continues to be a great way to learn much of what you need to know...
then you can go build the next big thing.

------
jschuur
Also worth checking out, the free part of Railscast's Bootstrap Rails
screencast two episoder: <http://railscasts.com/episodes/328-twitter-
bootstrap-basics>

------
gcao
I think Rails 3 has laid a good foundation to build next generation of web
applications, or back end of web apps. With introduction of Asset Pipeline and
built-in support of CoffeeScript/Sass etc, it is a lot easier to develop in
Rails than before. The performance is still not ideal though.

------
instakill
Woohoo. Great timing. Just started re-doing this to learn 3.2. Do you inject
bootstrap into the app or use Seyhunak's twitter-bootstrap-rails gem?

~~~
tmcdonald
It's using my bootstrap-sass gem. [1]

[1]: <https://github.com/thomas-mcdonald/bootstrap-sass>

~~~
mikey_p
I've been wanting to use Bootstrap with some other CSS syntaxes for awhile,
and I was wondering how you manage the conversion from less to scss and stay
up to date with the latest Bootstrap changes?

~~~
tmcdonald
In general I wait until the new version is merged into master, and I use
GitHub's compare view to see all the changes between the latest version and
the previous one, which I keep open on one screen and go through each file
updating the bits that have changed. For the Javascripts I just copy the whole
folder over, since I don't fiddle with those.

The main exception to this was for 2.0, which had a separate branch for a
while so that people could still use bootstrap-sass while updating their
application to the new syntax. When 2.0 was merged into master, since it had
been under such heavy development I reconverted the entire codebase.

There are a few quirks with the conversion from Less to SCSS, but these tend
to be few and far between, and are usually down to me missing a variable
somewhere. The main one is the use of namespaced mixins[1]. SCSS doesn't
support this, so I have to prefix/suffix the namespace to each mixin within
the namespace. Aside from that, and method names/variable notation, there
(appears to be, can't speak authoritatively since I haven't really used Less)
little difference between the two.

[1]: <http://lesscss.org/#-namespaces>

------
alexanderberman
This is awesome! Thanks for providing such a valuable resources to Rails
newbies!

------
danso
Interested in the rationale to choose bootstrap-sass over bootstrap-less. I
chose the latter, though can't say I know enough about the divide to feel
strongly one way or the other. It works well enough.

~~~
breckinloggins
<http://wrangl.com/sass-v-less>

Particularly: sass == Ruby. less == JavaScript.

I'm not saying that's good or bad, but it's probably "why".

~~~
danso
Sure, I guess that simplifies things from the tutorial-user's standpoint...I
had just wondered about the state of the sass maintainer keeping up with
bootstrap updates. Though I'm sure bootstrap changes come infrequently enough
that that's not a huge burden (?)

------
hallnoates
Very glad to see this! Bootstrap saves us a lot of time.

------
F_J_H
Can anyone recommend a similar tutorial covering one of the python web
frameworks? (i.e. complete ecosystem - git, testing, deployment)

------
freditup
I just finished this tutorial yesterday actually. I personally don't care so
much about the web design aspect as much as the RoR logic and techniques. Are
there any major things in the new version in that department that I should be
aware of? Edit: I loved the tutorial by the way - thank you so much for
putting the time and effort in to writing it.

~~~
mhartl
Nope, the logic is just the same. So many people requested Bootstrap that I
determined the market demand warranted the extra effort. But given your
situation and goals, it sounds like there's no need for you to re-do the
tutorial.

~~~
freditup
Thanks! Keep up the great work!

------
RobertLysik
I'm glad I saw this, I had to clear my cached pages to see that Blueprint was
swapped out in Chapter 5 for Bootstrap. Now this will give me another chance
to play with Git :) This was already a brilliant tutorial, but this has made
it even better since I was looking for an opportunity to experiment with the
Bootstrap framework, thanks!

------
geoffroy
This tutorial is amazing, and even more amazing now. Thanks Michael.

------
JM212
Do you have any estimation on when this latest version will be available in
print?

~~~
mhartl
The print edition is typically available 4-6 months after the final files are
submitted to the publisher. Yes, that seems like a long time to me, too.

------
desireco42
I have to reinvent myself, newer, better and with bootstrap, twitter of course

------
webmanoffesto
This is a great resource.

------
steinbrenner
designers are obsolete.

------
apgwoz
"Due to popular demand,"

Wait? What??

~~~
purephase
The previous thread on the new version of this tutorial had a few commenters
(and votes) on updating it to use Bootstrap.

~~~
apgwoz
fair enough, but I still question why a tutorial needs to be rewritten to make
use of a different CSS framework. Are there that many people forking this
tutorial that they want something cleaner to work with? I just don't get it.

~~~
mhartl
The full "rewrite" took less than two weeks, and much of that was redoing
screenshots and mockups (easy, dull work).

The motivation for the change was to please readers. Happy readers make for a
happy author. Among other things, happy readers buy ebooks and screencasts.
For a free online book, the Rails Tutorial makes a surprising amount of money.
I'd like to keep that record going with the 2nd edition.

~~~
apgwoz
I think I misunderstood this whole thing! The tutorial was rewritten to make
_use_ of bootstrap instead of blueprint. Not the rails tutorial site was
rewritten to be designed using bootstrap. It all makes sense now.

------
jenius
This makes me want to cry

~~~
breckinloggins
Elaborate? I'd love to know why. Is it because you're against bootstrap, or
you don't like the entire tutorial, or...?

