gem install rails
rails new my_app -T
using System; | |
using System.Collections.Generic; | |
namespace StrategyPattern | |
{ | |
public enum UnitOfBitRate | |
{ | |
Gbps, | |
Mbps, | |
Kbps, |
Installing Erlang | |
sudo apt-get install curl build-essential libncurses5-dev openssl libssl-dev fop xsltproc | |
curl -O https://raw.github.com/spawngrid/kerl/master/kerl | |
chmod a+x kerl | |
./kerl build R14B03 r14b03 | |
sudo ./kerl install r14b03 /opt/erlang/r14b03 | |
. /opt/erlang/r14b03/activate | |
Installing Riak | |
sudo apt-get install build-essential libc6-dev-i386 |
1.- Start Spork in a terminal window. | |
2.- Write a single test or small group of tests. | |
3.- Run Command-Shift-R to verify that the test or test group is red. | |
4.- Write the corresponding application code. | |
5.- Run Command-Shift-E to run the same test/group again, verifying that it’s green. | |
6.- Repeat steps 2–5 as necessary. | |
7.- When reaching a natural stopping point (such as before a commit), run rspec spec/ at the command line to confirm that the entire test suite is still green. |
I haven't set up an install guide for the latest ubuntu release, largely because the last set of instructions worked pretty closely with the latest and greatest Ubuntu, 12.04 Precise Pangolin, however when installing today, I found that there were enough differences in the way that I configure my setup to justify an update, so here it goes. Yes, I'm late to the party, but a quick google search didn't find anything that I felt was as complete for my requirements as my previous install guides, so here I go.
As always with my install guides, I have included here is just about everything you'll need (and then some) to get started with ruby on rails development with Ubuntu 12.04 as a platform. These are my settings and preferences, and this is certainly not the only way of doing things, so keep that in mind.
sudo apt-get update && sudo apt-get upgrade
##Install elinks | |
##brew install elinks | |
alias fact="elinks -dump randomfunfacts.com | sed -n '/^| /p' | tr -d \|" | |
##Jobs that take too long | |
alias funspork="fact && spork" |
# check the comments for @billmann's awesome solution to the same problem | |
def make_hash_one_dimensional(input = {}, output = {}, options = {}) | |
input.each do |key, value| | |
key = options[:prefix].nil? ? "#{key}" : "#{options[:prefix]}#{options[:delimiter]||"_"}#{key}" | |
if value.is_a? Hash | |
make_hash_one_dimensional(value, output, :prefix => key, :delimiter => "_") | |
else | |
output[key] = value | |
end |
Setup the Benchmark | |
[1] pry(main)> require 'benchmark' | |
=> true | |
[2] pry(main)> test_string = "/foo/bar/bah/bing" | |
=> "/foo/bar/bah/bing" | |
String#starts_with? | |
[3] pry(main)> Benchmark.realtime { (1..10000).to_a.each { %r{^/foo}.match(test_string) } } | |
=> 0.009987447 |
These commands are good as of 2011-07-27.
The download/install takes a while so start it first. When it finishes downloading you will still need to run it to complete installation.
Really the nicest choice for a terminal on OSX right now, especially with Lion style full screen support.
//Access root | |
sudo su - postgres | |
psql postgres | |
//Create user | |
create user el_usuario with password ''; | |
//Giving user permission to create databases | |
ALLTER USER el_usuario CREATEDB; |