简体   繁体   English

关于Ruby on Rails的一些基本问题

[英]Some basic questions on Ruby on Rails

I am going through the rails tutorial at the below link, i have a few questions. 我正在通过以下链接的rails教程,我有几个问题。

http://ruby.railstutorial.org/ruby-on-rails-tutorial-book#sec:bundler http://ruby.railstutorial.org/ruby-on-rails-tutorial-book#sec:bundler

What is equivalent command for this in windows, subl is not recognized in windows. 什么是Windows中的等效命令,在Windows中无法识别subl。 What is a GemFile and What is a Gem ? 什么是GemFile什么是Gem

$ cd first_app/
$ subl Gemfile

What does bundle mean? 捆绑意味着什么?

Your bundle is complete! Use `bundle show [gemname]` to see where a bundled gem
is installed.

subl : subl is the command-line command to launch Sublime Text on OS X. subl: subl是在OS X上启动Sublime Text的命令行命令。

gem : is a packaged Ruby application or library(third-party code as you just installed) . gem:是一个打包的Ruby应用程序或库(刚刚安装的第三方代码)。

Gemfile : It is files allow you to specify what gem dependencies are needed for your Rails application. Gemfile:文件允许您指定Rails应用程序所需的gem依赖项。

Bundler manages an application's dependencies. Bundler管理应用程序的依赖项。

Refer Bundler , Sublime 参考BundlerSublime

The Gemfile is a list of code your program needs. Gemfile是程序所需代码的列表。 In Ruby, to be cute, we call these gems. 在Ruby中,为了可爱,我们称之为宝石。 So there are gems to do things like read HTML, and if you wanted to use it, you would put it in your Gemfile. 所以有宝石可以做一些事情,比如阅读HTML,如果你想使用它,你可以把它放在你的Gemfile中。

Saying subl Gemfile means that you are opening the Gemfile with the Sublime text editor. subl Gemfile意味着你用Sublime文本编辑器打开Gemfile。 You don't need the sublime text editor, you can use any text editor you like. 您不需要sublime文本编辑器,您可以使用任何您喜欢的文本编辑器。 For you probably try nano or pico ( nano Gemfile and pico Gemfile ) or if you don't want to edit the files in your terminal, your OS almost certainly has one you can use (on Windows, there is Notepad and on Mac TextEdit). 对于你可能尝试nano或pico( nano Gemfilepico Gemfile )或者如果你不想编辑终端中的文件,你的操作系统几乎肯定有一个你可以使用的(在Windows上,有记事本和Mac TextEdit) 。 It would be wise to get an editor that can understand and highlight code, though. 但是,获得能够理解和突出代码的编辑器是明智之举。

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

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