Este tutorial contempla a instalação de um ambiente completo para desenvolvimento ruby/rails em uma maquina com SO ubuntu
Softwares necessários, em ordem de instalação:
| class CommentsController < ApplicationController | |
| # POST /comments | |
| # POST /comments.xml | |
| def create | |
| @post = Post.find(params[:post_id]) | |
| @comment = @post.comments.create(params[:comment]) | |
| respond_to do |format| | |
| format.html { redirect_to post_path(@post) } | |
| format.js | |
| end |
| PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;35m\]\w\[\033[00m\]' | |
| #Binaries for Android Tools | |
| PATH=${PATH}:~/Documents/android-sdk-mac_86/tools | |
| #Binaries for RVM ( Ruby Virtual Machine ) | |
| PATH=${PATH}:~/.rvm/bin | |
| #Git completation on bash terminal | |
| source ~/.git-completion.bash |
| PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;35m\]\w\[\033[00m\]' | |
| #Bundle binaries | |
| PATH=./bin:${PATH} | |
| #Binaries for Android Tools | |
| PATH=${PATH}:~/Documents/android-sdk-mac_86/tools | |
| #Binaries for RVM ( Ruby Virtual Machine ) | |
| PATH=${PATH}:~/.rvm/bin |
| # Update, upgrade and install development tools: | |
| apt-get update | |
| apt-get -y upgrade | |
| apt-get -y install build-essential | |
| apt-get -y install git-core | |
| # Install rbenv | |
| git clone git://github.com/sstephenson/rbenv.git /usr/local/rbenv | |
| # Add rbenv to the path: |
| http://jsfiddle.net/pauldechov/jPn3H/1/ | |
| https://github.com/ghempton/ember-router-example | |
| http://ghempton.github.com/ember-router-example | |
| http://stackoverflow.com/questions/7760332/how-to-make-i18n-with-handlebars-js-mustache-templates/8796912#8796912 | |
| https://emberjs-staging-new.herokuapp.com/guides/outlets#toc_the-router |
| http://nvie.com/posts/a-successful-git-branching-model/ | |
| http://perl.plover.com/classes/git/samples/slide001.html | |
| http://newartisans.com/2008/04/git-from-the-bottom-up/ |
| class TestCase | |
| class << self | |
| @@depth = 0 | |
| @@out = "" | |
| def test(*args, &block) | |
| method_missing(:test, args, block) | |
| end | |
| def method_missing(sym, *args, &block) |
This installs a patched ruby 1.9.3-p429 with the railsexpress patchsets: https://github.com/skaes/rvm-patchsets
You will also need a C Compiler. If you're on Linux, you probably already have one or know how to install one. On OS X, you should install XCode, and brew install autoconf using homebrew.
| 'use strict'; | |
| angular.module('tmpApp', [ | |
| 'ngCookies', | |
| 'ngResource', | |
| 'ngSanitize', | |
| 'ngRoute' | |
| ]) | |
| .config(function ($routeProvider, $locationProvider, $httpProvider) { | |
| $routeProvider |