Skip to main content

Setup Ubuntu 14.10 Utopic Unicorn Discussion

General • Asked by Chris Oliver

zanx!


Hi, looks like it didn't want to create the database for me with the rake command. I had to log into postgresql and add it manually.

just thought you should know.

Yeah I got this too. I just closed then restarted the terminal and tried again - worked!

I'm a complete nube to the *nix environment, Ruby, etc., having used only Windows since 1990.

Thanks, yeah I didn't try that. Let me know if you run into any problems, I've been using *nix for awhile and am a Win sys admin by trade.

Thanks Jeb, will do.


Thanks for the steps. Worked like a charm :)


Wonderful guide, worked great for me. I was trying to set up a virtual instance on Amazon, first using their Amazon Linux AMI. Scapped two instances after the ruby on rails (dependencies, user rights, missing files, etc bla bla etc) was pretty broken and messy. Started a new virtual instance running Ubuntu instead and followed your steps. Much better. It's quite a lengthy process but in the end everything worked like a charm, thanks to you!


its saying rvm not found what to do

Execute: gpg --keyserver hkp://keys.gnupg.net --recv-keys D39DC0E3

After: source ~/.rvm/scripts/rvm


Great tutorial. Thank you very much.

As a side note, PostgreSQL offers repositories for recent Ubuntu versions. In the tutorial, you are using the Ubuntu Precise repository no matter which Ubuntu version one selects at the beginning oof tutorial. After some research I found out that PostregreSQL offers differents repositories depending on the Ubuntu version. That would be nice to add to the tutorial as well, just in case.

http://www.postgresql.org/d...

Thanks Jason! I think at the time they didn't have anything past precise. I'm glad they got Trusty and Utopic in there!

It's no big deal. I just tought it was worth mentioning. I'm learning RoR and this has been one of the best tutorials on how to setup your environment! Very easy. Thanks.


Rael Gugelmin Cunha

Other alternative is to use the RVM PPA (so, automatic updates): https://github.com/rvm/ubun...


Great article! Helped me a ton!

Just an update, the command below is deprecated:

echo "gem: --no-ri --no-rdoc" > ~/.gemrc

now it should be:

echo "gem: --no-document" > ~/.gemrc

Awesome, thanks for the heads up Isaac!


All the process went fine but for some reason I cant see the page on localhost:3000.
It´s giving me a "page not available" error.

Last terminal output is:

[email protected]:~/myapp$ rails server
=> Booting WEBrick
=> Rails 4.2.0 application starting in development on http://localhost:3000
=> Run `rails server -h` for more startup options
=> Ctrl-C to shutdown server
[2015-02-14 23:50:43] INFO WEBrick 1.3.1
[2015-02-14 23:50:43] INFO ruby 2.1.5 (2014-11-13) [x86_64-linux]
[2015-02-14 23:50:43] INFO WEBrick::HTTPServer#start: pid=18421 port=3000

I had the same problem, but only when trying to connect from another machine on my network. Tried from local and it works successfully. How to open up the server other hosts?

I found out I´m having the problem because my app is only accepting requests from local adapter. The work around I´m using now is to initialize the server with:
rails s - b 0.0.0.0

This will make webrick accept requests from any interface.
Check if this works for you.

Anyway, I´m still trying to discover how to make this the default behaviour for "rails server" command.

Also if your using any kind of virtual machine, make sure your local and VM ports are mapped.


up and running with Rails in less than 2 hours with your tutorial

1000 thank-yous....


thank you very much for saving my time :D


Question, for exporting the rbenv, what's the best way to handle both OSX and Ubuntu? Because I use dotfiles for my zsh and want to just have one file for my zshenv.

I personally store my configs in a Git repo, clone it on each machine, and symlink the configs.


Thanks very much! It didn't took even 20 minutes.


[SOLVED]
Question here.
Working on a Linux VM using VirtualBox.
I'm configuring Git and I added the key to my settings.

When I run:

ssh -T [email protected]

I get the following message:
[email protected]:~$ ssh -T [email protected]
Warning: Permanently added the RSA host key for IP address '192.30.252.130' to the list of known hosts.
Permission denied (publickey).

Any ideas on how to correct this? Also, can I continue the installation steps and fix this later?

Thanks!

SOLVED didn't copy my keys in the proper location


Thanks Chris! These are probably the clearest installation instructions I've read.

You're welcome! I'm glad I was able to help. :)

I agree. Totally new and the install process was very confusing when using www.railstutorial.org. Thanks for the clear instructions.


Вы забыли упомянуть "Terminal" -> Profile -> Parameters profile -> Heading and command -> Tick this To start a command as an envelope of an input.


Thanks!


i have a problem....please help me


When I type:

echo 'export PATH="$HOME/.rbenv/plugins/ruby-build/bin:$PATH"' >> ~/.bashrc
exec $SHELL I get an error message: line 124 unepected EOF while looking for matching '"' and line 125 syntax error unexpected end of file.


thx a lot my friend., work like charm without errors on ubuntu mate 14.10. cheers


Pierre-Yves Mathieu

Hi Chris,

Thank you very much for GoRails, I have been using it to setup all my
project. Lately, I switched to Docker and tought Your community would
probably be interested in a faster and more consistent way to set up a
development environement. Please let me know what you think of this
simple docker box I created.

https://github.com/pywebdes...

Install Docker and docker-compose, try google!

1 - run: . setup.sh
2 - wait..., say yes, wait...
then start the dev server:
3 - docker-compose up

look your new server is running on localhost:3000

there's even a box for developping rails gem

https://github.com/pywebdes...

I would be very happy to hear from you, If you have any concerns, please tell me!

This is awesome and I'm definitely going to check it out tomorrow!

Pierre-Yves Mathieu

Have you been able to use it? I would love your feedback to make it easier and better.


José D. Romero Vega

Thanks is a great TUTORIAL! but i have a problem

SOLVED

I do this:
~$ rails new myapp -d mysql

and after I get this in the last part (after create all the stuff)

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 10.4.2
Using i18n 0.7.0

Bundler::GemspecError: Could not read gem at /home/jodarove/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/cache/json-1.8.2.gem. It may be corrupted.
An error occurred while installing json (1.8.2), and Bundler cannot continue.
Make sure that `gem install json -v '1.8.2'` succeeds before bundling.
run bundle exec spring binstub --all
bundler: command not found: spring
Install missing gem executables with `bundle install`

so I read in another blog the solution ( https://taimoorchangaizpuci... )

I need do this to clear the cache
~$ rm -rf /home/jodarove/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/cache/
where says jodarove change for your user name
and after that I execute again: rails new myapp -d mysql


Great information, on installing ROR in ubuntu.

Ruby on Rails Development in India


i have followed all steps. whenever i run "rake db:create".
It will returns following error:

Couldn't create database for {"adapter"=>"postgresql", "pool"=>5, "username"=>"postgres", "password"=>nil, "database"=>"homeporte_development"}
WARNING: password file "/home/saravanan/.pgpass" has group or world access; permissions should be u=rw (0600) or less
FATAL: Peer authentication failed for user "postgres"


rbenv install 2.2.2
This part took my whole life and am still waiting for its completion buddy


Hi! Thanks for the instructions. But, i have a problem. I'm installing on Ubuntu 14.04 clear system, but, when I put the rbenv install 2.2.3 command, in terminal shows "Installing ruby-2.2.3..." and stays here more of 2 hours. Why is too slow the installation? It's good or something else is bad in the installation? I will appreciate the help

That seems awfully long. Usually it's about 15 minutes or so. Sometimes it can stall because of low ram. You might restart it and see if it finishes sooner. I'd also recommend trying the $10/mo server because it has a bit more power for compiling.

Something I mistake: I have installed Ubuntu on VMWare Virtual Machine. I had add more memory, on limit of 32bit O.S., but, i had the same problem. After that, i should install from source, and now it's working. I hope that will works finally.
Edit: Finally, works. But, only i need install from source. rbenv doesn't work.
Second edit: When you go to install rails 4.2.4, the command should be "sudo gem install rails -v 4.2.4", if not insert "sudo" access, will show an error with the install.


thx for Tut. Works great on deepin with rvm method!


Thank you very much! It's much simple and powerfull article!


Thank you! I think every new project I start begins with visit this page.

Whoo! Thank you thank you! :)



Thanks dude. This tutorial saved my day!


Hi, When i run

ssh -T [email protected],

I have the following message:

/etc/ssh/ssh_config: line 54: Bad configuration option: subsystem

Unsupported Match attribute group

/etc/ssh/ssh_config line 55: Bad Match condition

I try to gererate another Key and i receive the same message ?

I edit the ssh_config file and on line 54 and 55, i have :

Match group ftpaccess
ChrootDirectory %h

So what is the problem ?


Hi All,
i have install ruby from source
after instillation when i run "gem install bundler" it gives below 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

i check zlib but it is already installed
Please help to resolve this issue


o meu nao deu certo


Login or Create An Account to join the conversation.

Subscribe to the newsletter

Join 24,647+ 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.