I'm switching from PHP to Ruby on Rails and I'm loving it, the only thing is I'm so used to Twitter Bootstrap for most of my designs and now I feel crippled without it, I followed some tutorials like adding bootstrap-sass
and what not to my Gemfile
, but I still appear to be missing important things like input-block-level
I'm just curious if there is an updated version or a easier tutorial to follow? Thanks.
-
Did you add bootstrap to your application.js and application.css? As detailed here https://github.com/thomas-mcdonald/bootstrap-sass#usage. – Mab879 Mar 11 '13 at 04:56
-
you can add twitter bootstrap to your rails application as well – Dev R Mar 11 '13 at 05:44
4 Answers
AFAIK, the easiest and most rails way to integrate the twitter bootstrap to rails is via
twitter-bootstrap-rails
gem, they have a pretty good documentation too.
check these screen casts, and this (premium) to get an idea.
and welcome to Rails :)

- 608
- 16
- 33

- 16,547
- 19
- 87
- 152
To to the input-block-level
in ERB do something like this
"input-block-level" => "hello_world"

- 608
- 16
- 33
Same as you, I'm coming from PHP and love RoR ;)
With bootstrap you need to import it in your manifest. Read a bit about the assets pipeline in RoR guide.
To import bootstrap, create a file in your app/assets/stylesheets directory, with the name you want, but with the extension .css.scss, and place in it the following line:
@import "bootstrap";
Also if you need to use the javascript helpers from bootstrap, you need to add the following line in your app/assets/javascript/application.js file:
//= require bootstrap

- 12,971
- 2
- 41
- 73
Just download the bootstrap ( CSS, JS ) file and make the updation in that file at regular interval from his official site : Bootstrap
For Bootstrap Tutorials : Click Here
Or you can refer the sample code for reference, because sometimes we dnt get the way to implement such functionality like tooltip.

- 6,486
- 10
- 51
- 86
-
The original query how to use bootstrap in ruby on rails not the user is asking for Bootstrap tutorial. – Suman-PHP4U Jan 13 '14 at 12:00