Install rbenv and ruby-build to Amazon Linux (cloud-init).
- Copy & paste content of
user-data.sh
to EC2 RunInstances user-data - Then, logging in to EC2 instance as ec2-user and run
install-ruby.sh
.
<? | |
class Ball | |
{ | |
private $_colour; | |
public function __construct($colour) | |
{ | |
$this->_colour = $colour; | |
} |
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 |
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) |
source 'https://rubygems.org' | |
gem 'rails', '3.2.0' | |
# Bundle edge Rails instead: | |
# gem 'rails', :git => 'git://github.com/rails/rails.git' | |
gem 'mysql2' | |
Install rbenv and ruby-build to Amazon Linux (cloud-init).
user-data.sh
to EC2 RunInstances user-datainstall-ruby.sh
.#get root access | |
$su - | |
$ cd /tmp | |
#Remove old Ruby | |
$ yum remove ruby | |
# Install dependencies | |
$ yum groupinstall "Development Tools" | |
$ yum install zlib zlib-devel |
this is a test gist....