Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Setting up dev server for Ruby

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.

like image 250
Laura Avatar asked Jan 21 '09 16:01

Laura


1 Answers

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 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.

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 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.

In development most people use an application server, Mongrel. In production the current standard is to use Apache 2 and 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.

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.

I highly recommend you check out http://guides.rubyonrails.com for more information.

like image 171
rabble Avatar answered Nov 02 '22 12:11

rabble