Last active
August 29, 2015 13:57
-
-
Save usutani/9449831 to your computer and use it in GitHub Desktop.
Ubuntu Server v12.10 64bit , Ruby 2.1.1 (rbenv), Rails 4.0.3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# See: Setup Ruby On Rails onUbuntu 13.10 http://gorails.com/setup/ubuntu/13.10 | |
# | |
# package | |
sudo apt-get update | |
sudo apt-get -y install git | |
sudo apt-get -y install curl g++ make | |
sudo apt-get -y install zlib1g-dev libssl-dev libreadline-dev libyaml-dev libxml2-dev libxslt-dev | |
sudo apt-get -y install sqlite3 libsqlite3-dev | |
# PostgreSQL | |
# sudo apt-get install libpq-dev | |
# rbenv | |
cd | |
git clone git://github.com/sstephenson/rbenv.git .rbenv | |
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc | |
echo 'eval "$(rbenv init -)"' >> ~/.bashrc | |
exec $SHELL | |
# ruby-build | |
mkdir -p ~/.rbenv/plugins | |
cd ~/.rbenv/plugins | |
git clone git://github.com/sstephenson/ruby-build.git | |
# ruby | |
rbenv install 2.1.1 | |
rbenv rehash | |
rbenv global 2.1.1 | |
rbenv version | |
# .gemrc | |
echo "install: --no-ri --no-rdoc" > ~/.gemrc | |
echo "update: --no-ri --no-rdoc" >> ~/.gemrc | |
# rails | |
gem install rails --version="~> 4.0.3" | |
rbenv rehash | |
# verification | |
cd | |
mkdir work | |
cd work | |
rails new foo --skip-bundle | |
cd foo | |
vi Gemfile | |
gem 'therubyracer', :platforms => :ruby | |
bundle install | |
rails g scaffold user name:string email:string | |
rake db:migrate | |
rails s |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment