Skip to content

Instantly share code, notes, and snippets.

Avatar

AstonJ AstonJ

View GitHub Profile
View test.md

this is a test gist....

@AstonJ
AstonJ / gist:2896818
Created Jun 8, 2012
Install/Upgrade Ruby on CentOS 6.2
View gist:2896818
#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 Jun 8, 2012 — forked from juno/README.md
Install rbenv and ruby-build to Amazon Linux (cloud-init).
View README.md

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.
View gist:1686058
source 'https://rubygems.org'
gem 'rails', '3.2.0'
# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'
gem 'mysql2'
View gist:1686036
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)
View gist:1654987
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
View gist:971119
<?
class Ball
{
private $_colour;
public function __construct($colour)
{
$this->_colour = $colour;
}
You can’t perform that action at this time.