Ask A Question


You’re not receiving notifications from this thread.

Setup Ubuntu 18.04 Bionic Beaver Discussion

Chris Oliver asked in General

nice guide... i tried it with sucess on ubuntu 18 !

DISTRIB_DESCRIPTION="Ubuntu Bionic Beaver (development branch)"

rbenv version
2.5.0 (set by /home/marcelo/.rbenv/version)

git --version
git version 2.15.1

ruby -v
ruby 2.5.0p0 (2017-12-25 revision 61468) [x86_64-linux]

rails -v
Rails 5.1.4

psql --version
psql (PostgreSQL) 9.5.10


Worked for me on Ubuntu 18.04


i am using ubuntu 18.04 too, mine is stuck at :
gpg --keyserver hkp:// --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB

error messages :
gpg: connecting dirmngr at '/run/user/1000/gnupg/S.dirmngr' failed: IPC connect call failed
gpg: keyserver receive failed: No dirmngr

how should i do to fix this ?


fajar did you get anything because am in same situation....


Run This Comment:
curl -sSL | gpg --import -
curl -sSL | gpg --import -


Getting ruby and rails to run on Ubuntu 18.04LTS is certainly not easy.
Background: I'm not a ruby programmer. I'm just trying to get my redmine site up and running again after upgrading to 18.04.

First, I tried installing redmine directly from Ubuntu. That failed miserably. (sorry I don't remember everything that happened. But I believe it had to do with not finding an openssl library that was clearly present). I had hopes this would just install all of the proper dependencies with no errors.

Then, i tried following the instructions on, which suggests not using the packaged install. That didn't work very well either. At one point, I ended up at the same openssl nonsense.

Now, I tried these instructions, and ruby seems to install OK with rbenv (although I don't really like it installing into a hidden directory in my home directory, with no apparent option to select the install directory). But rails falls flat at the nodejs install. I get: "rvm: command not found".
I found rvm in /usr/share/rvm/bin, but adding this to my path in .bashrc doesn't fix it.

I don't remember ruby/rails being this much of a pain under 12.04. Is there an easier way?


There's an issue installing older versions of ruby (<2.4) with rbenv.

Need to use:

sudo apt install libssl1.0-dev


I use Ubuntu 18.04 and PostgreSQL 11 doesn't work. It was unable to locate package, but 10 works.


thank you Micah!!! I failed at
E: Unable to locate package postgresql-11

all day yesterday running Ubuntu on Windows 10 WSL

and now today on a Ubuntu laptop. Just in case anyone isn't clear, I changed line
sudo apt install postgresql-11 libpq-dev
sudo apt install postgresql-10 libpq-dev

all working fine.


I have the follwing error :
$ rake db:seed

rake aborted!
Mysql2::Error::ConnectionError: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (13)

Tasks: TOP => db:abort_if_pending_migrations
(See full trace by running task with --trace)


Question: Why are we cloning from git to install rbenv and ruby-build instead of just installing with apt?


I believe the instructions for installing postgres 11 are outdated; I had to manually create a pgdg.list file as per official site instructions. Similarly, before creating my username I had to start the service manually


thanks a lot. Awesome guide.



Hello I already installed libssl1.0, but I still getting this error

Downloading ruby-2.3.3.tar.bz2...
error: failed to download ruby-2.3.3.tar.bz2

BUILD FAILED (Ubuntu 18.04 using ruby-build 20210119-9-gebb8a4f)

Thank you.


Thanks a lot! It's my first thing to open gorails docs before I start installing Ruby on Rails on any of my machine


i try install new apps rails but got some error like this :
/home/dudin/.rvm/rubies/ruby-3.0.1/lib/ruby/3.0.0/fileutils.rb:253:in `mkdir': Permission denied @ dir_s_mkdir - /var/www/html/ruby-gems-bootcamp (Errno::EACCES)

there is a step I missed?


how we install RVM, becasue above only rbenv.


Good app!


Just note about problem and solution in case that you want to install gem install bundler with rbenv ruby 2.0.0-p648.
I got an error:

gem install bundler

Fetching: bundler-2.3.24.gem (100%)
ERROR:  Error installing bundler:
        bundler requires Ruby version >= 2.3.0.

SOLUTION was we need to declare older bundler version:

gem install bundler -v '1.17.3'

Worked well.

Join the discussion
Create an account Log in

Want to stay up-to-date with Ruby on Rails?

Join 83,453+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.