Linode Rails Server: Debian or Ubuntu

Debian is the oldest of the Linux distributions and has a venerable history. 

But what attracts me to Ubuntu are the LTS distributions (or Long Term Support). You get a massive 5 years of support for that distribution. So, Ubuntu 12.04 LTS will be backed till 2017! Debian will support the previous release for 1 year.

Also, Ubuntu has the backing of a commercial organisation.

See also:

http://askubuntu.com/questions/15314/debian-stable-vs-ubuntu-lts-for-server

and

http://serverfault.com/questions/389199/is-it-debian-really-more-stable-for-servers-than-ubuntu-lts

and a specific guide to setting up a Rails server on Ubuntu 12.04 here:

http://blog.lunarlogicpolska.com/2013/setup-fresh-ubuntu-server-for-ruby-on-rails/

For the process of provisioning your server, see:

https://library.linode.com/getting-started

and, for Phusion Passenger, this is a useful read:

https://developer.apple.com/library/mac/#featuredarticles/PhusionRails/_index.html

If you’re on a Mac then use PassengerPane for local Rails deployments (helps avoid cluttered /etc/hosts): 

http://www.fngtps.com/passenger-preference-pane

Hint – just use:

$ gem install passenger

$ passenger-install-apache2-module

WWDC 2013: Apple Design Awards (aka the ADAs)

Winners:

Students

Finish: task management app

Mosaic.io: connects iOS devices to make mosaics

Also

Coda 2 by Panic: editor for web code

Ridiculous Fishing – A Tale Of Redemption by Vlambeer: never ending arcade world

WWF Together by the World Wildlife Fund: explores endangered species

Evernote 5 by Evernote Corporation: Evernote helps you remember everything in your life

Badland by Frogmind: atmospheric platform scroller

Yahoo Weather by Yahoo

Letterpress by 8 bits: a strategy word game

Procreate by Savage: painting app

Sky Gamblers by Atypical Games:   

Compilers on the Mac

The version of compiler you’re running will affect all the software you compile.

Unfortunately, the default changes on the Mac. It depends on:

  • the version of OS X you’re running
  • whether you installed Xcode (and/or the Command Line Tools) and, if so,
  • what version of Xcode you have installed

So, how does it affect the software?

For starters, you’ll find some just doesn’t compile. E.g. take a look at some of the problems installing Ruby under Lion:

http://stackoverflow.com/questions/8032824/cant-install-ruby-under-lion-with-rvm-gcc-issues/8032980#8032980

So, here’s a small guide.

Compilers have a front-end, that contains the parser and semantic analysis for the programming language and generates an intermediate representation of your code, and a backend which takes the stuff the front-end produced, optimizes it, and generates assembly code.

  • GCC: contains both front-ends for various languages and back-ends for many processor architectures
  • LLVM: a set of back-ends for various architectures
  • clang: a new front-end for C, Objective-C, and C++, uses the LLVM back-ends This generates more readable errors and warnings and shorter compile times. There may also be incompatibilities or bugs as clang is still very young
  • LLVM-GCC: is a GCC front-end with an LLVM back-end. LLVM’s back-end is faster than GCCs

clang’s (Objective-)C++ support is far from being complete so it calls llvm-gcc when it encounters a C++ source file. It also contains the static analyzer that is now integrated into Xcode. Some people say LLVM’s back-end generates better code than GCC’s but your mileage may vary. LLVM also supports link-time optimizations (which you can enable in Xcode’s project settings). They may produce faster code.

Apple wants to replace GCC with clang in the future because they have a policy against GPLv3 licensed code (GCC 4.2 is the last version that’s licensed under GPLv2).

Try it out:

gcc –version
i686-apple-darwin10-gcc-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5659)

means you’re running gcc.

http://stackoverflow.com/questions/1551099/xcode-3-2-1-gcc-clang-and-llvm-demystification

 

 

 

Installing MySQL on a MacBook

For some reason my old MacBook didn’t have MySQL installed.

Here’s the install process:

1. Brew did not work ‘cos it wasn’t installed

brew install mysql
-bash: brew: command not found

http://madebyhoundstooth.com/blog/install-mysql-on-mountain-lion-with-homebrew/

2. So, I went to install brew

ruby -e “$(curl -fsSkL raw.github.com/mxcl/homebrew/go)”
curl: (1) Protocol https not supported or disabled in libcurl

http://www.bigfastblog.com/homebrew-intro-to-the-mac-os-x-package-installer

3. So, I went to install curl with SSL

http://www.bigfastblog.com/homebrew-intro-to-the-mac-os-x-package-installer

—>  Computing dependencies for curl
—>  Verifying checksum(s) for curl-ca-bundle
Error: Checksum (md5) mismatch for certdata-1.57.txt
Error: Checksum (sha1) mismatch for certdata-1.57.txt
Error: Checksum (rmd160) mismatch for certdata-1.57.txt
Error: Target org.macports.checksum returned: Unable to verify file checksums
Error: The following dependencies failed to build: curl-ca-bundle
Error: Status 1 encountered during processing.
Before reporting a bug, first run the command again with the -d flag to get complete output.

4. So I updated port with

sudo port selfupdate

https://trac.macports.org/ticket/25929

This was successful but recommended this:

The ports tree has been updated. To upgrade your installed ports, you should run
port upgrade outdated

5. So, back to: