27

I'm working on my first project with bootstrap and I get this error whenever I try and view my project. I've looked around and haven't been able to find someone with same problem. Any help would be great! Thanks in advance.


Less::ParseError in Search#index

Showing /Users/Basil/Dropbox/College/CS 50/playedby.me/app/views/layouts/application.html.erb where line #4 raised: variable @fontAwesomeEotPath_iefix is undefined (in /Users/Basil/Dropbox/College/CS 50/playedby.me/app/assets/stylesheets/bootstrap_and_overrides.css.less) Extracted source (around line #4): 1: <!DOCTYPE html> 2: <html> 3: <head> 4: <%= stylesheet_link_tag 'application.css', :media => "all" %> 5: <%= javascript_include_tag "application" %> 6: <%= csrf_meta_tags %> 7: </head> 

Here is my bootrstrap_and_overrides.css.less

@import "twitter/bootstrap/bootstrap"; body { padding-top: 60px; } @import "twitter/bootstrap/responsive"; // Set the correct sprite paths @iconSpritePath: asset-path('twitter/bootstrap/glyphicons-halflings.png'); @iconWhiteSpritePath: asset-path('twitter/bootstrap/glyphicons-halflings-white.png'); // Set the Font Awesome (Font Awesome is default. You can disable by commenting below lines) // Note: If you use asset_path() here, your compiled boostrap_and_overrides.css will not // have the proper paths. So for now we use the absolute path. @fontAwesomeEotPath: '/assets/fontawesome-webfont.eot'; @fontAwesomeWoffPath: '/assets/fontawesome-webfont.woff'; @fontAwesomeTtfPath: '/assets/fontawesome-webfont.ttf'; @fontAwesomeSvgPath: '/assets/fontawesome-webfont.svg'; // Font Awesome @import "fontawesome"; // Your custom LESS stylesheets goes here // // Since bootstrap was imported above you have access to its mixins which // you may use and inherit here // // If you'd like to override bootstrap's own variables, you can do so here as well // See http://twitter.github.com/bootstrap/less.html for their names and documentation // // Example: // @linkColor: #ff0000; @successBackground: white; @successText: @green; @errorBackground: white; @errorText: @red; @navbarHeight: 60px; .alert-success, .alert-error { border: 10px solid @green; padding: 2%; font-size: 125%; line-height: 150%; } .alert-success { border-color: @green; } .alert-error { border-color: @red; } 
2
  • Note that @fontAwesomeEotPath is undefined is indeed this same issue Commented Mar 15, 2013 at 4:08
  • possible duplicate of stackoverflow.com/questions/13701132 Commented Jun 5, 2013 at 11:53

3 Answers 3

66

Notice that your bootstrap_and_overrides.css.less doesn't have the variable the error is complaining about.

Add the following line with the other @fontAwesome variables and you should be good.

@fontAwesomeEotPath_iefix: asset-path("fontawesome-webfont.eot#iefix"); 

Or update your twitter bootstrap install by running rails g bootstrap:install -f.

Sign up to request clarification or add additional context in comments.

2 Comments

you just saved my afternoon.
It was not clear to me that I had to re-run the generator either on an upgrade. TY
20

This has also happened to me. When you update the Bootstrap gem you must then update its javascript and css. To do so, run this:

rails g bootstrap:install -f 

This will add a line to your app/assets/css/bootstrap_overrides.css.less file which looks like:

@fontAwesomeEotPath_iefix: asset-path("fontawesome-webfont.eot#iefix"); 

This will solve the issue.

2 Comments

note that this will remove all custom changes from app/assets/css/bootstrap_overrides.css.less
@SvenKoschnicke: Thats correct. But usually we dont use this file to add our custom methods.Anyway thanks for pointing out that.
3

maybe you forget to install bootstrap, you can try command below.

rails g bootstrap:install 

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.