Starkers
Starkers

Reputation: 10551

Cannot load file error...but file definitely exists

I get this error message:

cannot load such file -- less (in /home/starkers/Documents/angular/vendor/assets/bower_components/bootstrap/less/bootstrap.less)

and yet in the console:

cat /home/starkers/Documents/angular/vendor/assets/bower_components/bootstrap/less/bootstrap.less
// Core variables and mixins
@import "variables.less"; 
@import "mixins.less";
...

I've restarted by server so what could be causing this?

Upvotes: 1

Views: 180

Answers (2)

zires
zires

Reputation: 574

By default, Rails asset pipeline can't serve less stylesheet file.

Add these to your Gemfile

gem 'less-rails'
gem 'therubyracer'

bundle install and then restarting server.

More details, check https://github.com/metaskills/less-rails

Upvotes: 1

pkrawat1
pkrawat1

Reputation: 681

I had a same problem. Cleaning up my public/assets and tmp/cache/development and then restarting the server did the job for me.

Upvotes: 0

Related Questions