I want to make a development server for Ruby. (I have done this for IIS and a LAMP set up, but am by no means proficient at it.) What will I need besides the actual server (which I already have)? And also any security issues? I know I could dev locally on my machine, but don't want to do that.
我想为Ruby创建一个开发服务器。 (我已经为IIS和LAMP设置了这个,但我并不精通它。)除了实际的服务器(我已经拥有)之外我还需要什么?还有任何安全问题吗?我知道我可以在我的机器上本地开发,但不想这样做。
1 个解决方案
#1
7
First off when doing ruby development the first thing to know is that it works best in a unix like environment, so mac os x, linux, solaris, bsd, etc...
首先要做ruby开发时首先要知道的是它在unix环境中效果最好,所以mac os x,linux,solaris,bsd等...
Ruby libraries are distributed and packaged as gems. So you'll want to install ruby and install rubygems. Then from there on you use the gem
command for installing ruby libraries.
Ruby库作为gem分发和打包。所以你要安装ruby并安装rubygems。然后从那里开始使用gem命令安装ruby库。
I'm going to assume you're talking about doing web development with either ruby on rails 2.x or Merb 1.x. The two frameworks are merging in the next release and it'll be called Rails 3.0. So the answer here works for either one. I'm going to say Rails, but i mean Rails/Merb.
我将假设您正在讨论使用rails 2.x或Merb 1.x上的ruby进行Web开发。这两个框架在下一个版本中合并,它将被称为Rails 3.0。所以这里的答案适用于任何一个。我要说Rails,但我的意思是Rails / Merb。
Rails development is done locally on your machine. So you'll need to install ruby and all the libraries you need locally. I know many people who use Windows end up using virtualization and running a linux environment for rails within their desktop windows box.
Rails开发在您的机器上本地完成。所以你需要在本地安装ruby和你需要的所有库。我知道许多使用Windows的人最终使用虚拟化并在桌面窗口框中为rails运行linux环境。
In development most people use an application server, Mongrel. In production the current standard is to use Apache 2 and Passenger.
在开发中,大多数人使用应用程序服务器Mongrel。在生产中,当前的标准是使用Apache 2和Passenger。
With rails you're going to want to use source control. Most people today use git in the rails community, but it's possible to use subversion, perforce, or many other SCM's. To get your application from your source control to your staging and production systems, the rails community created an application called Capistrano. It handles deployments. You setup your server information, ssh keys, define access, and then you can release your application with a single command.
使用rails,您将需要使用源代码控制。今天大多数人在rails社区中使用git,但是可以使用subversion,perforce或许多其他SCM。为了使您的应用程序从源代码控制到您的登台和生产系统,rails社区创建了一个名为Capistrano的应用程序。它处理部署。您可以设置服务器信息,ssh密钥,定义访问权限,然后使用单个命令释放应用程序。
cap deploy
It's a pretty good system. Back several years ago now when i was working on odeo.com we had people using windows, linux, and mac's all for development with production deploys to debian linux. It wasn't intentional that our application be cross platform, it just worked out that way because we had people who wanted to add to it, including designers and biz types, who were on windows.
这是一个非常好的系统。几年前,当我在odeo.com工作时,我们让人们使用windows,linux和mac进行开发,并将生产部署到debian linux。我们的应用程序是跨平台的并不是故意的,它只是通过这种方式解决,因为我们有想要添加它的人,包括设计师和商业类型,谁在Windows上。
I highly recommend you check out http://guides.rubyonrails.com for more information.
我强烈建议您查看http://guides.rubyonrails.com以获取更多信息。
#1
7
First off when doing ruby development the first thing to know is that it works best in a unix like environment, so mac os x, linux, solaris, bsd, etc...
首先要做ruby开发时首先要知道的是它在unix环境中效果最好,所以mac os x,linux,solaris,bsd等...
Ruby libraries are distributed and packaged as gems. So you'll want to install ruby and install rubygems. Then from there on you use the gem
command for installing ruby libraries.
Ruby库作为gem分发和打包。所以你要安装ruby并安装rubygems。然后从那里开始使用gem命令安装ruby库。
I'm going to assume you're talking about doing web development with either ruby on rails 2.x or Merb 1.x. The two frameworks are merging in the next release and it'll be called Rails 3.0. So the answer here works for either one. I'm going to say Rails, but i mean Rails/Merb.
我将假设您正在讨论使用rails 2.x或Merb 1.x上的ruby进行Web开发。这两个框架在下一个版本中合并,它将被称为Rails 3.0。所以这里的答案适用于任何一个。我要说Rails,但我的意思是Rails / Merb。
Rails development is done locally on your machine. So you'll need to install ruby and all the libraries you need locally. I know many people who use Windows end up using virtualization and running a linux environment for rails within their desktop windows box.
Rails开发在您的机器上本地完成。所以你需要在本地安装ruby和你需要的所有库。我知道许多使用Windows的人最终使用虚拟化并在桌面窗口框中为rails运行linux环境。
In development most people use an application server, Mongrel. In production the current standard is to use Apache 2 and Passenger.
在开发中,大多数人使用应用程序服务器Mongrel。在生产中,当前的标准是使用Apache 2和Passenger。
With rails you're going to want to use source control. Most people today use git in the rails community, but it's possible to use subversion, perforce, or many other SCM's. To get your application from your source control to your staging and production systems, the rails community created an application called Capistrano. It handles deployments. You setup your server information, ssh keys, define access, and then you can release your application with a single command.
使用rails,您将需要使用源代码控制。今天大多数人在rails社区中使用git,但是可以使用subversion,perforce或许多其他SCM。为了使您的应用程序从源代码控制到您的登台和生产系统,rails社区创建了一个名为Capistrano的应用程序。它处理部署。您可以设置服务器信息,ssh密钥,定义访问权限,然后使用单个命令释放应用程序。
cap deploy
It's a pretty good system. Back several years ago now when i was working on odeo.com we had people using windows, linux, and mac's all for development with production deploys to debian linux. It wasn't intentional that our application be cross platform, it just worked out that way because we had people who wanted to add to it, including designers and biz types, who were on windows.
这是一个非常好的系统。几年前,当我在odeo.com工作时,我们让人们使用windows,linux和mac进行开发,并将生产部署到debian linux。我们的应用程序是跨平台的并不是故意的,它只是通过这种方式解决,因为我们有想要添加它的人,包括设计师和商业类型,谁在Windows上。
I highly recommend you check out http://guides.rubyonrails.com for more information.
我强烈建议您查看http://guides.rubyonrails.com以获取更多信息。