设置 Ruby 开发环境

发布于 2024-09-13 11:23:01 字数 1380 浏览 2 评论 0原文

我目前正在尝试搭建一个学习Ruby的开发环境。该环境主要是为了掌握该语言,但不久之后我很可能会继续使用 Rails 进行开发。以 Web 开发为目标,我想了解一下首选的 Web 服务器和数据库。

我打算在虚拟机上设置环境,所以我不担心把东西搞砸。因此,我愿意使用 Linux 发行版、OSX 或 Windows 作为操作系统。

我即将从 C# 迁移过来,所以我想在一定程度上被迫采用 Ruby 的思维方式。显然,说起来容易做起来难。

  • 大多数 Ruby 开发人员使用什么操作系统?
  • 最简单的 IDE 是什么 处理来自背景的事情 使用 Visual Studio?
  • 哪个 Ruby 中使用最多的数据库 社区?
  • 哪个数据库最多 大多数网络可能都支持 主持人?
  • 哪个网络服务器是 最容易配置?起床并 以最短的时间运行 时间。

希望我已经提供了所需的所有信息,并希望这将帮助其他人建立自己的环境。

谢谢

编辑:

谢谢大家。有些确实不错 到目前为止的建议,我将全部 上船。我现在正在涉水 通过大量的文章围绕 Linux 上的初始 RoR 设置,如我所愿 了解事物是如何运作的 绑在一起。也因为这一切 免费...

我目前正在整理一个 虚拟机(这样我就可以破坏东西) 使用:

  • Ubuntu
  • SQLite
  • 没有网络服务器,我计划首先使用 Rails 附带的任何开发服务器
  • Redcar 编辑器

编辑2

我已经设置了几个环境 现在。

我的 ubuntu 安装程序运行在 Windows 上的虚拟机并决定 尝试用 ruby​​ 装饰我的 Mac 也有发展。

总的来说,我不得不说设置 mac 比 mac 痛得多 Linux 设置。在Mac上我正在运行 与:

  • OSX 中开箱即用的 SQLite(!)
  • TextMate(试用版,但很喜欢)
  • 混合网络服务器

我从学习方法中取得了进步 Ruby 来编写一些简单的 带有 Rails 的网站,我发现 使用 Rails 进行开发非常简单 使用。我还设置了一个GIT 我的工作目录中的存储库和 目前正在尝试 Heroku。

谢谢大家的帮助。

如果有人想了解有关在任一环境上进行设置的更多信息,我很乐意提供更多详细信息。

I am currently trying to set up a development environment for learning Ruby. The environment will primarily be for getting to grips with the language, but I will most probably move on to development with Rails after long. With web development a target, I would like to hear about preferred web servers and databases.

I plan on setting up the environment on a virtual machine, so I'm not worried about trashing the thing. Therefore, I am open to using a Linux distribution, OSX or Windows as the operating system.

I'm moving from C#, so I'd like to be forced into the Ruby way of thinking to a certain extent. Obviously, that's easier said than done.

  • What OS do most Ruby developers use?
  • What is the easiest IDE to get to
    grips with coming from a background
    of using Visual Studio?
  • Which
    database is used most within the Ruby
    community?
  • Which database is most
    likely to be supported by most web
    hosts?
  • Which web server is the
    easiest to configure? To get up and
    running in the shortest amount of
    time.

Hopefully I have provided all the information needed and hopefully this will aid others in setting up their own environments.

Thanks

Edit:

Thanks guys. Some really good
suggestions so far, all of which I'll
take on board. I'm currently wading
through the copious articles surrounding
initial RoR setup on Linux, as I like to
understand how things work and are
tied together. Also, because it's all
free...

I'm currently putting together a
virtual machine (so I can break stuff)
using:

  • Ubuntu
  • SQLite
  • No webserver, I plan on using whatever development server comes with Rails out of the box, initially
  • Redcar Editor

Edit 2

I have setup a couple of environments
now.

I have the ubuntu setup running in a
Virtual Machine on Windows and decided
to try decking my Mac out for ruby
development too.

Overall, I'd have to say setup for the
mac was a lot less painful than the
linux setup. On the mac I'm running
with:

  • SQLite that comes with OSX out of the box(!)
  • TextMate (trial version, but loving it)
  • Mongrel web server

I've progressed from learning the ways
of Ruby to writing some simple
websites with Rails and am finding
development with Rails really simple
to use. I have also set up a GIT
repository on my working directory and
am currently trying out Heroku.

Thanks for the help, everyone.

If anyone would like any more information about setting up on either environment, I'd be happy to provide more detail.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(6

蓝眼睛不忧郁 2024-09-20 11:23:01

大多数 Ruby 开发人员使用什么操作系统?

大多数情况下使用 Mac 操作系统,但任何 Linux 发行版都可以(Ubuntu/Fedora 等)。

对于使用 Visual Studio 的人来说,最容易掌握的 IDE 是什么?

如果您使用的是 Mac,那么 Textmate 非常受欢迎。如果您需要类似于企业世界的东西,Netbeans 和 Aptana 就在那里。 Emacs/Vim 也可以。

Ruby 社区中使用最多的是哪个数据库?

到目前为止,我认识的大多数 Ruby/RoR 人员都使用开源数据库。 sqlite 用于本地开发,而 Mysql 或 Postgresql 用于生产。我的建议是,sqlite 很容易学习,而尝试一下 Mysql 或 Postgresql,你可能不知道你的客户什么时候会要求你在它们上进行开发。 Mysql 非常流行。我认为 Postgresql 有更多的功能(个人喜好)。

大多数网络主机最有可能支持哪个数据库?

Mysql 最受共享主机支持,因此 LAMP (Linux/Apache/Mysql/Php) 中的 M。但 Postgresql 也得到了更多的支持。一些托管公司甚至支持两者,但 Rails 开发人员通常更喜欢使用 VPS (slicehost.com/linode.com) 并自行管理所有这些。也可以访问 heroku.com 来部署 Rails 应用程序,而不需要太多系统管理方面的知识。

哪个网络服务器最容易配置?在最短的时间内启动并运行。

使用 Rails 进行开发,您将获得 webrick 作为开发服务器,您可以在其中本地测试您的应用程序。但对于生产,我更喜欢 modrails.com,您可以在 apache/nginx 之间进行选择。我更喜欢使用 apache,因为这是我习惯的。

What OS do most Ruby developers use?

Mac OS for most, but any Linux distro will do (Ubuntu/Fedora etc).

What is the easiest IDE to get to grips with coming from a background of using Visual Studio?

Textmate is quite popular if you're on Mac. Netbeans and Aptana are there if you need something similar to enterprise world. Emacs/Vim is ok too.

Which database is used most within the Ruby community?

So far most Ruby / RoR guys I know use open source databases. sqlite for local development while Mysql or Postgresql for production. My advice, sqlite is easy to learn, while give a try with Mysql or Postgresql, you might not know when your clients going to ask you to develop on them. Mysql is very popular. Postgresql I think has lot more features (personal preference).

Which database is most likely to be supported by most web hosts?

Mysql is most supported by shared hosting hence the M in LAMP (Linux/Apache/Mysql/Php). But Postgresql is getting more support too. Some hosting companies even support both but Rails developers usually prefer to use VPS (slicehost.com/linode.com) and manage all these themselves. Checkout heroku.com too for deploying your Rails app without needing much knowledge in sys admin stuffs.

Which web server is the easiest to configure? To get up and running in the shortest amount of time.

Developing with Rails you'll get webrick as a development server where you can test ur app locally. But for production I prefer modrails.com where you can choose between apache/nginx. I prefer to use apache since that is what I'm used to.

可可 2024-09-20 11:23:01

您需要从一开始就查看 RVM,这消除了管理 Ruby 的很多痛苦版本和宝石。

从我去年 6 月在 Railsconf 上看到的笔记本电脑来看,Rails 开发人员大约 90% 使用 OSX,9.9% 使用 Linux,还有大约一两个人使用 Windows。

就个人而言,当我在家使用 OSX 和 geditredcar 当我在 Ubuntu Linux 上工作时。我在生产中使用 sqlite 进行开发,主要使用 mysql,但 mongodb 似乎是新的热点,但我除了使用它做了一些示例应用程序之外,还没有做更多的事情,所以我可以学习它。

虚拟主机提供商可能会让您选择您想要的任何数据库。 Heroku 很棒,用于通过 git 部署 Rails 应用程序,并使用 postgres,但如果你想的话,它有使用 mongodb 的插件走那条路。

要了解整个社区正在做什么,请查看 Thoughbot 的调查结果: http://robots.thoughtbot.com/post/308239139/2009-ruby-survey-results

You'll want to look at RVM from the start, this takes away a lot of the pain of managing Ruby versions and gems.

Judging from the laptops I saw at Railsconf last June, Rails developers are about 90% OSX, 9.9% Linux, and there's like 1 or 2 guys on Windows.

Personally I use Textmate when I'm at home on OSX and gedit and redcar when I'm at work on Ubuntu Linux. I use sqlite for development mainly with mysql in production, but mongodb seems to be the new hotness, but I haven't done much more than some sample apps with it so I can learn it.

Virtual hosting providers will probably give you a choice of whatever database you want. Heroku is awesome and is used for deploying Rails applications via git, and uses postgres but has plugins to use mongodb if you want to go that way.

For what the community at large is doing, check out Thoughbot's survey results at: http://robots.thoughtbot.com/post/308239139/2009-ruby-survey-results

_蜘蛛 2024-09-20 11:23:01

您可以查看 Bitnami 安装程序,它声称可以创建完整的 Ruby/Rails 堆栈。还有一个 VM 版本,因此理论上您可以获取他们的 VM 并开始编写您的应用程序。 (YMMV——我个人还没有尝试过)。

You might have a look at the Bitnami installer, which claims to create a full Ruby/Rails stack. There's also a VM version, so in theory you could just grab their VM and start coding your app. (YMMV -- personally I haven't tried it).

只是在用心讲痛 2024-09-20 11:23:01

操作系统

由于某种原因,大多数 Ruby 开发人员似乎都倾向于 Mac,其中也有少数 Linux 和 Windows 开发人员。也就是说,我使用 Windows 来完成所有的 Ruby 工作,并且还没有真正遇到任何巨大的障碍。如果您想与社区中的大多数人站在同一边,那么您最安全的选择可能是 Mac。

IDE

对于 ruby​​,您并不需要像 C# 这样的东西那样的成熟的 IDE。大多数 mac 用户似乎都使用 textmate。我个人使用 redcar。它还没有完全完成,但它可以在 Windows、Linux 或 Mac 上使用,而且我还没有遇到我需要但未提供的功能。它是用 ruby​​ 编写的,可以通过插件扩展,并支持 textmate 主题和片段。

为了补充 redcar,我实际上用 ruby​​ 编写了一个 shell 供我自己使用。它仍处于 alpha 阶段,但我已经有了 grep 和 ls 等功能,以及处理和操作文件的功能。您可以使用 ruby​​ 扩展它,并在 shell 中实际使用任何 ruby​​ 命令。它托管于此处,目前可在 Windows 上使用。在获得更多功能后,我可能会开始考虑 Mac 或 Linux 端口。

数据库

像sqlite和mysql这样的开源选项被广泛使用。我没有足够的经验来真正评论它们之间的差异。就其价值而言,Heroku(非常适合托管)使用 Postgresql。

服务器

您应该使用像 Thin 这样的轻量级服务器进行开发、测试你的应用程序。对于生产,请查看 modrails.com (正如其他一些答案所建议的那样)。

无论您选择什么,祝您好运。

OS

Most ruby developers seem to gravitate towards Macs for some reason, with a few linux and some windows devs. That said, I use windows for all my ruby work and haven't really run into any huge roadblocks. Your safest option will probably be a Mac, if you want to be on the same side as most of the community.

IDE

You don't really need a full-blown IDE for ruby, as you would for something like C#. Most mac users seem to use textmate. I personally use redcar. It's not fully completed yet, but it can be used on Windows, Linux or Mac, and I've yet to run into a feature I need that isn't provided. It is written in ruby, can be extended through plugins, and supports textmate themes and snippets.

To supplement redcar, I've actually written a shell in ruby for my own use. It's still in alpha stage, but I've got features like grep and ls working, and capabilities for working with and manipulating files. You can extend it with ruby, and actually use any ruby command inside the shell. It's hosted here, and is currently for use on windows. After I get some more features in, I might start looking at Mac or Linux ports.

Database

Open source options like sqlite and mysql are used widely. I don't have enough experience on them to really comment on the differences. For what it's worth, Heroku (which is great for hosting) uses Postgresql.

Server

You should use a lightweight server like Thin for development, to test your app. For production, have a look at modrails.com (as a few other answers have suggested).

Good luck with whatever you choose.

窗影残 2024-09-20 11:23:01

操作系统

80-20 Mac-Linux。到目前为止,我见过一位 Windows ruby​​ 开发人员。如果你使用 debian(ubuntu 是 debian),请看一下 rvm,因为 debian 削弱了 ruby​​gems。

IDE

您可以在没有 IDE 的情况下编写 ruby​​,使用您选择的编辑器。我们这里有 emacs、vim、textmate、gedit。如果你真的想要一个 IDE,那就使用 ruby​​mine。
取决于你的 shell-fu 有多好;-)

DB

sqlite >:)

服务器

对于开发来说,rails 服务器应该做。对于生产,我的推荐是 unicorn,与 nginx 搭配使用。

更多内容:
http://github.com/edgecase/ruby_koans
并选择 Rails 3 beta。

OS

80-20 Mac-Linux. I've seen one Windows ruby dev so far. If you use and debian (ubuntu is a debian), take a look at rvm, because debian cripples rubygems.

IDE

You can code ruby without an IDE, grab an editor of your choice. We've got emacs, vim, textmate, gedit here. If you really want an IDE, get rubymine.
Depends on how good your shell-fu is ;-)

DB

sqlite >:)

Server

For development, rails server should do. For production, my recommendation is unicorn, paired with nginx.

Further stuff:
http://github.com/edgecase/ruby_koans
And go for rails 3 beta.

海夕 2024-09-20 11:23:01

教程
ruby-lang.org/en/documentation/quickstart

Ruby 社区
ruby-lang.org/en/community/

我认为 Linux(Fedora) 最适合你

对于数据库 mysql 非常流行,

最受欢迎的 Web 服务器
http://www.modrails.com/
http://github.com/fauna/mongrel

Ruby 我的 IDE 不错
http://www.jetbrains.com/ruby/

Tutorials
ruby-lang.org/en/documentation/quickstart

Ruby community
ruby-lang.org/en/community/

I think Linux(Fedora) would be best for you

For data base mysql is very popular

most prefered web server
http://www.modrails.com/
http://github.com/fauna/mongrel

Ruby mine is good IDE
http://www.jetbrains.com/ruby/

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文