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