在修复之后,部署到Heroku仍然无法正常工作

时间:2015-09-08 19:33:25

标签: ruby-on-rails ruby heroku

关于部署问题,我已经经历了相同的错误,因为差不多2天和谷歌多次但仍然没有结果,我将应用程序推送到Heroku并添加Procfile以使用Puma服务器而不是Webrick。然后我根据Heroku的要求将ruby版本更新到2.0.0。我之前用sqlite3成功运行了第一个应用程序,但此时如何出错?我很乐意得到你的帮助。

请参阅以下内容:

的Gemfile:

source 'https://rubygems.org'
ruby '2.0.0'

gem 'rails', '4.2.4'
gem 'sass-rails', '~> 5.0'
gem 'uglifier', '>= 1.3.0'
gem 'coffee-rails', '~> 4.1.0'
gem 'jquery-rails'
gem 'turbolinks'
gem 'jbuilder', '~> 2.0'
gem 'bootstrap-sass', '~> 3.3.5'
gem 'font-awesome-sass', '~> 4.4.0'
gem 'pry', '~> 0.10.1'
gem 'puma'
gem 'sdoc', '~> 0.4.0', group: :doc

group :development, :test do
  gem 'sqlite3', '~> 1.3.10'
  gem 'byebug'
end

group :production do
  gem 'pg', '~> 0.18.3'
  gem 'rails_12factor', '~> 0.0.3'
end

group :development do
  gem 'web-console', '~> 2.0'
  gem 'spring'
end

database.yml中:

# SQLite version 3.x
#   gem install sqlite3
#
#   Ensure the SQLite 3 gem is defined in your Gemfile
#   gem 'sqlite3'
#
default: &default
  adapter: sqlite3
  pool: 5
  timeout: 5000

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

# Warning: The database defined as "test" will be erased and
# re-generated from your development database when you run "rake".
# Do not set this db to the same as development or production.
test:
  <<: *default
  database: db/test.sqlite3

production:
  <<: *default
  database: db/production.sqlite3

控制台:

Salmans-iMac:simple_saas salmanRT15$ git push heroku master
Counting objects: 3, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (3/3), done.
Writing objects: 100% (3/3), 318 bytes | 0 bytes/s, done.
Total 3 (delta 2), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote: 
remote: -----> Ruby app detected
remote: -----> Compiling Ruby/Rails
remote: -----> Using Ruby version: ruby-2.0.0
remote: -----> Installing dependencies using bundler 1.9.7
remote:        Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 --deployment
remote:        Rubygems 2.0.14 is not threadsafe, so your gems must be installed one at a time. Upgrade to Rubygems 2.1.0 or higher to enable parallel gem installation.
remote:        Using rake 10.4.2
remote:        Using i18n 0.7.0
remote:        Using json 1.8.3
remote:        Using minitest 5.8.0
remote:        Using thread_safe 0.3.5
remote:        Using tzinfo 1.2.2
remote:        Using activesupport 4.2.4
remote:        Using builder 3.2.2
remote:        Using erubis 2.7.0
remote:        Using mini_portile 0.6.2
remote:        Using nokogiri 1.6.6.2
remote:        Using rails-deprecated_sanitizer 1.0.3
remote:        Using rails-dom-testing 1.0.7
remote:        Using loofah 2.0.3
remote:        Using rails-html-sanitizer 1.0.2
remote:        Using actionview 4.2.4
remote:        Using rack 1.6.4
remote:        Using rack-test 0.6.3
remote:        Using actionpack 4.2.4
remote:        Using globalid 0.3.6
remote:        Using activejob 4.2.4
remote:        Using mime-types 2.6.1
remote:        Using mail 2.6.3
remote:        Using actionmailer 4.2.4
remote:        Using activemodel 4.2.4
remote:        Using arel 6.0.3
remote:        Using activerecord 4.2.4
remote:        Using execjs 2.6.0
remote:        Using autoprefixer-rails 6.0.2
remote:        Using sass 3.4.18
remote:        Using bootstrap-sass 3.3.5.1
remote:        Using coderay 1.1.0
remote:        Using coffee-script-source 1.9.1.1
remote:        Using coffee-script 2.4.1
remote:        Using thor 0.19.1
remote:        Using railties 4.2.4
remote:        Using coffee-rails 4.1.0
remote:        Using font-awesome-sass 4.4.0
remote:        Using multi_json 1.11.2
remote:        Using jbuilder 2.3.1
remote:        Using jquery-rails 4.0.5
remote:        Using method_source 0.8.2
remote:        Using pg 0.18.3
remote:        Using slop 3.6.0
remote:        Using pry 0.10.1
remote:        Using puma 2.13.4
remote:        Using bundler 1.9.7
remote:        Using sprockets 3.3.4
remote:        Using sprockets-rails 2.3.3
remote:        Using rails 4.2.4
remote:        Using rails_serve_static_assets 0.0.4
remote:        Using rails_stdout_logging 0.0.4
remote:        Using rails_12factor 0.0.3
remote:        Using rdoc 4.2.0
remote:        Using tilt 2.0.1
remote:        Using sass-rails 5.0.4
remote:        Using sdoc 0.4.1
remote:        Using turbolinks 2.5.3
remote:        Using uglifier 2.7.2
remote:        Bundle complete! 18 Gemfile dependencies, 59 gems now installed.
remote:        Gems in the groups development and test were not installed.
remote:        Bundled gems are installed into ./vendor/bundle.
remote:        Bundle completed (0.80s)
remote:        Cleaning up the bundler cache.
remote: -----> Preparing app for Rails asset pipeline
remote:        Running: rake assets:precompile
remote:        Asset precompilation completed (3.10s)
remote:        Cleaning assets
remote:        Running: rake assets:clean
remote: 
remote: -----> Discovering process types
remote:        Procfile declares types -> web
remote:        Default types for Ruby  -> console, rake, worker
remote: 
remote: -----> Compressing... done, 31.7MB
remote: -----> Launching... done, v10
remote:        https://afternoon-wildwood-4552.herokuapp.com/ deployed to Heroku
remote: 
remote: Verifying deploy.... done.

迁移:

Salmans-iMac:simple_saas salmanRT15$ heroku run rake db:migrate
Running `rake db:migrate` attached to terminal... up, run.9334
  ActiveRecord::SchemaMigration Load (1.1ms)  SELECT "schema_migrations".* FROM "schema_migrations"

错误:

Salmans-iMac:simple_saas salmanRT15$ heroku logs --tail
2015-09-08T18:39:55.482641+00:00 app[web.1]:    from /app/config.ru:in `new'
2015-09-08T18:39:55.482642+00:00 app[web.1]:    from /app/config.ru:in `<main>'
2015-09-08T18:39:55.482647+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.6.4/lib/rack/builder.rb:49:in `new_from_string'
2015-09-08T18:39:55.482644+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.6.4/lib/rack/builder.rb:49:in `eval'
2015-09-08T18:39:55.482649+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.6.4/lib/rack/builder.rb:40:in `parse_file'
2015-09-08T18:39:55.482650+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.6.4/lib/rack/server.rb:299:in `build_app_and_options_from_config'
2015-09-08T18:39:55.482660+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.6.4/lib/rack/server.rb:208:in `app'
2015-09-08T18:39:55.482661+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.2.4/lib/rails/commands/server.rb:61:in `app'
2015-09-08T18:39:55.482666+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.6.4/lib/rack/server.rb:272:in `start'
2015-09-08T18:39:55.482665+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.6.4/lib/rack/server.rb:336:in `wrapped_app'
2015-09-08T18:39:55.482668+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.2.4/lib/rails/commands/server.rb:80:in `start'
2015-09-08T18:39:55.482669+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.2.4/lib/rails/commands/commands_tasks.rb:80:in `block in server'
2015-09-08T18:39:55.482671+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.2.4/lib/rails/commands/commands_tasks.rb:75:in `tap'
2015-09-08T18:39:55.482674+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.2.4/lib/rails/commands/commands_tasks.rb:75:in `server'
2015-09-08T18:39:55.482676+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.2.4/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
2015-09-08T18:39:55.482677+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.2.4/lib/rails/commands.rb:17:in `<top (required)>'
2015-09-08T18:39:55.482681+00:00 app[web.1]:    from bin/rails:8:in `require'
2015-09-08T18:39:55.482682+00:00 app[web.1]:    from bin/rails:8:in `<main>'
2015-09-08T18:39:56.256256+00:00 heroku[web.1]: Process exited with status 1
2015-09-08T18:39:56.265441+00:00 heroku[web.1]: State changed from starting to crashed
2015-09-08T18:51:48.266869+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=afternoon-wildwood-4552.herokuapp.com request_id=852f1588-388a-4c5d-80bc-8942b0b9fe23 fwd="174.114.188.106" dyno= connect= service= status=503 bytes=
2015-09-08T18:51:48.572914+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=afternoon-wildwood-4552.herokuapp.com request_id=c91a2e08-1b02-4cb9-9c04-f0163c97d33f fwd="174.114.188.106" dyno= connect= service= status=503 bytes=
2015-09-08T18:51:53.413318+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/about" host=afternoon-wildwood-4552.herokuapp.com request_id=290f453d-d0bd-45fe-a03a-85c470e898c0 fwd="174.114.188.106" dyno= connect= service= status=503 bytes=
2015-09-08T18:51:53.582682+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=afternoon-wildwood-4552.herokuapp.com request_id=cd60a7c9-65b9-481d-8074-dfbea8db4774 fwd="174.114.188.106" dyno= connect= service= status=503 bytes=
2015-09-08T18:52:49.199959+00:00 heroku[api]: Starting process with command `bundle exec rake db`
2015-09-08T18:52:54.293561+00:00 heroku[run.1272]: Awaiting client
2015-09-08T18:52:54.332011+00:00 heroku[run.1272]: Starting process with command `bundle exec rake db`
2015-09-08T18:52:54.759690+00:00 heroku[run.1272]: State changed from starting to up
2015-09-08T18:52:59.020288+00:00 heroku[run.1272]: Process exited with status 0
2015-09-08T18:52:59.032621+00:00 heroku[run.1272]: State changed from up to complete
2015-09-08T18:53:14.892087+00:00 heroku[api]: Starting process with command `bundle exec rake db:migrate`
2015-09-08T18:53:18.765194+00:00 heroku[run.9334]: Awaiting client
2015-09-08T18:53:18.792442+00:00 heroku[run.9334]: Starting process with command `bundle exec rake db:migrate`
2015-09-08T18:53:19.009934+00:00 heroku[run.9334]: State changed from starting to up
2015-09-08T18:53:24.988697+00:00 heroku[run.9334]: State changed from up to complete
2015-09-08T18:53:25.029574+00:00 heroku[run.9334]: Process exited with status 0
2015-09-08T18:53:43.714497+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=afternoon-wildwood-4552.herokuapp.com request_id=17663d6d-f9c9-4d30-b06e-1d4a32f3c4b8 fwd="174.114.188.106" dyno= connect= service= status=503 bytes=
2015-09-08T18:53:44.114785+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=afternoon-wildwood-4552.herokuapp.com request_id=137c9b11-1134-4828-b8d7-f6e8fe835c02 fwd="174.114.188.106" dyno= connect= service= status=503 bytes=
2015-09-08T18:58:20.786629+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=afternoon-wildwood-4552.herokuapp.com request_id=216bad18-00e7-471f-9264-b210e3527a82 fwd="174.114.188.106" dyno= connect= service= status=503 bytes=
2015-09-08T18:58:21.022480+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=afternoon-wildwood-4552.herokuapp.com request_id=c08e8936-08e8-4555-8698-7d0ed93d197f fwd="174.114.188.106" dyno= connect= service= status=503 bytes=
2015-09-08T19:16:39.726171+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=afternoon-wildwood-4552.herokuapp.com request_id=5f10e8c4-fc8f-41bb-89ef-6b882fd10177 fwd="174.114.188.106" dyno= connect= service= status=503 bytes=
2015-09-08T19:16:39.490004+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=afternoon-wildwood-4552.herokuapp.com request_id=8e8c3ef6-c67a-4293-9b5f-bf45ee8d9786 fwd="174.114.188.106" dyno= connect= service= status=503 bytes=
2015-09-08T19:22:39.381210+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=afternoon-wildwood-4552.herokuapp.com request_id=a1c8ad83-ac03-4e94-9db3-ff5070e0ea15 fwd="174.114.188.106" dyno= connect= service= status=503 bytes=
2015-09-08T19:22:39.643243+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=afternoon-wildwood-4552.herokuapp.com request_id=a20aafc1-b844-4413-a0fa-2d2645534123 fwd="174.114.188.106" dyno= connect= service= status=503 bytes=
2015-09-08T19:33:01.164800+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=afternoon-wildwood-4552.herokuapp.com request_id=81699222-7883-4467-9722-dcaeb015446a fwd="174.114.188.106" dyno= connect= service= status=503 bytes=
2015-09-08T19:33:01.410808+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=afternoon-wildwood-4552.herokuapp.com request_id=f9d4abe6-1d89-44c1-ad48-81f88ab0cd22 fwd="174.114.188.106" dyno= connect= service= status=503 bytes=
2015-09-08T19:33:02.028240+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=afternoon-wildwood-4552.herokuapp.com request_id=c113fab8-e561-4e8a-b1b3-7b830269d3a0 fwd="174.114.188.106" dyno= connect= service= status=503 bytes=
2015-09-08T19:33:02.235582+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=afternoon-wildwood-4552.herokuapp.com request_id=c27540ae-6db4-4bf2-af69-3e0c49cfa1ac fwd="174.114.188.106" dyno= connect= service= status=503 bytes=
2015-09-08T19:35:38.651911+00:00 heroku[web.1]: State changed from crashed to starting
2015-09-08T19:35:41.839066+00:00 heroku[web.1]: Starting process with command `bundle exec rails server -p 12426`
2015-09-08T19:35:45.128856+00:00 app[web.1]: => Run `rails server -h` for more startup options
2015-09-08T19:35:45.128854+00:00 app[web.1]: => Rails 4.2.4 application starting in production on http://0.0.0.0:12426
2015-09-08T19:35:45.128817+00:00 app[web.1]: => Booting Puma
2015-09-08T19:35:45.128858+00:00 app[web.1]: => Ctrl-C to shutdown server
2015-09-08T19:35:45.812085+00:00 app[web.1]: Exiting
2015-09-08T19:35:45.812931+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.2.4/lib/rails/engine.rb:469:in `each'
2015-09-08T19:35:45.812922+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.2.4/lib/rails/engine.rb:472:in `block (2 levels) in eager_load!'
2015-09-08T19:35:45.812926+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.2.4/lib/rails/engine.rb:471:in `each'
2015-09-08T19:35:45.812935+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.2.4/lib/rails/engine.rb:469:in `eager_load!'
2015-09-08T19:35:45.812936+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.2.4/lib/rails/engine.rb:346:in `eager_load!'
2015-09-08T19:35:45.812943+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.2.4/lib/rails/application/finisher.rb:56:in `block in <module:Finisher>'
2015-09-08T19:35:45.812940+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.2.4/lib/rails/application/finisher.rb:56:in `each'
2015-09-08T19:35:45.812929+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.2.4/lib/rails/engine.rb:471:in `block in eager_load!'
2015-09-08T19:35:45.812916+00:00 app[web.1]: /app/app/mailers/contact_mailer.rb:1:in `<top (required)>': uninitialized constant ActiveMailer (NameError)
2015-09-08T19:35:45.812948+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.2.4/lib/rails/initializable.rb:30:in `run'
2015-09-08T19:35:45.812950+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.2.4/lib/rails/initializable.rb:55:in `block in run_initializers'
2015-09-08T19:35:45.812953+00:00 app[web.1]:    from /app/vendor/ruby-2.0.0/lib/ruby/2.0.0/tsort.rb:150:in `block in tsort_each'
2015-09-08T19:35:45.812959+00:00 app[web.1]:    from /app/vendor/ruby-2.0.0/lib/ruby/2.0.0/tsort.rb:219:in `each_strongly_connected_component_from'
2015-09-08T19:35:45.812960+00:00 app[web.1]:    from /app/vendor/ruby-2.0.0/lib/ruby/2.0.0/tsort.rb:182:in `block in each_strongly_connected_component'
2015-09-08T19:35:45.812964+00:00 app[web.1]:    from /app/vendor/ruby-2.0.0/lib/ruby/2.0.0/tsort.rb:180:in `each'
2015-09-08T19:35:45.812955+00:00 app[web.1]:    from /app/vendor/ruby-2.0.0/lib/ruby/2.0.0/tsort.rb:183:in `block (2 levels) in each_strongly_connected_component'
2015-09-08T19:35:45.812967+00:00 app[web.1]:    from /app/vendor/ruby-2.0.0/lib/ruby/2.0.0/tsort.rb:180:in `each_strongly_connected_component'
2015-09-08T19:35:45.812945+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.2.4/lib/rails/initializable.rb:30:in `instance_exec'
2015-09-08T19:35:45.812968+00:00 app[web.1]:    from /app/vendor/ruby-2.0.0/lib/ruby/2.0.0/tsort.rb:148:in `tsort_each'
2015-09-08T19:35:45.812972+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.2.4/lib/rails/initializable.rb:54:in `run_initializers'
2015-09-08T19:35:45.812981+00:00 app[web.1]:    from /app/config.ru:3:in `require'
2015-09-08T19:35:45.812976+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.2.4/lib/rails/application.rb:352:in `initialize!'
2015-09-08T19:35:45.812979+00:00 app[web.1]:    from /app/config/environment.rb:5:in `<top (required)>'
2015-09-08T19:35:45.812985+00:00 app[web.1]:    from /app/config.ru:3:in `block in <main>'
2015-09-08T19:35:45.812987+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.6.4/lib/rack/builder.rb:55:in `instance_eval'
2015-09-08T19:35:45.813023+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.6.4/lib/rack/builder.rb:55:in `initialize'
2015-09-08T19:35:45.813025+00:00 app[web.1]:    from /app/config.ru:in `new'
2015-09-08T19:35:45.813029+00:00 app[web.1]:    from /app/config.ru:in `<main>'
2015-09-08T19:35:45.813030+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.6.4/lib/rack/builder.rb:49:in `eval'
2015-09-08T19:35:45.813035+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.6.4/lib/rack/builder.rb:40:in `parse_file'
2015-09-08T19:35:45.813032+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.6.4/lib/rack/builder.rb:49:in `new_from_string'
2015-09-08T19:35:45.813037+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.6.4/lib/rack/server.rb:299:in `build_app_and_options_from_config'
2015-09-08T19:35:45.813044+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.6.4/lib/rack/server.rb:336:in `wrapped_app'
2015-09-08T19:35:45.813038+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.6.4/lib/rack/server.rb:208:in `app'
2015-09-08T19:35:45.813042+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.2.4/lib/rails/commands/server.rb:61:in `app'
2015-09-08T19:35:45.813052+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.2.4/lib/rails/commands/commands_tasks.rb:80:in `block in server'
2015-09-08T19:35:45.813047+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.6.4/lib/rack/server.rb:272:in `start'
2015-09-08T19:35:45.813049+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.2.4/lib/rails/commands/server.rb:80:in `start'
2015-09-08T19:35:45.813054+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.2.4/lib/rails/commands/commands_tasks.rb:75:in `tap'
2015-09-08T19:35:45.813057+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.2.4/lib/rails/commands/commands_tasks.rb:75:in `server'
2015-09-08T19:35:45.813063+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.2.4/lib/rails/commands.rb:17:in `<top (required)>'
2015-09-08T19:35:45.813059+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.0.0/gems/railties-4.2.4/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
2015-09-08T19:35:45.813064+00:00 app[web.1]:    from bin/rails:8:in `require'
2015-09-08T19:35:45.813067+00:00 app[web.1]:    from bin/rails:8:in `<main>'
2015-09-08T19:35:46.599863+00:00 heroku[web.1]: State changed from starting to crashed
2015-09-08T19:35:46.591596+00:00 heroku[web.1]: Process exited with status 1

1 个答案:

答案 0 :(得分:2)

您需要将class ContactMailer < ActiveMailer::Base更改为

class ContactMailer < ActionMailer::Base

在你的/app/app/mailers/contact_mailer.rb以及rails应用中的任何位置。没有课程ActiveMailer,只有ActionMailer