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.
我目前正在尝试建立一个学习Ruby的开发环境。环境将主要用于掌握语言,但我很可能不久将继续使用Rails进行开发。以Web开发为目标,我想了解首选的Web服务器和数据库。
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.
我计划在虚拟机上设置环境,所以我不担心会破坏这个东西。因此,我愿意使用Linux发行版,OSX或Windows作为操作系统。
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.
我正在从C#转移,所以我想在某种程度上*进入Ruby的思维方式。显然,说起来容易做起来难。
- What OS do most Ruby developers use?
- Ruby开发人员使用什么操作系统?
- What is the easiest IDE to get to grips with coming from a background of using Visual Studio?
- 从使用Visual Studio的背景来看,最简单的IDE是什么?
- Which database is used most within the Ruby community?
- Ruby社区中最常使用哪个数据库?
- Which database is most likely to be supported by most web hosts?
- 大多数Web主机最有可能支持哪个数据库?
- Which web server is the easiest to configure? To get up and running in the shortest amount of time.
- 哪个Web服务器最容易配置?在最短的时间内起床和跑步。
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...
多谢你们。到目前为止,一些非常好的建议,我将参与其中。我正在浏览有关Linux上初始RoR设置的大量文章,因为我喜欢了解事情如何运作并且联系在一起。另外,因为它都是免费的......
I'm currently putting together a virtual machine (so I can break stuff) using:
我正在使用以下方法组建一个虚拟机(所以我可以破解东西):
- Ubuntu
- Ubuntu的
- SQLite
- SQLite的
- No webserver, I plan on using whatever development server comes with Rails out of the box, initially
- 没有网络服务器,我打算开始使用开箱即用的Rails开发服务器
- Redcar Editor
- Redcar编辑
Edit 2
编辑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.
我在Windows上的虚拟机中运行了ubuntu设置,并决定尝试将我的Mac装入ruby开发中。
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:
总的来说,我不得不说mac的设置比linux设置要痛苦得多。在mac上我正在运行:
- SQLite that comes with OSX out of the box(!)
- 开箱即用的OSX附带的SQLite(!)
- TextMate (trial version, but loving it)
- TextMate(试用版,但爱它)
- Mongrel web server
- Mongrel Web服务器
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.
我已经从学习Ruby的方式发展到使用Rails编写一些简单的网站,并且发现Rails的开发非常简单易用。我还在我的工作目录上设置了一个GIT存储库,目前正在尝试使用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.
如果有人想了解有关在任一环境中设置的更多信息,我很乐意提供更多详细信息。
6 个解决方案
#1
8
What OS do most Ruby developers use?
Ruby开发人员使用什么操作系统?
Mac OS for most, but any Linux distro will do (Ubuntu/Fedora etc).
大多数Mac OS,但任何Linux发行版都可以(Ubuntu / Fedora等)。
What is the easiest IDE to get to grips with coming from a background of using Visual Studio?
从使用Visual Studio的背景来看,最简单的IDE是什么?
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.
如果你在Mac上,Textmate很受欢迎。如果您需要与企业世界类似的东西,Netbeans和Aptana就在那里。 Emacs / Vim也可以。
Which database is used most within the Ruby community?
Ruby社区中最常使用哪个数据库?
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).
到目前为止,我所知道的大多数Ruby / RoR人都使用开源数据库。 sqlite用于本地开发,而Mysql或Postgresql用于生产。我的建议,sqlite很容易学习,而试用Mysql或Postgresql,你可能不知道你的客户什么时候会要求你开发它们。 Mysql很受欢迎。 Postgresql我认为有更多的功能(个人喜好)。
Which database is most likely to be supported by most web hosts?
大多数Web主机最有可能支持哪个数据库?
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.
共享主机支持Mysql,因此LAMP中的M(Linux / Apache / Mysql / Php)。但是Postgresql也得到了更多的支持。一些托管公司甚至支持两者,但Rails开发人员通常更喜欢使用VPS(slicehost.com/linode.com)并自行管理所有这些。结帐heroku.com也可以部署你的Rails应用程序,而无需太多的sys管理员知识。
Which web server is the easiest to configure? To get up and running in the shortest amount of time.
哪个Web服务器最容易配置?在最短的时间内起床和跑步。
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.
使用Rails进行开发,您将获得webrick作为开发服务器,您可以在本地测试您的应用程序。但对于生产我更喜欢modrails.com,您可以在其中选择apache / nginx。我喜欢使用apache,因为这是我习惯的。
#2
5
You'll want to look at RVM from the start, this takes away a lot of the pain of managing Ruby versions and gems.
你想从一开始就看RVM,这消除了管理Ruby版本和宝石的很多痛苦。
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.
从我去年6月在Railsconf上看到的笔记本电脑来看,Rails开发人员大约有90%的OSX,9.9%的Linux,而Windows上有1或2个人。
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.
我个人在OSX上使用Textmate,当我在Ubuntu Linux上工作时使用gedit和redcar。我在生产中使用sqlite主要用于开发mysql,但是mongodb似乎是新的热点,但我没有做过一些带有它的示例应用程序,所以我可以学习它。
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.
虚拟主机提供商可能会为您提供所需数据库的选择。 Heroku很棒,用于通过git部署Rails应用程序,并使用postgres但是如果你想这样的话,有插件可以使用mongodb。
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
对于整个社区正在做的事情,请查看尽管的机器人调查结果:http://robots.thoughtbot.com/post/308239139/2009-ruby-survey-results
#3
2
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).
您可以查看Bitnami安装程序,它声称可以创建完整的Ruby / Rails堆栈。还有一个VM版本,所以理论上你可以抓住他们的VM并开始编写你的应用程序。 (YMMV - 我个人还没试过)。
#4
2
OS
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.
由于某些原因,大多数ruby开发人员似乎都倾向于使用Mac,只需要几个linux和一些Windows开发人员。也就是说,我使用Windows来完成我所有的红宝石工作,并没有遇到任何巨大的障碍。如果您希望与大多数社区站在一起,那么您最安全的选择可能是Mac。
IDE
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.
你真的不需要一个完整的用于ruby的IDE,就像C#这样的东西。大多数mac用户似乎都使用textmate。我个人使用redcar。它尚未完全完成,但它可以在Windows,Linux或Mac上使用,我还没有遇到我需要的功能,但没有提供。它是用ruby编写的,可以通过插件扩展,并支持textmate主题和片段。为了补充redcar,我实际上用红宝石写了一个shell用于我自己的用途。它仍处于alpha阶段,但我有像grep和ls一样的功能,以及处理和操作文件的功能。你可以用ruby扩展它,实际上在shell中使用任何ruby命令。它托管在这里,目前在Windows上使用。在我获得更多功能之后,我可能会开始关注Mac或Linux端口。
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.
像sqlite和mysql这样的开源选项被广泛使用。我没有足够的经验来真正评论这些差异。对于它的价值,Heroku(非常适合托管)使用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).
您应该使用像Thin for development这样的轻量级服务器来测试您的应用。有关制作,请查看modrails.com(正如其他一些答案所示)。
Good luck with whatever you choose.
无论你选择什么,祝你好运。
#5
2
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.
80-20 Mac-Linux。到目前为止,我见过一个Windows ruby dev。如果你使用和debian(ubuntu是debian),请看看rvm,因为debian会破坏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 ;-)
您可以在没有IDE的情况下编写ruby代码,获取您选择的编辑器。我们这里有emacs,vim,textmate,gedit。如果你真的想要一个IDE,那就得到rubymine。取决于你的shell-fu有多好;-)
DB
sqlite >:)
sqlite> :)
Server
For development, rails server should do. For production, my recommendation is unicorn, paired with nginx.
对于开发,rails服务器应该这样做。对于制作,我的推荐是独角兽,与nginx配对。
Further stuff: http://github.com/edgecase/ruby_koans And go for rails 3 beta.
更多内容:http://github.com/edgecase/ruby_koans并转到rails 3 beta。
#6
0
Tutorials ruby-lang.org/en/documentation/quickstart
教程ruby-lang.org/en/documentation/quickstart
Ruby community
ruby-lang.org/en/community/
Ruby社区ruby-lang.org/en/community/
I think Linux(Fedora) would be best for you
我认为Linux(Fedora)最适合你
For data base mysql is very popular
对于数据库,mysql非常流行
most prefered web server http://www.modrails.com/ http://github.com/fauna/mongrel
最喜欢的网络服务器http://www.modrails.com/ http://github.com/fauna/mongrel
Ruby mine is good IDE http://www.jetbrains.com/ruby/
Ruby我的IDE很好http://www.jetbrains.com/ruby/
#1
8
What OS do most Ruby developers use?
Ruby开发人员使用什么操作系统?
Mac OS for most, but any Linux distro will do (Ubuntu/Fedora etc).
大多数Mac OS,但任何Linux发行版都可以(Ubuntu / Fedora等)。
What is the easiest IDE to get to grips with coming from a background of using Visual Studio?
从使用Visual Studio的背景来看,最简单的IDE是什么?
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.
如果你在Mac上,Textmate很受欢迎。如果您需要与企业世界类似的东西,Netbeans和Aptana就在那里。 Emacs / Vim也可以。
Which database is used most within the Ruby community?
Ruby社区中最常使用哪个数据库?
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).
到目前为止,我所知道的大多数Ruby / RoR人都使用开源数据库。 sqlite用于本地开发,而Mysql或Postgresql用于生产。我的建议,sqlite很容易学习,而试用Mysql或Postgresql,你可能不知道你的客户什么时候会要求你开发它们。 Mysql很受欢迎。 Postgresql我认为有更多的功能(个人喜好)。
Which database is most likely to be supported by most web hosts?
大多数Web主机最有可能支持哪个数据库?
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.
共享主机支持Mysql,因此LAMP中的M(Linux / Apache / Mysql / Php)。但是Postgresql也得到了更多的支持。一些托管公司甚至支持两者,但Rails开发人员通常更喜欢使用VPS(slicehost.com/linode.com)并自行管理所有这些。结帐heroku.com也可以部署你的Rails应用程序,而无需太多的sys管理员知识。
Which web server is the easiest to configure? To get up and running in the shortest amount of time.
哪个Web服务器最容易配置?在最短的时间内起床和跑步。
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.
使用Rails进行开发,您将获得webrick作为开发服务器,您可以在本地测试您的应用程序。但对于生产我更喜欢modrails.com,您可以在其中选择apache / nginx。我喜欢使用apache,因为这是我习惯的。
#2
5
You'll want to look at RVM from the start, this takes away a lot of the pain of managing Ruby versions and gems.
你想从一开始就看RVM,这消除了管理Ruby版本和宝石的很多痛苦。
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.
从我去年6月在Railsconf上看到的笔记本电脑来看,Rails开发人员大约有90%的OSX,9.9%的Linux,而Windows上有1或2个人。
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.
我个人在OSX上使用Textmate,当我在Ubuntu Linux上工作时使用gedit和redcar。我在生产中使用sqlite主要用于开发mysql,但是mongodb似乎是新的热点,但我没有做过一些带有它的示例应用程序,所以我可以学习它。
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.
虚拟主机提供商可能会为您提供所需数据库的选择。 Heroku很棒,用于通过git部署Rails应用程序,并使用postgres但是如果你想这样的话,有插件可以使用mongodb。
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
对于整个社区正在做的事情,请查看尽管的机器人调查结果:http://robots.thoughtbot.com/post/308239139/2009-ruby-survey-results
#3
2
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).
您可以查看Bitnami安装程序,它声称可以创建完整的Ruby / Rails堆栈。还有一个VM版本,所以理论上你可以抓住他们的VM并开始编写你的应用程序。 (YMMV - 我个人还没试过)。
#4
2
OS
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.
由于某些原因,大多数ruby开发人员似乎都倾向于使用Mac,只需要几个linux和一些Windows开发人员。也就是说,我使用Windows来完成我所有的红宝石工作,并没有遇到任何巨大的障碍。如果您希望与大多数社区站在一起,那么您最安全的选择可能是Mac。
IDE
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.
你真的不需要一个完整的用于ruby的IDE,就像C#这样的东西。大多数mac用户似乎都使用textmate。我个人使用redcar。它尚未完全完成,但它可以在Windows,Linux或Mac上使用,我还没有遇到我需要的功能,但没有提供。它是用ruby编写的,可以通过插件扩展,并支持textmate主题和片段。为了补充redcar,我实际上用红宝石写了一个shell用于我自己的用途。它仍处于alpha阶段,但我有像grep和ls一样的功能,以及处理和操作文件的功能。你可以用ruby扩展它,实际上在shell中使用任何ruby命令。它托管在这里,目前在Windows上使用。在我获得更多功能之后,我可能会开始关注Mac或Linux端口。
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.
像sqlite和mysql这样的开源选项被广泛使用。我没有足够的经验来真正评论这些差异。对于它的价值,Heroku(非常适合托管)使用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).
您应该使用像Thin for development这样的轻量级服务器来测试您的应用。有关制作,请查看modrails.com(正如其他一些答案所示)。
Good luck with whatever you choose.
无论你选择什么,祝你好运。
#5
2
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.
80-20 Mac-Linux。到目前为止,我见过一个Windows ruby dev。如果你使用和debian(ubuntu是debian),请看看rvm,因为debian会破坏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 ;-)
您可以在没有IDE的情况下编写ruby代码,获取您选择的编辑器。我们这里有emacs,vim,textmate,gedit。如果你真的想要一个IDE,那就得到rubymine。取决于你的shell-fu有多好;-)
DB
sqlite >:)
sqlite> :)
Server
For development, rails server should do. For production, my recommendation is unicorn, paired with nginx.
对于开发,rails服务器应该这样做。对于制作,我的推荐是独角兽,与nginx配对。
Further stuff: http://github.com/edgecase/ruby_koans And go for rails 3 beta.
更多内容:http://github.com/edgecase/ruby_koans并转到rails 3 beta。
#6
0
Tutorials ruby-lang.org/en/documentation/quickstart
教程ruby-lang.org/en/documentation/quickstart
Ruby community
ruby-lang.org/en/community/
Ruby社区ruby-lang.org/en/community/
I think Linux(Fedora) would be best for you
我认为Linux(Fedora)最适合你
For data base mysql is very popular
对于数据库,mysql非常流行
most prefered web server http://www.modrails.com/ http://github.com/fauna/mongrel
最喜欢的网络服务器http://www.modrails.com/ http://github.com/fauna/mongrel
Ruby mine is good IDE http://www.jetbrains.com/ruby/
Ruby我的IDE很好http://www.jetbrains.com/ruby/