go to  ForumEasy.com   
JavaPro  
 
 
   Home  |  MyForum  |  FAQ  |  Archive    You are not logged in. [Login] or [Register]  
Forum Home » Java Deploying » How to Install Rails on Ubuntu 16.04 LTS
Email To Friend  |   Set Alert To This Topic Rewarding Points Availabe: 0 (What's this) New Topic  |   Post Reply
Author Topic: How to Install Rails on Ubuntu 16.04 LTS
Linux
member
offline   
 
posts: 120
joined: 01/24/2011
from: San Jose, CA
  posted on: 09/09/2017 01:54:00 AM    Edit  |   Quote  |   Report 
How to Install Rails on Ubuntu 16.04 LTS

What is Rails?

Rails is a web application development framework written in Ruby language.


Why Rails?

It is designed to make programming web applications easier based on the philosophy:

  • Don't Repeat Yourself
  • Convention Over Configuration

  •  Profile | Reply Points Earned: 0
    Linux
    member
    offline   
     
    posts: 120
    joined: 01/24/2011
    from: San Jose, CA
      posted on: 09/09/2017 02:08:32 AM    Edit  |   Quote  |   Report 
    Install Rails
    With Ruby available, the RubyGems packaging system should be included. You can check by:
    $ gem -v
    
    2.6.8
    


    Then you can install Rails (which is a gem) by:
    $ gem install rails
    


    Later on, you can update your Rails by:
    $ gem update rails
    



    If the installation process goes well, you should be able to run the version checking:
    $ rails -v
    
    Rails 5.1.4
    


     Profile | Reply Points Earned: 0
    Linux
    member
    offline   
     
    posts: 120
    joined: 01/24/2011
    from: San Jose, CA
      posted on: 09/09/2017 06:30:06 AM    Edit  |   Quote  |   Report 
    Rails project's dependency
    Before we can start to build your Rails project, you normally need to have the followings available:

  • Database -- which is used to store Rails project's objects.

    For example, PostgreSQL

  • NodeJS -- a JavaScript runtime
    $ curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -
    $ sudo apt-get install  nodejs
    


    $ nodejs -v
    
    v6.11.3
    


  • Bundler -- which is used to manage project's version control.
    $ gem install bundler
    
    Successfully installed bundler-1.15.4
    Parsing documentation for bundler-1.15.4
    Done installing documentation for bundler after 6 seconds
    1 gem installed
    
    $ bundler -v
    Bundler version 1.15.4
    
    



  •  Profile | Reply Points Earned: 0
    Linux
    member
    offline   
     
    posts: 120
    joined: 01/24/2011
    from: San Jose, CA
      posted on: 09/13/2017 10:32:20 PM    Edit  |   Quote  |   Report 
    Troubleshooting -- bundler with specific version

    Sometimes Rails project need a specific version of bundler to build all of those dependencies, but your environment has only the latest ones. For example, bundlers (<=1.5.3, >=1.3.3) are desired, but you have 1.5.4 installed.

    Here is what you can do.
    $ gem uninstall bundler
    $ gem install bundler --version '1.5.3'
    


     Profile | Reply Points Earned: 0

     
    Powered by ForumEasy © 2003-2005, All Rights Reserved. | Privacy Policy | Terms of Use
     
    Get your own forum today. It's easy and free.