I am new to ruby, played with Sinatra now want to try Rails 3. I am setting up my environment and came up with a checklist.
How would you improve it?
Here is what I have installed
Rake .9.2
Compass 0.11.5
Rails 3.0.7
Passenger 3.0.7
+ a host of dependencies. My goal is to create an environment with Compass Framework, Passenger and jQuery.
Here are my steps -- Thanks for the feedback!
Create Rails App, Database & Server Instance
(1)
Run rails new prjName --using blueprint
(2)
Is httpd.conf file pointing to right file?
(3)
Delete /public/index.html.erb
(4)
Update Rakefile if using Rake 0.9.2
module ::applicationName
class Application
include Rake::DSL
end
end
module ::RakeFileUtils
extend Rake::FileUtilsExt
end
(5)
Run rake db:create:all (optional)
(6)
Run rails g scaffold modelName attr:DataType..
(7)
Add to route.rb root :to => 'resource#action'
(8)
Run rake db:migrate
(9)
Go to migrate folder and confirm contents of date_create_resource.rb
(10)
Add gem "rake", "~> 0.9.2" to Gemfile
Set up jQuery, Compass and Finish Up
(11)
Run compass init rails add generated statement to Gemfile
(12)
Add gem "jquery-rails", "~> 1.0.12" to Gemfile
(13)
Run rails generate jquery:install --ui
(14)
Run compass init rails (to generate a sass folder)? I should not have to do this? Any Compass Users please help me understand why this is the case...
(15)
Place js references in ERB file
<%= javascript_include_tag"javascripts/jquery.min.js"%>
<%= javascript_include_tag "javascripts/jquery-ui.min.js"%>
<%= javascript_include_tag "javascripts/jquery-ui.min.js"%>
(16)
Review, update Gemfile (jQuery,rake, compass)
(17)
Update the compass.rb file
(18)
Run bundle install
(19)
Restart the server sudo apachectl graceful
My example is here https://github.com/prognostikos/rails_templates/blob/master/... and if you search github you can find many more.
Use with 'rails new yourapp --template=path/to/template'