Skip to content

Instantly share code, notes, and snippets.

@AstonJ
AstonJ / test.md
Created August 26, 2015 00:09
test

this is a test gist....

@AstonJ
AstonJ / gist:2896818
Created June 8, 2012 16:47
Install/Upgrade Ruby on CentOS 6.2
#get root access
$su -
$ cd /tmp
#Remove old Ruby
$ yum remove ruby
# Install dependencies
$ yum groupinstall "Development Tools"
$ yum install zlib zlib-devel
@AstonJ
AstonJ / README.md
Created June 8, 2012 16:21 — forked from juno/README.md
Install rbenv and ruby-build to Amazon Linux (cloud-init).

Install rbenv and ruby-build to Amazon Linux (cloud-init).

  1. Copy & paste content of user-data.sh to EC2 RunInstances user-data
  2. Then, logging in to EC2 instance as ec2-user and run install-ruby.sh.
source 'https://rubygems.org'
gem 'rails', '3.2.0'
# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'
gem 'mysql2'
Bundler could not find compatible versions for gem "railties":
In Gemfile:
rails (= 3.2.0) ruby depends on
railties (= 3.2.0) ruby
sass-rails (~> 3.2.3) ruby depends on
railties (3.2.1)
NoMethodError: undefined method `to_sym' for #<Hash:0x007fb17d66ed20>
~/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/devise-1.5.3/lib/devise/rails/routes.rb:190:in `map!'
~/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/devise-1.5.3/lib/devise/rails/routes.rb:190:in `devise_for'
~/projects/mytest/config/routes.rb:7:in `block in <top (required)>'
~/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/actionpack-3.2.0.rc1/lib/action_dispatch/routing/route_set.rb:272:in `instance_exec'
~/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/actionpack-3.2.0.rc1/lib/action_dispatch/routing/route_set.rb:272:in `eval_block'
~/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/actionpack-3.2.0.rc1/lib/action_dispatch/routing/route_set.rb:249:in `draw' ~/projects/mytest/config/routes.rb:1:in `<top (required)>' ~/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/activesupport-3.2.0.rc1/lib/active_support/dependencies.rb:245:in `load' ~/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/activesupport-3.2.0
<?
class Ball
{
private $_colour;
public function __construct($colour)
{
$this->_colour = $colour;
}