Ruby on Rails Error "Cannot Load Such File -- Less"

Ruby on Rails error cannot load such file -- less

I guess you are using sass instead of LESS.

Have you tried the twitter-bootstrap-rails gem?

gem "therubyracer"
gem "less-rails"
gem "twitter-bootstrap-rails"

https://github.com/seyhunak/twitter-bootstrap-rails

cannot load such file -- v8 (in E:/work/store/app/assets/stylesheets/bootstrap_and_overrides.css.less)

I used another gem :bootstrap-sass

and it worked

Warning using twitter-bootstrap-rails generators on Windows

Rails cannot load such file -- bcrypt

You put this gem 'bcrypt' into your Gemfile.

If you put it and ran bundle install, did you restart your rails server ?

If you still had this problem, you can do this as follow:

  • Firstly uninstall bcrypt and bcrypt-ruby by running these two commands:

    gem uninstall bcrypt and gem uninstall bcrypt-ruby

  • Install it again with gem install bcrypt --platform=ruby

  • In your Gemfile write gem 'bcrypt-ruby', '3.1.5', :require => 'bcrypt'

  • Then run bundle install and restart your rail server

Bundle exec cannot load such file -- /var/www/backoffice/config/application

I found the problem was related to the folder permissions. I gave rwx permissions to the folder and the command run successfully.
Thanks anyway!

Repair git -fd clean mistake ? Now seeing cannot load such file -- less

Removing log/ and tmp/ isn't that problematic, however, public/system can be problematic. Most upload gems put their uploaded files there.

  1. no, unless you have a list what was in there before.

  2. did you try bundle install? Maybe bundle clean before as well. Depending on what gem you used to get twitter bootstrap working, follow the install steps again. From that error message, you are at least missing the bootstrap stylesheet files. If you reinstall the relevant gems, it should work again.

Edit concerning your addition:

It seems like the less installer created a application.css, while you already had a application.css.scss. You should be fine by just deleting application.css (check the content before). However, I wonder, are you using scss and less together in a project? That might result in problems in the long run.



Related Topics



Leave a reply



Submit