JavierQQ23
JavierQQ23

Reputation: 714

How to enable less in Rails 3.2 using Twitter Bootstrap

I decided to use the twitter-bootstrap-rails gem and then ran these generators:

rails g bootstrap:install 
rails g bootstrap:layout application fluid
rails g bootstrap:themed products

and it installed some files as expected, but when I access to my application it has the links and button with the Twitter style but the nav the content and the sidebar are all not fixed.

It seems that bootstrap.css.less is not being open I've tried installing the following:

but nothing happens. Is there any extra configuration that I have to do?

Upvotes: 0

Views: 2055

Answers (1)

CaptainCasey
CaptainCasey

Reputation: 1371

I'm using Less in a Rails 3.2 application with Edge twitter-bootstrap-rails in my Gemfile:

gem 'twitter-bootstrap-rails', :git => 'http://github.com/seyhunak/twitter-bootstrap-rails.git'

You might be able to get this to work putting it under the 'assets' group, but for my needs, I had to include it for the whole application.

After that, follow the instructions at https://github.com/seyhunak/twitter-bootstrap-rails and see how you go.

My installation seems to differ from yours, as my bootstrap less file is app/assets/stylesheets/bootstrap_and_overrides.css.less

If this is true for you, you should rename any include/imports from 'bootstrap' to 'bootstrap_and_overrides'

The only other thing I can think of, is that Twitter Bootstrap requires JQuery 1.7.

Hope this helps,

Upvotes: 1

Related Questions