| Author | 
              Topic: How to Install Rails on Ubuntu 16.04 LTS  |  
           
         |  
        
          
            
              
                
                	
                  
                    
                      Linux member offline     |  
                    
                      |   |  
                    
                      
                        
                          
                            | posts: | 
                            120 |  
                          
                            | joined: | 
                            01/24/2011 |  
                          
                            | from: | 
                            San Jose, CA |  
                         
                       |  
                    | 
                  | 
                
                  
                    
                       |  
                    
                       |  
                    
                      
                        
                          | 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
 
  |  
                        
                           |  
                        |  
                    
                       |  
                    
                       |  
                    |  
                |  
        
          
            
              
                
                	
                  
                    
                      Linux member offline     |  
                    
                      |   |  
                    
                      
                        
                          
                            | posts: | 
                            120 |  
                          
                            | joined: | 
                            01/24/2011 |  
                          
                            | from: | 
                            San Jose, CA |  
                         
                       |  
                    | 
                  | 
                
                  
                    
                       |  
                    
                       |  
                    
                      
                        
                          | Install Rails |  
                        
                          With Ruby available, the RubyGems packaging system should be included. You can check by:
 
  Then you can install Rails (which is a gem) by:
 
  Later on, you can update your Rails by:
 
 
  If the installation process goes well, you should be able to run the version checking:
 
 
  |  
                        
                           |  
                        |  
                    
                       |  
                    
                       |  
                    |  
                |  
        
          
            
              
                
                	
                  
                    
                      Linux member offline     |  
                    
                      |   |  
                    
                      
                        
                          
                            | posts: | 
                            120 |  
                          
                            | joined: | 
                            01/24/2011 |  
                          
                            | from: | 
                            San Jose, CA |  
                         
                       |  
                    | 
                  | 
                
                  
                    
                       |  
                    
                       |  
                    
                      
                        
                          | 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
 
 
 
   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
 
 
 
  |  
                        
                           |  
                        |  
                    
                       |  
                    
                       |  
                    |  
                |  
        
          
            
              
                
                	
                  
                    
                      Linux member offline     |  
                    
                      |   |  
                    
                      
                        
                          
                            | posts: | 
                            120 |  
                          
                            | joined: | 
                            01/24/2011 |  
                          
                            | from: | 
                            San Jose, CA |  
                         
                       |  
                    | 
                  | 
                
                  
                    
                       |  
                    
                       |  
                    
                      
                        
                          | 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'
 
 
  |  
                        
                           |  
                        |  
                    
                       |  
                    
                       |  
                    |  
                |  
      |