Rails on Ubuntu
October 31, 2008 6:02 PM   Subscribe

Rails on Ubuntu. I've followed this tutorial: http://wiki.rubyonrails.org/rails/pages/RailsOnUbuntu Now how to do I access ror from my browser? Where do I put files for dev? Help please!!
posted by BoldStepDesign to Computers & Internet (4 answers total)
First you have to write something, but it sounds like you might need a tutorial or a book. You can just do "rails test_app" in your home dir and it will set up the skeleton. Then you can cd into ./test_app and run "./script/server" to fire it up. It will return the port the server is running on, somewhere around 3000, 3001 or so. Point your browser at http://ubuntubox:3004/ (or whatever port) and you should see something.
posted by rhizome at 6:24 PM on October 31, 2008

A note on what rhizome said, you can run the built in server, but it's not going to be functional for a live website with real visitors. You'll want to set yourself up using fcgi under Apache (or other ways, that's the one I use and I find it easy).

If you are interested in RoR, but are learning Rails at the same time, I heartily recommend Why's (poignant) Guide.
posted by Kickstart70 at 8:12 PM on October 31, 2008

Assuming you've created a project, like so:

$> rails my_new_project

just step into your directory:

$> cd my_new_project

and start the server:

$> ./script/server

You now have a Rails app running on your local box. From your browser, you should be able to reach http://localhost:3000. If you haven't already, you'll need to set up a database and configure your app to reach it (consult one of the zillion Rails how-tos; I recommend picking up a copy of Agile Web Development with Rails, published by Pragmatic Programmers.) All of your development will take place within that my_new_project folder.

The nice thing about development with Rails is that this folder can be anywhere on your local box -- you don't need to wire it up to Apache or anything. Although as Kickstart70 mentioned, you will need to tackle that if/when you move your app to a production server.

Good luck!
posted by sonofslim at 9:42 PM on October 31, 2008

I should mention that the rails maintainers in debian/ubuntu are a bit hostile towards Ruby Gems, which sort of does the same thing but apparently is not apt-get or package policy friendly.
posted by pwnguin at 10:44 PM on October 31, 2008

« Older Post apocalyptic kindergarteners   |   Obamusic! Newer »
This thread is closed to new comments.