Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Adding twitter-bootstrap-rails with an existing rails app

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

like image 244
sdurg4 Avatar asked Apr 19 '12 16:04

sdurg4


2 Answers

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 :

  gem "therubyracer"
  gem "less-rails"

Then in console I ran:

bundle install

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 !

like image 174
K M Rakibul Islam Avatar answered Nov 04 '22 13:11

K M Rakibul Islam


In some case, you have not installed therubyracer.

add

#gem 'therubyracer' , '= 0.10.2'

to your Gemfile and

#bundle install

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

#gem install libv8 --version=3.11.8.3

or something like this before hand.

like image 1
Keita Shimizu Avatar answered Nov 04 '22 15:11

Keita Shimizu