Skip to content

Instantly share code, notes, and snippets.

@rymai
Created May 9, 2010 21:10
Show Gist options
  • Save rymai/395415 to your computer and use it in GitHub Desktop.
Save rymai/395415 to your computer and use it in GitHub Desktop.
1. Run: rails new_project
2. In Gemfile:
source 'http://rubygems.org'
gem 'rails', '3.0.0.beta3'
gem 'heroku'
gem 'i18n'
gem 'haml'
gem 'devise', '>= 1.1.rc1'
gem 'state_machine'
gem 'jammit', :git => 'git://github.com/railsjedi/jammit.git'
group :development do
# bundler requires these gems in development
gem 'sqlite3-ruby', :require => 'sqlite3'
# Ruby console
gem 'looksee'
gem 'wirble'
end
group :test do
gem 'sqlite3-ruby', :require => 'sqlite3'
gem 'rspec', '>= 2.0.0.beta.8'
gem 'rspec-rails', '>= 2.0.0.beta.8'
gem 'factory_girl', :git => 'git://github.com/danielb2/factory_girl'
# gem 'factory_girl', :git => 'git://github.com/thoughtbot/factory_girl.git', :branch => 'rails3'
end
group :production do
gem 'pg'
end
3. Add the generators:
- Download the generators: http://github.com/indirect/rails3-generators/archives/master/zipball/master
- Put the generators folder in /lib
4. In config/application.rb:
config.generators do |g|
g.orm :active_record
g.template_engine :haml
# g.test_framework :rspec, :fixture => true, :views => false
g.test_framework :test_unit, :fixture_replacement => :factory_girl, :views => false
# g.fixture_replacement :factory_girl, :dir => "spec/factories"
end
5. Run: bundle install
6. Run (when rspec will be ready): rails generate rspec:install
7. Run: rails generate devise_install
8. Run: bundle exec haml --rails .
9. Run: rails generate devise User
10. Run (example): rails generate scaffold Project title:string descripion:text
11. Run (example): rails generate model Phase title:string duration:float
Resources:
http://www.viget.com/extend/rails-3-generators-the-old-faithful/
http://www.viget.com/extend/rails-3-generators-the-unusuals-part-1/
http://www.viget.com/extend/rails-3-generators-the-unusuals-part-2/
http://www.viget.com/extend/rails-3-generators-say-hello/
http://www.viget.com/extend/rails-3-generators-scaffolding/
http://www.viget.com/extend/rails-3-generators-hooks/
http://paulbarry.com/articles/2010/01/13/customizing-generators-in-rails-3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment