views:

4792

answers:

12

I would like to get source for a small, well written rails app to modify and "play with" as I learn how to program. I have found hundreds of open-source apps, but I don't know which are any good.

Any suggestions?

+1  A: 

The depot application that is described in the Agile Web Development book has been very useful for me.

You can get the code here, however the book explains it step by step.

hectorsq
here's some links about using the depot app with rails 2.0http://groups.google.com/group/rubyonrails-talk/browse_thread/thread/7bd0e7db2152d770/#http://woonzai.com/blog/2007/12/18/help-for-rails-beginners-using-the-book-awdwr-and-rails-20/
Gene T
+7  A: 

Your best bet is actually the rails scaffolding itself. For instance, instead of

ruby script/generate recipe

(for a fictional 'recipe' example)

You can do

ruby script/generate scaffold recipe

This does all the MVC creation code that rails normally does for you, plus puts the scaffolding in. It's the same as if you'd done

scaffold :recipe

only this way shows you the code. So you have something working - albeit not prettily - and can move up from there.

Atiaxi
this is definitely good for the extreme basics. It won't however teach you anything in the intermediate to advanced areas.
Tilendor
+1  A: 

The scaffolding is certainly a great introduction to the framework.

"Agile Web Development" is an excellent book and the depot application provides the basis for numerous entities that are requested on web sites today.

*Edit - Reference to project was removed since it is no longer available. Thanks Brian! Shame that project never took off, unless they renamed it.

Adam
Thanks for the heads up.
Adam
+3  A: 

This doesn't answer your question, but you must have some kind of app in mind, and you can find examples for a lot of different functionality here:

http://www.opensourcerails.com/

http://www.railsforall.org/apps

this was good, but hasn't been updated in awhile

http://sample.caboo.se/

I think all tutorial books now have downloadable code, and a lot of those zip files are complete, working example apps that aren't gigantic repos like, say the reddit codebase. (I learned from the apps in the back of Scott Raymond's ajax on Rails book, which is great, but the apps are probably also not updated. I also liked the railsspace book. It's actually interesting to substitute HAML/SASS for eRb, make an app non-RESTFUL, substitute sphinx for ferret, whatever.

http://examples.oreilly.com/9780596527440/

http://railsspace.com/book

Gene T
+50  A: 

On my drive I have a number of open-source Rails apps I have used for reference while learning Rails as also sanity checking that I am doing things the "rails-way":

Beast and Mephisto are particularly valuable as they have been developed by high-profile members of the Rails community.

Toby Hede
Links would be good. :-)
Charles Roper
Beast and Mephisto appear to be dead
jcm
A: 

Here are some social networking focussed ones, which cover quite a lot of ground and are thus well worth looking at:

And BaseApp is pretty cool too. It's a sort of starter app styled along the lines of 37 Signals' apps, such as (unsurprisingly) BaseCamp:

Charles Roper
+6  A: 

If you want to have look into some professional and a recent one (although, still not finished) code, browse through this repository: http://github.com/spot-us/spot-us/tree/master - its an application developed by the Obie Fernandez's Hashrocket team.

Milan Novota
A: 

what about Typo and Cookbook that comes with InstantRails? :)

+1  A: 

Community Engine - It's a plugin to build social network apps

Ed
moved url: http://communityengine.org/
Brian Maltzan
+1  A: 

I enjoyed reading through the code for BucketWise, by Jamis Buck. I've been working with Rails for a while, but I certainly picked up a trick or two.

Paul Horsfall
+5  A: 

An excellent list just appeared at the JetPack Flight Log, reminding me of this question.

To summarise, we have the following (I've linked to source locations as a hedge against the post changing/disappearing, but please try the link above first)

Mike Woodhouse
A: 

A bit of shameless self-promotion here, but I've worked on rboard for quite a while now: http://github.com/radar/rboard and I consider it as an example of a good rails app.

Ryan Bigg