简体   繁体   English

Rails中的引导宝石

[英]Bootstrap gem in Rails

I'm going to create a new Rails project, and as I know I should use gem 'bootstrap-sass', it's not a problem for me. 我将创建一个新的Rails项目,并且我知道我应该使用gem'bootstrap-sass',这对我来说不是问题。 But I have one question - why I should use gem instead of just adding some files (CSS and JS) directly to index.html? 但是我有一个问题-为什么我应该使用gem而不是直接将一些文件(CSS和JS)直接添加到index.html? Can you explain me? 你能解释一下吗? Thanks in advance! 提前致谢!

Use gem or source files don't make any big difference. 使用gem或源文件没有太大区别。

But, when you use gem it's easier to update... you need just update the gem and it's done! 但是,当您使用gem时,更新起来更容易了……您只需要更新gem就可以了! And when you use the source files, you must download the new version and replace the old files. 使用源文件时,必须下载新版本并替换旧文件。 I think it's the big deal when using gem: easer to update. 我认为使用gem:easyr进行更新很重要。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM