Skip to content

Allow 3-level DB configs to group connections by environment#28095

Merged
matthewd merged 1 commit intorails:masterfrom
matthewd:nested-database-config
Feb 21, 2017
Merged

Allow 3-level DB configs to group connections by environment#28095
matthewd merged 1 commit intorails:masterfrom
matthewd:nested-database-config

Conversation

@matthewd
Copy link
Member

Cut-down take on the key part of #27611

Still to do:

  • Teach the rake tasks that work with all the configs how to navigate this
  • Relocate the Rails.env call, which has long been inside AR, but really shouldn't be
  • Add more 3-level tests to the resolver

This gets us a shippable implementation of the headline feature for #27611, though:

default: &default
  adapter: sqlite3
  pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %>
  timeout: 5000

development:
  primary:
    <<: *default
    database: db/development.sqlite3
  readonly:
    <<: *default
    database: db/readonly.sqlite3

@kirs
Copy link
Member

kirs commented Feb 21, 2017

Really like the simplification 👍

@matthewd matthewd force-pushed the nested-database-config branch from 606f41c to b744d5f Compare February 21, 2017 17:04
[Arthur Nogueira Neves & Matthew Draper]
@matthewd matthewd force-pushed the nested-database-config branch from b744d5f to 0a4f600 Compare February 21, 2017 18:42
@yahonda
Copy link
Member

yahonda commented Feb 21, 2017

I'm interested in this feature and have a basic question.

Are primary: and read-only: connections required to have the same set of database tables associated with ActiveRecord models?

I'm thinking about if it enables to create two connections, one is primary: for main Rails applications and another one is (let's say) reporting: to get some data for reporting stored in another database.

Background: Oracle enhanced adapter is supporting database links to connect to another database via a database link, but database link is hard to support such as getting correct metadata and performance over a database link.
if this feature can support multiple databases, we may be able to migrate database link support to this feature.

Thanks.

@matthewd
Copy link
Member Author

Are primary: and read-only: connections required to have the same set of database tables associated with ActiveRecord models?

No. In itself, this feature does nothing more than allow establish_connection :primary / establish_connection :readonly to work, and to have their connected DB vary based on the environment.

That makes it a bit easier to combine with @arthurnn's previous work in and around #24844, to potentially teach models to use more than one connection. (Hence the primary/readonly example names here.)

But on its own, this is just about allowing people to move from:

development:
  <<: *default
  database: db/development.sqlite3
development_another:
  <<: *default
  database: db/dev-another.sqlite3
production:
  <<: *default
  database: db/production.sqlite3
production_another:
  <<: *default
  database: db/prod-another.sqlite3

to:

development:
  primary:
    <<: *default
    database: db/development.sqlite3
  another:
    <<: *default
    database: db/dev-another.sqlite3
production:
  primary:
    <<: *default
    database: db/production.sqlite3
  another:
    <<: *default
    database: db/prod-another.sqlite3

and most significantly, from establish_connection :"#{Rails.env}_another" to establish_connection :another.

How those additional connection details are used, is still up to the application.

@yahonda
Copy link
Member

yahonda commented Feb 21, 2017

Thanks for the explanation. I think I understand how it will work. Hope it gets merged to Rails 5.1

Copy link
Contributor

@kaspth kaspth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Neat 👍

@matthewd matthewd merged commit 8de6807 into rails:master Feb 21, 2017
@deepj
Copy link
Contributor

deepj commented Feb 27, 2017

I'm not sure if this works, or what I make wrong here and I understand the behaviour of this feature. I have the following in database.yml

development:
  primary:
    adapter: oracle_enhanced
    host: oracle_db
    port: 1521
    database: app_development
    username: normal_user
    password: password
  migration:
    adapter: oracle_enhanced
    host: oracle_db
    port: 1521
    database: app_development
    username: migration_user
    password: password

We need to have a special user with privileges to create schema (don't ask why). So I'd like to rewrite db:migrate task which uses the migration connection. This is pretty easy.

But if I run the application I got:

ActiveRecord::AdapterNotSpecified ('development' database is not configured. Available: ["default", "test", "staging", "primary", "migration"]):

activerecord (5.1.0.beta1) lib/active_record/connection_adapters/connection_specification.rb:246:in `resolve_symbol_connection'
activerecord (5.1.0.beta1) lib/active_record/connection_adapters/connection_specification.rb:227:in `resolve_connection'
activerecord (5.1.0.beta1) lib/active_record/connection_adapters/connection_specification.rb:141:in `resolve'
activerecord (5.1.0.beta1) lib/active_record/connection_handling.rb:55:in `establish_connection'
activerecord (5.1.0.beta1) lib/active_record/railtie.rb:124:in `block (2 levels) in <class:Railtie>'
activesupport (5.1.0.beta1) lib/active_support/lazy_load_hooks.rb:45:in `instance_eval'
activesupport (5.1.0.beta1) lib/active_support/lazy_load_hooks.rb:45:in `execute_hook'
activesupport (5.1.0.beta1) lib/active_support/lazy_load_hooks.rb:52:in `block in run_load_hooks'
activesupport (5.1.0.beta1) lib/active_support/lazy_load_hooks.rb:51:in `each'
activesupport (5.1.0.beta1) lib/active_support/lazy_load_hooks.rb:51:in `run_load_hooks'
activerecord (5.1.0.beta1) lib/active_record/base.rb:326:in `<module:ActiveRecord>'
activerecord (5.1.0.beta1) lib/active_record/base.rb:25:in `<top (required)>'
activesupport (5.1.0.beta1) lib/active_support/dependencies.rb:292:in `require'
activesupport (5.1.0.beta1) lib/active_support/dependencies.rb:292:in `block in require'
activesupport (5.1.0.beta1) lib/active_support/dependencies.rb:258:in `load_dependency'
activesupport (5.1.0.beta1) lib/active_support/dependencies.rb:292:in `require'
activerecord (5.1.0.beta1) lib/active_record/migration.rb:564:in `connection'
activerecord (5.1.0.beta1) lib/active_record/migration.rb:551:in `call'
actionpack (5.1.0.beta1) lib/action_dispatch/middleware/callbacks.rb:26:in `block in call'
activesupport (5.1.0.beta1) lib/active_support/callbacks.rb:97:in `run_callbacks'
actionpack (5.1.0.beta1) lib/action_dispatch/middleware/callbacks.rb:24:in `call'
actionpack (5.1.0.beta1) lib/action_dispatch/middleware/executor.rb:12:in `call'
actionpack (5.1.0.beta1) lib/action_dispatch/middleware/debug_exceptions.rb:59:in `call'
web-console (3.4.0) lib/web_console/middleware.rb:135:in `call_app'
web-console (3.4.0) lib/web_console/middleware.rb:28:in `block in call'
web-console (3.4.0) lib/web_console/middleware.rb:18:in `catch'
web-console (3.4.0) lib/web_console/middleware.rb:18:in `call'
actionpack (5.1.0.beta1) lib/action_dispatch/middleware/show_exceptions.rb:31:in `call'
railties (5.1.0.beta1) lib/rails/rack/logger.rb:36:in `call_app'
railties (5.1.0.beta1) lib/rails/rack/logger.rb:24:in `block in call'
activesupport (5.1.0.beta1) lib/active_support/tagged_logging.rb:69:in `block in tagged'
activesupport (5.1.0.beta1) lib/active_support/tagged_logging.rb:26:in `tagged'
activesupport (5.1.0.beta1) lib/active_support/tagged_logging.rb:69:in `tagged'
railties (5.1.0.beta1) lib/rails/rack/logger.rb:24:in `call'
sprockets-rails (3.2.0) lib/sprockets/rails/quiet_assets.rb:13:in `call'
actionpack (5.1.0.beta1) lib/action_dispatch/middleware/remote_ip.rb:79:in `call'
actionpack (5.1.0.beta1) lib/action_dispatch/middleware/request_id.rb:25:in `call'
rack (2.0.1) lib/rack/method_override.rb:22:in `call'
rack (2.0.1) lib/rack/runtime.rb:22:in `call'
activesupport (5.1.0.beta1) lib/active_support/cache/strategy/local_cache_middleware.rb:27:in `call'
actionpack (5.1.0.beta1) lib/action_dispatch/middleware/executor.rb:12:in `call'
actionpack (5.1.0.beta1) lib/action_dispatch/middleware/static.rb:125:in `call'
rack (2.0.1) lib/rack/sendfile.rb:111:in `call'
railties (5.1.0.beta1) lib/rails/engine.rb:522:in `call'
rack (2.0.1) lib/rack/handler/webrick.rb:86:in `service'

I thought the primary is used as a default connection for the rest.

@yahonda
Copy link
Member

yahonda commented Feb 28, 2017

@deepj I am interested in this feature but not familiar with it yet, if you reproduce with this only with Oracle enhanced adapter 1.8.0.beta1 and Rails 5.1.0.beta1, would you open an issue https://github.com/rsim/oracle-enhanced

@kenn
Copy link
Contributor

kenn commented Apr 11, 2017

Does this mean users are expected to be aware that there are reserved keywords at the 2nd level, including obscure ones like socket or collation, or even adapter specific configs like reaping_frequency? How should those conflicts be handled?

@deepj
Copy link
Contributor

deepj commented Apr 13, 2017

@yahonda I'm sorry for the late answer. In the end the problem was somewhere else. Everything else works like a charm.

rafaelfranca added a commit that referenced this pull request Apr 27, 2017
This reverts commit 92278a5.

This seems to conflict conceptually with #28095 and it is a new feature
after the RC.
@mjfaga
Copy link

mjfaga commented May 31, 2017

@deepj What was the issue you were having... I'm running into the same thing. My database.yml looks like:

defaults: &defaults
  adapter: postgresql
  encoding: utf8
  reconnect: false
  host: localhost
  pool: 16

development:
  primary:
    <<: *defaults
    database: first_database
  read_replica:
    <<: *defaults
    database: second_database

test:
  primary:
    <<: *defaults
    database: first_database_test
  read_replica:
    <<: *defaults
    database: second_database_test

Error:

/Users/mfaga/.rvm/gems/ruby-2.4.0@sem-tools/gems/activerecord-5.1.1/lib/active_record/connection_adapters/connection_specification.rb:248:in `resolve_symbol_connection': 'development' database is not configured. Available: ["defaults", "primary", "read_replica"] (ActiveRecord::AdapterNotSpecified)
	from /Users/mfaga/.rvm/gems/ruby-2.4.0@sem-tools/gems/activerecord-5.1.1/lib/active_record/connection_adapters/connection_specification.rb:229:in `resolve_connection'
	from /Users/mfaga/.rvm/gems/ruby-2.4.0@sem-tools/gems/activerecord-5.1.1/lib/active_record/connection_adapters/connection_specification.rb:142:in `resolve'
	from /Users/mfaga/.rvm/gems/ruby-2.4.0@sem-tools/gems/activerecord-5.1.1/lib/active_record/connection_handling.rb:55:in `establish_connection'
	from /Users/mfaga/.rvm/gems/ruby-2.4.0@sem-tools/gems/activerecord-5.1.1/lib/active_record/railtie.rb:124:in `block (2 levels) in <class:Railtie>'
	from /Users/mfaga/.rvm/gems/ruby-2.4.0@sem-tools/gems/activesupport-5.1.1/lib/active_support/lazy_load_hooks.rb:45:in `instance_eval'
	from /Users/mfaga/.rvm/gems/ruby-2.4.0@sem-tools/gems/activesupport-5.1.1/lib/active_support/lazy_load_hooks.rb:45:in `execute_hook'
	from /Users/mfaga/.rvm/gems/ruby-2.4.0@sem-tools/gems/activesupport-5.1.1/lib/active_support/lazy_load_hooks.rb:52:in `block in run_load_hooks'
	from /Users/mfaga/.rvm/gems/ruby-2.4.0@sem-tools/gems/activesupport-5.1.1/lib/active_support/lazy_load_hooks.rb:51:in `each'
	from /Users/mfaga/.rvm/gems/ruby-2.4.0@sem-tools/gems/activesupport-5.1.1/lib/active_support/lazy_load_hooks.rb:51:in `run_load_hooks'
	from /Users/mfaga/.rvm/gems/ruby-2.4.0@sem-tools/gems/activerecord-5.1.1/lib/active_record/base.rb:326:in `<module:ActiveRecord>'
	from /Users/mfaga/.rvm/gems/ruby-2.4.0@sem-tools/gems/activerecord-5.1.1/lib/active_record/base.rb:25:in `<top (required)>'
	from /Users/mfaga/.rvm/gems/ruby-2.4.0@sem-tools/gems/activesupport-5.1.1/lib/active_support/dependencies.rb:292:in `require'
	from /Users/mfaga/.rvm/gems/ruby-2.4.0@sem-tools/gems/activesupport-5.1.1/lib/active_support/dependencies.rb:292:in `block in require'
	from /Users/mfaga/.rvm/gems/ruby-2.4.0@sem-tools/gems/activesupport-5.1.1/lib/active_support/dependencies.rb:256:in `block in load_dependency'
	from /Users/mfaga/.rvm/gems/ruby-2.4.0@sem-tools/gems/activesupport-5.1.1/lib/active_support/dependencies.rb:661:in `new_constants_in'
	from /Users/mfaga/.rvm/gems/ruby-2.4.0@sem-tools/gems/activesupport-5.1.1/lib/active_support/dependencies.rb:256:in `load_dependency'
	from /Users/mfaga/.rvm/gems/ruby-2.4.0@sem-tools/gems/activesupport-5.1.1/lib/active_support/dependencies.rb:292:in `require'
	from /Users/mfaga/.rvm/gems/ruby-2.4.0@sem-tools/gems/paper_trail-7.0.2/lib/paper_trail/frameworks/active_record/models/paper_trail/version.rb:8:in `<module:PaperTrail>'
	from /Users/mfaga/.rvm/gems/ruby-2.4.0@sem-tools/gems/paper_trail-7.0.2/lib/paper_trail/frameworks/active_record/models/paper_trail/version.rb:3:in `<top (required)>'
	from /Users/mfaga/.rvm/gems/ruby-2.4.0@sem-tools/gems/activesupport-5.1.1/lib/active_support/dependencies.rb:476:in `load'
	from /Users/mfaga/.rvm/gems/ruby-2.4.0@sem-tools/gems/activesupport-5.1.1/lib/active_support/dependencies.rb:476:in `block in load_file'
	from /Users/mfaga/.rvm/gems/ruby-2.4.0@sem-tools/gems/activesupport-5.1.1/lib/active_support/dependencies.rb:661:in `new_constants_in'
	from /Users/mfaga/.rvm/gems/ruby-2.4.0@sem-tools/gems/activesupport-5.1.1/lib/active_support/dependencies.rb:475:in `load_file'
	from /Users/mfaga/.rvm/gems/ruby-2.4.0@sem-tools/gems/activesupport-5.1.1/lib/active_support/dependencies.rb:374:in `block in require_or_load'
	from /Users/mfaga/.rvm/gems/ruby-2.4.0@sem-tools/gems/activesupport-5.1.1/lib/active_support/dependencies.rb:36:in `block in load_interlock'
	from /Users/mfaga/.rvm/gems/ruby-2.4.0@sem-tools/gems/activesupport-5.1.1/lib/active_support/dependencies/interlock.rb:12:in `block in loading'
	from /Users/mfaga/.rvm/gems/ruby-2.4.0@sem-tools/gems/activesupport-5.1.1/lib/active_support/concurrency/share_lock.rb:149:in `exclusive'
	from /Users/mfaga/.rvm/gems/ruby-2.4.0@sem-tools/gems/activesupport-5.1.1/lib/active_support/dependencies/interlock.rb:11:in `loading'
	from /Users/mfaga/.rvm/gems/ruby-2.4.0@sem-tools/gems/activesupport-5.1.1/lib/active_support/dependencies.rb:36:in `load_interlock'
	from /Users/mfaga/.rvm/gems/ruby-2.4.0@sem-tools/gems/activesupport-5.1.1/lib/active_support/dependencies.rb:357:in `require_or_load'
	from /Users/mfaga/.rvm/gems/ruby-2.4.0@sem-tools/gems/activesupport-5.1.1/lib/active_support/dependencies.rb:335:in `depend_on'
	from /Users/mfaga/.rvm/gems/ruby-2.4.0@sem-tools/gems/activesupport-5.1.1/lib/active_support/dependencies.rb:251:in `require_dependency'
	from /Users/mfaga/.rvm/gems/ruby-2.4.0@sem-tools/gems/railties-5.1.1/lib/rails/engine.rb:476:in `block (2 levels) in eager_load!'
	from /Users/mfaga/.rvm/gems/ruby-2.4.0@sem-tools/gems/railties-5.1.1/lib/rails/engine.rb:475:in `each'
	from /Users/mfaga/.rvm/gems/ruby-2.4.0@sem-tools/gems/railties-5.1.1/lib/rails/engine.rb:475:in `block in eager_load!'
	from /Users/mfaga/.rvm/gems/ruby-2.4.0@sem-tools/gems/railties-5.1.1/lib/rails/engine.rb:473:in `each'
	from /Users/mfaga/.rvm/gems/ruby-2.4.0@sem-tools/gems/railties-5.1.1/lib/rails/engine.rb:473:in `eager_load!'
	from /Users/mfaga/.rvm/gems/ruby-2.4.0@sem-tools/gems/railties-5.1.1/lib/rails/engine.rb:354:in `eager_load!'
	from /Users/mfaga/projects/ezcater/sem-tools/config/initializers/paper_trail.rb:6:in `<top (required)>'
	from /Users/mfaga/.rvm/gems/ruby-2.4.0@sem-tools/gems/activesupport-5.1.1/lib/active_support/dependencies.rb:286:in `load'
	from /Users/mfaga/.rvm/gems/ruby-2.4.0@sem-tools/gems/activesupport-5.1.1/lib/active_support/dependencies.rb:286:in `block in load'
	from /Users/mfaga/.rvm/gems/ruby-2.4.0@sem-tools/gems/activesupport-5.1.1/lib/active_support/dependencies.rb:258:in `load_dependency'
	from /Users/mfaga/.rvm/gems/ruby-2.4.0@sem-tools/gems/activesupport-5.1.1/lib/active_support/dependencies.rb:286:in `load'
	from /Users/mfaga/.rvm/gems/ruby-2.4.0@sem-tools/gems/railties-5.1.1/lib/rails/engine.rb:655:in `block in load_config_initializer'
	from /Users/mfaga/.rvm/gems/ruby-2.4.0@sem-tools/gems/activesupport-5.1.1/lib/active_support/notifications.rb:168:in `instrument'
	from /Users/mfaga/.rvm/gems/ruby-2.4.0@sem-tools/gems/railties-5.1.1/lib/rails/engine.rb:654:in `load_config_initializer'
	from /Users/mfaga/.rvm/gems/ruby-2.4.0@sem-tools/gems/railties-5.1.1/lib/rails/engine.rb:612:in `block (2 levels) in <class:Engine>'
	from /Users/mfaga/.rvm/gems/ruby-2.4.0@sem-tools/gems/railties-5.1.1/lib/rails/engine.rb:611:in `each'
	from /Users/mfaga/.rvm/gems/ruby-2.4.0@sem-tools/gems/railties-5.1.1/lib/rails/engine.rb:611:in `block in <class:Engine>'
	from /Users/mfaga/.rvm/gems/ruby-2.4.0@sem-tools/gems/railties-5.1.1/lib/rails/initializable.rb:30:in `instance_exec'
	from /Users/mfaga/.rvm/gems/ruby-2.4.0@sem-tools/gems/railties-5.1.1/lib/rails/initializable.rb:30:in `run'
	from /Users/mfaga/.rvm/gems/ruby-2.4.0@sem-tools/gems/railties-5.1.1/lib/rails/initializable.rb:59:in `block in run_initializers'
	from /Users/mfaga/.rvm/rubies/ruby-2.4.0/lib/ruby/2.4.0/tsort.rb:228:in `block in tsort_each'
	from /Users/mfaga/.rvm/rubies/ruby-2.4.0/lib/ruby/2.4.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component'
	from /Users/mfaga/.rvm/rubies/ruby-2.4.0/lib/ruby/2.4.0/tsort.rb:422:in `block (2 levels) in each_strongly_connected_component_from'
	from /Users/mfaga/.rvm/rubies/ruby-2.4.0/lib/ruby/2.4.0/tsort.rb:431:in `each_strongly_connected_component_from'
	from /Users/mfaga/.rvm/rubies/ruby-2.4.0/lib/ruby/2.4.0/tsort.rb:421:in `block in each_strongly_connected_component_from'
	from /Users/mfaga/.rvm/gems/ruby-2.4.0@sem-tools/gems/railties-5.1.1/lib/rails/initializable.rb:48:in `each'
	from /Users/mfaga/.rvm/gems/ruby-2.4.0@sem-tools/gems/railties-5.1.1/lib/rails/initializable.rb:48:in `tsort_each_child'
	from /Users/mfaga/.rvm/rubies/ruby-2.4.0/lib/ruby/2.4.0/tsort.rb:415:in `call'
	from /Users/mfaga/.rvm/rubies/ruby-2.4.0/lib/ruby/2.4.0/tsort.rb:415:in `each_strongly_connected_component_from'
	from /Users/mfaga/.rvm/rubies/ruby-2.4.0/lib/ruby/2.4.0/tsort.rb:349:in `block in each_strongly_connected_component'
	from /Users/mfaga/.rvm/rubies/ruby-2.4.0/lib/ruby/2.4.0/tsort.rb:347:in `each'
	from /Users/mfaga/.rvm/rubies/ruby-2.4.0/lib/ruby/2.4.0/tsort.rb:347:in `call'
	from /Users/mfaga/.rvm/rubies/ruby-2.4.0/lib/ruby/2.4.0/tsort.rb:347:in `each_strongly_connected_component'
	from /Users/mfaga/.rvm/rubies/ruby-2.4.0/lib/ruby/2.4.0/tsort.rb:226:in `tsort_each'
	from /Users/mfaga/.rvm/rubies/ruby-2.4.0/lib/ruby/2.4.0/tsort.rb:205:in `tsort_each'
	from /Users/mfaga/.rvm/gems/ruby-2.4.0@sem-tools/gems/railties-5.1.1/lib/rails/initializable.rb:58:in `run_initializers'
	from /Users/mfaga/.rvm/gems/ruby-2.4.0@sem-tools/gems/railties-5.1.1/lib/rails/application.rb:353:in `initialize!'
	from /Users/mfaga/projects/ezcater/sem-tools/config/environment.rb:5:in `<top (required)>'
	from config.ru:3:in `require'
	from config.ru:3:in `block in <main>'
	from /Users/mfaga/.rvm/gems/ruby-2.4.0@sem-tools/gems/rack-2.0.3/lib/rack/builder.rb:55:in `instance_eval'
	from /Users/mfaga/.rvm/gems/ruby-2.4.0@sem-tools/gems/rack-2.0.3/lib/rack/builder.rb:55:in `initialize'
	from config.ru:in `new'
	from config.ru:in `<main>'
	from /Users/mfaga/.rvm/gems/ruby-2.4.0@sem-tools/gems/rack-2.0.3/lib/rack/builder.rb:49:in `eval'
	from /Users/mfaga/.rvm/gems/ruby-2.4.0@sem-tools/gems/rack-2.0.3/lib/rack/builder.rb:49:in `new_from_string'
	from /Users/mfaga/.rvm/gems/ruby-2.4.0@sem-tools/gems/rack-2.0.3/lib/rack/builder.rb:40:in `parse_file'
	from /Users/mfaga/.rvm/gems/ruby-2.4.0@sem-tools/gems/rack-2.0.3/lib/rack/server.rb:319:in `build_app_and_options_from_config'
	from /Users/mfaga/.rvm/gems/ruby-2.4.0@sem-tools/gems/rack-2.0.3/lib/rack/server.rb:219:in `app'
	from /Users/mfaga/.rvm/gems/ruby-2.4.0@sem-tools/gems/railties-5.1.1/lib/rails/commands/server/server_command.rb:24:in `app'
	from /Users/mfaga/.rvm/gems/ruby-2.4.0@sem-tools/gems/rack-2.0.3/lib/rack/server.rb:354:in `wrapped_app'
	from /Users/mfaga/.rvm/gems/ruby-2.4.0@sem-tools/gems/railties-5.1.1/lib/rails/commands/server/server_command.rb:80:in `log_to_stdout'
	from /Users/mfaga/.rvm/gems/ruby-2.4.0@sem-tools/gems/railties-5.1.1/lib/rails/commands/server/server_command.rb:42:in `start'
	from /Users/mfaga/.rvm/gems/ruby-2.4.0@sem-tools/gems/railties-5.1.1/lib/rails/commands/server/server_command.rb:131:in `block in perform'
	from /Users/mfaga/.rvm/gems/ruby-2.4.0@sem-tools/gems/railties-5.1.1/lib/rails/commands/server/server_command.rb:126:in `tap'
	from /Users/mfaga/.rvm/gems/ruby-2.4.0@sem-tools/gems/railties-5.1.1/lib/rails/commands/server/server_command.rb:126:in `perform'
	from /Users/mfaga/.rvm/gems/ruby-2.4.0@sem-tools/gems/thor-0.19.4/lib/thor/command.rb:27:in `run'
	from /Users/mfaga/.rvm/gems/ruby-2.4.0@sem-tools/gems/thor-0.19.4/lib/thor/invocation.rb:126:in `invoke_command'
	from /Users/mfaga/.rvm/gems/ruby-2.4.0@sem-tools/gems/thor-0.19.4/lib/thor.rb:369:in `dispatch'
	from /Users/mfaga/.rvm/gems/ruby-2.4.0@sem-tools/gems/railties-5.1.1/lib/rails/command/base.rb:63:in `perform'
	from /Users/mfaga/.rvm/gems/ruby-2.4.0@sem-tools/gems/railties-5.1.1/lib/rails/command.rb:44:in `invoke'
	from /Users/mfaga/.rvm/gems/ruby-2.4.0@sem-tools/gems/railties-5.1.1/lib/rails/commands.rb:16:in `<top (required)>'
	from /Users/mfaga/projects/ezcater/sem-tools/bin/rails:9:in `require'
	from /Users/mfaga/projects/ezcater/sem-tools/bin/rails:9:in `<top (required)>'
	from /Users/mfaga/.rvm/gems/ruby-2.4.0@sem-tools/gems/spring-2.0.2/lib/spring/client/rails.rb:28:in `load'
	from /Users/mfaga/.rvm/gems/ruby-2.4.0@sem-tools/gems/spring-2.0.2/lib/spring/client/rails.rb:28:in `call'
	from /Users/mfaga/.rvm/gems/ruby-2.4.0@sem-tools/gems/spring-2.0.2/lib/spring/client/command.rb:7:in `call'
	from /Users/mfaga/.rvm/gems/ruby-2.4.0@sem-tools/gems/spring-2.0.2/lib/spring/client.rb:30:in `run'
	from /Users/mfaga/.rvm/gems/ruby-2.4.0@sem-tools/gems/spring-2.0.2/bin/spring:49:in `<top (required)>'
	from /Users/mfaga/.rvm/gems/ruby-2.4.0@sem-tools/gems/spring-2.0.2/lib/spring/binstub.rb:31:in `load'
	from /Users/mfaga/.rvm/gems/ruby-2.4.0@sem-tools/gems/spring-2.0.2/lib/spring/binstub.rb:31:in `<top (required)>'
	from /Users/mfaga/projects/ezcater/sem-tools/bin/spring:15:in `require'
	from /Users/mfaga/projects/ezcater/sem-tools/bin/spring:15:in `<top (required)>'
	from bin/rails:3:in `load'
	from bin/rails:3:in `<main>'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants