Skip to content

skeleton rails app starter

I’ve found a few tools that I like to use on all new projects, mostly for the presentation and testing layers. Following the dictum that lazy is good (and I’m far too lazy to make sure that’s the correct usage of ‘dictum’), I’ve created a starter app that has all those tools in place, so I don’t have to do all the script/generating etc each time.

In case it helps you, you can find it at http://github.com/madcowley/rails_skeleton.

Suggestions welcome.

So far, the list includes:

Presentation

Testing

Javascript

In case you want to do it by hand, here’s how:

rails

rails rails_skeleton
cd rails_skeleton

haml

sudo gem install haml (if needed)
haml --rails .

in environment.rb:

config.gem 'haml-edge'

(for compass)

compass

sudo gem install compass
rake rails:template LOCATION=http://compass-style.org/rails/installer

add to layout header:

 = stylesheet_link_tag 'compiled/screen.css', :media => 'screen, projection'
 = stylesheet_link_tag 'compiled/print.css', :media => 'print'
 /[if lt IE 8]
   = stylesheet_link_tag 'compiled/ie.css', :media => 'screen, projection'

formtastic

config.gem ‘formtastic’ script/generate formtastic

jquery

= javascript_include_tag ‘http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js’

rspec

in environments/test.rb:

config.gem "rspec", :lib => false
config.gem "rspec-rails", :lib => false

script/generate rspec

cucumber

script/generate cucumber

or

script/generate cucumber --spork</http://github.com/madcowley/rails_skeleton>
Reblog this post [with Zemanta]

Post a Comment

Your email is never published nor shared. Required fields are marked *
*
*