INSTALLING RUBY ON RAILS IN UBUNTU

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 -sSL https://rvm.io/mpapis.asc | gpg2 --import -
 

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


http://sourceforge.net/projects/xampp/files/XAMPP%20Linux/1.8.3/xampp-linux-1.8.3-4-installer.run/download?use_mirror=jaist

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.   Then " 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

If we are get this error when install rvm :-

E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable)
E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?


Use this:

http://sourcedigit.com/15249-how-to-fix-e-could-not-get-lock-varlibaptlistslock-or-lock-varlibdpkglock-problem/

WE CAN FOLLOW

https://gorails.com/setup/ubuntu/16.04

Comments

Popular posts from this blog

psql: could not connect to server: No such file or directory Is the server running locally and accepting connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?

CARRIERWAVE - UPLOAD ANY MEDIA (AUDIO , VIDEO AND IMAGE ) FILE IN RAILS

SELECT COUNTRY WITH STATE AND IT'S CITIES RAILS

RAILS: UPLOADING PHOTOS VIA AMAZON S3 AND PAPERCLIP (UPLOADING FILES TO S3 IN RUBY WITH PAPERCLIP)

SEARCHING USING AJAX IN RAILS

UPLOAD ANY MEDIA FILE IN RAILS USING PAPERCLIP

UNINITIALIZED CONSTANT PAPERCLIP::STORAGE::S3::AWS

CURL COMMAND ON RUBY ON RAILS

CHECK PASSENGER RUBY PATH