Comments on How to Install Ruby on Rails on Ubuntu 18.04 LTS

In this tutorial, I will show you how to install Ruby on Rails on Ubuntu 18.04 LTS. We will show you how to install and configure Rails with a PostgreSQL database, and how to create a new first project with Rails.

14 Comment(s)

Add comment

Please register in our forum first to comment.

Comments

By: Nick

Now why the heck would we use vim to edit the database.yml file. Thats so wierd

By: Arno Some

The development database config has port 5423 which should be port 5432

By: Gaurav

Should have read this comment before, you mentioned the correct port number.....

By: khaing war

This is very useful article.

Thank u very much :)

By: Rich

I don't think this command is working because I get this usage message

Usage  rvm-installer [options] [action]Options  [[--]version] <version>    The version or tag to install. Valid values are:      latest         - The latest tagged version.      latest-minor   - The latest minor version of the current major version.      latest-<x>     - The latest minor version of version x.      latest-<x>.<y> - The latest patch version of version x.y.      <x>.<y>.<z>    - Major version x, minor version y and patch z.  [--]branch <branch>    The name of the branch from which RVM is installed. This option can be used    with the following formats for <branch>:      <account>/        If account is rvm or mpapis, installs from one of the following:          https://github.com/rvm/rvm/archive/master.tar.gz          https://bitbucket.org/mpapis/rvm/get/master.tar.gz       Otherwise, installs from:         https://github.com/<account>/rvm/archive/master.tar.gz      <account>/<branch>        If account is rvm or mpapis, installs from one of the following:          https://github.com/rvm/rvm/archive/<branch>.tar.gz          https://bitbucket.org/mpapis/rvm/get/<branch>.tar.gz        Otherwise, installs from:          https://github.com/<account>/rvm/archive/<branch>.tar.gz      [/]<branch>        Installs the branch from one of the following:          https://github.com/rvm/rvm/archive/<branch>.tar.gz          https://bitbucket.org/mpapis/rvm/get/<branch>.tar.gz      [--]source <source>        Defines the repository from which RVM is retrieved and installed in the format:          <domain>/<account>/<repo>        Where:          <domain>  - Is bitbucket.org, github.com or a github enterprise site serving                      an RVM repository.          <account> - Is the user account in which the RVM repository resides.          <repo>    - Is the name of the RVM repository.        Note that when using the [--]source option, one should only use the [/]branch format        with the [--]branch option. Failure to do so will result in undefined behavior.      --trace        Provides debug logging for the installation script.Actions  master - Installs RVM from the master branch at rvm/rvm on github or mpapis/rvm           on bitbucket.org.  stable - Installs RVM from the stable branch a rvm/rvm on github or mpapis/rvm           on bitbucket.org.  help   - Displays this output.

curl -sSL https://get.rvm.io | bash -s stable --ruby curl -sSL https://get.rvm.io | bash -s stable --ruby

By: Ed

rails db:setuprails db:migrateshould be...rake db:setuprake db:migrateOn top of that it fails when it runs. it fails with "ActiveRecord::AdapterNotSpecified: 'rails_dev' database is not configured."

 

By: Steve

This doesn't work on WSL 

By: Cesar Raul Villalbac

Thank you very much for the article, I could install in ubuntu 18.04 virtualbox on windows 10 and it worked

By: Jetson Davis

Instead of chanhging linix user using $su - postgres, I had to type: $sudo -u postgres psql postgres

 

By: Mosiah

Thanks dude!

By: Uli

Thanks for the tutorial, awesome stuff...

By: david

getting the error.

Cannot assign requested address - bind(2) for "192.168.1.10" port 8080 (Errno::EADDRNOTAVAIL)

 

nothing is running on that port. rails s -p 8080 works. just curious, do you have "192.168.1.10"  defined in host somewhere?

 

By: barry

When I run the commandrails g scaffold Post title:string body:text

I get a usage error message complaining about the syntax for the rails command

By: S Kumar

Every time use this "source /usr/local/rvm/scripts/rvm" when change folder or connect server (SSH).

How to set a path for this issue.