«

»

Aug 25

Rails Project Setup Script

I got tired of typing the same commands all the time and/or looking up urls for plugins.  Hence this script….  Yes, I know it’s been done before, but this does what I want (for now; I’m sure I’ll edit it).

It does the following:

  • Creates rails instance (optionally setting the database, etc.)
  • Installs rspec & rspec-rails
  • Installs acts_as_statemachine
  • Installs restful_authentication
  • Modifies routes.rb
  • Adds an observer
  • Adds email settings

You can see the script below the cut or download it here:start-rails

(Edit: Removed an un-escaped pair of parens)

1 comment

  1. Navjeet

    Installed a rails (using Rails 2.1.1) project with this script and now when I run script/server I get an error:

    /usr/lib/ruby/gems/1.8/gems/activesupport-2.1.1/lib/active_support/dependencies.rb:116:in `qualified_const_defined?’: “Plugins::Restful-authentication::Lib” is not a valid constant name! (NameError)

    I read at http://agilewebdevelopment.com/plugins/restful_authentication somebody ran into same issue with Rails 2.1.0 but monkey patched Rails. A better solution is to rename vendor/plugin/restful-authentication folder to vendor/plugin/restful_authentication (use underscore). May be you can incorporate the renaming of folder in your script.

Leave a Reply

%d bloggers like this: