#160 √ invalid
Edwin V.

Rails application recipes

Reported by Edwin V. | May 9th, 2008 @ 07:51 PM

I'm wondering if you considered some kind of recipe for Rails applications. Every time we start a new Rails project in our company, we are taking the same steps: installing certain plugins, adding some custom rake tasks and executing svn actions to create a proper svn workspace. Wouldn't it be nice to apply some kind of application recipe when generating a new application with the 'rails' command?

The guys from Caboose created the Sample Rails application, which can be retrieved from SVN. I don't think storing a sample application in SVN is such a good idea, because of the versioning of the Rails code and plugins. When creating a new project, I often want the lastest Rails version and the most recent plugins and not be forced to update the sample repository first.

A recipe in the simplest form should contain a number of commands to execute, e.g.:

script/plugin install rspec
script/plugin install rspec_rails
rake svn:configure

In this way, the problem can easily be solved with a bash script. But I think a more high-level (YAML?) solution could also be nice:

plugins:
    rspec
    rspec_Rails
tasks:
    svn:configure

This recipe file should be passed as an argument to the rails script:

rails weblog --recipe=/home/edwin/rails_with_rspec.yaml

It is even possible to make it possible to give an URL as argument, but this might be a bit overkill. It can be nice though when someone wants to share his recipes or to share recipes within a company.

I'm willing to add the functionality to the Rails core with a patch, but would like to know if it is a feature that fits in the Rails vision and if more people think this is usable.

Comments and changes to this ticket

  • DHH

    DHH May 11th, 2008 @ 07:45 PM

    • → State changed from “new” to “invalid”

    I think this is rather specific to a certain use case (many applications using exactly the same setup). I think it'd work better as a plugin for starters.

  • Edwin V.

    Edwin V. May 11th, 2008 @ 07:54 PM

    I don't totally agree with you David. It is not the case that many of my applications are using the same setup. I'm using for example RSpec and whatever the content or setup of the application I'm building is, I need the plugins. The same for plugins as exception_notification or mail_queue.

    But I do agree with you on your other point, a plugin would be a good starting solution as long as it is not sure more people are experiencing this problem.

  • court3nay

    court3nay May 11th, 2008 @ 08:21 PM

    Or, you could keep your blank-state application in Git, which would solve the upstream issue.

  • Sven Fuchs

    Sven Fuchs May 11th, 2008 @ 09:38 PM

    How about a bash script? Or a rake task?

Please Login or create a free account to add a new comment.

You can update this ticket by sending an email to from your email client. (help)

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

Source available from github

The Git repository resides at http://github.com/rails

Check out the current development trunk (Edge Rails) with:

git clone git://github.com/rails/rails.git

Creating or reviewing a patch

See the contributor guide.

Creating a feature request

Please don't. If you want a new feature in Rails, you'll have to pull up your sleeves and get busy yourself. Or convince someone else to do it. See the contributor guide on how to get going. But posting them here is just going to lead to ticket root.

Creating a bug report

When creating a bug report, be sure to include as much relevant information as possible. Post the code sample that causes the problem. Preferably, alter the unit tests and show through either changed or added tests how the expected behavior is not occuring.

Security vulnerabilities should be reported via an email to security@rubyonrails.org, do not use trac for reporting security vulnerabilities. All content in trac is publicly available as soon as it is posted.

Then don't get your hopes up. Unless you have a "Code Red, Mission Critical, The World is Coming to an End" kinda bug, you're creating this ticket in the hope that others with the same problem will be able to collaborate with you on solving it. Do not expect that the ticket automatically will see any activity or that others will jump to fix it. Creating a ticket like this is mostly to help yourself start on the path of fixing the problem and for others to sign on to with a "I'm having this problem too".

Shared Ticket Bins