All threads / Deploy with problems
Ask A Question

Notifications

You’re not receiving notifications from this thread.

Deploy with problems

Cristian asked in Rails

hello everyone I have installed a ruby ​​and rails application in vps of dreamhost with many problems and I have solved a lot but apparently this is too big or very complex. Just starting with this environment I hope you can guide me.
Thanks!

Error_
rake db:migrate
rake aborted!
ActiveRecord::AdapterNotSpecified: 'development' database is not configured. Available: ["production"]
/home/rapanuicargo/.rvm/gems/ruby-2.2.1/gems/activerecord-4.2.1/lib/active_record/connection_adapters/connection_specification.rb:248:in `resolve_symbol_connection'
/home/rapanuicargo/.rvm/gems/ruby-2.2.1/gems/activerecord-4.2.1/lib/active_record/connection_adapters/connection_specification.rb:211:in `resolve_connection'
/home/rapanuicargo/.rvm/gems/ruby-2.2.1/gems/activerecord-4.2.1/lib/active_record/connection_adapters/connection_specification.rb:139:in `resolve'
/home/rapanuicargo/.rvm/gems/ruby-2.2.1/gems/activerecord-4.2.1/lib/active_record/connection_adapters/connection_specification.rb:169:in `spec'
/home/rapanuicargo/.rvm/gems/ruby-2.2.1/gems/activerecord-4.2.1/lib/active_record/connection_handling.rb:50:in `establish_connection'
/home/rapanuicargo/.rvm/gems/ruby-2.2.1/gems/activerecord-4.2.1/lib/active_record/railtie.rb:120:in `block (2 levels) in <class:Railtie>'
/home/rapanuicargo/.rvm/gems/ruby-2.2.1/gems/activesupport-4.2.1/lib/active_support/lazy_load_hooks.rb:38:in `instance_eval'
/home/rapanuicargo/.rvm/gems/ruby-2.2.1/gems/activesupport-4.2.1/lib/active_support/lazy_load_hooks.rb:38:in `execute_hook'
/home/rapanuicargo/.rvm/gems/ruby-2.2.1/gems/activesupport-4.2.1/lib/active_support/lazy_load_hooks.rb:28:in `block in on_load'
/home/rapanuicargo/.rvm/gems/ruby-2.2.1/gems/activesupport-4.2.1/lib/active_support/lazy_load_hooks.rb:27:in `each'
/home/rapanuicargo/.rvm/gems/ruby-2.2.1/gems/activesupport-4.2.1/lib/active_support/lazy_load_hooks.rb:27:in `on_load'
/home/rapanuicargo/.rvm/gems/ruby-2.2.1/gems/activerecord-4.2.1/lib/active_record/railtie.rb:116:in `block in <class:Railtie>'
/home/rapanuicargo/.rvm/gems/ruby-2.2.1/gems/railties-4.2.1/lib/rails/initializable.rb:30:in `instance_exec'
/home/rapanuicargo/.rvm/gems/ruby-2.2.1/gems/railties-4.2.1/lib/rails/initializable.rb:30:in `run'
/home/rapanuicargo/.rvm/gems/ruby-2.2.1/gems/railties-4.2.1/lib/rails/initializable.rb:55:in `block in run_initializers'
/home/rapanuicargo/.rvm/gems/ruby-2.2.1/gems/railties-4.2.1/lib/rails/initializable.rb:54:in `run_initializers'
/home/rapanuicargo/.rvm/gems/ruby-2.2.1/gems/railties-4.2.1/lib/rails/application.rb:352:in `initialize!'
/home/rapanuicargo/test.arriaza.vip/rapacargo/config/environment.rb:5:in `<top (required)>'
/home/rapanuicargo/.rvm/gems/ruby-2.2.1/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:274:in `require'
/home/rapanuicargo/.rvm/gems/ruby-2.2.1/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:274:in `block in require'
/home/rapanuicargo/.rvm/gems/ruby-2.2.1/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:240:in `load_dependency'
/home/rapanuicargo/.rvm/gems/ruby-2.2.1/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:274:in `require'
/home/rapanuicargo/.rvm/gems/ruby-2.2.1/gems/railties-4.2.1/lib/rails/application.rb:328:in `require_environment!'
/home/rapanuicargo/.rvm/gems/ruby-2.2.1/gems/railties-4.2.1/lib/rails/application.rb:457:in `block in run_tasks_blocks'
/home/rapanuicargo/.rvm/gems/ruby-2.2.1/gems/rake-12.0.0/exe/rake:27:in `<top (required)>'
Tasks: TOP => db:migrate => environment
(See full trace by running task with --trace)
------------------------------------------------------------------------------------------------------------------------------------------------
Database

production:
  adapter: mysql2
  encoding: utf8
  database: production_rapacargo
  username: xxxxxxxx
  password: xxxxxx
  port: 3306
  pool: 5
  host: mysql.xxxxx.com

development:
  adapter: mysql2
  encoding: utf8
  database: development_rapacargo
  username: xxxxxxxx
  password: xxxxxxx
  port: 3306
  pool: 5
  host: mysql.xxxxxx.com

test:
  adapter: mysql2
  encoding: utf8
  database: xxxxxxx
  username: xxxxxx
  password: xxxxxx
  port: 3306
  pool: 5
  host: xxxxxxxx

Hey Cristian,

On Dreamhost, you'll need to figure out how to run with RAILS_ENV=production so it will use the production entry in config/database.yml and so on.

If it's a VPS server you're using on Dreamhost, try this guide to get you setup: https://gorails.com/deploy/ubuntu/18.04

Join the discussion

Want to stay up-to-date with Ruby on Rails?

Join 70,078+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.

    logo Created with Sketch.

    Screencast tutorials to help you learn Ruby on Rails, Javascript, Hotwire, Turbo, Stimulus.js, PostgreSQL, MySQL, Ubuntu, and more. Icons by Icons8

    © 2023 GoRails, LLC. All rights reserved.