Forums Ruby

How to Get Ruby, Rails, and a Database Installed and Working on My Laptop

Subscribe to How to Get Ruby, Rails, and a Database Installed and Working on My Laptop 5 post(s), 4 voice(s)

 
Avatar Cary Foster 2 post(s)

Scott, would you post a list of recommended websites I can visit to download necessary tools for running Ruby on Rails on my laptop?

 
Avatar Scott Woods Administrator 41 post(s)

Hey Cary,

This article here represents my setup really closely:

http://www.robbyonrails.com/articles/2007/06/19…

We go to the trouble of doing things this way because we prefer PostgreSQL as a database server, and because this type of custom setup gives us a lot of control over the specific versions of software that we’re running.

That said, I think that if you’re just getting started with Rails and programming on OS X, then Locomotive would be a much better option:

http://locomotive.raaum.org/

Locomotive packages all the software you need into one application, so installation is super easy. It’s not as customizable as the first option, but that doesn’t matter to you at this point—you want to be able to get started programming with rails, not messing around with installing software.

Basically, it will install the key features that you’ll need:

  • Ruby, the programming language itself
  • RubyGems, the system that Ruby uses for distributing software such as Rails
  • Rails, which is packaged as a set of RubyGems
  • A simple database—sqlite3.

Sqlite3 is a nice database to start with, since it doesn’t require a separate server (like MySQL and PostgreSQL do), and all of your database data gets stored in a single file. Less configuration, and fewer pieces to put together means more time that you can spend on rails itself.

Since there are many options for databases in rails, you need to configure your rails project for your specific setup using the config/database.yml file that will be in your rails project. To use sqlite3 that comes with locomotive, here’s what you can use for your config/database.yml file (replace the old content):

http://pastie.caboo.se/89324

Hope this helps. Let me know if you run into any trouble. You can always ping me on skype (scott.woods) if you want faster turnaround time too :)

Scott

 
Avatar Matt 6 post(s)

Hey all—
I have r on r installed. And I’m using RadRails. Should I uninstall and follow what the group is doing, or would I be able to operated as is.

 
Avatar Scott Woods Administrator 41 post(s)

Hey Matt,

I say you’re fine. We’ll be able to help you out no matter what you run into, and unless something is being flaky, just run with it—better to spend your time on actually getting stuff done. The “best way” to set this stuff up changes so often that you don’t get much benefit out of tweaking your environment endlessly unless something’s actually getting in your way.

Scott

 
Avatar Andrew Shind... 27 post(s)

If anyone has tried to follow the aptana guide for setting up ruby, rails, and mysql (the hivemind article) and not have had luck, make sure you change the rubyVM settings to point to /opt/local instead of /usr. If anyone needs the necessary links to see what I’m talking about, let me know.

Forums Ruby