Ruby on Rails 错误“无法加载此类文件——更少"

编程入门 行业动态 更新时间:2024-10-26 04:24:20
本文介绍了Ruby on Rails 错误“无法加载此类文件——更少"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我对 ruby on rails 还很陌生,我一直在尝试使用 twitter-bootstrap 作为资产,所以我将它包含在我的 Gemfile 中,捆绑并它安装成功.但是我注意到它依赖于我执行bundle"命令时未显示的某些依赖项.

I am fairly new to ruby on rails, I have been trying to use twitter-bootstrap as an asset, so I have included it in my Gemfile, bundled and it installs successfully. However I have noticed that it relies on certain dependencies that are not shown when I do the "bundle" command.

它需要的依赖

(1) Libv8 (2) Less (3) Less-rails

错误信息:

cannot load such file -- less (in c:/Sites/todo/app/assets/stylesheets/bootstrap_and_overrides.css.less) [code] Extracted source (around line #8): 5: <!--[if lt IE 9]> 6: <script src="html5shim.googlecode/svn/trunk/html5.js" type="text/javascript"></script> 7: <![endif]--> 8: <%= stylesheet_link_tag "application", :media => "all" %> 9: <%= javascript_include_tag "application" %> 10: <%= csrf_meta_tags %> 11: <meta name="viewport" content="width=device-width, initial-scale=1.0"> [/code] Trace app/views/layouts/application.html.erb:8:in `_app_views_layouts_application_html_erb__560528188_27183396' app/controllers/lists_controller.rb:7:in `index'

我已经注意到这个问题的很多答案,并选择了显而易见的解决方案,但不知何故我仍然卡住了,非常感谢一些指导.

I have noticed a lot of answers to this very question already, and have chosen the obvious solutions, but somehow I still get stuck, and would really appreciate some guidance.

推荐答案

我猜你在使用 sass 而不是 LESS.

I guess you are using sass instead of LESS.

您是否尝试过 twitter-bootstrap-rails gem?

Have you tried the twitter-bootstrap-rails gem?

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

github/seyhunak/twitter-bootstrap-rails

更多推荐

Ruby on Rails 错误“无法加载此类文件——更少"

本文发布于:2023-10-16 16:56:12,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1498176.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:此类   更少   加载   错误   文件

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!