Answer the question
In order to leave comments, you need to log in
Unable to deploy to DigitalOcean with Capistrano?
I do according to this instruction, but nothing comes out.
At first it says that I don't have a symbolic link to the **database.yml** file on the server
00:03 deploy:check:linked_files
ERROR linked file /home/demo/myproject/shared/config/database.yml does not exist on 188.226.140.17
production:
adapter: postgresql
encoding: utf8
database: myproject_db
username: postgres
password: 1234567890postgres
host: localhost
pool: 5
min_messages: WARNING
00:03 deploy:check:linked_files
ERROR linked file /home/demo/myproject/shared/config/secrets.yml does not exist on 188.226.140.17
touch /home/demo/myproject/shared/config/secrets.yml
# Be sure to restart your server when you modify this file.
# Your secret key is used for verifying the integrity of signed cookies.
# If you change this key, all old signed cookies will become invalid!
# Make sure the secret is at least 30 characters and all random,
# no regular words or you'll be exposed to dictionary attacks.
# You can use `rake secret` to generate a secure secret key.
# Make sure the secrets in this file are kept private
# if you're sharing your code publicly.
development:
secret_key_base: 1bbe19e548182eb986995dfef00bb0bb0ed410e25c8cdbf4e9f2e92290ce69f91b84c0fa76fdd50a18d49fea3906f57a0cba9398562fa39492a3472b680d8112
test:
secret_key_base: ed1b6e6ca1dfd6c1b939414ffd69fa92dadfeb61fe7e819ac7d08c515a169f8648ec29b21e89a34d8649585916b6485dfc74f9eded1ecf83a87e315500e1b64a
# Do not keep production secrets in the repository,
# instead read values from the environment.
production:
secret_key_base: <%= ENV["SECRET_KEY_BASE"] %>
00:03 deploy:check:linked_files
ERROR linked file /home/demo/myproject/shared/config/nginx.conf does not exist on 188.226.140.17
00:03 deploy:check:linked_files
ERROR linked file /home/demo/myproject/shared/config/nginx.conf does not exist on 188.226.140.17
upstream puma {
server unix:///home/demo/apps/myproject/shared/tmp/sockets/myproject-puma.sock;
}
server {
listen 80 default_server deferred;
# server_name example.com;
root /home/demo/apps/myproject/current/public;
access_log /home/demo/apps/myproject/current/log/nginx.access.log;
error_log /home/demo/apps/myproject/current/log/nginx.error.log info;
location ^~ /assets/ {
gzip_static on;
expires max;
add_header Cache-Control public;
}
try_files $uri/index.html $uri @puma;
location @puma {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_redirect off;
proxy_pass http://puma;
}
error_page 500 502 503 504 /500.html;
client_max_body_size 10M;
keepalive_timeout 10;
}
00:21 bundler:install
01 ~/.rvm/bin/rvm default do bundle install --gemfile /home/demo/myproject/releases/20170525093300/Gemfile --path /home/demo/myproject/shared/bundle --without development test --deployment --quiet
00:31 deploy:assets:precompile
01 ~/.rvm/bin/rvm default do bundle exec rake assets:precompile
01 rake aborted!
01 ActiveRecord::AdapterNotSpecified: 'production' database is not configured. Available: []
01 /home/demo/myproject/shared/bundle/ruby/2.3.0/gems/activerecord-4.2.6/lib/active_record/connection_adapters/connection_specification.rb:248:in `resolve_symbol_connection'
01 /home/demo/myproject/shared/bundle/ruby/2.3.0/gems/activerecord-4.2.6/lib/active_record/connection_adapters/connection_specification.rb:211:in `resolve_connection'
Answer the question
In order to leave comments, you need to log in
The proposed article has a method that loads the config to the database on the server from the local machine
I run this command on the server:
[email protected]:~$ ~/.rvm/bin/rvm default do bundle exec rake assets:precompile
Could not locate Gemfile or .bundle/ directory
But I have a Gemfile in both the Github repository and mine project!
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question