Just wondering,
What are the basic gems that you guys use and the architecture (code base and otherwise) do you guys follow when starting a new Rails project?
Just wondering,
What are the basic gems that you guys use and the architecture (code base and otherwise) do you guys follow when starting a new Rails project?
Try searching for “rails template” on GitHub, and you’ll get a lot of answers from smart people on the gems question. Any questions of architecture though above and beyond the standard Rails folder structure are going to be specific to each application though.
Hi,
I don't know what do you mean by "and the architecture" but I
can’ tell you which gem’s we add almost by default to all the projects… our basic gemfile look like this:
gem 'pg', '0.9.0'
#Our default database
gem 'hflr', '1.0.1' #splitting files
gem 'will_paginate', '>= 3.0.pre' #pagination
gem 'delayed_job', '2.1.4' #backround jobs
gem 'jquery-rails' #jquery instead of
prototype (solved in rails 3.1)
#security
gem 'devise'
gem 'devise_cas_authenticatable'
gem 'cancan', '>= 1.6.5'
group :development do
gem 'annotate', '>=2.4.0' #team request
end
group :development, :test do
gem 'rails_code_qa' #testing (includes rcov)
end
Considerations for our projects / architecture:
- We develop and deploy in all platforms... the most problematic
is windows. - We don’t have a clear path how to connect different rails projects (working on it)
And about the steps... If I was to start from zero... it will
be: 1. rails new project 2. create/init GIT repository 3. change gemfile to standard 4. copy “config\environments\production.rb” to “config\environments\pre_production.rb” (ideally should be the same as production… but we have some different like links to other servers, that also need to be pre-production) 5. correct the “config\database.yml” 6. copy “config\database.yml” to “config\database.yml.example” 7. exclude from git “config\database.yml”, “log” folder and “tmp” folder 8. setup the databases 9. bundle install 10. GIT commit and deploy on the integration server
I have omitted some steep like setup de device, cancan and
cas… but that really depends on each project/organization
I hope it will help you.