the newbie-ruby-on-rails-recipe (nro2r)

As starting to learn Ruby on Rails for a couple of hours I felt comfortable in making me some notes on what are some default steps to get started with a basic app. Although using the excellent tutorial of Michael Hartl it took me some time do remember all the command as they end up in being essentially around 10-15 in a row ,sth. like this (for the exact code look here) :

rails new foobar
vim Gemfile #edit the Gemfile as you need it in your app
bundle install
bundle update
bundle install
rails generate rspec:install
git init
git add .
git commit -m "initial commit"
git remote add origin https://github.com/foo/twentythree.git
git push -u origin master

In order to remember these commands in a easy way I came up with a nutshell version of it which is written in a ruby-style although one should be aware that it is NOT a working command, its just a mnemonic:

rails new foobar if custom_gemfile? do |bundle| {install,update,install} end && generate rspec && git={init,add,commit,remote add,push}

As mentioned its just a tool to remember the chain of commands instead of a correct ruby/rails command representation.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: