How To Install Ruby on Rails on Ubuntu - PowerPoint PPT Presentation

About This Presentation
Title:

How To Install Ruby on Rails on Ubuntu

Description:

Presented by VEXXHOST, provider of OpenStack based public and Private Cloud Infrastructure – PowerPoint PPT presentation

Number of Views:21
Slides: 8
Provided by: Username withheld or not provided
Category:
Tags:

less

Transcript and Presenter's Notes

Title: How To Install Ruby on Rails on Ubuntu


1
(No Transcript)
2
How To Install Ruby on Rails on Ubuntu
  • Ruby on Rails, often simply Rails, is an open
    source web application framework which runs on
    the Ruby programming language.
  • It is a full-stack framework it allows creating
    pages and applications that gather information
    from the web server, talk to or query the
    database, and render templates out of the box.
  • As a result, Rails features a routing system that
    is independent of the web server.
  • Ruby on Rails emphasizes the use of well-known
    software engineering patterns and principles,
    such as active record pattern, convention over
    configuration (CoC), dont repeat yourself (DRY),
    and model/view/controller (MVC).
  • This article applies to all releases of Ubuntu so
    it should help you to install Ruby on Rails on
    Ubuntu 12.04 LTS, 13.10 and any future releases.
  • The majority of articles regarding this subject
    are release specific and very long. Well keep
    this one short and simple!

3
How To Install Ruby on Rails on Ubuntu
  • Update and Prepare System
  • It is important to make sure that your server is
    updated.
  • On Ubuntu servers, you will need to run the
    following commands to update your repositories
    and your system.
  • Well also need some basic requirements on your
    server.
  • apt-get update apt-get upgrade apt-get
    -y install curl

4
How To Install Ruby on Rails on Ubuntu
  • Install Ruby and Rails
  • We will be leveraging the RVM project to help us
    install the latest Ruby release.
  • When we will install RVM, we will tell it to
    compile and install the latest Ruby release and
    download Rails as well.
  • curl -sSL https//get.rvm.io bash -s stable
    --rails
  • RVM will automatically download, install and
    compile the latest release of Ruby.
  • Once its done with that process, it will install
    the latest release of rubygems which is required
    to install Rails.
  • Afterwards, it downloads and installs Ruby on
    Rails on your server.

5
How To Install Ruby on Rails on Ubuntu
  • Install Ruby and Rails
  • You can now use Ruby on Rails by typing
    the rails command in your SSH shell, you will see
    output similar to the following
  • rails Usage rails new APP_PATH
    options Options -r, --rubyPATH
    Path to the Ruby binary of your choice
    Default /usr/local/rvm/rubies/ruby-2.1.0/bin/ruby
    -m, --templateTEMPLATE Path to some
    application template (can be a filesystem path or
    URL) --skip-gemfile Don't create a
    Gemfile -B, --skip-bundle Don't run
    bundle install -G, --skip-git Skip
    .gitignore file --skip-keeps Skip
    source control .keep files -O,
    --skip-active-record Skip Active Record
    files -S, --skip-sprockets Skip
    Sprockets files -d, --databaseDATABASE
    Preconfigure for selected database (options
    mysql/oracle/postgresql/sqlite3/frontbase/ib
    m_db/sqlserver/jdbcmysql/jdbcsqlite3/jdbcpostgresq
    l/jdbc) Default sqlite3 -j,
    --javascriptJAVASCRIPT Preconfigure for
    selected JavaScript library Default
    jquery -J, --skip-javascript Skip
    JavaScript files --dev Setup the
    application with Gemfile pointing to your Rails
    checkout --edge Setup the
    application with Gemfile pointing to Rails
    repository

6
How To Install Ruby on Rails on Ubuntu
  • -T, --skip-test-unit Skip TestUnit
    files --rcRC Path to file containing
    extra configuration options for rails command
    --no-rc Skip loading of extra
    configuration options from .railsrc file
  • Runtime options -f, --force Overwrite
    files that already exist -p, --pretend Run
    but do not make any changes -q, --quiet
    Suppress status output -s, --skip Skip
    files that already exist
  • Rails options -h, --help Show this help
    message and quit -v, --version Show Rails
    version number and quit
  • Description The 'rails new' command creates a
    new Rails application with a default directory
    structure and configuration at the path you
    specify. You can specify extra command-line
    arguments to be used every time 'rails new' runs
    in the .railsrc configuration file in your home
    directory. Note that the arguments specified in
    the .railsrc file don't affect the defaults
    values shown above in this help message.

7
How To Install Ruby on Rails on Ubuntu
  • Example rails new /Code/Ruby/weblog This
    generates a skeletal Rails installation in
    /Code/Ruby/weblog. See the README in the newly
    created application to get going.
  • Your Ubuntu machine now has the latest Ruby and
    Ruby on Rails installed on it without worrying
    about installing dependencies and complicated
    compilation processes, all it took was one short
    command!
Write a Comment
User Comments (0)
About PowerShow.com