3

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!

1

3 Answers 3

10

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.

1
  • @LathaD, thanks but in his case he already installed the gem before putting in gemfile. So I think both are valid. correct me if I am wrong though. ;)
    – uday
    Commented Jun 1, 2012 at 19:16
3

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. ;)

1

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.