因此,我正在开发我的第一个rails项目,并试图安装bootstrap,但我遇到了一些问题。我遵循github页面上的指示,但当我做了所有事情并重新加载了我的页面时,我收到了这个错误:有人可以帮我吗?将Bootstrap安装到Rails项目中
0
A
回答
1
您正在将您的代码放在错误的路径中。请将文件app/assets/stylesheets.css
的名称编辑为app/assets/stylesheets.css.scss
,然后将@import "bootstrap-sprockets";
和@import "bootstrap";
置于此文件中。
欲了解更多详情,请访问https://github.com/twbs/bootstrap-sass。
0
我不知道,但创业板不会在这个时候工作,我建议您使用CDN或其它CSS自举的。 我没有得到使用那个宝石。
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css">
<!-- Optional theme -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap-theme.min.css">
<!-- Latest compiled and minified JavaScript -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js"></script>
希望有帮助。
相关问题
- 1. Twitter-bootstrap-rails:它是否将Bootstrap安装到项目中?
- 2. 使用bundle install在我的Ruby on Rails项目中安装Bootstrap
- 3. 将Bootstrap-Image-Gallery添加到Rails项目
- 4. 在Rails中安装Bootstrap MVC
- 5. 如何将SignalR.Client.NET35安装到项目中
- 6. 无法安装gem'twitter-bootstrap-rails'
- 7. 将许多项目输出添加到安装项目中
- 8. Android将Eclipse项目安装到DeviceAnywhere
- 9. 安装bootstrap到grails
- 10. Bootstrap v4在Rails中安装问题
- 11. 无法使用rails g bootstrap:使用'twitter-bootstrap-rails'进行安装
- 12. 如何从VS 2010部署安装项目安装到Windows 7中的公共目录安装项目
- 13. 安装前安装/安装项目检查以前安装的项目?
- 14. Rails Bundle在bootstrap-sass上安装失败
- 15. 将Office 2010安装exe包装为安装项目?
- 16. 不成功的炼金术CMS安装到Rails 4.1.0.rc2项目
- 17. 安装MFC项目
- 18. C#安装项目
- 19. 安装项目modificatios
- 20. 安装Grails项目
- 21. Symfony项目安装
- 22. 安装项目vs2010
- 23. VS2008安装项目
- 24. 将多个Laravel 4项目安装到子目录
- 25. 如何将MLlib Apache Spark库安装到JAVA Eclpise项目中?
- 26. 无法将Microsoft.ProjectOxford.Face NuGet安装到Xamarin Studio iOS项目中
- 27. 将.Net框架更新添加到安装项目中
- 28. 无法将NuGet包安装到项目中
- 29. 如何将Google API的json-simple jar安装到maven项目中?
- 30. angularjs:无法将角度饼干安装到我的项目中
重新启动服务器?并且请将文件命名为filename.scss。和额外的CSS没有区别 – argentum47 2015-04-02 04:46:12
你是对的,它现在的作品! – Swifter 2015-04-02 05:25:39
用户使用sass,所以命名* .sass会更合适;) – 2015-04-02 07:52:17