Ruby 和 Ruby on Rails 有什么区别?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/1237372/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
What is the difference between Ruby and Ruby on Rails?
提问by yaar zeigerman
I have been studying Ruby for the past few days and I have noticed there is Ruby on Rails.
过去几天我一直在研究 Ruby,我注意到有 Ruby on Rails。
What is the difference between the two? Do they work together? Is the syntax the same?
两者有什么区别?他们一起工作吗?语法一样吗?
回答by
Ruby is a programming language. Ruby on Rails ("RoR") is a web-application framework that is implemented in Ruby.
Ruby 是一种编程语言。Ruby on Rails(“RoR”)是一个用 Ruby 实现的 Web 应用程序框架。
So they not only "work together" but RoR depends on Ruby.
所以他们不仅“一起工作”,而且 RoR 取决于 Ruby。
回答by Brian Rasmussen
Ruby is a general purpose language. Ruby on Rails is a Ruby framework for implementing web applications.
Ruby 是一种通用语言。Ruby on Rails 是一个用于实现 Web 应用程序的 Ruby 框架。
回答by GowriShankar
Ruby is an interpreted scripting language for quick and easy object-oriented programming.
Ruby 是一种解释性脚本语言,用于快速轻松的面向对象编程。
Ruby is a programming Language
Ruby 是一种编程语言
Ruby on Rails is web-development framework.
Ruby on Rails 是 Web 开发框架。
You can read more in "Small Discussion about Ruby on Rails".
您可以在“关于 Ruby on Rails 的小讨论”中阅读更多内容。
回答by prat1kk
Just like PHP has Codeigniter , CakePHP and Laravel, similarly, Ruby has Ruby on Rails ("RoR").
就像 PHP 有 Codeigniter 、CakePHP 和 Laravel 一样,Ruby 也有 Ruby on Rails(“RoR”)。
回答by Srinivas M.V.
Ruby is a scripting language and Rails is a framework which is built using Ruby.
Ruby 是一种脚本语言,Rails 是一个使用 Ruby 构建的框架。
Ruby and Rails are tightly coupled and "Rails is magic emerged out of Ruby". Whatever you write in a Rails application is just Ruby code. When you run a Rails application, you are just interpreting the Ruby code using Ruby's interpreter.
Ruby 和 Rails 是紧密耦合的,“Rails 是从 Ruby 中诞生的魔法”。无论您在 Rails 应用程序中编写什么,都只是 Ruby 代码。当您运行 Rails 应用程序时,您只是在使用 Ruby 的解释器来解释 Ruby 代码。
回答by Sam Harwell
Ruby on Rails is a library written in the Ruby language. Its popularity prompted many people to take up writing in Ruby to make use of it, which led many people to treat them as inseparable. :)
Ruby on Rails 是一个用 Ruby 语言编写的库。它的流行促使许多人开始用 Ruby 编写来利用它,这导致许多人将它们视为形影不离。:)

