Instaliranje Ruby on Rails na Ubuntu

Instaliranje Ruby on Rails na Ubuntu

Uputstva za instaliranje Ruby on Rails na Ubuntu su prilično jednostavna . Možete da kopirate sledeći kod i nalepite ga u skriptu i izvršite. Na ovaj način će sve instalirati u jednom potezu.
Potpuna instalacija Rubi-ja na Ubuntu obično traje oko 10-15 minuta . Ako vidite nešto što bi trebalo ažurirati, javite nam.

echo "Updates packages. Asks for your password."
sudo apt-get update -y
echo "Installs packages. Give your password when asked."
sudo apt-get install -y curl nodejs libcurl4-gnutls-dev git-core libxslt1-dev     libxml2-dev libsqlite3-dev libmysqlclient-dev git git-doc libncurses5-dev build-    essential rake libqt4-dev libqtwebkit-dev openssl libreadline6 libreadline6-dev     curl git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-dev sqlite3     libxml2-dev libxslt-dev autoconf libc6-dev ncurses-dev automake libtool bison     subversion pkg-config libv8-dev libmagickwand-dev libreadline-dev libedit-dev     libgdbm-dev libffi-dev zlib1g-dev rake curl vim

echo "Setting up mysql"


sudo apt-get install -y mysql-server mysql-client

echo "Setting up postgres"
sudo apt-get install postgresql-9.3 pgadmin3 postgresql-contrib-9.3 postgresql-    server-dev-9.3

echo "Installs RVM (Ruby Version Manager) for handling Ruby installation"
echo insecure >> ~/.curlrc
curl -sSL https://rvm.io/mpapis.asc | gpg --import -
\curl -sSL https://get.rvm.io | bash -s stable
source ~/.rvm/scripts/rvm

echo "Saving rvm function into bashrc"
echo '[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" #         Load RVM function' >> ~/.bashrc
source ~/.bashrc

echo "Installs Ruby"
rvm install 2.1.2
rvm use 2.1.2 --default

gem install bundler --no-rdoc --no-ri
gem install rails --no-rdoc --no-ri

    echo "Congrats! You are all set with Ruby and MySQL/Sqlite"