7

Design: Register / Log in, but does Ruby not recognize? [Update]

 2 years ago
source link: https://www.codesd.com/item/design-register-log-in-but-does-ruby-not-recognize-update.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

Design: Register / Log in, but does Ruby not recognize? [Update]

advertisements

This happens only on heroku, locally everything is working fine.

When i sign up a new user / or sign in with an existing one into my app, i get no error message or whatsoever.

Yet, the if user_signed_in? as an example is not working. I still get the sign up / sign in buttons, instead of the dashboard as an example. Same with active_admin, when i try to login, i get no errors, yet it just reloads the sign in page. This is really weird.

Again, only on heroku. When i try to login locally or try to sign up a new user, everything is working fine.

Heroku logs shows no errors (except for an missing image file)

$ heroku logs
2017-02-14T11:48:17.367871+00:00 app[web.1]:   Rendered project/index.html.erb within layouts/application (1.4ms)
2017-02-14T11:48:17.369701+00:00 app[web.1]:   Rendered shared/_header.html.erb (1.0ms)
2017-02-14T11:48:17.369874+00:00 app[web.1]:   Rendered shared/_message.html.erb (0.1ms)
2017-02-14T11:48:17.370124+00:00 app[web.1]:   Rendered shared/_footer.html.erb (0.1ms)
2017-02-14T11:48:17.370297+00:00 app[web.1]: Completed 200 OK in 5ms (Views: 3.2ms | ActiveRecord: 0.8ms)
2017-02-14T11:48:17.386624+00:00 heroku[router]: at=info method=GET path="/" host=herogamedev2.herokuapp.com request_id=8b8bf6db-d1bc-420e-bcc0-4efc9591adb0 fwd="94.218.91.178" dyno=web.1 connect=1ms service=13ms status=200 bytes=5750
2017-02-14T11:48:17.514234+00:00 heroku[router]: at=info method=GET path="/assets/application-1d6aff3e9562d68738287f8737bcd49d854bd20cc894434ed3975afebb8addd2.css" host=herogamedev2.herokuapp.com request_id=712f2bda-87a4-427c-ac27-b8297f81008a fwd="94.218.91.178" dyno=web.1 connect=0ms service=3ms status=304 bytes=133
2017-02-14T11:48:17.632465+00:00 heroku[router]: at=info method=GET path="/assets/application-835796ed4ed64d77b216af341c67c9e3ada5866ff071e82dc15b0af01d47e9de.js" host=herogamedev2.herokuapp.com request_id=1a496b53-6500-455e-aada-aa2e535a2802 fwd="94.218.91.178" dyno=web.1 connect=0ms service=4ms status=304 bytes=133
2017-02-14T11:48:17.920864+00:00 heroku[router]: at=info method=GET path="/assets/pexel.jpeg" host=herogamedev2.herokuapp.com request_id=c962257e-2cb6-4c59-86e6-2cc6b6bb81e6 fwd="94.218.91.178" dyno=web.1 connect=1ms service=9ms status=404 bytes=1829
2017-02-14T11:48:17.899656+00:00 app[web.1]: Started GET "/assets/pexel.jpeg" for 94.218.91.178 at 2017-02-14 11:48:17 +0000
2017-02-14T11:48:17.903852+00:00 app[web.1]: ActionController::RoutingError (No route matches [GET] "/assets/pexel.jpeg"):
2017-02-14T11:48:17.903853+00:00 app[web.1]:   vendor/bundle/ruby/2.2.0/gems/actionpack-4.2.5.1/lib/action_dispatch/middleware/debug_exceptions.rb:21:in `call'
2017-02-14T11:48:17.903853+00:00 app[web.1]:   vendor/bundle/ruby/2.2.0/gems/actionpack-4.2.5.1/lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'
2017-02-14T11:48:17.903850+00:00 app[web.1]:
2017-02-14T11:48:17.903855+00:00 app[web.1]:   vendor/bundle/ruby/2.2.0/gems/railties-4.2.5.1/lib/rails/rack/logger.rb:38:in `call_app'
2017-02-14T11:48:17.903855+00:00 app[web.1]:   vendor/bundle/ruby/2.2.0/gems/railties-4.2.5.1/lib/rails/rack/logger.rb:20:in `block in call'
2017-02-14T11:48:17.903856+00:00 app[web.1]:   vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.5.1/lib/active_support/tagged_logging.rb:68:in `block in tagged'
2017-02-14T11:48:17.903857+00:00 app[web.1]:   vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.5.1/lib/active_support/tagged_logging.rb:26:in `tagged'
2017-02-14T11:48:17.903858+00:00 app[web.1]:   vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.5.1/lib/active_support/tagged_logging.rb:68:in `tagged'
2017-02-14T11:48:17.903858+00:00 app[web.1]:   vendor/bundle/ruby/2.2.0/gems/railties-4.2.5.1/lib/rails/rack/logger.rb:20:in `call'
2017-02-14T11:48:17.903859+00:00 app[web.1]:   vendor/bundle/ruby/2.2.0/gems/actionpack-4.2.5.1/lib/action_dispatch/middleware/request_id.rb:21:in `call'
2017-02-14T11:48:17.903860+00:00 app[web.1]:   vendor/bundle/ruby/2.2.0/gems/rack-1.6.5/lib/rack/methodoverride.rb:22:in `call'
2017-02-14T11:48:17.903860+00:00 app[web.1]:   vendor/bundle/ruby/2.2.0/gems/rack-1.6.5/lib/rack/runtime.rb:18:in `call'
2017-02-14T11:48:17.903861+00:00 app[web.1]:   vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.5.1/lib/active_support/cache/strategy/local_cache_middleware.rb:28:in `call'
2017-02-14T11:48:17.903862+00:00 app[web.1]:   vendor/bundle/ruby/2.2.0/gems/actionpack-4.2.5.1/lib/action_dispatch/middleware/static.rb:116:in `call'
2017-02-14T11:48:17.903863+00:00 app[web.1]:   vendor/bundle/ruby/2.2.0/gems/railties-4.2.5.1/lib/rails/engine.rb:518:in `call'
2017-02-14T11:48:17.903864+00:00 app[web.1]:   vendor/bundle/ruby/2.2.0/gems/railties-4.2.5.1/lib/rails/application.rb:165:in `call'
2017-02-14T11:48:17.903864+00:00 app[web.1]:   vendor/bundle/ruby/2.2.0/gems/rack-1.6.5/lib/rack/lock.rb:17:in `call'
2017-02-14T11:48:17.903865+00:00 app[web.1]:   vendor/bundle/ruby/2.2.0/gems/rack-1.6.5/lib/rack/content_length.rb:15:in `call'
2017-02-14T11:48:17.903866+00:00 app[web.1]:   vendor/bundle/ruby/2.2.0/gems/rack-1.6.5/lib/rack/handler/webrick.rb:88:in `service'
2017-02-14T11:48:17.903863+00:00 app[web.1]:   vendor/bundle/ruby/2.2.0/gems/rack-1.6.5/lib/rack/sendfile.rb:113:in `call'
2017-02-14T11:48:17.903867+00:00 app[web.1]:   vendor/ruby-2.2.6/lib/ruby/2.2.0/webrick/httpserver.rb:138:in `service'
2017-02-14T11:48:17.903868+00:00 app[web.1]:   vendor/ruby-2.2.6/lib/ruby/2.2.0/webrick/httpserver.rb:94:in `run'
2017-02-14T11:48:17.903868+00:00 app[web.1]:   vendor/ruby-2.2.6/lib/ruby/2.2.0/webrick/server.rb:294:in `block in start_thread'
2017-02-14T11:48:17.903869+00:00 app[web.1]:
2017-02-14T11:48:17.903870+00:00 app[web.1]:
2017-02-14T11:51:46.157350+00:00 heroku[router]: at=info method=GET path="/" host=herogamedev2.herokuapp.com request_id=b513d122-8920-4580-b4e1-500f535d2ee4 fwd="94.218.91.178" dyno=web.1 connect=0ms service=18ms status=200 bytes=5750
2017-02-14T11:51:46.149910+00:00 app[web.1]: Processing by ProjectController#index as HTML
2017-02-14T11:51:46.143633+00:00 app[web.1]: Started GET "/" for 94.218.91.178 at 2017-02-14 11:51:46 +0000
2017-02-14T11:51:46.152204+00:00 app[web.1]:   Project Load (0.6ms)  SELECT "projects".* FROM "projects"
2017-02-14T11:51:46.152561+00:00 app[web.1]:   Rendered project/index.html.erb within layouts/application (1.3ms)
2017-02-14T11:51:46.155256+00:00 app[web.1]:   Rendered shared/_header.html.erb (1.7ms)
2017-02-14T11:51:46.155495+00:00 app[web.1]:   Rendered shared/_message.html.erb (0.0ms)
2017-02-14T11:51:46.155858+00:00 app[web.1]:   Rendered shared/_footer.html.erb (0.2ms)
2017-02-14T11:51:46.156116+00:00 app[web.1]: Completed 200 OK in 6ms (Views: 4.7ms | ActiveRecord: 0.6ms)
2017-02-14T11:51:46.289308+00:00 heroku[router]: at=info method=GET path="/assets/application-1d6aff3e9562d68738287f8737bcd49d854bd20cc894434ed3975afebb8addd2.css" host=herogamedev2.herokuapp.com request_id=f23301ca-ff2f-4998-9896-5d0f60007f78 fwd="94.218.91.178" dyno=web.1 connect=0ms service=11ms status=304 bytes=133
2017-02-14T11:51:46.734862+00:00 heroku[router]: at=info method=GET path="/assets/pexel.jpeg" host=herogamedev2.herokuapp.com request_id=53d21642-c654-4ed1-ad1f-f5d3e6accf6f fwd="94.218.91.178" dyno=web.1 connect=0ms service=8ms status=404 bytes=1829
2017-02-14T11:51:46.417122+00:00 heroku[router]: at=info method=GET path="/assets/application-835796ed4ed64d77b216af341c67c9e3ada5866ff071e82dc15b0af01d47e9de.js" host=herogamedev2.herokuapp.com request_id=625f2fe6-d3f6-4fbd-a062-1b30cb2d3354 fwd="94.218.91.178" dyno=web.1 connect=0ms service=11ms status=304 bytes=133
2017-02-14T11:51:46.729375+00:00 app[web.1]: Started GET "/assets/pexel.jpeg" for 94.218.91.178 at 2017-02-14 11:51:46 +0000
2017-02-14T11:51:46.733787+00:00 app[web.1]:
2017-02-14T11:51:46.733789+00:00 app[web.1]: ActionController::RoutingError (No route matches [GET] "/assets/pexel.jpeg"):
2017-02-14T11:51:46.733790+00:00 app[web.1]:   vendor/bundle/ruby/2.2.0/gems/actionpack-4.2.5.1/lib/action_dispatch/middleware/debug_exceptions.rb:21:in `call'
2017-02-14T11:51:46.733791+00:00 app[web.1]:   vendor/bundle/ruby/2.2.0/gems/actionpack-4.2.5.1/lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'
2017-02-14T11:51:46.733792+00:00 app[web.1]:   vendor/bundle/ruby/2.2.0/gems/railties-4.2.5.1/lib/rails/rack/logger.rb:38:in `call_app'
2017-02-14T11:51:46.733793+00:00 app[web.1]:   vendor/bundle/ruby/2.2.0/gems/railties-4.2.5.1/lib/rails/rack/logger.rb:20:in `block in call'
2017-02-14T11:51:46.733793+00:00 app[web.1]:   vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.5.1/lib/active_support/tagged_logging.rb:68:in `block in tagged'
2017-02-14T11:51:46.733794+00:00 app[web.1]:   vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.5.1/lib/active_support/tagged_logging.rb:26:in `tagged'
2017-02-14T11:51:46.733795+00:00 app[web.1]:   vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.5.1/lib/active_support/tagged_logging.rb:68:in `tagged'
2017-02-14T11:51:46.733796+00:00 app[web.1]:   vendor/bundle/ruby/2.2.0/gems/railties-4.2.5.1/lib/rails/rack/logger.rb:20:in `call'
2017-02-14T11:51:46.733796+00:00 app[web.1]:   vendor/bundle/ruby/2.2.0/gems/actionpack-4.2.5.1/lib/action_dispatch/middleware/request_id.rb:21:in `call'
2017-02-14T11:51:46.733797+00:00 app[web.1]:   vendor/bundle/ruby/2.2.0/gems/rack-1.6.5/lib/rack/methodoverride.rb:22:in `call'
2017-02-14T11:51:46.733798+00:00 app[web.1]:   vendor/bundle/ruby/2.2.0/gems/rack-1.6.5/lib/rack/runtime.rb:18:in `call'
2017-02-14T11:51:46.733799+00:00 app[web.1]:   vendor/bundle/ruby/2.2.0/gems/actionpack-4.2.5.1/lib/action_dispatch/middleware/static.rb:116:in `call'
2017-02-14T11:51:46.733798+00:00 app[web.1]:   vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.5.1/lib/active_support/cache/strategy/local_cache_middleware.rb:28:in `call'
2017-02-14T11:51:46.733800+00:00 app[web.1]:   vendor/bundle/ruby/2.2.0/gems/rack-1.6.5/lib/rack/sendfile.rb:113:in `call'
2017-02-14T11:51:46.733804+00:00 app[web.1]:   vendor/bundle/ruby/2.2.0/gems/railties-4.2.5.1/lib/rails/engine.rb:518:in `call'
2017-02-14T11:51:46.733805+00:00 app[web.1]:   vendor/bundle/ruby/2.2.0/gems/railties-4.2.5.1/lib/rails/application.rb:165:in `call'
2017-02-14T11:51:46.733806+00:00 app[web.1]:   vendor/bundle/ruby/2.2.0/gems/rack-1.6.5/lib/rack/lock.rb:17:in `call'
2017-02-14T11:51:46.733806+00:00 app[web.1]:   vendor/bundle/ruby/2.2.0/gems/rack-1.6.5/lib/rack/content_length.rb:15:in `call'
2017-02-14T11:51:46.733807+00:00 app[web.1]:   vendor/bundle/ruby/2.2.0/gems/rack-1.6.5/lib/rack/handler/webrick.rb:88:in `service'
2017-02-14T11:51:46.733808+00:00 app[web.1]:   vendor/ruby-2.2.6/lib/ruby/2.2.0/webrick/httpserver.rb:138:in `service'
2017-02-14T11:51:46.733809+00:00 app[web.1]:   vendor/ruby-2.2.6/lib/ruby/2.2.0/webrick/httpserver.rb:94:in `run'
2017-02-14T11:51:46.733809+00:00 app[web.1]:   vendor/ruby-2.2.6/lib/ruby/2.2.0/webrick/server.rb:294:in `block in start_thread'
2017-02-14T11:51:46.733810+00:00 app[web.1]:
2017-02-14T11:51:46.733810+00:00 app[web.1]:
2017-02-14T11:51:51.126778+00:00 app[web.1]: Started GET "/admin/login" for 94.218.91.178 at 2017-02-14 11:51:51 +0000
2017-02-14T11:51:51.131909+00:00 app[web.1]: Processing by ActiveAdmin::Devise::SessionsController#new as HTML
2017-02-14T11:51:51.147797+00:00 app[web.1]:   Rendered vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-7ff122d58083/app/views/active_admin/devise/shared/_links.erb (2.7ms)
2017-02-14T11:51:51.147851+00:00 app[web.1]:   Rendered vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-7ff122d58083/app/views/active_admin/devise/sessions/new.html.erb within layouts/active_admin_logged_out (14.6ms)
2017-02-14T11:51:51.148691+00:00 app[web.1]: Completed 200 OK in 17ms (Views: 15.7ms | ActiveRecord: 0.0ms)
2017-02-14T11:51:51.149987+00:00 heroku[router]: at=info method=GET path="/admin/login" host=herogamedev2.herokuapp.com request_id=24f52ba4-5e33-41df-92db-02792e3f3753 fwd="94.218.91.178" dyno=web.1 connect=1ms service=26ms status=200 bytes=3327
2017-02-14T11:51:55.832008+00:00 heroku[router]: at=info method=POST path="/admin/login" host=herogamedev2.herokuapp.com request_id=ee29663a-6e03-4b09-8ca2-2ba566b6e043 fwd="94.218.91.178" dyno=web.1 connect=0ms service=96ms status=302 bytes=1021
2017-02-14T11:51:55.738592+00:00 app[web.1]: Started POST "/admin/login" for 94.218.91.178 at 2017-02-14 11:51:55 +0000
2017-02-14T11:51:55.743302+00:00 app[web.1]: Processing by ActiveAdmin::Devise::SessionsController#create as HTML
2017-02-14T11:51:55.743339+00:00 app[web.1]:   Parameters: {"utf8"=>"✓", "authenticity_token"=>"RUV3xPCZVfG9OyBE2X25RQmegZQhMqiknxrVWvZH1lhL7cKscTmbODk/kX/qIxtKq85eEgAGJPMYuZLRWY2J6g==", "admin_user"=>{"email"=>"[email protected]", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Login"}
2017-02-14T11:51:55.745537+00:00 app[web.1]:   AdminUser Load (0.7ms)  SELECT  "admin_users".* FROM "admin_users" WHERE "admin_users"."email" = $1  ORDER BY "admin_users"."id" ASC LIMIT 1  [["email", "[email protected]"]]
2017-02-14T11:51:55.819195+00:00 app[web.1]:    (0.6ms)  BEGIN
2017-02-14T11:51:55.820991+00:00 app[web.1]:   SQL (0.6ms)  UPDATE "admin_users" SET "last_sign_in_at" = $1, "current_sign_in_at" = $2, "sign_in_count" = $3, "updated_at" = $4 WHERE "admin_users"."id" = $5  [["last_sign_in_at", "2017-02-14 11:47:42.774425"], ["current_sign_in_at", "2017-02-14 11:51:55.817737"], ["sign_in_count", 4], ["updated_at", "2017-02-14 11:51:55.819377"], ["id", 1]]
2017-02-14T11:51:55.822643+00:00 app[web.1]:    (1.2ms)  COMMIT
2017-02-14T11:51:55.830995+00:00 app[web.1]: Completed 302 Found in 88ms (ActiveRecord: 3.0ms)
2017-02-14T11:51:55.830874+00:00 app[web.1]: Redirected to https://herogamedev2.herokuapp.com/admin
2017-02-14T11:51:55.951344+00:00 app[web.1]: Started GET "/admin" for 94.218.91.178 at 2017-02-14 11:51:55 +0000
2017-02-14T11:51:55.955533+00:00 app[web.1]: Processing by Admin::DashboardController#index as HTML
2017-02-14T11:51:55.956112+00:00 app[web.1]: Completed 401 Unauthorized in 1ms (ActiveRecord: 0.0ms)
2017-02-14T11:51:56.106141+00:00 heroku[router]: at=info method=GET path="/admin/login" host=herogamedev2.herokuapp.com request_id=7f27d81e-e1ed-4949-a33c-51a43e806165 fwd="94.218.91.178" dyno=web.1 connect=0ms service=26ms status=200 bytes=3327
2017-02-14T11:51:55.960821+00:00 heroku[router]: at=info method=GET path="/admin" host=herogamedev2.herokuapp.com request_id=6d953372-85c8-464c-ac1d-200326a6f992 fwd="94.218.91.178" dyno=web.1 connect=0ms service=12ms status=302 bytes=1033
2017-02-14T11:51:56.082699+00:00 app[web.1]: Started GET "/admin/login" for 94.218.91.178 at 2017-02-14 11:51:56 +0000
2017-02-14T11:51:56.087109+00:00 app[web.1]: Processing by ActiveAdmin::Devise::SessionsController#new as HTML
2017-02-14T11:51:56.102803+00:00 app[web.1]:   Rendered vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-7ff122d58083/app/views/active_admin/devise/sessions/new.html.erb within layouts/active_admin_logged_out (14.3ms)
2017-02-14T11:51:56.102750+00:00 app[web.1]:   Rendered vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-7ff122d58083/app/views/active_admin/devise/shared/_links.erb (2.6ms)
2017-02-14T11:51:56.105098+00:00 app[web.1]: Completed 200 OK in 18ms (Views: 17.0ms | ActiveRecord: 0.0ms)

Any ideas?

[Update]

Running heroku run rails console and then @User.allreturns nil.

$ heroku run rails console
Running rails console on herogamedev2... starting, run.3740 (Free)
Running rails console on herogamedev2... connecting, run.3740 (Free)
Running rails console on herogamedev2... up, run.3740 (Free)
Loading production environment (Rails 4.2.5.1)
irb(main):001:0> @User.all
@User.all
NoMethodError: undefined method `all' for nil:NilClass
        from (irb):1
        from /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.5.1/lib/rails/commands/console.rb:110:in `start'
        from /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.5.1/lib/rails/commands/console.rb:9:in `start'
        from /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.5.1/lib/rails/commands/commands_tasks.rb:68:in `console'
        from /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.5.1/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
        from /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.5.1/lib/rails/commands.rb:17:in `<top (required)>'
        from /app/bin/rails:4:in `require'
        from /app/bin/rails:4:in `<main>'
irb(main):002:0>

So it seems like devise is not creating anything, however, i don't get any errors whatsoever and again, only on heroku, locally i can register, sign in, logout, edit and everything else.

  # ==> Mailer Configuration
  # Configure the e-mail address which will be shown in Devise::Mailer,
  # note that it will be overwritten if you use your own mailer class
  # with default "from" parameter.
  config.mailer_sender = '[email protected]'

  # Configure the class responsible to send e-mails.
  # config.mailer = 'Devise::Mailer'

  # Configure the parent class responsible to send e-mails.
  # config.parent_mailer = 'ActionMailer::Base'

  # ==> ORM configuration
  # Load and configure the ORM. Supports :active_record (default) and
  # :mongoid (bson_ext recommended) by default. Other ORMs may be
  # available as additional gems.
  require 'devise/orm/active_record'

  # ==> Configuration for any authentication mechanism
  # Configure which keys are used when authenticating a user. The default is
  # just :email. You can configure it to use [:username, :subdomain], so for
  # authenticating a user, both parameters are required. Remember that those
  # parameters are used only when authenticating and not when retrieving from
  # session. If you need permissions, you should implement that in a before filter.
  # You can also supply a hash where the value is a boolean determining whether
  # or not authentication should be aborted when the value is not present.
  # config.authentication_keys = [:email]

  # Configure parameters from the request object used for authentication. Each entry
  # given should be a request method and it will automatically be passed to the
  # find_for_authentication method and considered in your model lookup. For instance,
  # if you set :request_keys to [:subdomain], :subdomain will be used on authentication.
  # The same considerations mentioned for authentication_keys also apply to request_keys.
  # config.request_keys = []

  # Configure which authentication keys should be case-insensitive.
  # These keys will be downcased upon creating or modifying a user and when used
  # to authenticate or find a user. Default is :email.
  config.case_insensitive_keys = [:email]

  # Configure which authentication keys should have whitespace stripped.
  # These keys will have whitespace before and after removed upon creating or
  # modifying a user and when used to authenticate or find a user. Default is :email.
  config.strip_whitespace_keys = [:email]

  # Tell if authentication through request.params is enabled. True by default.
  # It can be set to an array that will enable params authentication only for the
  # given strategies, for example, `config.params_authenticatable = [:database]` will
  # enable it only for database (email + password) authentication.
  # config.params_authenticatable = true

  # Tell if authentication through HTTP Auth is enabled. False by default.
  # It can be set to an array that will enable http authentication only for the
  # given strategies, for example, `config.http_authenticatable = [:database]` will
  # enable it only for database authentication. The supported strategies are:
  # :database      = Support basic authentication with authentication key + password
  # config.http_authenticatable = false

  # If 401 status code should be returned for AJAX requests. True by default.
  # config.http_authenticatable_on_xhr = true

  # The realm used in Http Basic Authentication. 'Application' by default.
  # config.http_authentication_realm = 'Application'

  # It will change confirmation, password recovery and other workflows
  # to behave the same regardless if the e-mail provided was right or wrong.
  # Does not affect registerable.
  # config.paranoid = true

  # By default Devise will store the user in session. You can skip storage for
  # particular strategies by setting this option.
  # Notice that if you are skipping storage for all authentication paths, you

  config.skip_session_storage = [:http_auth]

  application
  # won't boot properly.
  # config.reload_routes = true

  # ==> Configuration for :database_authenticatable
  # For bcrypt, this is the cost for hashing the password and defaults to 11. If
  # using other algorithms, it sets how many times you want the password to be hashed.
  #
  # Limiting the stretches to just one in testing will increase the performance of
  # your test suite dramatically. However, it is STRONGLY RECOMMENDED to not use
  # a value less than 10 in other environments. Note that, for bcrypt (the default
  # algorithm), the cost increases exponentially with the number of stretches (e.g.
  # a value of 20 is already extremely slow: approx. 60 seconds for 1 calculation).
  config.stretches = Rails.env.test? ? 1 : 10

  # Set up a pepper to generate the hashed password.
  # config.pepper = 'e89683643d7f4fdeb42d0ca84e0599babe3a08160e877b5a7668a92bc223c9f58dd171712775a4659162a99acf854382ad9bdd0ee0061fd81ec6c0830ab2cf46'

  # A period that the user is allowed to confirm their account before their
  # token becomes invalid. For example, if set to 3.days, the user can confirm
  # their account within 3 days after the mail was sent, but on the fourth day
  # their account can't be confirmed with the token any more.
  # Default is nil, meaning there is no restriction on how long a user can take
  # before confirming their account.
  # config.confirm_within = 3.days

  # If true, requires any email changes to be confirmed (exactly the same way as
  # initial account confirmation) to be applied. Requires additional unconfirmed_email
  # db field (see migrations). Until confirmed, new email is stored in
  # unconfirmed_email column, and copied to email column on successful confirmation.
  config.reconfirmable = true

  # Defines which key will be used when confirming an account
  # config.confirmation_keys = [:email]

  # ==> Configuration for :rememberable
  # The time the user will be remembered without asking for credentials again.
  # config.remember_for = 2.weeks

  # Invalidates all the remember me tokens when the user signs out.
  config.expire_all_remember_me_on_sign_out = true

  # If true, extends the user's remember period when remembered via cookie.
  # config.extend_remember_period = false

  # Options to be passed to the created cookie. For instance, you can set
  # secure: true in order to force SSL only cookies.
  # config.rememberable_options = {}

  # ==> Configuration for :validatable
  # Range for password length.
  config.password_length = 6..128

  # Email regex used to validate email formats. It simply asserts that
  # one (and only one) @ exists in the given string. This is mainly
  # to give user feedback and not to assert the e-mail validity.
  config.email_regexp = /\A[^@\s]+@[^@\s]+\z/

  # ==> Configuration for :timeoutable
  # The time you want to timeout the user session without activity. After this
  # time the user will be asked for credentials again. Default is 30 minutes.
  # config.timeout_in = 30.minutes

  # Number of authentication tries before locking an account if lock_strategy
  # is failed attempts.
  # config.maximum_attempts = 20

  # Time interval to unlock the account if :time is enabled as unlock_strategy.
  # config.unlock_in = 1.hour

  # Warn on the last attempt before the account is locked.
  # config.last_attempt_warning = true

  # ==> Configuration for :recoverable
  #
  # Defines which key will be used when recovering the password for an account
  # config.reset_password_keys = [:email]

  # Time interval you can reset your password with a reset password key.
  # Don't put a too small interval or your users won't have the time to
  # change their passwords.
  config.reset_password_within = 6.hours

  # When set to false, does not sign a user in automatically after their password is
  # reset. Defaults to true, so a user is signed in automatically after a reset.
  # config.sign_in_after_reset_password = true

  # ==> Configuration for :encryptable
  # Allow you to use another hashing or encryption algorithm besides bcrypt (default).
  # You can use :sha1, :sha512 or algorithms from others authentication tools as
  # :clearance_sha1, :authlogic_sha512 (then you should set stretches above to 20
  # for default behavior) and :restful_authentication_sha1 (then you should set
  # stretches to 10, and copy REST_AUTH_SITE_KEY to pepper).
  #
  # Require the `devise-encryptable` gem when using anything other than bcrypt
  # config.encryptor = :sha512

  # ==> Scopes configuration
  # Turn scoped views on. Before rendering "sessions/new", it will first check for
  # "users/sessions/new". It's turned off by default because it's slower if you
  # are using only default views.
  # config.scoped_views = false

  # Configure the default scope given to Warden. By default it's the first
  # devise role declared in your routes (usually :user).
  # config.default_scope = :user

  # Set this configuration to false if you want /users/sign_out to sign out
  # only the current scope. By default, Devise signs out all scopes.
  # config.sign_out_all_scopes = true

  # ==> Navigation configuration
  # Lists the formats that should be treated as navigational. Formats like
  # :html, should redirect to the sign in page when the user does not have
  # access, but formats like :xml or :json, should return 401.
  #
  # If you have any extra navigational formats, like :iphone or :mobile, you
  # should add them to the navigational formats lists.
  #
  # The "*/*" below is required to match Internet Explorer requests.
  # config.navigational_formats = ['*/*', :html]

  # The default HTTP method used to sign out a resource. Default is :delete.
  config.sign_out_via = :delete

  # ==> OmniAuth
  # Add a new OmniAuth provider. Check the wiki for more information on setting
  # up on your models and hooks.
  # config.omniauth :github, 'APP_ID', 'APP_SECRET', scope: 'user,public_repo'

  # ==> Warden configuration
  # If you want to use other strategies, that are not supported by Devise, or
  # change the failure app, you can configure them inside the config.warden block.
  #
  # config.warden do |manager|
  #   manager.intercept_401 = false
  #   manager.default_strategies(scope: :user).unshift :some_external_strategy
  # end

  # ==> Mountable engine configurations
  # When using Devise inside an engine, let's call it `MyEngine`, and this engine
  # is mountable, there are some extra configurations to be taken into account.
  # The following options are available, assuming the engine is mounted as:
  #
  #     mount MyEngine, at: '/my_engine'
  #
  # The router that invoked `devise_for`, in the example above, would be:
  # config.router_name = :my_engine
  #
  # When using OmniAuth, Devise cannot automatically set OmniAuth path,
  # so you need to do it manually. For the users scope, it would be:
  # config.omniauth_path_prefix = '/my_engine/users/auth'

 end


It looks like you may not have precompiled your assets before you pushed to Heroku, try:

rake assets:precompile
git add .
etc etc

I think that should help. For more information, see here: see this


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK