Skip to main content

Setup Ubuntu 13.10 Saucy Salamander Discussion

General • Asked by Chris Oliver
3e03b8dffcad014f0d2977621ec8d65e

I believe in the line "sudo apt-get install postgresql-common -t raring," raring should actually be saucy. Also in the line "rails new myapp -d postgres," postgres should be postgresql.

Ce795239ba5dd2384fc2f88ffaff5451

Fixed! Thanks for pointing those out Abe.


F09cf0f7ba1864907113687f09839797

Thanks for the tutorial, I think in case you installed ruby from source, you will need to execute the "gem install rails" command using sudo, to be like this: "sudo gem install rails" :)

Ce795239ba5dd2384fc2f88ffaff5451

Yes! That is correct. I'll try to update the tutorial soon to note that. Thanks!


3df6d42fa7761c98474cc0d116a60d40
Ricardo Enrique Berdejö Mora

Thank you. I just moved ubuntu from Win8 and didn't know how to do it.


A444e1ba503ea1e02bb007a4f92df8c1
Caio Ribeiro Pereira

Thanks! Awesome post! I'm using into my vagrant ubuntu 13.10 now!


F5fb201801ca1d6a70f58067637830d7

all this packages are exists in ubuntu 13.10 ? When I try to apt-get on them, my ubuntu doesnt find this packages : sudo apt-get install zlib1g-dev libssl-dev libreadline-dev libyaml-dev libsqlite3-dev
libxml2-dev libxslt1-dev

Ce795239ba5dd2384fc2f88ffaff5451

Try running sudo apt-get update and then the install again. Maybe your repository list is out of date.

F5fb201801ca1d6a70f58067637830d7

i've tried today and before that, i run sudo apt-get update but not work


6ccbe54fa705ac0cb4a14e1014763488
Daniel Alvarenga Lima

Before gem install rails:
rbenv rehash
rbenv global 2.0.0-p247


A929a7c3802cc7277952cfeefcaa88f4

Unable to locate package lib is what i get when I run
"

sudo apt-get install git-core curl zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev lib
"

Ce795239ba5dd2384fc2f88ffaff5451

Sorry, there's word wrapping there. Those two lines are meant to be one.

A929a7c3802cc7277952cfeefcaa88f4

Hey thanks for your swift reply..i have got it done working fine ...thankyou so much guys

Ce795239ba5dd2384fc2f88ffaff5451

I fixed the wrapping so everything is on one line now! :)


9619895c5526d3ffed55cb7d465c1773

Admired the way you explained it. Super cool. Very well done.


9619895c5526d3ffed55cb7d465c1773

Just a minor gripe: I tried to install postgres-9.3 as i was using 9.1 on saucy. The problem is it automatically removes the package logrotate and the packages that depend on them. In my case it removed riak (basho.com) and is needed for my work. You can add a warning in the 9.3 install and ask users to wait till Trusty tahr (or) use the default 9.1 bundle.

Ce795239ba5dd2384fc2f88ffaff5451

Thanks for pointing that out. I wonder why it removes logrotate...That's definitely something you want to keep around unless they have a replacement.

9619895c5526d3ffed55cb7d465c1773

It removes logrotate and its dependencies automatically.


9619895c5526d3ffed55cb7d465c1773

If you have gem uglifier in your Gemfile, then you don't need to install nodejs.


88ce5a1f961832585f329292d22451fc

I have a problem installing rails following the instructions:

$ gem install rails
Successfully installed rails-4.0.1
Parsing documentation for rails-4.0.1
Done installing documentation for rails after 1 seconds
1 gem installed
$ rails -v
The program 'rails' is currently not installed. You can install it by typing:
sudo apt-get install rails

little help?

Ce795239ba5dd2384fc2f88ffaff5451

Did you install ruby with rbenv? If so, you need to run rbenv rehash to make the executable available.

88ce5a1f961832585f329292d22451fc

no I installed ruby with rvm

88ce5a1f961832585f329292d22451fc

victory! I had to add `source ~/.rvm/scripts/rvm` to .bashrc file

http://www.codelearn.org/bl...

Ce795239ba5dd2384fc2f88ffaff5451

Oh of course! Thanks for catching that. I'll make sure to update the tutorial.


C1be7171ca49098750321b653d5dd303

Excellent explanation! Thank you very much


56ea0b06f1610e495fd555c95e38c42f

First of all, thanks for the tutorial.

Secondly I run into a problem while trying to create my database.

I used your instructions to create my own postgres user but apparently I receive this error when I run rake db:create :

Couldn't create database for {"adapter"=>"postgresql", "encoding"=>"unicode", "database"=>"appname_development", "pool"=>5, "username"=>"myusername", "password"=>"mypassword", "host"=>"localhost", "port"=>5432}

where myusername and mypassword are the ones I used to create my postgres user after configuring the database.yml file.

I then tried to see if the user is in the pg_roles database( http://ideone.com/HkDoXO ) and I tried to change the password in the console and restarted the server but I still got the error.

The only way I managed to make rake db:create work was to use the "postgres" user ( and I think this one was created by postgresql automatically).

Ce795239ba5dd2384fc2f88ffaff5451

You may want to make sure that the user you created has admin rights to create databases. That could be the problem as it looks like only the postgres user has "Create DB" permissions.

6d36383f353f79d903e2e0946b73e8f7

can you tell how to give admin right to the user?

Ce795239ba5dd2384fc2f88ffaff5451

See this for granting permission to a user inside of Postgres: http://www.cyberciti.biz/fa...


E07338a69bc13624869f1b870a14ab6b

When i run gem install rails, I receive this error message:

ERROR: Error installing rails:
ERROR: Failed to build gem native extension.

Can you help me to overtake this issue? Thanks you.

Ce795239ba5dd2384fc2f88ffaff5451

Make sure you installed all the dependencies. The native extensions it needs to build are likely the sqlite3 ones.


A803b5f96ee20ae883caab9cf9db6b88

This is awesome Chris, I did a search for installing "ruby on rails ubuntu" and it popped up with a link and your image next to it. I've been staying up to date with the rails eco system and have built a few niche websites using rails but I"m glad to see you're still going strong.

Ce795239ba5dd2384fc2f88ffaff5451

Woah, I'm way late on this. Good hearing from you again! Where are you at these days?


519c926ed8dd9776026fbee9e09a3ef3

you forgot to add nodejs package, a fundamental dependency to start webrick on ubuntu

Ce795239ba5dd2384fc2f88ffaff5451

It's in there at the top of the Installing Rails section. :)


D6b81013116add6ca35b3ed47d8df173

Thanks a million! This process isn't exactly intuitive for someone who is just starting to learn Rails development, which is funny because starting Django on Ubuntu was a piece of the proverbial cake. Why the heck doesn't the Ubuntu team get their act together and make this just as easy?


7db97a588815aaac608c21b78eafe8fb

Hi Chris,
Thanks for this awesome guide.
I am facing problem for installing postgres sql,
its saying:
Package postgresql-9.2 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'postgresql-9.2' has no installation candidate

Ce795239ba5dd2384fc2f88ffaff5451

Try using "postgresql-9.3" instead of 9.2. It's been a little while that 9.3 has been out so the repository may have removed support for the older version. If that works, let me know and I'll make sure to update the tutorial. I'll try to get time to run through the tutorial again on my own to verify anything else that's broken. Thanks! :)


Fe57e3b819f335abbfb274ecd2ae52d3

Creating a new user in postgres did not provide the necessary permissions to create a database with "rake db:create." Perhaps modify it to make the user a superuser (-su) or explain how to alter the user role with "ALTER ROLE chris CREATEDB;"

Ce795239ba5dd2384fc2f88ffaff5451

Yes, I think it used to ask before if you wanted to create a superuser but when I tried it again it didn't. Updated the instructions to include "-s". Thanks!


68170bce8f66aca0f3e66e5b178dc6a6

thanks for your info.....bravo ubuntu 13.10 by achek LPMP-Aceh


77134fffd4375072a35d1fdcd9136032

Hi, I got this error when entered this command:
sudo -u postgres createuser aaa -s
"could not change directory to "/root": Permission denied"

Ce795239ba5dd2384fc2f88ffaff5451

Are you a regular user or root when you ran this? I found this when googling it http://www.postgresql.org/m...

77134fffd4375072a35d1fdcd9136032

I did the whole process as root. Do I need to login as postgres user?

Ce795239ba5dd2384fc2f88ffaff5451

Ideally you want to do this as your regular user. If you're root, you can do this instead:

su postgres
createuser aaa -s
77134fffd4375072a35d1fdcd9136032

Thank but I redo the whole thing as a user (with root privileges). I am stuck at SSHing to GitHub (SSH Key is added to GitHub account).

ssh -T [email protected]
Host key verification failed.

Ce795239ba5dd2384fc2f88ffaff5451

For that to work, you need to put your ~/.ssh/id_rsa.pub key into Github.

77134fffd4375072a35d1fdcd9136032

Yes I did add key to GitHub (http://puu.sh/6rnjF.png).
It was not a problem when I did that with root but as a new user, I got this problem.


2c7cfb30cc6f774293768fb3b64ef6b4

I am new to both ruby and ubuntu and am just wondering where the default directory is for the config/database.yml? Apologies in advance if its quite simple

Ce795239ba5dd2384fc2f88ffaff5451

It's located inside your Rails application. It will be generated when you run the "rails new" command.

2c7cfb30cc6f774293768fb3b64ef6b4

Oh awesome, cheers! I thought that might have been the case but just wanted to see if it wasn't made in the install and I missed it.

Thanks


E82b7a876d51824a660b8388dc76a1d9

Great guide for a *nix n00b like me!!

Only one issue, the "add-apt-repository" stuff was reporting "command not found" so I had to search elsewhere to sort that.

But again, thanks my friend, best guide ever :)

Ce795239ba5dd2384fc2f88ffaff5451

Thanks Rich! Did you have to install the python-software-properties or software-properties-common package(s)? Also which version of ubuntu were you on? I'm surprised it didn't come with Ubuntu 13.10

E82b7a876d51824a660b8388dc76a1d9

Hey Chris. I had to install both the python-software-propertiesand the software-properties-common packages. It's possible I only needed one, but I forget which one I installed first so I may not have needed it. Sorry, forget which one though - but I definitely needed one of them.

I installed Rails on a clean Ubuntu 13.10 x64 Server edition (no X).

Thanks again, without this guide I wouldn't now be running my own Diaspora* pod :)

Ce795239ba5dd2384fc2f88ffaff5451

Fantastic. :) Thanks for the tip. I'll make sure to get that fixed shortly.


67b4b0da1074e71906237509810c7eac

if i copy a new rails app and then cd in and type bundle install, it says "The program 'bundle' is currently not installed. You can install it by typing:

sudo apt-get install ruby-bundler"

how can i get it work.
infact doing rails on a new folder says i got to install rails using"sudo apt-get install rails". why like this?
(things were easier with windows)

67b4b0da1074e71906237509810c7eac

okay it seems i did all this in a new tab wch was causing it to behave that way. but i got reasons to believe when i start my comp the next time, that's what i will get when i try starting the app.


69b229c5e304362b20f45a0694a408bf

Setting up LAMP, PHP, and Ruby/Rails on an Amazon EC2 instance, running Ubuntu:

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 13.10
Release: 13.10
Codename: saucy

so this is cool. Installing liquid template (Shopify's templating language / framework), drupal, wordpress, and other options. Be fun to set up an old-skool slash-dot server maybe later.

Sound interesting to anyone? If so I'll post my ongoing results here. So far -- stumbles over Amazon's documentation on getting started... but once you have your instance up, everything is straight out of the web, As Amazon claims, it is like having the server in front of you, So (not to beat a dead horce here) It is as if I have my work server here on my coffee table which works for me!
Oh yeah my micro-instance is free for 12 months while I try to do something with it ;)

Ce795239ba5dd2384fc2f88ffaff5451

Sure! I'd love to hear how it goes.

69b229c5e304362b20f45a0694a408bf

Well I actually got a couple of small paid contracts to work on! So I am setting this aside for a bit. I will be getting back to it however. I'll post back to here.


5fdc86a5c37d7232d8962a44cfb12dd0

You should have told us how to click "Ok" in terminal. :D


55ea7c471faab2a67a9558ec8676a691

Hi Chris, thanks for the tutorial. I'm new to ruby on rails and is currently trying to set it up on ubuntu 13.10. I've gotten as far as setting up the postgresql but i keep getting this:

try wget --help for more options
gpg: no valid open PGP data found

after typing :

sudo sh -c "echo 'deb http://apt.postgresql.org/p... precise-pgdg main' > /etc/apt/sources.list.d/pgdg.list"
wget --quiet -O - http://apt.postgresql.org/p... | sudo apt-key add -

What do i do?

Ce795239ba5dd2384fc2f88ffaff5451

You're welcome! Make sure you run the wget command exactly as it is written. Missing a "- " can cause it to fail. If you need to, download the file yourself, and run

sudo apt-key add ACCC4CF8.asc

where ever you download it to.

55ea7c471faab2a67a9558ec8676a691

Thanks, didn't type it in properly.


7a39a8fc213178b2e650f08cfd28e4bd

Hey thanks for posting this! I set up a user with full permissions on my Linode VPS and then disabled root access for security reasons. Maybe for that reason I am getting "rbenv not found" after I type "rbenv install 2.1.0". Any ideas?

Ce795239ba5dd2384fc2f88ffaff5451

If you're getting rbenv not found, then go back and run the echo lines to make sure that rbenv is added to your user's bashrc. That's what makes rbenv and all the rubies you install available to that user.

7a39a8fc213178b2e650f08cfd28e4bd

Thanks for pointing me in the right direction. Sorry, I'm quite a newbie when it comes to using a server of any kind so it's not too obvious for me... ;-)

Ce795239ba5dd2384fc2f88ffaff5451

You may want to walk through the whole rbenv installation again just to make sure it's setup right.

7a39a8fc213178b2e650f08cfd28e4bd

It worked, thanks!

In case anyone finds this useful, I set up my user as follows at the start:

adduser example_user_name
usermod -a -G sudo example_user_name


0c437867d9fb658e259ca5731a4f3309

Thanks for this great article. I'm a newbie and moving pretty slowly in getting the environment set up, so this really helps. At this point, it looks like I have Ruby and Rails installed, I've set up myapp and done the "rails server" command at the end, but the http://localhost:3000 doesn't show me anything ("Problem loading page" message). Do you have any idea what might be wrong? Thanks!

Ce795239ba5dd2384fc2f88ffaff5451

Make sure the rails server command is still running. The command will say it is listening on http://0.0.0.0:3000 which means it's running successfully.


B2d391dded0338046eec07b11528ec31
Fernando Rosentalski

Nice post, you could improve adding imagemagick or graphicsmagick as well


04a684a0803a4fec9474ed5f053ad4bf

How to install script on apache2 ubuntu 13.10


7bda5bad8da2881a34487854c190fdc4

Rails setup has never been easier! Well done mate - you are legendary!


75ded16afbe991ec44ba8cb7338a5781

very cool, big thanks!


77efa2f25f10313fbf5adc685dd81597

when i restart terminal it doesn't see ruby anymore :(

Ce795239ba5dd2384fc2f88ffaff5451

Make sure your ~/.bashrc has the export PATH lines in it for rbenv or rvm (whichever you were using).


48c9d5332205a0af38e6c44706a7ee1d

This is the very cool every, Thanks for your nice tuts.


8f2508c15672a0b3feddde22763830a8

Everything worked fine until I tried to add test the website (http://localhost:3000). I received an error that stated "no Rakefile found (looking for: rakefile, Rakefile, rakefile.rb, Rakefile.rb). I ran a trace, but it seems that everything else loaded properly. Do I need to add the rakefile?

Ce795239ba5dd2384fc2f88ffaff5451

Hey Rico, there should be a Rakefile automatically generated when you create your rails app. What command were you running that gave this error?

8f2508c15672a0b3feddde22763830a8

Hey Chris. I ran the command "rake db:create"

Ce795239ba5dd2384fc2f88ffaff5451

Okay cool, so make sure you're inside the rails application when you run that command.


21aacf05720a9143b874f5856a3e5d47
Eduardo D Jr Barrete

Hi Chris,

I have this error : No binary rubies available for: ubuntu/13.10/i386/ruby-2.1.0.

Ce795239ba5dd2384fc2f88ffaff5451

Hey Eduardo, I believe that is rvm telling you that you don't have all the necessary to compile from source so it is looking for a binary instead. Double check that you installed all the packages with apt-get and the other parts of the tutorial before that.

21aacf05720a9143b874f5856a3e5d47
Eduardo D Jr Barrete

Hi Chris thanks for your reply. I just reinstalled my ubuntu and now its working fine. Thanks again!


5203fc5d7c926cc7dbd92f8c382b0d03

Thanks for that!


2c513c490de605924bc5daa196326157

3d3065bd2111d44b2d39ce59954aba07

Very helpful guide. Works on my ubuntu 13.10. Thanks!


D137629e7def21c596a59e0cffcd2bf6

Awesome! Many thanks, Chris


A639d307010b86a9ca47971c3787df6d
Kasey Jean Robinson

This worked great, thank you so much!!!

I had a little trouble on how to save the git SSH key to a /home/user/ folder, but figured it out with a friend's help. Thanks!

Ce795239ba5dd2384fc2f88ffaff5451

Great! Let me know if there's anything I can make more clear for that part.


A486e6b6dd2d26f2e257c08d5edd1d39

Geez, wish I'd seen this when I was setting up Ruby & RoR on Ubuntu. What is the reason for installing node.js? I've noticed I always have to install the ruby racer for JS stuff, but I don't on our work server. At work we have node.js installed. Does node.js provide JS abilities (if that's the right word) for process .js files?

Ce795239ba5dd2384fc2f88ffaff5451

The ruby racer can be a replacement for Node.js but Node doesn't require you to add a gem to your app. The reason you need one of these is so that you can compile Coffeescript to Javascript (and then combine and minify it in the asset pipeline when you deploy). Node is a Javascript runtime that isn't in the browser and therubyracer gem provides one as well.

A486e6b6dd2d26f2e257c08d5edd1d39

Thanks, that's great to know. I'll add node.js and remove the ruby racer gem. BTW, I really like the way you structured this page with the various version at the top, and the tabs for whatever Ruby management tool we use.

Ce795239ba5dd2384fc2f88ffaff5451

I was hoping people would find those useful! :)


9b8723cfaa5f14b0a36d8b573feaa3a9

Chris - 'setup' is a noun, and 'set up' is a verb, and you've misused 'setup' in this article, in other articles you've written on gorails.com, and in replies to this article. Please take a few minutes to learn the correct the usage of 'set up' and 'setup'.


5c89cc53e2e2222d1476787b0ded3bca

Thank you!
Great Job


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.