

Ask HN: Help me improve my Rails 3 Environment. Please. - Rhodee

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.<p>How would you improve it?<p>Here is what I have installed<p>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.<p>Here are my steps -- Thanks for the feedback!<p>Create Rails App, Database &#38; 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<p>module ::applicationName
  class Application 
    include Rake::DSL 
  end 
end<p>module ::RakeFileUtils 
  extend Rake::FileUtilsExt 
end<p>(5)
Run rake db:create:all (optional)<p>(6)
Run rails g scaffold modelName attr:DataType..<p>(7)
Add to route.rb root :to =&#62; 'resource#action'<p>(8)
Run rake db:migrate<p>(9)
Go to migrate folder and confirm contents of date_create_resource.rb<p>(10)
Add gem "rake", "~&#62; 0.9.2" to Gemfile<p>Set up jQuery, Compass and Finish Up<p>(11)
Run compass init rails add generated statement to Gemfile<p>(12)<p>Add gem "jquery-rails", "~&#62; 1.0.12" to Gemfile
(13)<p>Run rails generate jquery:install --ui
(14)<p>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...<p>(15)
Place js references in ERB file
&#60;%= javascript_include_tag"javascripts/jquery.min.js"%&#62; 
&#60;%= javascript_include_tag "javascripts/jquery-ui.min.js"%&#62; 
&#60;%= javascript_include_tag "javascripts/jquery-ui.min.js"%&#62;<p>(16)
Review, update Gemfile (jQuery,rake, compass)<p>(17)
Update the compass.rb file<p>(18)
Run bundle install<p>(19)
Restart the server sudo apachectl graceful
======
prognostikos
You can do 95% of this (excluding Apache configuration) automatically with
Rails templates.

My example is here
[https://github.com/prognostikos/rails_templates/blob/master/...](https://github.com/prognostikos/rails_templates/blob/master/basic.rb)
and if you search github you can find many more.

Use with 'rails new yourapp --template=path/to/template'

~~~
Rhodee
@prognostikos - thanks man. I saw your template and came across a few others.
I came across this gem (<https://github.com/kfaustino/rails-templater>) I
might give it a go. I understand about 85% of your script so I am definitely
going to try and create my own from all this inspiration.

------
lenary
no need to restart the server. if you're using passenger, just `$ touch
tmp/restart.txt` (in your rails app). That will restart just that app in
passenger (and lots of other servers too)

~~~
Rhodee
@lenary thank you very much for your feedback. I recall reading about the
restart.txt - what contents should be in this file or is it generated?

