не работает должным образом - PullRequest
0 голосов
/ 04 сентября 2018

Каждый раз, когда я запускаю рельсы, создаю устройство: установка Я получаю эту ошибку / Поэтому, пожалуйста, кто-нибудь, помогите мне с этим вопросом заранее спасибо. Я также использую Rails 5.0 и ruby ​​2.5.0

/usr/local/rvm/rubies/ruby-2.5.0/lib/ruby/2.5.0/fileutils.rb:90: warning: already initialized constant FileUtils::VERSION
/usr/local/rvm/gems/ruby-2.5.0/gems/fileutils-1.1.0/lib/fileutils.rb:92: warning: previous definition of VERSION was here
/usr/local/rvm/rubies/ruby-2.5.0/lib/ruby/2.5.0/fileutils.rb:1188: warning: already initialized constant FileUtils::Entry_::S_IF_DOOR
/usr/local/rvm/gems/ruby-2.5.0/gems/fileutils-1.1.0/lib/fileutils.rb:1267: warning: previous definition of S_IF_DOOR was here
/usr/local/rvm/rubies/ruby-2.5.0/lib/ruby/2.5.0/fileutils.rb:1446: warning: already initialized constant FileUtils::Entry_::DIRECTORY_TERM
/usr/local/rvm/gems/ruby-2.5.0/gems/fileutils-1.1.0/lib/fileutils.rb:1541: warning: previous definition of DIRECTORY_TERM was here
/usr/local/rvm/rubies/ruby-2.5.0/lib/ruby/2.5.0/fileutils.rb:1448: warning: already initialized constant FileUtils::Entry_::SYSCASE
/usr/local/rvm/gems/ruby-2.5.0/gems/fileutils-1.1.0/lib/fileutils.rb:1543: warning: previous definition of SYSCASE was here
/usr/local/rvm/rubies/ruby-2.5.0/lib/ruby/2.5.0/fileutils.rb:1501: warning: already initialized constant FileUtils::OPT_TABLE
/usr/local/rvm/gems/ruby-2.5.0/gems/fileutils-1.1.0/lib/fileutils.rb:1596: warning: previous definition of OPT_TABLE was here
/usr/local/rvm/rubies/ruby-2.5.0/lib/ruby/2.5.0/fileutils.rb:1555: warning: already initialized constant FileUtils::LOW_METHODS
/usr/local/rvm/gems/ruby-2.5.0/gems/fileutils-1.1.0/lib/fileutils.rb:1650: warning: previous definition of LOW_METHODS was here
/usr/local/rvm/rubies/ruby-2.5.0/lib/ruby/2.5.0/fileutils.rb:1562: warning: already initialized constant FileUtils::METHODS
/usr/local/rvm/gems/ruby-2.5.0/gems/fileutils-1.1.0/lib/fileutils.rb:1657: warning: previous definition of METHODS was here
/home/ubuntu/workspace/config/initializers/devise.rb:289:in `block in <top (required)>': undefined method `action_mailer' for Devise:Module (NoMethodError)
        from /usr/local/rvm/gems/ruby-2.5.0/gems/devise-4.5.0/lib/devise.rb:307:in `setup'
        from /home/ubuntu/workspace/config/initializers/devise.rb:5:in `<top (required)>'
        from /usr/local/rvm/gems/ruby-2.5.0/gems/activesupport-5.0.7/lib/active_support/dependencies.rb:287:in `load'
        from /usr/local/rvm/gems/ruby-2.5.0/gems/activesupport-5.0.7/lib/active_support/dependencies.rb:287:in `block in load'
        from /usr/local/rvm/gems/ruby-2.5.0/gems/activesupport-5.0.7/lib/active_support/dependencies.rb:259:in `load_dependency'
        from /usr/local/rvm/gems/ruby-2.5.0/gems/activesupport-5.0.7/lib/active_support/dependencies.rb:287:in `load'
        from /usr/local/rvm/gems/ruby-2.5.0/gems/railties-5.0.7/lib/rails/engine.rb:648:in `block in load_config_initializer'
        from /usr/local/rvm/gems/ruby-2.5.0/gems/activesupport-5.0.7/lib/active_support/notifications.rb:166:in `instrument'
        from /usr/local/rvm/gems/ruby-2.5.0/gems/railties-5.0.7/lib/rails/engine.rb:647:in `load_config_initializer'
        from /usr/local/rvm/gems/ruby-2.5.0/gems/railties-5.0.7/lib/rails/engine.rb:612:in `block (2 levels) in <class:Engine>'
        from /usr/local/rvm/gems/ruby-2.5.0/gems/railties-5.0.7/lib/rails/engine.rb:611:in `each'
        from /usr/local/rvm/gems/ruby-2.5.0/gems/railties-5.0.7/lib/rails/engine.rb:611:in `block in <class:Engine>'
        from /usr/local/rvm/gems/ruby-2.5.0/gems/railties-5.0.7/lib/rails/initializable.rb:30:in `instance_exec'
        from /usr/local/rvm/gems/ruby-2.5.0/gems/railties-5.0.7/lib/rails/initializable.rb:30:in `run'
        from /usr/local/rvm/gems/ruby-2.5.0/gems/railties-5.0.7/lib/rails/initializable.rb:55:in `block in run_initializers'
        from /usr/local/rvm/rubies/ruby-2.5.0/lib/ruby/2.5.0/tsort.rb:228:in `block in tsort_each'
        from /usr/local/rvm/rubies/ruby-2.5.0/lib/ruby/2.5.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component'
        from /usr/local/rvm/rubies/ruby-2.5.0/lib/ruby/2.5.0/tsort.rb:422:in `block (2 levels) in each_strongly_connected_component_from'
        from /usr/local/rvm/rubies/ruby-2.5.0/lib/ruby/2.5.0/tsort.rb:431:in `each_strongly_connected_component_from'
        from /usr/local/rvm/rubies/ruby-2.5.0/lib/ruby/2.5.0/tsort.rb:421:in `block in each_strongly_connected_component_from'
        from /usr/local/rvm/gems/ruby-2.5.0/gems/railties-5.0.7/lib/rails/initializable.rb:44:in `each'
        from /usr/local/rvm/gems/ruby-2.5.0/gems/railties-5.0.7/lib/rails/initializable.rb:44:in `tsort_each_child'
        from /usr/local/rvm/rubies/ruby-2.5.0/lib/ruby/2.5.0/tsort.rb:415:in `call'
        from -e:1:in `<main>'

Может кто-нибудь помочь, если я использую c9.io

1 Ответ

0 голосов
/ 04 сентября 2018

Строки config.action_mailer должны идти в файле конфигурации Rails для среды, в которой вы хотите использовать эту конфигурацию. Поэтому для разработки используйте: app/config/environments/development.rb и production: app/config/environments/production.rb

Вы внесли изменения в свой конфиг?

config/environments/development.rb

добавить эту строку

config.action_mailer.default_url_options = { host: 'localhost', port: 3000 }
Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...