I am trying to use twitter-bootstrap-rails with an existing rails application and getting the following error when i refreshed the page.
no such file to load -- less (in /app/assets/stylesheets/bootstrap_and_overrides.css.less)
Extracted source (around line #5):
2: <html>
3: <head>
4: <title>Tracker</title>
5: <%= stylesheet_link_tag "application" %>
6: <%= javascript_include_tag "application" %>
7: <%= csrf_meta_tags %>
8: </head>
any idea what I am doing wrong? thanks
I was also able to get this to work by replacing 'application' with 'bootstrap_and_overrides' in the stylesheet_link_tag tag of the layout template, per sdurg4's suggestion.
In my case, only re-starting the rails server did not do the trick. I had to do following things to fix the problem.
1. I needed to install the missing gems first. I added following lines to my Gemfile :
Then in console I ran:
2. Lastly, I had to re-start my rails server.
After all these steps, twitter bootstrap started working with my rails app. Hope this helps someone who faces the same trouble that I did !
Using rails 3.2.13:
After I installed the 3 gems (therubyracer / less-rails / twitter-bootstrap-rails) I replaced this line *= require twitter/bootstrap with *= require bootstrap_and_overrides in application.css.
From the github updating guide:
I got it to work by replacing the stylesheet_link_tag to bootstrap_and_overrides. However, I am using devise for authentication and twitter-bootstrap-rails, I think is messes up the devise user model because none of the logout or sign in functions work.
In some case, you have not installed therubyracer.
add
to your Gemfile and
may resolve this problem. (In my case, I could not make the rubyracer 0.11.0, so I designated 0.10.2)
If you have not installed libv8, you have to exec
or something like this before hand.