Steps for installing ruby on rails successfully on Ubuntu

The first step is to install some dependencies for Ruby.
sudo apt-get update
sudo apt-get install git-core curl zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev python-software-properties
sudo apt-get install libmysqlclient-dev
sudo apt-get install libpq-dev
sudo apt-get install imagemagick
sudo apt-get install libmagickwand-dev

The installation for rvm is pretty simple:
sudo apt-get install libgdbm-dev libncurses5-dev automake libtool bison libffi-dev
curl -L https://get.rvm.io | bash -s stable
source ~/.rvm/scripts/rvm
echo "source ~/.rvm/scripts/rvm" >> ~/.bashrc
rvm install 2.1.2
rvm use 2.1.2 --default
ruby -v

The last step is to tell Rubygems not to install the documentation for each package locally
echo "gem: --no-ri --no-rdoc" > ~/.gemrc

Installing Rails
sudo add-apt-repository ppa:chris-lea/node.js
sudo apt-get update
sudo apt-get install nodejs
gem install rails
For mysql lampp server
From there you can download the xammp and now need to install it.
for installing it you need to follow the steps below.

1. Copy "xampp-linux-1.8.3-4-
installer.run" file from your download folder to desktop
2. Now go to the desktop using terminal
3. Type that command " sudo chmod 777 xampp-linux-1.8.3-4-installer.run " for providing the admin permission.
4. than " sudo ./xampp-linux-1.8.3-4-
installer.run " for installing the lampp server.
Final Steps
And now for the moment of truth. Let's create your first Rails application
rails new myapp -d mysql

Comments

Popular Posts

How to pass hash in Postman

nginx: unrecognized service

Bootstrap Select Picker append add new item if search not exist

Reading Excel Sheets using "Roo" gem in ruby on rails

Add CORS to Nginx on AWS Elastic Beanstalk

Enable gzip compression on Elastic Beanstalk with nginx

Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock'

Get video duration by URL in Ruby on Rails

site-enables nginx setting in ruby in rails