简体   繁体   English

宝石安装红宝石

[英]Gem install ruby

I'm new to sass/compass, and I'd like to know how is the first statement (below) different from the second one. 我是sass / compass的新手,我想知道第一个语句(如下)与第二个语句有何不同。

  1. compass install compass;
  2. gem install compass

I also need to know whether I should use the second statement every time I create a new project? 我还需要知道每次创建新项目时是否应该使用第二条语句?

I don't know the difference between the 2(heck i didn't even know the first one was an option). 我不知道2之间的区别(我什至都​​不知道第一个是一个选择)。 But my advice would be to add gems in the gemfile and run bundle install. 但是我的建议是在gemfile中添加gems并运行bundle install。

2 reasons: 2个原因:

1: Options: when you do gem install compass it installs the gem automatically for your whole environment. 1: 选项:当您执行gem install compass它将自动为您的整个环境安装gem。 And in your gemfile you can seperate it over different groups. 在您的gemfile中,您可以将其分成不同的组。

2: Readability : If you use gem install compass the gem will not be visible in your gemfile, so when other people try to work on your project they can't see all the gems used in the application through the gemfile (annoying). 2: 可读性 :如果使用gem install罗盘 ,gem文件中将看不到该gem,因此当其他人尝试在您的项目中工作时,他们无法通过gemfile看到应用程序中使用的所有gem(讨厌)。

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

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