ひよこメモ

備忘ブログ Ruby, Rails, AWS, html5, css3, javascript, vim,

AWSでRailsをインストール

今見返してもなんのこっちゃという感じ・・・

sudo yum update
sudo yum install -y libxslt-devel libxml2-devel gcc gcc-c++ ruby-devel sqlite-devel openssl-devel patch readline-devel libyaml-devel libffi-devel autoconf automake libtool bison git
sudo gem install nokogiri -- --use-system-libraries

git clone git://github.com/sstephenson/rbenv.git ~/.rbenv
git clone https://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bash_profile
echo 'eval "$(rbenv init -)"' >> ~/.bash_profile
source ~/.bash_profile
rbenv install 2.2.0;rbenv rehash
rbenv global 2.2.0

gem install io-console
gem uninstall io-console -v 0.4.2
gem install rails

ruby -v
rails -v
gem -v
bundle -v

mkdir rails
cd rails

rails new books

rails server -b 0.0.0.0