Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Reference checklist for starting a new Rails application?

It's easy to create a new Rails application using "rails new myapp" (or start with a template from Rails Wizard or the RailsApps project).

But after that, what do you do? What gems do you always add? What decisions do you make before beginning development? What important items are often overlooked before deploying an app?

I'd like to put together a reference checklist to share. Any suggestions?

For example:

  • Create a new RVM gemset
  • Modify the .gitignore file
  • Switch from TestUnit to RSpec
  • Set up Guard to run tests in the background during development
  • Add the viewport metatag to the default application layout
  • Don't forget to create a sitemap.xml file
  • Add a Google Analytics snippet

What else?

like image 582
Daniel Kehoe Avatar asked Nov 07 '11 23:11

Daniel Kehoe


Video Answer


3 Answers

Starting with a Rails template.

You should look theses resources :

  • http://railswizard.org/
  • https://github.com/RailsApps/rails3-application-templates
  • http://railsapps.github.com/rails-application-templates.html
  • https://github.com/quickleft/prologue
like image 112
jeremymarc Avatar answered Sep 22 '22 14:09

jeremymarc


For me usual process involves:

  • Add CSS framework (grids, text, forms)
  • Add Cells
  • Add Slim (www.slim-lang.com)
  • Remove Test::Unit for RSpec
  • Add application config settings (config.yml)
  • Add Cucumber
  • Add FactoryGirl
  • Add Spork
  • Add Guard (guard-rspec, guard-cucumber, guard-sass, guard-livereload, guard-spork)
  • Add Git, Github space, + amend .gitignore
  • Add Heroku (stage + production) spaces

I'll usually copy over my google_analytics helpers and sitemap_controller from other projects during the development process instead of being organised enough to do it from the start. I like to the the testing and deployment options setup from the get go so I can start developing and releasing early and often.

Dave

like image 31
sprysoft Avatar answered Sep 23 '22 14:09

sprysoft


create rvm gemset, create .rvmrc, modify .gitignore

Then add gems

  • gem 'pg'
  • gem 'thin'
  • gem 'ruby-debug19', :require => 'ruby-debug'
  • gem 'rspec-rails'
  • gem 'factory_girl_rails'
  • gem 'capybara'

then depending on the project, I often use aws3, paperclip, resque, will_paginate and haml (although I try not to use it on new projects anymore)

like image 29
jassa Avatar answered Sep 21 '22 14:09

jassa