Ошибка устаревания для rails, не позволяющая запустить сервер rails - PullRequest
0 голосов
/ 07 мая 2019

Я делаю некоторые вещи с открытым исходным кодом для приложения rails https://github.com/publiclab/mapknitter, но когда я пытаюсь запустить сервер rails, используя rails s, я получаю следующее сообщение об ошибке:

DEPRECATION WARNING: Support for Rails versions before 4.2 is deprecated and will be removed from skylight 2.0. (called from require at /Users/bena/.rvm/rubies/ruby-2.4.6/lib/ruby/site_ruby/2.4.0/bundler/runtime.rb:81)
=> Booting WEBrick
=> Rails 3.2.22.5 application starting in development on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
[SKYLIGHT] [1.7.2] Running Skylight in development mode. No data will be reported until you deploy your app.
(To disable this message for all local apps, run `skylight disable_dev_warning`.)
Exiting
/Users/bena/.rvm/gems/ruby-2.4.6/gems/railties-3.2.22.5/lib/rails/application/configuration.rb:115:in `read': No such file or directory @ rb_sysopen - /Users/bena/Documents/repos/ben-repos/mapknitter/config/database.yml (Errno::ENOENT)
    from /Users/bena/.rvm/gems/ruby-2.4.6/gems/railties-3.2.22.5/lib/rails/application/configuration.rb:115:in `database_configuration'
    from /Users/bena/.rvm/gems/ruby-2.4.6/gems/activerecord-3.2.22.5/lib/active_record/railtie.rb:84:in `block (2 levels) in <class:Railtie>'
    from /Users/bena/.rvm/gems/ruby-2.4.6/gems/activesupport-3.2.22.5/lib/active_support/lazy_load_hooks.rb:36:in `instance_eval'
    from /Users/bena/.rvm/gems/ruby-2.4.6/gems/activesupport-3.2.22.5/lib/active_support/lazy_load_hooks.rb:36:in `execute_hook'
    from /Users/bena/.rvm/gems/ruby-2.4.6/gems/activesupport-3.2.22.5/lib/active_support/lazy_load_hooks.rb:43:in `block in run_load_hooks'
    from /Users/bena/.rvm/gems/ruby-2.4.6/gems/activesupport-3.2.22.5/lib/active_support/lazy_load_hooks.rb:42:in `each'
    from /Users/bena/.rvm/gems/ruby-2.4.6/gems/activesupport-3.2.22.5/lib/active_support/lazy_load_hooks.rb:42:in `run_load_hooks'
    from /Users/bena/.rvm/gems/ruby-2.4.6/gems/activerecord-3.2.22.5/lib/active_record/base.rb:720:in `<top (required)>'
    from /Users/bena/.rvm/gems/ruby-2.4.6/gems/skylight-1.7.2/lib/skylight/probes.rb:119:in `require'
    from /Users/bena/.rvm/gems/ruby-2.4.6/gems/skylight-1.7.2/lib/skylight/probes.rb:119:in `require'
    from /Users/bena/.rvm/gems/ruby-2.4.6/gems/activesupport-3.2.22.5/lib/active_support/dependencies.rb:251:in `block in require'
    from /Users/bena/.rvm/gems/ruby-2.4.6/gems/activesupport-3.2.22.5/lib/active_support/dependencies.rb:236:in `load_dependency'
    from /Users/bena/.rvm/gems/ruby-2.4.6/gems/activesupport-3.2.22.5/lib/active_support/dependencies.rb:251:in `require'
    from /Users/bena/Documents/repos/ben-repos/mapknitter/config/initializers/column_definition.rb:19:in `<class:ColumnDefinition>'
    from /Users/bena/Documents/repos/ben-repos/mapknitter/config/initializers/column_definition.rb:17:in `<top (required)>'
    from /Users/bena/.rvm/gems/ruby-2.4.6/gems/activesupport-3.2.22.5/lib/active_support/dependencies.rb:245:in `load'
    from /Users/bena/.rvm/gems/ruby-2.4.6/gems/activesupport-3.2.22.5/lib/active_support/dependencies.rb:245:in `block in load'
    from /Users/bena/.rvm/gems/ruby-2.4.6/gems/activesupport-3.2.22.5/lib/active_support/dependencies.rb:236:in `load_dependency'
    from /Users/bena/.rvm/gems/ruby-2.4.6/gems/activesupport-3.2.22.5/lib/active_support/dependencies.rb:245:in `load'
    from /Users/bena/.rvm/gems/ruby-2.4.6/gems/railties-3.2.22.5/lib/rails/engine.rb:593:in `block (2 levels) in <class:Engine>'
    from /Users/bena/.rvm/gems/ruby-2.4.6/gems/railties-3.2.22.5/lib/rails/engine.rb:592:in `each'
    from /Users/bena/.rvm/gems/ruby-2.4.6/gems/railties-3.2.22.5/lib/rails/engine.rb:592:in `block in <class:Engine>'
    from /Users/bena/.rvm/gems/ruby-2.4.6/gems/railties-3.2.22.5/lib/rails/initializable.rb:30:in `instance_exec'
    from /Users/bena/.rvm/gems/ruby-2.4.6/gems/railties-3.2.22.5/lib/rails/initializable.rb:30:in `run'
    from /Users/bena/.rvm/gems/ruby-2.4.6/gems/railties-3.2.22.5/lib/rails/initializable.rb:55:in `block in run_initializers'
    from /Users/bena/.rvm/gems/ruby-2.4.6/gems/railties-3.2.22.5/lib/rails/initializable.rb:54:in `each'
    from /Users/bena/.rvm/gems/ruby-2.4.6/gems/railties-3.2.22.5/lib/rails/initializable.rb:54:in `run_initializers'
    from /Users/bena/.rvm/gems/ruby-2.4.6/gems/railties-3.2.22.5/lib/rails/application.rb:136:in `initialize!'
    from /Users/bena/.rvm/gems/ruby-2.4.6/gems/railties-3.2.22.5/lib/rails/railtie/configurable.rb:30:in `method_missing'
    from /Users/bena/Documents/repos/ben-repos/mapknitter/config/environment.rb:5:in `<top (required)>'
    from /Users/bena/.rvm/gems/ruby-2.4.6/gems/skylight-1.7.2/lib/skylight/probes.rb:119:in `require'
    from /Users/bena/.rvm/gems/ruby-2.4.6/gems/skylight-1.7.2/lib/skylight/probes.rb:119:in `require'
    from /Users/bena/Documents/repos/ben-repos/mapknitter/config.ru:3:in `block in <main>'
    from /Users/bena/.rvm/gems/ruby-2.4.6/gems/rack-1.4.7/lib/rack/builder.rb:51:in `instance_eval'
    from /Users/bena/.rvm/gems/ruby-2.4.6/gems/rack-1.4.7/lib/rack/builder.rb:51:in `initialize'
    from /Users/bena/Documents/repos/ben-repos/mapknitter/config.ru:in `new'
    from /Users/bena/Documents/repos/ben-repos/mapknitter/config.ru:in `<main>'
    from /Users/bena/.rvm/gems/ruby-2.4.6/gems/rack-1.4.7/lib/rack/builder.rb:40:in `eval'
    from /Users/bena/.rvm/gems/ruby-2.4.6/gems/rack-1.4.7/lib/rack/builder.rb:40:in `parse_file'
    from /Users/bena/.rvm/gems/ruby-2.4.6/gems/rack-1.4.7/lib/rack/server.rb:200:in `app'
    from /Users/bena/.rvm/gems/ruby-2.4.6/gems/railties-3.2.22.5/lib/rails/commands/server.rb:46:in `app'
    from /Users/bena/.rvm/gems/ruby-2.4.6/gems/rack-1.4.7/lib/rack/server.rb:304:in `wrapped_app'
    from /Users/bena/.rvm/gems/ruby-2.4.6/gems/rack-1.4.7/lib/rack/server.rb:254:in `start'
    from /Users/bena/.rvm/gems/ruby-2.4.6/gems/railties-3.2.22.5/lib/rails/commands/server.rb:70:in `start'
    from /Users/bena/.rvm/gems/ruby-2.4.6/gems/railties-3.2.22.5/lib/rails/commands.rb:55:in `block in <top (required)>'
    from /Users/bena/.rvm/gems/ruby-2.4.6/gems/railties-3.2.22.5/lib/rails/commands.rb:50:in `tap'
    from /Users/bena/.rvm/gems/ruby-2.4.6/gems/railties-3.2.22.5/lib/rails/commands.rb:50:in `<top (required)>'
    from script/rails:6:in `require'
    from script/rails:6:in `<main>'

Isпроблема, вызванная версией рельсов, которые я использую, или версией люка или чем-то еще?

Я использую ruby 2.4.6p354 и rails 3.2.22.5

Я установил и попыталсяпереключитесь на rails 4.2.0, но это, похоже, не работает, я думаю, потому что в gemfile есть пессимистическое ограничение версии gem "rails" ,"~>3.2", но я могу быть совершенно не прав.Мне сказали не менять гемфайл.

1 Ответ

1 голос
/ 07 мая 2019

Проверьте первую строку в обратном следе ошибки. У вас нет /config/database.yml в вашем проекте

Нет такого файла или каталога @ rb_sysopen - /Users/bena/Documents/repos/ben-repos/mapknitter/config/database.yml (Errno :: ENOENT)

Убедитесь, что вы установили все из Необходимые условия и просто следуйте Установка Руководство

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...