How to install Twitter Bootstrap to my rails
Solution 1
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.
Solution 2
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. ;)
Solution 3
You need to require it in your Gemfile and than ran bundle install
GeekedOut
Recently started working on http://www.problemio.com Thank you to all the people on StackOverflow who have helped me. Could not have made the progress I did without your help!! EDIT: I LOOOOOOOOOOVE STACKOVERFLOW. THANK YOU TO ALL THE AMAZING PEOPLE HERE!!!!
Updated on June 26, 2022Comments
-
GeekedOut almost 2 years
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!