Scale up as you grow — whether you're running one virtual machine or ten thousand.

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.

This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
After I install postgresql from APT and try creating a new database user I get the following message:
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"?
Can somebody help with this? I had the same problem on my local machine though I don’t remember how I fixed it.
I run rails server --binding=server_public_IP when I try to access my server from a browser, nothing happens, but there is an error message in the console: Cannot render console from [IP_ADDRESS]! Allowed networks: 127.0.0… i add it as exceptions: class Application < Rails::Application config.web_console.whitelisted_ips = ‘10.0.2.2’ end
then there was an error: ERROR Errno::ECONNRESET: Connection reset by peer @ io_fillbuf - fd:12
I saw a comment there should be gem ‘thin’ as a server. I have installed it.
but after that there still nothing happens in the browser, but the console shows requests and that everything is working well. Have someone faced such a problem?
UPDATE
Somehow it does not work on the port 3000, but works on the port 80! =)
After
sudo apt-get install postgresql postgresql-contrib libpq-dev
I get the following error
The PostgreSQL server failed to start. Please check the log output:
2015-08-13 07:26:07 EDT FATAL: could not map anonymous shared memory: Cannot allocate memory
2015-08-13 07:26:07 EDT HINT: This error usually means that PostgreSQL's request for a shared memory segment exceeded available memory or swap space. To reduce the request size (currently 147783680 bytes), reduce PostgreSQL's shared memory usage, perhaps by reducing shared_buffers or max_connections.```
It really works, thank you for your helping and it works in centOS or fedora too. It isn’t just for ubuntu or debian.
After I install postgresql from APT and try creating a new database user I get the following message:
PG::ConnectionBad 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”?
To make it work, I have to run the following command manually every time.
sudo service postgresql start
Is there anyway to avoid entering the command every time ?
I am wondering if Rails can use PostgreSQL without setting the superuser password and if this password can and ought to be different from my Ubuntu account password: why in other words it should be important a superuser username matching my Ubuntu login name and on the other hand a different password? database.yml records exactly this kind of sensitive information and is pushed to a Git repository hosting web site and to Heroku.
Also, according to Heroku it is necessary “to export the DATABASE_URL environment variable for your app to connect to it when running locally”, with:
export DATABASE_URL=postgres:///$(whoami)
Is that really necessary?
If you have a firewall set up, make sure the port your server is running on is open.; otherwise, you won’t be able to connect.
If you’re using ufw and the default rails server port (3000), run the following command:
sudo service ufw allow 3000/tcp
You can check which ports are open with
sudo ufw status