Zainab Ajetunmobi

Joined

180 Experience
0 Lessons Completed
0 Questions Solved

Activity

Posted in Setup Windows 10 Discussion

hi codrin thank you very much for your extensive help the other day it has finally work

Posted in Setup Windows 10 Discussion

this is what i am having now thanks for your help so far
rake db:create
We could not find your database: postgres. Which can be found in the database configuration file located at config/database.yml.

To resolve this issue:

  • Did you create the database for this app, or delete it? You may need to create your database.
  • Has the database name changed? Check your database.yml config has the correct database name.

To create your database, run:

    bin/rails db:create

Couldn't create 'myapp_development' database. Please check your configuration.
rake aborted!
ActiveRecord::NoDatabaseError: We could not find your database: postgres. Which can be found in the database configuration file located at config/database.yml.

To resolve this issue:

  • Did you create the database for this app, or delete it? You may need to create your database.
  • Has the database name changed? Check your database.yml config has the correct database name.

To create your database, run:

    bin/rails db:create

Posted in Setup Windows 10 Discussion

hello who can help me
rake db:create
rake aborted!
ActiveRecord::DatabaseConfigurations::InvalidConfigurationError: '{ default => }' is not a valid configuration. Expected '' to be a URL string or a Hash.
/mnt/c/myapp/rakefile:6:in `'
(See full trace by running task with --trace)

Posted in Setup Windows 10 Discussion

is there anything i can do

Posted in Setup Windows 10 Discussion

i have added my password unfortunately this is what i keep having

rake db:create
rake aborted!
ActiveRecord::DatabaseConfigurations::InvalidConfigurationError: '{ default => }' is not a valid configuration. Expected '' to be a URL string or a Hash.
/mnt/c/myapp/rakefile:6:in `'
(See full trace by running task with --trace)

Posted in Setup Windows 10 Discussion

i have paste it

Posted in Setup Windows 10 Discussion

this is everything from my database
PostgreSQL. Versions 9.3 and up are supported.

Install the pg driver:

gem install pg

On macOS with Homebrew:

gem install pg -- --with-pg-config=/usr/local/bin/pg_config

On macOS with MacPorts:

gem install pg -- --with-pg-config=/opt/local/lib/postgresql84/bin/pg_config

On Windows:

gem install pg

Choose the win32 build.

Install PostgreSQL and put its /bin directory on your path.

Configure Using Gemfile

gem "pg"

c

default: &default
host: localhost
adapter: postgresql
encoding: unicode
username: postgres
password: password

# For details on connection pooling, see Rails configuration guide
# https://guides.rubyonrails.org/configuring.html#database-pooling
pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %>

development:
<<: *default
database: myapp_development

# The specified database role being used to connect to postgres.
# To create additional roles in postgres see $ createuser --help.
# When left blank, postgres will use the default role. This is
# the same name as the operating system user running Rails.
#username: myapp

# The password associated with the postgres role (username).
#password:

# Connect on a TCP socket. Omitted by default since the client uses a
# domain socket that doesn't need configuration. Windows does not have
# domain sockets, so uncomment these lines.
#host: localhost

# The TCP port the server listens on. Defaults to 5432.
# If your server runs on a different port number, change accordingly.
#port: 5432

# Schema search path. The server defaults to $user,public
#schema_search_path: myapp,sharedapp,public

# Minimum log levels, in increasing order:
# debug5, debug4, debug3, debug2, debug1,
# log, notice, warning, error, fatal, and panic
# Defaults to warning.
#min_messages: notice

Warning: The database defined as "test" will be erased and

re-generated from your development database when you run "rake".

Do not set this db to the same as development or production.

test:
<<: *default
database: myapp_test

As with config/credentials.yml, you never want to store sensitive information,

like your database password, in your source code. If your source code is

ever seen by anyone, they now have access to your database.

Instead, provide the password or a full connection URL as an environment

variable when you boot the app. For example:

DATABASE_URL="postgres://myuser:mypass@localhost/somedatabase"

If the connection URL is provided in the special DATABASE_URL environment

variable, Rails will automatically merge its configuration values on top of

the values provided in this file. Alternatively, you can specify a connection

URL environment variable explicitly:

production:

url: <%= ENV["MY_APP_DATABASE_URL"] %>

Read https://guides.rubyonrails.org/configuring.html#configuring-a-database

for a full overview on how database connection configuration can be specified.

production:
<<: *default
database: myapp_production
username: myapp
password: <%= ENV["MYAPP_DATABASE_PASSWORD"] %>

Posted in Setup Windows 10 Discussion

please help i have tried everything this is what i have
rake db:create
rake aborted!
ActiveRecord::DatabaseConfigurations::InvalidConfigurationError: '{ default => }' is not a valid configuration. Expected '' to be a URL string or a Hash.
/mnt/c/myapp/rakefile:6:in `'
(See full trace by running task with --trace)
edit please if someone reply my comment how do i know

Posted in Setup Windows 10 Discussion

is there anything i can do

Posted in Setup Windows 10 Discussion

hello codrin i am really sorry for disturbing you and thank you very much for your help this is what i have again
zainab@DESKTOP-6EV5CHP:/mnt/c/myapp$ rake db:create
Rails couldn't infer whether you are using multiple databases from your database.yml and can't generate the tasks for the non-primary databases. If you'd like to use this feature, please simplify your ERB.
rake aborted!
Cannot load database configuration:
YAML syntax error occurred while parsing /mnt/c/myapp/config/database.yml. Please note that YAML must be consistently indented using spaces. Tabs are not allowed. Error: (): mapping values are not allowed in this context at line 19 column 10

Caused by:
Psych::SyntaxError: (): mapping values are not allowed in this context at line 19 column 10

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

Posted in Setup Windows 10 Discussion

default: &default
adapter: postgresql
encoding: unicode
# For details on connection pooling, see Rails configuration guide
# https://guides.rubyonrails.org/configuring.html#database-pooling
is this what you are talking about
pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %>

Posted in Setup Windows 10 Discussion

is there anything else i need to do

Posted in Setup Windows 10 Discussion

yes it did

Posted in Setup Windows 10 Discussion

thank you very much for your reply but this is what i have
zainab@DESKTOP-6EV5CHP:/mnt/c/myapp$ rake db:create
We could not find your database: postgres. Which can be found in the database configuration file located at config/database.yml.

To resolve this issue:

  • Did you create the database for this app, or delete it? You may need to create your database.
  • Has the database name changed? Check your database.yml config has the correct database name.

To create your database, run:

    bin/rails db:create

Couldn't create 'myapp_development' database. Please check your configuration.
rake aborted!
ActiveRecord::NoDatabaseError: We could not find your database: postgres. Which can be found in the database configuration file located at config/database.yml.

To resolve this issue:

  • Did you create the database for this app, or delete it? You may need to create your database.
  • Has the database name changed? Check your database.yml config has the correct database name.

To create your database, run:

    bin/rails db:create

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)
zainab@DESKTOP-6EV5CHP:/mnt/c/myapp$
zainab@DESKTOP-6EV5CHP:/mnt/c/myapp$ rails server
=> Booting Puma
=> Rails 7.0.4.2 application starting in development
=> Run bin/rails server --help for more startup options
Puma starting in single mode...

  • Puma version: 5.6.5 (ruby 3.2.0-p0) ("Birdie's Version")
  • Min threads: 5
  • Max threads: 5
  • Environment: development
  • PID: 138
  • Listening on http://127.0.0.1:3000
  • Listening on http://[::1]:3000 Use Ctrl-C to stop C- Gracefully stopping, waiting for requests to finish === puma shutdown: 2023-02-05 08:21:21 +0000 ===
  • Goodbye! Exiting zainab@DESKTOP-6EV5CHP:/mnt/c/myapp$

Posted in Setup Windows 10 Discussion

please i have done everything this is what i have againzainab@DESKTOP-6EV5CHP:/mnt/c/Windows/system32/myapp$ rake db:create
We could not find your database: postgres. Which can be found in the database configuration file located at config/database.yml.

To resolve this issue:

  • Did you create the database for this app, or delete it? You may need to create your database.
  • Has the database name changed? Check your database.yml config has the correct database name.

To create your database, run:

    bin/rails db:create

Couldn't create 'myapp_development' database. Please check your configuration.
rake aborted!
ActiveRecord::NoDatabaseError: We could not find your database: postgres. Which can be found in the database configuration file located at config/database.yml.

To resolve this issue:

  • Did you create the database for this app, or delete it? You may need to create your database.
  • Has the database name changed? Check your database.yml config has the correct database name.

To create your database, run:

    bin/rails db:create

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)

Posted in Setup Windows 10 Discussion

hi codrin thanks for your reply but i don't seem to understand please can you elaborate it a bit

Posted in Setup Windows 10 Discussion

please can anyone help me
zainab@DESKTOP-6EV5CHP:/mnt/c$ rails new myapp -d postgresql
create
create README.md
create Rakefile
create .ruby-versionwill be installed:
create config.ru
create .gitignorealled, 0 to remove and 171 not upgraded.
create .gitattributeses.
create Gemfile 1001 kB of additional disk space will be used.
run git init from "."y
error: chmod on /mnt/c/myapp/.git/config.lock failed: Operation not permitted12.13-0ubuntu0.20.04.1 [118 kB]
fatal: could not set 'core.filemode' to 'false'dates/main amd64 libpq-dev amd64 12.13-0ubuntu0.20.04.1 [137 kB]
fatal: not a git repository (or any parent up to mount point /mnt)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
create app
create app/assets/config/manifest.js
create app/assets/stylesheets/application.css
create app/channels/application_cable/channel.rb
create app/channels/application_cable/connection.rb
create app/controllers/application_controller.rb
create app/helpers/application_helper.rb
create app/jobs/application_job.rb
create app/mailers/application_mailer.rb
create app/models/application_record.rb
create app/views/layouts/application.html.erb
create app/views/layouts/mailer.html.erb
create app/views/layouts/mailer.text.erb
create app/assets/images
create app/assets/images/.keep
create app/controllers/concerns/.keep
create app/models/concerns/.keep
create bin
create bin/rails
create bin/rake
create bin/setup
/home/zainab/.rbenv/versions/3.2.0/lib/ruby/3.2.0/fileutils.rb:2222:in chmod': Operation not permitted @ apply2files - /mnt/c/myapp/bin (Errno::EPERM)
from /home/zainab/.rbenv/versions/3.2.0/lib/ruby/3.2.0/fileutils.rb:2222:in
chmod'
from /home/zainab/.rbenv/versions/3.2.0/lib/ruby/3.2.0/fileutils.rb:1836:in block (2 levels) in chmod_R'
from /home/zainab/.rbenv/versions/3.2.0/lib/ruby/3.2.0/fileutils.rb:2369:in
preorder_traverse'
from /home/zainab/.rbenv/versions/3.2.0/lib/ruby/3.2.0/fileutils.rb:1834:in block in chmod_R'
from /home/zainab/.rbenv/versions/3.2.0/lib/ruby/3.2.0/fileutils.rb:1833:in
each'
from /home/zainab/.rbenv/versions/3.2.0/lib/ruby/3.2.0/fileutils.rb:1833:in chmod_R'
from /home/zainab/.rbenv/versions/3.2.0/lib/ruby/gems/3.2.0/gems/thor-1.2.1/lib/thor/actions/file_manipulation.rb:154:in
chmod'
from /home/zainab/.rbenv/versions/3.2.0/lib/ruby/gems/3.2.0/gems/railties-7.0.4/lib/rails/generators/rails/app/app_generator.rb:19:in chmod'
from /home/zainab/.rbenv/versions/3.2.0/lib/ruby/gems/3.2.0/gems/railties-7.0.4/lib/rails/generators/rails/app/app_generator.rb:95:in
bin'
from /home/zainab/.rbenv/versions/3.2.0/lib/ruby/gems/3.2.0/gems/railties-7.0.4/lib/rails/generators/app_base.rb:134:in public_send'
from /home/zainab/.rbenv/versions/3.2.0/lib/ruby/gems/3.2.0/gems/railties-7.0.4/lib/rails/generators/app_base.rb:134:in
build'
from /home/zainab/.rbenv/versions/3.2.0/lib/ruby/gems/3.2.0/gems/railties-7.0.4/lib/rails/generators/rails/app/app_generator.rb:336:in create_bin_files'
from /home/zainab/.rbenv/versions/3.2.0/lib/ruby/gems/3.2.0/gems/thor-1.2.1/lib/thor/command.rb:27:in
run'
from /home/zainab/.rbenv/versions/3.2.0/lib/ruby/gems/3.2.0/gems/thor-1.2.1/lib/thor/invocation.rb:127:in invoke_command'
from /home/zainab/.rbenv/versions/3.2.0/lib/ruby/gems/3.2.0/gems/thor-1.2.1/lib/thor/invocation.rb:134:in
block in invoke_all'
from /home/zainab/.rbenv/versions/3.2.0/lib/ruby/gems/3.2.0/gems/thor-1.2.1/lib/thor/invocation.rb:134:in each'
from /home/zainab/.rbenv/versions/3.2.0/lib/ruby/gems/3.2.0/gems/thor-1.2.1/lib/thor/invocation.rb:134:in
map'
from /home/zainab/.rbenv/versions/3.2.0/lib/ruby/gems/3.2.0/gems/thor-1.2.1/lib/thor/invocation.rb:134:in invoke_all'
from /home/zainab/.rbenv/versions/3.2.0/lib/ruby/gems/3.2.0/gems/thor-1.2.1/lib/thor/group.rb:232:in
dispatch'
from /home/zainab/.rbenv/versions/3.2.0/lib/ruby/gems/3.2.0/gems/thor-1.2.1/lib/thor/base.rb:485:in start'
from /home/zainab/.rbenv/versions/3.2.0/lib/ruby/gems/3.2.0/gems/railties-7.0.4/lib/rails/commands/application/application_command.rb:26:in
perform'
from /home/zainab/.rbenv/versions/3.2.0/lib/ruby/gems/3.2.0/gems/thor-1.2.1/lib/thor/command.rb:27:in run'
from /home/zainab/.rbenv/versions/3.2.0/lib/ruby/gems/3.2.0/gems/thor-1.2.1/lib/thor/invocation.rb:127:in
invoke_command'
from /home/zainab/.rbenv/versions/3.2.0/lib/ruby/gems/3.2.0/gems/thor-1.2.1/lib/thor.rb:392:in dispatch'
from /home/zainab/.rbenv/versions/3.2.0/lib/ruby/gems/3.2.0/gems/railties-7.0.4/lib/rails/command/base.rb:87:in
perform'
from /home/zainab/.rbenv/versions/3.2.0/lib/ruby/gems/3.2.0/gems/railties-7.0.4/lib/rails/command.rb:48:in invoke'
from /home/zainab/.rbenv/versions/3.2.0/lib/ruby/gems/3.2.0/gems/railties-7.0.4/lib/rails/cli.rb:18:in
'
from internal:/home/zainab/.rbenv/versions/3.2.0/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb:85:in require'
from <internal:/home/zainab/.rbenv/versions/3.2.0/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:85:in
require'
from /home/zainab/.rbenv/versions/3.2.0/lib/ruby/gems/3.2.0/gems/railties-7.0.4/exe/rails:10:in <top (required)>'
from /home/zainab/.rbenv/versions/3.2.0/bin/rails:25:in
load'
from /home/zainab/.rbenv/versions/3.2.0/bin/rails:25:in <main>'
zainab@DESKTOP-6EV5CHP:/mnt/c$ cd myapp
zainab@DESKTOP-6EV5CHP:/mnt/c/myapp$ rake db:create
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 <top (required)>'
(See full trace by running task with --trace)
zainab@DESKTOP-6EV5CHP:/mnt/c/myapp$
zainab@DESKTOP-6EV5CHP:/mnt/c/myapp$ rails server
bin/rails:3:in
require_relative': cannot load such file -- /mnt/c/myapp/config/boot (LoadError)
from bin/rails:3:in <main>'
zainab@DESKTOP-6EV5CHP:/mnt/c/myapp$ rake db:create
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)
zainab@DESKTOP-6EV5CHP:/mnt/c/myapp$ rails new myapp -d postgresql

Posted in Setup Windows 10 Discussion

hello guys please i need your help

zainab@DESKTOP-6EV5CHP:/mnt/c/myapp$ rake db:create
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)
zainab@DESKTOP-6EV5CHP:/mnt/c/myapp$
zainab@DESKTOP-6EV5CHP:/mnt/c/myapp$ rails server
bin/rails:3:in require_relative': cannot load such file -- /mnt/c/myapp/config/boot (LoadError)
from bin/rails:3:in

'
zainab@DESKTOP-6EV5CHP:/mnt/c/myapp$ rake db:create
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)
zainab@DESKTOP-6EV5CHP:/mnt/c/myapp$
this is the problem i am facing while trying to create a rake db