Can some one summarize briefly what each line is doing here please?
Just got this RoR app working, and just want some clarification to what exactly went on behind the scenes, briefly so I can look into each step:
Clone the git repo
git clone git://github.com/railsdog/spree.git spree
cd spree
Install the gem dependencies
bundle install
Create a sanbox rails application for testing purposes
rails new sandbox -m sample/sandbox_template.rb
cd sandbox
Generate the necessary Spree files
rails g spree:install
Bootstrap the database (run the migrations, create seed data, optionally load sample data.)
rake db:migrate db:seed db:sample
Start the server
rails server
I know what the 1st line is doing, git clone ...
But does bundle install download all the dependancies from what file? Where does the call to rails g spree:install look to generate the files?
I know rake is like 'make', but is it really compiling new code? Or does rake just run the migration scripts 开发者_StackOverflow社区etc. i.e. no compiling going on.
Let's go through it step-by-step:
git clone git://github.com/railsdog/spree.git spree
This checks out the latest code from git to the directory spree
bundle install
This parses the Gemfile in your directory and installs the dependencies for your application accordingly.
rails new sandbox -m sample/sandbox_template.rb
This creates a new rails project from a rails-template, this template instructs rails to generate the application with certain pre-defined parameters.
rails g spree:install
A generator that comes with spree that has instructions on how to make your spree application ready for use.
rake db:migrate db:seed db:sample
Migration the database migrations and feel the application with seed and demo-date.
Rake might compile certain things, if the sqlite gem needs to be installed for instance rake will make sure you compile it correctly. It differs per situation.
精彩评论