GeekedOut
GeekedOut

Reputation: 17185

How to install Twitter Bootstrap to my rails

I just ran

gem install twitter-bootstrap-rails

and it installed a number of files:

11 gems installed
Installing ri documentation for activesupport-3.2.5...
Installing ri documentation for activemodel-3.2.5...
Installing ri documentation for rack-1.4.1...
Installing ri documentation for journey-1.0.3...
Installing ri documentation for sprockets-2.1.3...
Installing ri documentation for actionpack-3.2.5...
Installing ri documentation for therubyracer-0.10.1...
Installing ri documentation for commonjs-0.2.6...
Installing ri documentation for less-2.2.1...
Installing ri documentation for less-rails-2.2.3...
Installing ri documentation for twitter-bootstrap-rails-2.0.8...
Installing RDoc documentation for activesupport-3.2.5...
Installing RDoc documentation for activemodel-3.2.5...
Installing RDoc documentation for rack-1.4.1...
Installing RDoc documentation for journey-1.0.3...
Installing RDoc documentation for sprockets-2.1.3...
Installing RDoc documentation for actionpack-3.2.5...
Installing RDoc documentation for therubyracer-0.10.1...
Installing RDoc documentation for commonjs-0.2.6...
Installing RDoc documentation for less-2.2.1...
Installing RDoc documentation for less-rails-2.2.3...
Installing RDoc documentation for twitter-bootstrap-rails-2.0.8...

Should I run bundle update? Or do I just need to add the twitter-bootstrap-rails-2.0.8 to my gemfile?

What is the right way to make it be recognized by my "require" and "import" statements?

I also added this line to my application.css:

 *= require twitter/bootstrap

Thanks!

Upvotes: 3

Views: 11516

Answers (3)

uday
uday

Reputation: 8710

I believe you need to add twitter bootstrap to your gemfile & then run bundle install. The purpose of Gemfile is it serves as reference to Rails on what dependencies/gems the app needs. So unless you specify it in gemfile, though its installed, your app cannot use it.

Upvotes: 10

DavidMann10k
DavidMann10k

Reputation: 563

Whenever you have questions about installing a gem like this, it's page on Github is a good place to start.

https://github.com/seyhunak/twitter-bootstrap-rails#installing-gem

Put it in your gemfile.

bundle install.

Then continue reading the instructions there. ;)

Upvotes: 3

Yuriy Goldshtrakh
Yuriy Goldshtrakh

Reputation: 2014

You need to require it in your Gemfile and than ran bundle install

Upvotes: 1

Related Questions