Francisco Morales Sánchez

Joined

1,270 Experience
12 Lessons Completed
0 Questions Solved

Activity

Posted in error in rake db:create command

Hi Chris

Thanks for your comment.
I've run posgresql service and in other console of ubuntu I run command rake db:create, and I get the same message.
Maybe I neccessary need to create the database first such as in laravel would do? or I'm in the wrong route?.
I only need solve this issue to start with RoR.

Here the consoles
(Postgresql service)
This message is shown once a day. To disable it please create the
/home/ubuntu/.hushlogin file.
ubuntu@LAPTOP-MIO8EIGO:~$ sudo service postgresql start
[sudo] password for ubuntu:

  • Starting PostgreSQL 12 database server [ OK ] ubuntu@LAPTOP-MIO8EIGO:~$ sudo -u postgres psql psql (12.8 (Ubuntu 12.8-0ubuntu0.20.04.1)) Type "help" for help.

postgres=#

RoR app
ubuntu@LAPTOP-MIO8EIGO:/mnt/c/code/myapp$ rake db:create
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"?
Couldn't create 'myapp_development' database. Please check your configuration.
rake aborted!
ActiveRecord::NoDatabaseError: 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"?

Caused by:
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"?

Tasks: TOP => db:create
(See full trace by running task with --trace)
ubuntu@LAPTOP-MIO8EIGO:/mnt/c/code/myapp$

thank you

Posted in error in rake db:create command

Hi everyone

I'm getting this error when I try to create db (I've guided me with https://gorails.com/setup/windows/10). Using WSL.
All step go well, till this command: rake db:create

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"?
Couldn't create 'myapp_development' database. Please check your configuration.
rake aborted!
ActiveRecord::NoDatabaseError: 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"?


Caused by:
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"?

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

Thanks for your help

Posted in Setup Windows 10 Discussion

Hi
after rake db:create I got and error
rake aborted!
LoadError: cannot load such file -- /mnt/c/myapp/config/application
/mnt/c/myapp/rakefile:4:in require_relative'
/mnt/c/myapp/rakefile:4:in
'
(See full trace by running task with --trace)

logo Created with Sketch.

Ruby on Rails tutorials, guides, and screencasts for web developers learning Ruby, Rails, Javascript, Turbolinks, Stimulus.js, Vue.js, and more. Icons by Icons8

© 2021 GoRails, LLC. All rights reserved.