The page you are looking for doesn't exist. root_to

I have an app that works fine locally, but than I try to push to heroku and the root_to route doesn't work.

I've gone through and looked at all the other posts for this, but none of them are for the route_to file and non of the fixes I have found online are working.

I have activeadmin installed so I'm not sure if that is affecting it. I'm using Devise to handle users.

Please help, this is a simple site, I'm not sure why it's causing so much trouble.

Github repo: https://github.com/spq24/seered

Routes.rb

Seered::Application.routes.draw do
break if ARGV.join.include? 'assets:precompile'
 ActiveAdmin.routes(self)

 devise_for :admin_users, ActiveAdmin::Devise.config

 devise_for :users

 root :to => 'pages#home'

 get "pages/home"

 match '/about',     to: 'pages#about'

Rake Routes output:

                admin_root            /admin(.:format)
        admin/dashboard#index
    batch_action_admin_admin_users POST       /admin/admin_users/batch_action(.:for
    at) admin/admin_users#batch_action
                 admin_admin_users GET        /admin/admin_users(.:format)
        admin/admin_users#index
                                   POST       /admin/admin_users(.:format)
        admin/admin_users#create
              new_admin_admin_user GET        /admin/admin_users/new(.:format)
        admin/admin_users#new
             edit_admin_admin_user GET        /admin/admin_users/:id/edit(.:format)
        admin/admin_users#edit
                  admin_admin_user GET        /admin/admin_users/:id(.:format)
        admin/admin_users#show
                                   PUT        /admin/admin_users/:id(.:format)
        admin/admin_users#update
                                   DELETE     /admin/admin_users/:id(.:format)
        admin/admin_users#destroy
                   admin_dashboard            /admin/dashboard(.:format)
        admin/dashboard#index
          batch_action_admin_users POST       /admin/users/batch_action(.:format)
        admin/users#batch_action
                       admin_users GET        /admin/users(.:format)
        admin/users#index
                                   POST       /admin/users(.:format)
        admin/users#create
                    new_admin_user GET        /admin/users/new(.:format)
        admin/users#new
                   edit_admin_user GET        /admin/users/:id/edit(.:format)
        admin/users#edit
                        admin_user GET        /admin/users/:id(.:format)
        admin/users#show
                                   PUT        /admin/users/:id(.:format)
        admin/users#update
                                   DELETE     /admin/users/:id(.:format)
        admin/users#destroy
       batch_action_admin_comments POST       /admin/comments/batch_action(.:format
        admin/comments#batch_action
                    admin_comments GET        /admin/comments(.:format)
        admin/comments#index
                                   POST       /admin/comments(.:format)
        admin/comments#create
                     admin_comment GET        /admin/comments/:id(.:format)
        admin/comments#show
            new_admin_user_session GET        /admin/login(.:format)
        active_admin/devise/sessions#new
                admin_user_session POST       /admin/login(.:format)
        active_admin/devise/sessions#create
        destroy_admin_user_session DELETE|GET /admin/logout(.:format)
        active_admin/devise/sessions#destroy
               admin_user_password POST       /admin/password(.:format)
        active_admin/devise/passwords#create
           new_admin_user_password GET        /admin/password/new(.:format)
        active_admin/devise/passwords#new
          edit_admin_user_password GET        /admin/password/edit(.:format)
        active_admin/devise/passwords#edit
                                   PUT        /admin/password(.:format)
        active_admin/devise/passwords#update
                  new_user_session GET        /users/sign_in(.:format)
        devise/sessions#new
                      user_session POST       /users/sign_in(.:format)
        devise/sessions#create
              destroy_user_session DELETE     /users/sign_out(.:format)
        devise/sessions#destroy
          cancel_user_registration GET        /users/cancel(.:format)
        devise/registrations#cancel
                 user_registration POST       /users(.:format)
        devise/registrations#create
             new_user_registration GET        /users/sign_up(.:format)
        devise/registrations#new
            edit_user_registration GET        /users/edit(.:format)
        devise/registrations#edit
                                   PUT        /users(.:format)
        devise/registrations#update
                                   DELETE     /users(.:format)
        devise/registrations#destroy
                              root            /
        pages#home
                        pages_home GET        /pages/home(.:format)
        pages#home
                             about            /about(.:format)

Config/Environments/production

Seered::Application.configure do
      # Settings specified here will take precedence over those in   config/application.rb

      # Code is not reloaded between requests
      config.cache_classes = true

      # Full error reports are disabled and caching is turned on
      config.consider_all_requests_local       = false
      config.action_controller.perform_caching = true

      # Disable Rails's static asset server (Apache or nginx will already do this)
      config.serve_static_assets = false

      # Compress JavaScripts and CSS
      config.assets.compress = true

      # Don't fallback to assets pipeline if a precompiled asset is missed
      config.assets.compile = true

      # Generate digests for assets URLs
      config.assets.digest = true

      # Defaults to nil and saved in location specified by config.assets.prefix
      # config.assets.manifest = YOUR_PATH

      # Specifies the header that your server uses for sending files
      # config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache
      # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx

      # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
      # config.force_ssl = true

      # See everything in the log (default is :info)
      # config.log_level = :debug

      # Prepend all log lines with the following tags
      # config.log_tags = [ :subdomain, :uuid ]

      # Use a different logger for distributed setups
      # config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new)

      # Use a different cache store in production
      # config.cache_store = :mem_cache_store

      # Enable serving of images, stylesheets, and JavaScripts from an asset server
      # config.action_controller.asset_host = "http://assets.example.com"

      # Precompile additional assets (application.js, application.css, and all non-JS/CSS are already added)
      # config.assets.precompile += %w( search.js )

      # Disable delivery errors, bad email addresses will be ignored
      # config.action_mailer.raise_delivery_errors = false

      # Enable threaded mode
      # config.threadsafe!

      # Enable locale fallbacks for I18n (makes lookups for any locale fall back to
      # the I18n.default_locale when a translation can not be found)
      config.i18n.fallbacks = true

      # Send deprecation notices to registered listeners
      config.active_support.deprecation = :notify

      # Log the query plan for queries taking more than this (works
      # with SQLite, MySQL, and PostgreSQL)
      # config.active_record.auto_explain_threshold_in_seconds = 0.5

      #Domain name for Devise
      config.action_mailer.default_url_options = { :host => 'localhost:3000' }
      config.assets.initialize_on_precompile = false
    end

Answers


Try putting the root route first. That's typically recommended because it's usually the most-accessed route in the application.


Need Your Help

Cleaning up a regular expression which has lots of repetition

regex

I am looking to clean up a regular expression which matches 2 or more characters at a time in a sequence. I have made one which works, but I was looking for something shorter, if possible.

JQuery doesn't work well in my XQuery file, why?

javascript jquery

I have an XQuery file creating an HTML page with selects about dates and hours. Then when I click on the button, I want to try if the selected data is right or not (begin date can't be > than end d...

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.