This project is archived and is in readonly mode.

#158 ✓invalid
Edwin Vlieg

[FEATURE] Rails application recipe

Reported by Edwin Vlieg | May 9th, 2008 @ 10:00 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 a variable to the rails script:

rails weblog --recipe=/home/edwin/rails_with_rspec.yaml
rails weblog --recipe=http://www.example.com/my_rails_recipe.yaml

The possibility to download a recipe from the internet with the command might be a bit overkill, but can be nice if 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/git fork, 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

  • Edwin Vlieg

    Edwin Vlieg May 10th, 2008 @ 05:20 PM

    Sorry for posting a duplicate ticket, this ticket disappeared shortly after adding, so I gave it another try. I think the other ticket is beter tagged, maybe someone can delete this one.

    Ticket #160 is the right version.

  • Pratik

    Pratik May 12th, 2008 @ 12:46 AM

    • State changed from “new” to “invalid”

    I think you should release a gem to do so, which would basically install a new rails binary, maybe call it "railsgen" or something. Getting it in core might be difficult before it's in wide use.

    Thanks.

Create your profile

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

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

People watching this ticket

Pages