views:

214

answers:

6

Hi,

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.

A: 

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/

A: 

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

zetetic
+1  A: 

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.

Tass
windows with redcar editor all the way! (it is actually what I use)...
rogerdpack
+5  A: 

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.

Ed
+5  A: 

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

Dan McNevin
It seems the first Ruby guy on Windows is me. *facepalm*
floatless
+1  A: 

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.

bennybdbc
@bennybdbc - Hi, thanks for your suggestions. I took a look at Heroku, it looks like an amazing platform for hosting. Would it be worth using a MySQL or PostgreSQL database if I have hosting on Heroku in mind? I was planning on using SQLite to get started.
fletcher