Heroku - หน้าไม่มีอยู่

ได้รับข้อผิดพลาดว่าไม่มีหน้าของฉันเมื่อพยายามเข้าถึงแอปพลิเคชันของฉัน มันทำงานได้ในเครื่อง แต่ไม่ใช่ในระบบ ฉันได้รันคราดและกำหนดเส้นทางแล้วรีสตาร์ท โดยไม่มีการแก้ไข แม้ว่า "ไม่มีหน้า" จะแสดง favicon ที่กำหนดเองของฉัน นี่เป็นแอปหน้าเดียวที่เรียบง่ายสำหรับใช้ในบริษัทส่วนตัวของฉันที่ฉันเป็นเจ้าของ พื้นฐานมาก ไม่มีอะไรมากไปกว่านี้ ชุดโครงนั่งร้านหนึ่งชุด แค่นั้นเอง.... ได้รับการพัฒนาใน RubyMine

ไฟล์เส้นทาง:

BoothLeads::Application.routes.draw do

  resources :leads


  # The priority is based upon order of creation:
  # first created -> highest priority.

  # Sample of regular route:
  #   match 'products/:id' => 'catalog#view'
  # Keep in mind you can assign values other than :controller and :action

  # Sample of named route:
  #   match 'products/:id/purchase' => 'catalog#purchase', :as => :purchase
  # This route can be invoked with purchase_url(:id => product.id)

  # Sample resource route (maps HTTP verbs to controller actions automatically):
  #   resources :products

  # Sample resource route with options:
  #   resources :products do
  #     member do
  #       get 'short'
  #       post 'toggle'
  #     end
  #
  #     collection do
  #       get 'sold'
  #     end
  #   end

  # Sample resource route with sub-resources:
  #   resources :products do
  #     resources :comments, :sales
  #     resource :seller
  #   end

  # Sample resource route with more complex sub-resources
  #   resources :products do
  #     resources :comments
  #     resources :sales do
  #       get 'recent', :on => :collection
  #     end
  #   end

  # Sample resource route within a namespace:
  #   namespace :admin do
  #     # Directs /admin/products/* to Admin::ProductsController
  #     # (app/controllers/admin/products_controller.rb)
  #     resources :products
  #   end

  # You can have the root of your site routed with "root"
  # just remember to delete public/index.html.
   #root :to => 'leads#index.html'

  # See how all your routes lay out with "rake routes"

  # This is a legacy wild controller route that's not recommended for RESTful applications.
  # Note: This route will make all actions in every controller accessible via GET requests.
  # match ':controller(/:action(/:id))(.:format)'
end

โยกย้าย

class CreateLeads < ActiveRecord::Migration
  def change
    create_table :leads do |t|
      t.string :name
      t.string :address
      t.string :phone
      t.text :interest

      t.timestamps
    end
  end
end

ผู้ควบคุมลีด

class LeadsController < ApplicationController
  # GET /leads
  # GET /leads.json
  def index
    @leads = Lead.all

    respond_to do |format|
      format.html # index.html.erb
      format.json { render json: @leads }
    end
  end

  # GET /leads/1
  # GET /leads/1.json
  def show
    @lead = Lead.find(params[:id])

    respond_to do |format|
      format.html # show.html.erb
      format.json { render json: @lead }
    end
  end

  # GET /leads/new
  # GET /leads/new.json
  def new
    @lead = Lead.new

    respond_to do |format|
      format.html # new.html.erb
      format.json { render json: @lead }
    end
  end

  # GET /leads/1/edit
  def edit
    @lead = Lead.find(params[:id])
  end

  # POST /leads
  # POST /leads.json
  def create
    @lead = Lead.new(params[:lead])

    respond_to do |format|
      if @lead.save
        format.html { redirect_to @lead, notice: 'Lead was successfully created.' }
        format.json { render json: @lead, status: :created, location: @lead }
      else
        format.html { render action: "new" }
        format.json { render json: @lead.errors, status: :unprocessable_entity }
      end
    end
  end

  # PUT /leads/1
  # PUT /leads/1.json
  def update
    @lead = Lead.find(params[:id])

    respond_to do |format|
      if @lead.update_attributes(params[:lead])
        format.html { redirect_to @lead, notice: 'Lead was successfully updated.' }
        format.json { head :no_content }
      else
        format.html { render action: "edit" }
        format.json { render json: @lead.errors, status: :unprocessable_entity }
      end
    end
  end

  # DELETE /leads/1
  # DELETE /leads/1.json
  def destroy
    @lead = Lead.find(params[:id])
    @lead.destroy

    respond_to do |format|
      format.html { redirect_to leads_url }
      format.json { head :no_content }
    end
  end
end

มีอะไรอีกที่จำเป็นแจ้งให้เราทราบ

ขอบคุณสำหรับความช่วยเหลือ

พรอมต์ CMD: บันทึก Heroku

C:\Users\Jeff Gray\RubymineProjects\BoothLeads>heroku logs
2013-04-01T05:34:12+00:00 app[web.1]: Completed 200 OK in 218ms (Views: 61.9ms |
 ActiveRecord: 63.6ms)
2013-04-01T05:34:13+00:00 heroku[router]: at=info method=GET path=/assets/applic
ation-01780e1cf08fc467414520399232647f.css host=peaceful-chamber-6371.herokuapp.
com fwd="110.32.193.201" dyno=web.1 connect=1ms service=32ms status=200 bytes=25
4629
2013-04-01T05:34:13+00:00 heroku[router]: at=info method=GET path=/assets/applic
ation-5909661ad10a83c2e0ae36fac77e7706.js host=peaceful-chamber-6371.herokuapp.c
om fwd="110.32.193.201" dyno=web.1 connect=1ms service=19ms status=200 bytes=128
395
2013-04-01T05:34:21+00:00 heroku[web.1]: Stopping all processes with SIGTERM
2013-04-01T05:34:22+00:00 app[web.1]:   /usr/local/lib/ruby/1.9.1/webrick/server
.rb:90:in `select'
2013-04-01T05:34:22+00:00 app[web.1]: [2013-04-01 05:34:22] ERROR SignalExceptio
n: SIGTERM
2013-04-01T05:34:33+00:00 heroku[web.1]: Stopping remaining processes with SIGKI
LL
2013-04-01T05:34:33+00:00 heroku[web.1]: Error R12 (Exit timeout) -> At least on
e process failed to exit within 10 seconds of SIGTERM
2013-04-01T05:34:35+00:00 heroku[web.1]: Process exited with status 137
2013-04-01T05:37:42+00:00 heroku[api]: Starting process with command `bundle exe
c rake db:migrate` by [email protected]
2013-04-01T05:37:45+00:00 heroku[run.2185]: Awaiting client
2013-04-01T05:37:45+00:00 heroku[run.2185]: Starting process with command `bundl
e exec rake db:migrate`
2013-04-01T05:37:46+00:00 heroku[run.2185]: State changed from starting to up
2013-04-01T05:37:54+00:00 heroku[run.2185]: Process exited with status 1
2013-04-01T05:37:54+00:00 heroku[run.2185]: State changed from up to complete
2013-04-01T05:38:00+00:00 heroku[web.1]: State changed from up to starting
2013-04-01T05:38:02+00:00 heroku[web.1]: Starting process with command `bundle e
xec rails server -p 47627`
2013-04-01T05:38:03+00:00 heroku[web.1]: Stopping all processes with SIGTERM
2013-04-01T05:38:04+00:00 app[web.1]: [2013-04-01 05:38:04] ERROR SignalExceptio
n: SIGTERM
2013-04-01T05:38:04+00:00 app[web.1]:   /usr/local/lib/ruby/1.9.1/webrick/server
.rb:90:in `select'
2013-04-01T05:38:06+00:00 app[web.1]: DEPRECATION WARNING: You have Rails 2.3-st
yle plugins in vendor/plugins! Support for these plugins will be removed in Rail
s 4.0. Move them out and bundle them in your Gemfile, or fold them in to your ap
p as lib/myplugin/* and config/initializers/myplugin.rb. See the release notes f
or more on this: http://weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-has-been
-released. (called from <top (required)> at /app/config/environment.rb:5)
2013-04-01T05:38:06+00:00 app[web.1]: DEPRECATION WARNING: You have Rails 2.3-st
yle plugins in vendor/plugins! Support for these plugins will be removed in Rail
s 4.0. Move them out and bundle them in your Gemfile, or fold them in to your ap
p as lib/myplugin/* and config/initializers/myplugin.rb. See the release notes f
or more on this: http://weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-has-been
-released. (called from <top (required)> at /app/config/environment.rb:5)
2013-04-01T05:38:10+00:00 app[web.1]: => Booting WEBrick
2013-04-01T05:38:10+00:00 app[web.1]: => Rails 3.2.12 application starting in pr
oduction on http://0.0.0.0:47627
2013-04-01T05:38:10+00:00 app[web.1]: => Call with -d to detach
2013-04-01T05:38:10+00:00 app[web.1]: => Ctrl-C to shutdown server
2013-04-01T05:38:10+00:00 app[web.1]: Connecting to database specified by DATABA
SE_URL
2013-04-01T05:38:10+00:00 app[web.1]: [2013-04-01 05:38:10] INFO  ruby 1.9.2 (20
11-07-09) [x86_64-linux]
2013-04-01T05:38:10+00:00 app[web.1]: [2013-04-01 05:38:10] INFO  WEBrick 1.3.1
2013-04-01T05:38:10+00:00 app[web.1]: [2013-04-01 05:38:10] INFO  WEBrick::HTTPS
erver#start: pid=2 port=47627
2013-04-01T05:38:11+00:00 heroku[web.1]: State changed from starting to up
2013-04-01T05:38:14+00:00 heroku[web.1]: Error R12 (Exit timeout) -> At least on
e process failed to exit within 10 seconds of SIGTERM
2013-04-01T05:38:14+00:00 heroku[web.1]: Stopping remaining processes with SIGKI
LL
2013-04-01T05:38:17+00:00 heroku[web.1]: Process exited with status 137
2013-04-01T05:38:36+00:00 heroku[router]: at=info method=GET path=/ host=peacefu
l-chamber-6371.herokuapp.com fwd="75.170.18.86" dyno=web.1 connect=6ms service=1
94ms status=404 bytes=728
2013-04-01T05:38:36+00:00 app[web.1]: Started GET "/" for 75.170.18.86 at 2013-0
4-01 05:38:35 +0000
2013-04-01T05:38:36+00:00 app[web.1]:
2013-04-01T05:38:36+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/railties-3
.2.12/lib/rails/rack/logger.rb:32:in `call_app'
2013-04-01T05:38:36+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/activesupp
ort-3.2.12/lib/active_support/tagged_logging.rb:22:in `tagged'
2013-04-01T05:38:36+00:00 app[web.1]: ActionController::RoutingError (No route m
atches [GET] "/"):
2013-04-01T05:38:36+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/railties-3
.2.12/lib/rails/rack/logger.rb:16:in `call'
2013-04-01T05:38:36+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/actionpack
-3.2.12/lib/action_dispatch/middleware/request_id.rb:22:in `call'
2013-04-01T05:38:36+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/activesupp
ort-3.2.12/lib/active_support/cache/strategy/local_cache.rb:72:in `call'
2013-04-01T05:38:36+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/actionpack
-3.2.12/lib/action_dispatch/middleware/show_exceptions.rb:56:in `call'
2013-04-01T05:38:36+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/railties-3
.2.12/lib/rails/rack/logger.rb:16:in `block in call'
2013-04-01T05:38:36+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/rack-1.4.5
/lib/rack/methodoverride.rb:21:in `call'
2013-04-01T05:38:36+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/rack-1.4.5
/lib/rack/lock.rb:15:in `call'
2013-04-01T05:38:36+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/actionpack
-3.2.12/lib/action_dispatch/middleware/debug_exceptions.rb:21:in `call'
2013-04-01T05:38:36+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/rack-cache
-1.2/lib/rack/cache/context.rb:136:in `forward'
2013-04-01T05:38:36+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/rack-cache
-1.2/lib/rack/cache/context.rb:245:i
n `fetch'
2013-04-01T05:38:36+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/rack-cache
-1.2/lib/rack/cache/context.rb:66:in `call!'
2013-04-01T05:38:36+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/railties-3
.2.12/lib/rails/engine.rb:479:in `call'
2013-04-01T05:38:36+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/rack-cache
-1.2/lib/rack/cache/context.rb:51:in `call'
2013-04-01T05:38:36+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/railties-3
.2.12/lib/rails/application.rb:223:in `call'
2013-04-01T05:38:36+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/rack-1.4.5
/lib/rack/content_length.rb:14:in `call'
2013-04-01T05:38:36+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/rack-1.4.5
/lib/rack/runtime.rb:17:in `call'
2013-04-01T05:38:36+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/rack-cache
-1.2/lib/rack/cache/context.rb:185:in `lookup'
2013-04-01T05:38:36+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/actionpack
-3.2.12/lib/action_dispatch/middleware/static.rb:62:in `call'
2013-04-01T05:38:36+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/railties-3
.2.12/lib/rails/rack/log_tailer.rb:17:in `call'
2013-04-01T05:38:36+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/rack-1.4.5
/lib/rack/handler/webrick.rb:59:in `service'
2013-04-01T05:38:36+00:00 app[web.1]:   /usr/local/lib/ruby/1.9.1/webrick/httpse
rver.rb:111:in `service'
2013-04-01T05:38:36+00:00 app[web.1]:   /usr/local/lib/ruby/1.9.1/webrick/httpse
rver.rb:70:in `run'
2013-04-01T05:38:36+00:00 app[web.1]:
2013-04-01T05:38:36+00:00 app[web.1]:   /usr/local/lib/ruby/1.9.1/webrick/server
.rb:183:in `block in start_thread'
2013-04-01T05:38:36+00:00 app[web.1]:
2013-04-01T05:39:44+00:00 app[web.1]: Started GET "/" for 75.170.18.86 at 2013-0
4-01 05:39:44 +0000
2013-04-01T05:39:44+00:00 app[web.1]:
2013-04-01T05:39:44+00:00 app[web.1]: ActionController::RoutingError (No route m
atches [GET] "/"):
2013-04-01T05:39:44+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/actionpack
-3.2.12/lib/action_dispatch/middleware/debug_exceptions.rb:21:in `call'
2013-04-01T05:39:44+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/actionpack
-3.2.12/lib/action_dispatch/middleware/show_exceptions.rb:56:in `call'
2013-04-01T05:39:44+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/railties-3
.2.12/lib/rails/rack/logger.rb:32:in `call_app'
2013-04-01T05:39:44+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/railties-3
.2.12/lib/rails/rack/logger.rb:16:in `block in call'
2013-04-01T05:39:44+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/activesupp
ort-3.2.12/lib/active_support/tagged_logging.rb:22:in `tagged'
2013-04-01T05:39:44+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/railties-3
.2.12/lib/rails/rack/logger.rb:16:in `call'
2013-04-01T05:39:44+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/actionpack
-3.2.12/lib/action_dispatch/middleware/request_id.rb:22:in `call'
2013-04-01T05:39:44+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/rack-1.4.5
/lib/rack/methodoverride.rb:21:in `call'
2013-04-01T05:39:44+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/rack-1.4.5
/lib/rack/runtime.rb:17:in `call'
2013-04-01T05:39:44+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/activesupp
ort-3.2.12/lib/active_support/cache/strategy/local_cache.rb:72:in `call'
2013-04-01T05:39:44+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/rack-1.4.5
/lib/rack/lock.rb:15:in `call'
2013-04-01T05:39:44+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/actionpack
-3.2.12/lib/action_dispatch/middleware/static.rb:62:in `call'
2013-04-01T05:39:44+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/rack-cache
-1.2/lib/rack/cache/context.rb:136:in `forward'
2013-04-01T05:39:44+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/rack-cache
-1.2/lib/rack/cache/context.rb:245:in `fetch'
2013-04-01T05:39:44+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/rack-cache
-1.2/lib/rack/cache/context.rb:185:in `lookup'
2013-04-01T05:39:44+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/rack-cache
-1.2/lib/rack/cache/context.rb:51:in `call'
2013-04-01T05:39:44+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/rack-cache
-1.2/lib/rack/cache/context.rb:66:in `call!'
2013-04-01T05:39:44+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/railties-3
.2.12/lib/rails/engine.rb:479:in `call'
2013-04-01T05:39:44+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/railties-3
.2.12/lib/rails/application.rb:223:in `call'
2013-04-01T05:39:44+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/rack-1.4.5
/lib/rack/content_length.rb:14:in `call'
2013-04-01T05:39:44+00:00 heroku[router]: at=info method=GET path=/ host=peacefu
l-chamber-6371.herokuapp.com fwd="75.170.18.86" dyno=web.1 connect=2ms service=4
6ms status=404 bytes=728
2013-04-01T05:39:44+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/railties-3
.2.12/lib/rails/rack/log_tailer.rb:17:in `call'
2013-04-01T05:39:44+00:00 app[web.1]:   /usr/local/lib/ruby/1.9.1/webrick/httpse
rver.rb:111:in `service'
2013-04-01T05:39:44+00:00 app[web.1]:   /usr/local/lib/ruby/1.9.1/webrick/server
.rb:183:in `block in start_thread'
2013-04-01T05:39:44+00:00 app[web.1]:   /usr/local/lib/ruby/1.9.1/webrick/httpse
rver.rb:70:in `run'
2013-04-01T05:39:44+00:00 app[web.1]:
2013-04-01T05:39:44+00:00 app[web.1]:   vendor/bundle/ruby/1.9.1/gems/rack-1.4.5
/lib/rack/handler/webrick.rb:59:in `service'
2013-04-01T05:39:44+00:00 app[web.1]:
2013-04-01T05:39:54+00:00 app[web.1]: Started GET "/leads" for 110.32.193.201 at
 2013-04-01 05:39:54 +0000
2013-04-01T05:39:54+00:00 app[web.1]: Processing by LeadsController#index as HTM
L
2013-04-01T05:39:54+00:00 app[web.1]:   Rendered leads/index.html.erb within lay
outs/application (12.6ms)
2013-04-01T05:39:54+00:00 app[web.1]: Completed 200 OK in 207ms (Views: 60.8ms |
 ActiveRecord: 60.4ms)
2013-04-01T05:39:54+00:00 heroku[router]: at=info method=GET path=/leads host=pe
aceful-chamber-6371.herokuapp.com fwd="110.32.193.201" dyno=web.1 connect=1ms se
rvice=228ms status=304 bytes=0

การผลิต.rb

    BoothLeads::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
end

การพัฒนา.rb

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

  # In the development environment your application's code is reloaded on
  # every request. This slows down response time but is perfect for development
  # since you don't have to restart the web server when you make code changes.
  config.cache_classes = false

  # Log error messages when you accidentally call methods on nil.
  config.whiny_nils = true

  # Show full error reports and disable caching
  config.consider_all_requests_local       = true
  config.action_controller.perform_caching = false

  # Don't care if the mailer can't send
  config.action_mailer.raise_delivery_errors = false

  # Print deprecation notices to the Rails logger
  config.active_support.deprecation = :log

  # Only use best-standards-support built into browsers
  config.action_dispatch.best_standards_support = :builtin

  # Raise exception on mass assignment protection for Active Record models
  config.active_record.mass_assignment_sanitizer = :strict

  # 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

  # Do not compress assets
  config.assets.compress = false

  # Expands the lines which load the assets
  config.assets.debug = true
end

Cat/Config/Routes.rb

C:\Users\Jeff Gray\RubymineProjects\BoothLeads>heroku run cat config/routes.rb
Running `cat config/routes.rb` attached to terminal... up, run.2943
BoothLeads::Application.routes.draw do
  resources :solds


  resources :leads


  # The priority is based upon order of creation:
  # first created -> highest priority.

  # Sample of regular route:
  #   match 'products/:id' => 'catalog#view'
  # Keep in mind you can assign values other than :controller and :action

  # Sample of named route:
  #   match 'products/:id/purchase' => 'catalog#purchase', :as => :purchase
  # This route can be invoked with purchase_url(:id => product.id)

  # Sample resource route (maps HTTP verbs to controller actions automatically):

  #   resources :products

  # Sample resource route with options:
  #   resources :products do
  #     member do
  #       get 'short'
  #       post 'toggle'
  #     end
  #
  #     collection do
  #       get 'sold'
  #     end
  #   end

  # Sample resource route with sub-resources:
  #   resources :products do
  #     resources :comments, :sales
  #     resource :seller
  #   end

  # Sample resource route with more complex sub-resources
  #   resources :products do
  #     resources :comments
  #     resources :sales do
  #       get 'recent', :on => :collection
  #     end
  #   end

  # Sample resource route within a namespace:
  #   namespace :admin do
  #     # Directs /admin/products/* to Admin::ProductsController
  #     # (app/controllers/admin/products_controller.rb)
  #     resources :products
  #   end

  # You can have the root of your site routed with "root"
  # just remember to delete public/index.html.
  # root :to => 'welcome#index'

  # See how all your routes lay out with "rake routes"

  # This is a legacy wild controller route that's not recommended for RESTful ap
plications.
  # Note: This route will make all actions in every controller accessible via GE
T requests.
  # match ':controller(/:action(/:id))(.:format)'
end

person Jeff Gray    schedule 01.04.2013    source แหล่งที่มา


คำตอบ (3)


หน้าเว็บของคุณกำลังจะมาจริง ๆ (ลอง http://peaceful-chamber-6371.herokuapp.com/leads) เพียงแต่ไม่มีการกำหนดเส้นทางสำหรับรูท (http://peaceful-chamber-6371.herokuapp.com/)

เนื่องจากคุณตั้งใจให้ไซต์นี้เป็นไซต์หน้าเดียว ฉันจะ "ย้าย" นำไปสู่ราก:

BoothLeads::Application.routes.draw do
   resources :leads, path: ''
end

นั่นจะทำให้โอกาสในการขายของคุณพร้อมใช้งานที่ localhost:3000 ในพื้นที่ และที่ http://peaceful-chamber-6371.herokuapp.com/ บน Heroku

person Dan Wich    schedule 01.04.2013
comment
ฉันหมายถึงหน้าเดียว มันเป็นแค่หน้าย่อยของโอกาสในการขาย... ซึ่งเป็นโครง ดังนั้นให้เพิ่มข้อมูลและแสดงรายการ แถบนำทางเต็มไปด้วยลิงก์ภายนอก - person Jeff Gray; 01.04.2013
comment
ตกลง. ตราบใดที่ LeadsController.index เป็นสถานที่ที่ดีสำหรับให้ผู้คนเข้ามาเมื่อพวกเขาป้อน URL คำตอบของฉันก็น่าจะเป็นสิ่งที่คุณต้องการ - person Dan Wich; 01.04.2013
comment
พยายามแล้ว.... ยังมีข้อผิดพลาดทั้งว่างเปล่า '' และลิงก์ http://... โปรดยกโทษให้ฉันด้วยเพราะฉันยังใหม่กับการอัปโหลดไปยัง heroku - person Jeff Gray; 01.04.2013
comment
โอเค ฉันขอตรวจสอบให้แน่ใจว่าแต่ละขั้นตอนไม่มีอะไรผิดพลาด หากคุณแทนที่ Route.rb ด้วยอันที่อยู่ในคำตอบของฉัน จากนั้นรีสตาร์ทเซิร์ฟเวอร์ภายในเครื่องของคุณ http://localhost:3000/ (ไม่มี /leads) ใช้งานได้หรือไม่ - person Dan Wich; 01.04.2013
comment
ตกลง. หากคุณเช็คอิน Routes.rb ดังนั้น git push heroku master และอาจ heroku restart เพื่อความปลอดภัย peaceful-chamber- 6371.herokuapp.com ขึ้นมาเหรอ? - person Dan Wich; 01.04.2013
comment
ใน Production.rb ฉันได้เปลี่ยนแปลงสิ่งนี้แล้ว # อย่าถอยกลับไปยังไปป์ไลน์ของสินทรัพย์ หากพลาดเนื้อหาที่คอมไพล์แล้ว config.assets.compile = true - person Jeff Gray; 01.04.2013
comment
เพิ่มรหัส Production.rb และ development.rb ของฉันขึ้นไปด้านบน ..... ถ้าคุณดูที่แหล่งที่มาของหน้า มันเป็นหน้า 404 ของฉันที่ heroku กำลังวางไว้ ... แค่ fyi - person Jeff Gray; 01.04.2013
comment
ฉันคิดว่าสภาพแวดล้อมของคุณโอเค ฉันไม่สามารถเข้าใจได้ว่าทำไมเส้นทางจึงเหมาะกับคุณในพื้นที่ (เช่นคุณไม่จำเป็นต้องเพิ่ม /leads หลังจาก localhost:3000 อีกต่อไป) แต่ก็ยังใช้งานไม่ได้กับ Heroku คุณสามารถโพสต์ผลลัพธ์ของ heroku run cat config/routes.rb ได้หรือไม่ - person Dan Wich; 01.04.2013
comment
ฉันจะโพสต์มันตอนนี้ (จะโพสต์ในคำถามเดิมเพื่อเก็บทุกอย่างไว้ด้วยกัน) ..... นี่เป็นอีกเรื่องแปลก ๆ ....... IDK ถ้า heroku กำลังผลักดันฉันอยู่ !!!! บันทึกกิจกรรมของฉันไม่แสดงอะไรเลยในช่วงสองชั่วโมงที่ผ่านมาภายใต้กิจกรรมในบัญชีแอป heroku ของฉัน..... เราจำเป็นต้องพุชไปยังฐานข้อมูลใหม่และดูว่ามีการเปลี่ยนแปลงหรือไม่???? หมายเหตุด้านข้าง หมายเหตุด้านข้าง หมายเหตุด้านข้าง:::: คุณจะเห็นได้จากการทดสอบ cat config ว่ามันไม่ได้อัปเดตเส้นทางของฉัน .. นั่นอาจเป็นปัญหา มันไม่ได้รับการผลักดันใช่หรือไม่ ทางออกสำหรับเรื่องนั้นเหรอ? - person Jeff Gray; 01.04.2013
comment
ฮ่าฮ่า ฉันไม่เคยสังเกตเห็นบันทึกกิจกรรม Heroku เลยด้วยซ้ำ นั่นมีประโยชน์มาก การขาดการพุชเป็นปัญหาของคุณอย่างแน่นอน คุณจะเห็นว่าไฟล์ Routes.rb ของคุณบน heroku ไม่มีส่วน path: '' ใช่แล้ว ฉันจะลองผลักดันไปที่แอป Heroku ใหม่ - person Dan Wich; 01.04.2013
comment
นอกจากนี้ คุณสามารถตรวจสอบ git status เพื่อให้แน่ใจว่าไม่มีการเปลี่ยนแปลงใดที่ไม่ได้ถูกจัดเตรียมสำหรับการคอมมิตหรือการเปลี่ยนแปลงที่จะคอมมิต - person Dan Wich; 01.04.2013

คุณได้ย้ายฐานข้อมูลของคุณหรือไม่?

heroku run rake db:migrate

คุณได้ปรับขนาดแอปของคุณหรือไม่?

heroku ps:scale web=1
person muttonlamb    schedule 01.04.2013
comment
เพิ่งรัน heroku ps:scale web=1 ... restart แล้วเราก็ยังไม่มีอะไรเลย - person Jeff Gray; 01.04.2013
comment
โอ้เพื่อน ขอบคุณสำหรับ db:migrate... ฉันคิดว่ามันกำลังทำแบบนั้นโดยอัตโนมัติ - ไม่ได้แสดงเป็นขั้นตอนในคำแนะนำอย่างใดอย่างหนึ่งที่ฉันดู - person khiner; 27.09.2013

คุณใช้ Rails 4.0 หรือไม่? หากเป็นเช่นนั้น แอปของคุณยังอยู่ในช่วงเริ่มต้นและยังคงใช้หน้าแอปพลิเคชัน Rails เริ่มต้นเป็นโฮมเพจ / รูทหรือไม่ หากเป็นเช่นนั้น ใน Rails 4 หน้าคงที่นี้จะไม่มีอยู่แล้ว และจะทำให้เกิดข้อผิดพลาด 404 เมื่อย้ายไปยัง Heroku ในการแก้ไข คุณจะต้องกำหนดหน้าแรกจริง และตั้งค่ารูทในไฟล์เส้นทาง

person Joe Logan    schedule 11.08.2014