Skip to main content

Setup Ubuntu 16.04 Xenial Xerus Discussion

General • Asked by Chris Oliver
856fc0b248657618eacb3ccdb69deee2

Don't use "ssh-keygen -t rsa", use "-t dsa", much safer and not owned by NSA.... ;-)

4ae18c92860c6147a3c7e00f4d84e547
856fc0b248657618eacb3ccdb69deee2

Looks like that I'm wrong... DSA is being deprecated now (I think)...

Some insights:

https://security.stackexcha...


57ec36bf3d5572ede0b529febb588835

PostgreSQL is now upto 9.5.2 and yet this recommends 9.3.x. Is there something actively wrong with the version in the standard Ubuntu repositories; that prompts you to go back to the PostgreSQL repositories?

Given all the JSONB goodness that arrived with 9.4.x and was enhanced with 9.5.x; this is a surprise! Am slightly puzzled and very keen to lay hands on JSONB.

Also grateful for this site and these pages especially!

Ce795239ba5dd2384fc2f88ffaff5451

Whoops, just updated that. Hard to keep all these dang version numbers up to date.

561a3a55352fe6a5343e541a6894b541

pg gem looks broken on xenial


1aa75c5d222ed71a41a0b57d104db6e0

Sorry I am very new to rails development, when creating an user in postgresql I get a not connected to database error...

could not change directory to "/home/jie": Permission denied
createuser: could not connect to database postgres: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?

3ec5cddaa4c223564239b11407e90b3a

did you get any solution for that?


8f4e5aa2787c65782cf359db90a24a9c

Instead of this "sudo sh -c "echo 'deb http://apt.postgresql.org/p... precise-pgdg main' >", Do "sudo sh -c "echo 'deb http://apt.postgresql.org/p... xenial-pgdg main' >"


B44e9511f0e996e7701fa1cea6f287ff

Ubuntu 16.04 has Ruby 2.3 in its package repository, as "ruby-full". Is there any point these days not to use that? Even if you want to use rbenv, you can still mix user gems and system ruby. (Note noobs: even though all guides seem to advise you to use rbenv or rvm, it can be more trouble than it's worth, especially on a single-user system.)

Ce795239ba5dd2384fc2f88ffaff5451

The main reason not to use that is because you can update Ruby versions independently of the packages. Ruby 2.3 will get patches, 2.4 will come out, etc and you may have older apps that use 1.9 for example. All those would be easily managed with a version manager like rbenv and you can install it without waiting for the package maintainers to update it.


C84750d2a27eb19a6aaa297be2db2bbc

You have the installing NodeJS twice. Once right after rbenv/rvm and once right before installing Rails. Is there a reason for that?

Ce795239ba5dd2384fc2f88ffaff5451

Nope, just overlooked that! :)


Bf479daa018908475ed9c4fc37f3695e

You got great article!

Would you be able to demonstrate the same for Production Environment ? and the best practices for production ?

Ce795239ba5dd2384fc2f88ffaff5451

Check out the deploy tutorial! :) https://gorails.com/deploy/...

Bf479daa018908475ed9c4fc37f3695e

Awesome, Thanks for quick reply!


8a31f515638b49dd208ff148de0b3cea

If I want to automate the entire set of tasks in one script and call that at command line and sit back and watch it all happen, how do I do that? Right now I am cutting and pasting lines.

Ce795239ba5dd2384fc2f88ffaff5451

That's where Chef, Ansible, etc come into play. :)


Bf575130d8f987c019a4f0ac4c549431

Thank you very helpful


D6404b1930e49c5ae478d5b5cd80abf2

thanks man... this help-me a lot!


F44245d04bd8182d0e0b4cb56b85a70b

Git connection was refusing until I ran ssh-add ~/.ssh/id_rsa and it worked.

May help somebody.

Aaa8cc6d369ab9078b7c215d6f144e0e

I solved this problem with the two commands bellow:
1) eval `ssh-agent -c`
2) ssh-add


B372442192883dc93b546d44b2b8ba34

4ae18c92860c6147a3c7e00f4d84e547

Just curious, why not default to `rvm` ?

F01f6e933ccbda2849b748e2024ac120

not sure, but rvm did work for me a few different times, but every time i have tried rbenv it has worked.

D7bd52ec3e6020cea862e00bec7ff313

not remembering which ones exactly, but rbenv have had very serious updates problems 6 month ago or something; "accidentally"upgrading it just broke people install at the time and you pretty much had to switch to rvm. A move that could become hellish if you had installed passenger though rbenv (:

F01f6e933ccbda2849b748e2024ac120

Yeah the fun install ror on linux is about as awesome as installing wireless drivers in the old days.

D7bd52ec3e6020cea862e00bec7ff313

humm, it was very true some years ago. rvm's always been stable since it exists; but rbenv introduced a fat doubt when their update failed


52a939111a0dd608f8e7bb91981858b9

Greate article, I always forget setting up the postgres user.


Ba5e50b62a87a7307a02fbc7bc1627b3

rbenv install 2.3.1

Downloading ruby-2.3.1.tar.bz2...

-> https://cache.ruby-lang.org...

error: failed to download ruby-2.3.1.tar.bz2

BUILD FAILED (Ubuntu 16.04 using ruby-build 20160426-22-g3dbbf90)

can you help me in this ?


Fced15d7c3e0cc965d11d489c89dc8c7

When I run

sudo apt-get install postgresql-common

I got this error:
The following packages have unmet dependencies:
postgresql-common : Depends: init-system-helpers (>= 1.18~) but 1.14 is to be installed
E: Unable to correct problems, you have held broken packages.

Believe me, neither stackoverflow was able to help me with thie error.

Anyone can help?

Fced15d7c3e0cc965d11d489c89dc8c7

I figured out what I did wrong. I was trying to install Xenial package instead of Trusty package.
Thanks.

Df2c5efac92a809ae91b2d291c049967
Joseph Bou Saada

can u explain more. I am having same issue

Fced15d7c3e0cc965d11d489c89dc8c7

Joseph, whatch out the version you're trying to install. This version has to be the as your Ubuntu version (Ubuntu 16 = Xenial and 14 = Trusty). Got it?


074279aa84c050a9c760c70fa8313193

Thank that all work for me.
i must learn ruby now.!


8670a5665befd5090c8ca12afc9d5c64

Epic. Many thanks.


147436ab12209d9d336bbd15a6f888ef

I'm going into the last step rake db:create but i've got an error, it says that i have to install debug_inspector - v '0.0.2' but still ive got an error, please help me, what i supposed to do? thank you.

[email protected]:~/myapp$ rake db:create
Could not find gem 'rails (= 4.2.6)' in any of the gem sources listed in your Gemfile or available on this machine.
Run `bundle install` to install missing gems.

[email protected]:~/myapp$ bundle install
Fetching gem metadata from https://rubygems.org/
Fetching version metadata from https://rubygems.org/
Fetching dependency metadata from https://rubygems.org/
Resolving dependencies.............................................
Using rake 11.2.2
Using i18n 0.7.0
Using json 1.8.3
Using minitest 5.9.0
Using thread_safe 0.3.5
Using builder 3.2.2
Using erubis 2.7.0
Using mini_portile2 2.1.0
Using pkg-config 1.1.7
Using rack 1.6.4
Using mime-types-data 3.2016.0521
Using arel 6.0.3
Installing debug_inspector 0.0.2 with native extensions

Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

current directory: /tmp/bundler20160625-27921-19vrn9zdebug_inspector-0.0.2/gems/debug_inspector-0.0.2/ext/debug_inspector
/usr/bin/ruby2.3 -r ./siteconf20160625-27921-q4iq2t.rb extconf.rb
mkmf.rb can't find header files for ruby at /usr/lib/ruby/include/ruby.h

extconf failed, exit code 1

Gem files will remain installed in /tmp/bundler20160625-27921-19vrn9zdebug_inspector-0.0.2/gems/debug_inspector-0.0.2 for inspection.
Results logged to /tmp/bundler20160625-27921-19vrn9zdebug_inspector-0.0.2/extensions/x86-linux/2.3.0/debug_inspector-0.0.2/gem_make.out
Using bundler 1.12.5
Installing byebug 9.0.5 with native extensions

Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

current directory: /tmp/bundler20160625-27921-1av67ezbyebug-9.0.5/gems/byebug-9.0.5/ext/byebug
/usr/bin/ruby2.3 -r ./siteconf20160625-27921-10vahzy.rb extconf.rb
mkmf.rb can't find header files for ruby at /usr/lib/ruby/include/ruby.h

extconf failed, exit code 1

Gem files will remain installed in /tmp/bundler20160625-27921-1av67ezbyebug-9.0.5/gems/byebug-9.0.5 for inspection.
Results logged to /tmp/bundler20160625-27921-1av67ezbyebug-9.0.5/extensions/x86-linux/2.3.0/byebug-9.0.5/gem_make.out
Using coffee-script-source 1.10.0
Using execjs 2.7.0
Using thor 0.19.1
Using concurrent-ruby 1.0.2
Using multi_json 1.12.1
Installing pg 0.18.4 with native extensions

Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

current directory: /tmp/bundler20160625-27921-6wnv2wpg-0.18.4/gems/pg-0.18.4/ext
/usr/bin/ruby2.3 -r ./siteconf20160625-27921-1hfbrz5.rb extconf.rb
mkmf.rb can't find header files for ruby at /usr/lib/ruby/include/ruby.h

extconf failed, exit code 1

Gem files will remain installed in /tmp/bundler20160625-27921-6wnv2wpg-0.18.4/gems/pg-0.18.4 for inspection.
Results logged to /tmp/bundler20160625-27921-6wnv2wpg-0.18.4/extensions/x86-linux/2.3.0/pg-0.18.4/gem_make.out
Using sass 3.4.22
Using tilt 2.0.5
Using spring 1.7.1
Using rdoc 4.2.2
Using tzinfo 1.2.2
Installing nokogiri 1.6.8 with native extensions

Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

current directory: /tmp/bundler20160625-27921-fzg6wvnokogiri-1.6.8/gems/nokogiri-1.6.8/ext/nokogiri
/usr/bin/ruby2.3 -r ./siteconf20160625-27921-131um77.rb extconf.rb
mkmf.rb can't find header files for ruby at /usr/lib/ruby/include/ruby.h

extconf failed, exit code 1

Gem files will remain installed in /tmp/bundler20160625-27921-fzg6wvnokogiri-1.6.8/gems/nokogiri-1.6.8 for inspection.
Results logged to /tmp/bundler20160625-27921-fzg6wvnokogiri-1.6.8/extensions/x86-linux/2.3.0/nokogiri-1.6.8/gem_make.out
Using rack-test 0.6.3
Using mime-types 3.1
An error occurred while installing debug_inspector (0.0.2), and Bundler cannot
continue.
Make sure that `gem install debug_inspector -v '0.0.2'` succeeds before
bundling.


1eff23520876dc4ba8e040424fedbc4b

Chris, as a subscriber, I've gotten a lot of tips from you, now here's one from me:
It should be "without further ado", not "adieu." The former means fuss and bother, the latter means goodbye. The are homonyms.


Eaa2fcad22789fa45f926a8a22136a28

Hey all, I'm having trouble with installing rails. I followed all of the steps (including "rbenv rehash") but when I try "rails -v" I don't get any message. I've uninstalled using "gem uninstall rails -v 4.2.6" multiple times and re-installed but it didn't help. I eventually just moved onto postgresql which seemed to work fine but when I get to the final steps the "rails new myapp -d postgresql" doesn't seem to do anything. Any help is appreciated!


6944c2b59d98651ade4c756720eda563

Best tutorial I have ever seen. I've tried to install Ruby and Rails on Windows and that was a nightmare) Development server was very slow. Later on I have Kubuntu installed and faced a problem installing rails via RVM. Luckily I found this tutorial! It's great, because this article covers a lot of ways to install rails on linux. Thank you very much!


Fca674912735dc95d249f045319253dd

thanks for this. very helpful


Dbcf35391967f1f80e94f4caae03d323

Thanks a lot for this. Its running like a charm.


9d4d5b33c7320e0c7e1fb1b9ca7a83a4

Help - I'm setting up ruby for first time. I'm using rbenv.
I wrote this in shell -

echo 'export PATH="$HOME/.rbenv/plugins/ruby-build/bin:$PATH"' >> ~/.bashrc
and when I write exec $SHELL. It throws an error like - exec $SHELL unexpected EOF while looking for matching `"' syntax error: unexpected end of file .


85e67f3977e613cd17e8e2ff289ba8e4

Hello Chris,

I'm new to rails using zsh (oh-my-zsh) and can't get to work the rails command in the terminal. Upon executing the commands in your tutorial, I replace .bashrc with .zshrc

echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.zshrc
echo 'eval "$(rbenv init -)"' >> ~/.zshrc
echo 'export PATH="$HOME/.rbenv/plugins/ruby-build/bin:$PATH"' >> ~/.zshrc

Any idea with this? Thanks!


3c7ac3f479f01833c8f69658f11937ce

Same problem here.

Ce795239ba5dd2384fc2f88ffaff5451

Double check that your ~/.bashrc has the rbenv lines in it. This happens when bash doesn't properly load rbenv, and that happens because it doesn't add it to the path in your ~/.bashrc.

33cc5623ea0cb371ebb48b2230068516

Don't know does it help to rbenv users but this hint helped me:

https://rvm.io/integration/...
The trick is to configure terminal to login as login shell.


7c9a7e51f3db6074b5cb4993d2546c61

Just a short note. If you receive an error message regarding the YAML syntax when running rake db:create, make sure that you dont have any exclamation marks in you password. If so, just put the entire password between quotation marks.


4890deae38bd797d04d72376879efd1d

Ran these tonight on a Digital Ocean droplet. Went off without a hitch. Thanks!

Ce795239ba5dd2384fc2f88ffaff5451

Awesome to hear! :)


Efca459ef4f778ac5c312c567ea38add

Hi, I am stuck at the Github step. I created the key fine and pasted it but when I run 'cat ~/.ssh/id_rsa.pub' it says 'cat: /home/austin/.ssh/id_rsa.pub: No such file or directory'

I have minimal background in Linux and this is my first time installing ROR. I tried Googling some solutions but had no luck. Any ideas?

Efca459ef4f778ac5c312c567ea38add

Do I need the Github step?

961b23b9e0c8ea9f9a8a829be1ae6804

Austin, I am having this same result with `cat ~/.ssh/id_rsa.pub` - Ubuntu 16.04... not sure what to do to resolve this either

Ef49df22813bd3497d8c963a2a101845

when the terminal ask you "Enter file in which to save the key (/home/user/.ssh/id_rsa): rsa" you normally give a name for the file with the key.

just try next command this way :

$ cat "the_name_of_the_file" (because it's saved in the current (home) directory.

961b23b9e0c8ea9f9a8a829be1ae6804

Thank Mickaelmgd. When prompted for a filename, I left it blank and hit enter and everything worked as described after that.


Be173e6aba7ccb174e2907bb6ea7550e

git clone https://github.com/rbenv/ru... ~/.rbenv/plugins/ruby-build
After typing my username (email) and password I get the error "remote: repository not found".


A4133b3e3da0d5cfc931145ca1868fac

Can anybody help me as i want to install Homebrew and ruby on rails on my Macbook OSX 10.8.5 2 months back i still could install homebrew but now it gives the following error.

Last login: Sat Oct 29 15:02:30 on ttys000

mrrobotas-MacBook-Pro:~ mrrobota$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubuserconte..."

curl: (22) The requested URL returned error: 404

mrrobotas-MacBook-Pro:~ mrrobota$


721a01bfc7dd2a5df547efb7dee37186

This guide is something that would have solved all my problems as I started getting into Rails development. I'll be recommending it to people getting started. Thanks for taking the time to prepare it.

Ce795239ba5dd2384fc2f88ffaff5451

Thanks Matt! That means a lot. :D


D0278f07066ca2e2238641f20222b541

Perfect...
All directions are clear :)


02e55fc56b01dbb8faca732cf431f145

The ~/.rvm/scripts/rvm didnt work for me, it was source /usr/local/rvm/scripts/rvm


C5b2ac9992d15c69ac580a8343ccb2a1

Thanks. Didn't have a problem installing ruby on rails on Ubuntu 16.04. Great Job


3649657314a5eb9e1246e63910ea5a15

Hi All,
Any help would be greatly appreciated, Using MySQL and everything went perfect until the end command, rake db:create then i received the below any idea?
rake db:create
(in /home/gary/myapp)
rake aborted!
LoadError: cannot load such file -- bundler/setup
/home/gary/myapp/config/boot.rb:3:in `<top (required)="">'
/home/gary/myapp/config/application.rb:1:in `<top (required)="">'
/home/gary/myapp/Rakefile:4:in `<top (required)="">'
(See full trace by running task with --trace)


3649657314a5eb9e1246e63910ea5a15

Yes, ran it again and then ran "rake db:create" received the same error, BTW thank you for answering!


1cc73972b4f51a4bedbf9694820c668a
Edy Ken Kiptoo Khanali

help out .. i got this error ..

Expected string default value for '--rc'; got false (boolean)


D6570fd47decc6779d2a21e386c22a20

It's my favorite guide to use install RoR. Thaks!


8eb9ba19600cb4d681c791435766ebc7

Just ran everything perfectly. Now I just need to learn how to use Rails.


C4b8d16ab9490594f537fd2ba4d8df1f

There are so many coding tutorials out there with missing bits, or bits that half-work. Everything here worked first time. Good job!


071093fba2ddf19162510e9d5a0c5c38
Muhammed Rajeef M K

In case anybody is stuck at rake db:create,

Make sure Inside your databse.yml file, under default: you have the following ( right below pool)

host: localhost
username : your username
password : user's password


1b273382f6ed0a48a23b054d13d6d8fe

When I run "rails server" i see below stuff and doesnt seem to start listening in localhost:3000
Any ideas?
https://uploads.disquscdn.c...


5ad7a0d70e695c00e8ba948bb8484970

Whenever I use the rails server command or ANY command, I get this - a deprecated warning, what do I do with this? Any way to fix it? And also, how do we uninstall rails if I used rbenv?

[email protected]:~/Desktop/Web/Rails/myapp$ rails server
/home/username/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/activesupport-5.0.1/lib/active_support/xml_mini.rb:51: warning: constant ::Fixnum is deprecated
/home/username/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/activesupport-5.0.1/lib/active_support/xml_mini.rb:52: warning: constant ::Bignum is deprecated
=> Booting Puma
=> Rails 5.0.1 application starting in development on http://localhost:3000
=> Run `rails server -h` for more startup options
/home/username/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/activesupport-5.0.1/lib/active_support/core_ext/numeric/conversions.rb:138: warning: constant ::Fixnum is deprecated
Puma starting in single mode...
* Version 3.7.0 (ruby 2.4.0-p0), codename: Snowy Sagebrush
* Min threads: 5, max threads: 5
* Environment: development
* Listening on tcp://0.0.0.0:3000
Use Ctrl-C to stop

0f60568f76ca5b580dc6bea0f72c4b32

It is solved in Rails 5.0.2


D59fb9b44fe32165c05592b5b5bdd174

warning: constant ::Fixnum is deprecated
warning: constant ::Bignum is deprecated

i am getting these errors while executing rake command stackoverflow thread said this is the problem with ruby 2.4.0 can may i know how to downgrade my ruby gem


Af97aa541bc19208d0ebea0d826d0992

thanks, this was useful!


9cccc19200fa7b304f6c947c8a4d0b1a

First of all: Great Guide!
Ive got a little different question going to PageFlow. As this is the best Rails/RoR guide ive found and pretty lost right now i thought i could give it a try here:
I followed every step described here, installed ruby 2.3.1p112 and rails 4.2.7.1
as i try running rails generate pageflow:install i get following error message:
/home/pageflow/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/pageflow-0.11.3/lib/pageflow/global_config_api.rb:17:in `config': Pageflow has not been configured yet (RuntimeError)

since my ruby know how is === 0 maybe one of you ran into the same problem or knows how to solve it? https://uploads.disquscdn.c...

Best regards,
Ronald


C85dbd6bdb87d013953153d214697d75

Great article, really helped a lot in installing ruby on rails and starting my first application.


0e8d9238e9cb076643504bc17879639d

/etc/nginx/sites-enabled/default is not available for me


34fea5083f70d4c6122d9e28373ae284

Hey Chris, this was great for a beginner like me. Though, the only problem I had was with creating a new user for the postgres database as I get "could not change directory to "/home/whoarse": Permission denied". Not sure where to start with this??


34fea5083f70d4c6122d9e28373ae284

Hey Chris, this was great for a beginner like me. Though, the only problem I had was with creating a new user for the postgres database as I get "could not change directory "/home/whaorse": Permission denied". Not sure where to start with this??


Ba4821b916018dc9a33e0f62151a2533

Err:10 http://ppa.launchpad.net/fo... xenial/main amd64 Packages
404 Not Found
Ign:12 http://ppa.launchpad.net/fo... xenial/main i386 Packages
Ign:13 http://ppa.launchpad.net/fo... xenial/main all Packages
Ign:15 http://ppa.launchpad.net/fo... xenial/main Translation-en_IN
Ign:16 http://ppa.launchpad.net/fo... xenial/main Translation-en
Ign:17 http://ppa.launchpad.net/fo... xenial/main amd64 DEP-11 Metadata
Ign:18 http://ppa.launchpad.net/fo... xenial/main DEP-11 64x64 Icons
Err:20 http://ppa.launchpad.net/li... xenial/main amd64 Packages
404 Not Found


9e4f107daf8491f90b986536fdebcab1

thanks


B5af4b414ee84fbc740c367ce79c5bd1
Ernesto Almeda (MTGONS5)

Probably the easiest Setup I've came across. Good Job!


Cc0f980e7501d4f6de3073b2dc160fb7

I would recommend also installing ruby-dev:
`sudo apt-get install ruby-dev`


0ccb393a7440fc2b064a3ebf2743f961

This has solved my current installation problem and some that I would have definitely run into.
Thanks Chris.


7abac14713328af5fa4e9725a7e81f78

Tried for two full nights to install rails on Ubuntu, this is the first site to explain step by step, so a HUGE Thank You! I'm now on my way up the learning curve.


2de8d4524979c67ae9db19c3f6a50c9a

Why this way and not taking the packages from repositories? Is it due old versions and incompatibilities?

6fd237f6f40f5afca32aca6ea633f58a

Usually the distros...
1) doesn`t have an updated version of ruby.
2) installs a system wide ruby. So, for an user to install a gem he would need sudo and also there wouldn`t have gem set isolation.
3) from 2), there is no version management, like rbenv and rvm.


6fd237f6f40f5afca32aca6ea633f58a

Icing on the cake:
echo 'gem: --no-rdoc --no-ri' >> ~/.gemrc
gem install pry && echo 'alias irb=pry' >> ~/.bashrc

6fd237f6f40f5afca32aca6ea633f58a
Disabling rdoc, to avoid compilation error on low memory machines: 
CONFIGURE_OPTS="--disable-install-rdoc" 
before rbenv install

58f941ef253d48d156a2a2c1318c28b0

Dude. Epic. But you got me there. Thanks a mill.


A5f0b6868a697fe5b9df7817153236f7
Kleberson do Rego Lima

Excellent tutorial! Thank you Chris!


C8d7ccccddd75a2f90734ba7f4956285

Such a nice tutorial bro....Great


49a0748481f443ea435f8e02b5c9d278

Thank you, I was very worried installing it on ubuntu, your tutorial was so beginner friendly.


5812bf8ed2d4d980b20720478936b550

This is the best Rails installation tutorial. Thanks man.


E3ce7f9c6650853bb6a0c0d55ce8ed22

Congrats for this nice article!!!


6f5d9ab50ccfe287a8786b31d97e9923

Very helpful, thanks. But I got a failure on Ubuntu 16.04.2 when it runs oracle-java7-installer. I already have Java8 installed. Here's the error messages:

=========================
[email protected]:~$ sudo apt-get install git-core curl zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev python-software-properties libffi-dev nodejs
... (bunch of installs that work, then ...) ...
Setting up oracle-java7-installer (7u80+7u60arm-0~webupd8~1) ...
Downloading Oracle Java 7...
--2017-08-08 14:38:03-- http://download.oracle.com/...
Resolving download.oracle.com (download.oracle.com)... 104.107.60.99, 104.107.61.90
Connecting to download.oracle.com (download.oracle.com)|104.107.60.99|:80... connected.
HTTP request sent, awaiting response... 302 Moved Temporarily
Location: https://edelivery.oracle.co... [following]
--2017-08-08 14:38:03-- https://edelivery.oracle.co...
Resolving edelivery.oracle.com (edelivery.oracle.com)... 2600:1407:21:28e::2d3e, 2600:1407:21:2ae::2d3e, 23.194.90.202
Connecting to edelivery.oracle.com (edelivery.oracle.com)|2600:1407:21:28e::2d3e|:443... connected.
HTTP request sent, awaiting response... 302 Moved Temporarily
Location: http://download.oracle.com/... [following]
--2017-08-08 14:38:03-- http://download.oracle.com/...
Connecting to download.oracle.com (download.oracle.com)|104.107.60.99|:80... connected.
HTTP request sent, awaiting response... 404 Not Found
2017-08-08 14:38:04 ERROR 404: Not Found.

download failed
Oracle JDK 7 is NOT installed.
dpkg: error processing package oracle-java7-installer (--configure):
subprocess installed post-installation script returned error exit status 1
... (more installs that work) ...
update-alternatives: using /usr/bin/nodejs to provide /usr/bin/js (js) in auto mode
Processing triggers for libc-bin (2.23-0ubuntu9) ...
Errors were encountered while processing:
oracle-java7-installer
E: Sub-process /usr/bin/dpkg returned an error code (1)

[email protected]:~$ java -version
java version "1.8.0_144"
Java(TM) SE Runtime Environment (build 1.8.0_144-b01)
Java HotSpot(TM) 64-Bit Server VM (build 25.144-b01, mixed mode)
========================

Help?


7ed41ea4c70ce38df7fb8cfa2a874570

i have got problem in setting up sql.. it says E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution). would you please tell me the solution


Be60cbaa8a74a1c3bdafeff06ccb9528

https://uploads.disquscdn.c...

followed your tutorial and steps were smooth unexpected! :D thanks much!


Becbb4c5db3d68f9038a0f511825815b

in my pc while installing rails ial getting this error:
ERROR: Loading command: install (LoadError)
cannot load such file -- zlib
ERROR: While executing gem ... (NoMethodError)
undefined method `invoke_with_build_args' for nil:NilClass

Becbb4c5db3d68f9038a0f511825815b

somebody help me please...

92ff0b1f538507ae6f672f859c281183
Yaroslav Beskhlebnyi

gem install bundler


D77872f30dddb37d103d9d3018ce0b45
MIGUEL ANGEL GIL RODRIGUEZ

hello a question I have my project rvm 2.3.1 and rails 5.1.1 which version should I install, thanks


B8669478f7f992f75770406b05096fc7

Thanks for clear road. Before, I tried to install with other guides but couldn't successful. With you, it was not only easy also was pleasure. Now all running. Really thanks.


9db04d3db6b49f300c41c9c213f3938d

Thank you so much for this, it was awesome and extremely helpful. One suggestion to help out the impatient (such as myself). Use '--verbose' with the installs where applicable; makes it much easier to know that it's actually working.


7c69390748f64982df87bc19af781d6f

The official rvm is recommnded to be installed by using this repo: https://github.com/rvm/ubun...


Ede9e0fd67c38678488befb94bab3250

hai ,very good blog ..i have a doubt when we install mysql in root and one more command that u r using...sudo apt-get install mysql-server mysql-client libmysqlclient-dev... in u r blog its giving some problem ....then how to create database and create a table and link to a html page and to get ouput on localhost:3000..if any blog u have created please
refer that


61b1aeccaa61eb58f247492abb55077a

47eae087169467ea80681f3b6f715ce5

excellent recipe !!


9998dc0b983767f35f7429dfac554bdc
i had error bundler: command not found: spring

1d6f5cc16502bf3a13712256a35b19c1
Hello,
I have install rails and  i want to use mysql for database.
i have install mysql but how can i see the database in browser.
like localhost/phpmyadmin

Thank You

65b08a921bca7870c01c142f08cf0dfb

How it worked for me:

FYI: Instead of

sudo -u postgres createuser chris -s

I used:

sudo -i -u postgres createuser chris -s

Also, in the config/database.yml file, under pool:5, add

  host: localhost
  username: pguser
  password: pguser_password

(pguser) + (pguser_password) is the username and password you created. Also add this to the "test" envrionment section.

And finally if rails server doesn't work, if you're using a Virtual Server like Digital Ocean, use:

rails server --binding=server_public_IP

where (server_public_IP) is the server's IP address. Then use http://server_public_IP:3000 in your web browser.


Login or Create An Account to join the conversation.

Subscribe to the newsletter

Join 18,000+ developers who get early access to new screencasts, articles, guides, updates, and more.

By clicking this button, you agree to the GoRails Terms of Service and Privacy Policy.

More of a social being? We're also on Twitter and YouTube.