Heroku - страница не существует

Получение ошибки о том, что моя страница не существует при попытке доступа к моему приложению. Он работает локально, но не в системе, я запустил rake и route и перезапустил, без разрешения. Тем не менее, «Страница не существует» показывает мой собственный значок. ЭТО ПРОСТОЕ ОДНОСТРАНИЧНОЕ ПРИЛОЖЕНИЕ ДЛЯ ИСПОЛЬЗОВАНИЯ В МОЕЙ ЛИЧНОЙ КОМПАНИИ, ОЧЕНЬ БАЗОВОЕ, ничего лишнего, один набор лесов и все.... Было разработано в 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

Производство.рб

    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

Девелопмент.рб

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
Ok. Пока LeadsController.index является хорошим местом для людей, которые вводят URL-адрес, мой ответ, вероятно, то, что вы хотите. - person Dan Wich; 01.04.2013
comment
попробовал это .... все еще ошибки как с пустой '', так и со ссылкой http:// ... пожалуйста, простите меня, так как я новичок в загрузке на героку - person Jeff Gray; 01.04.2013
comment
Хорошо, позвольте мне убедиться, что с каждым отдельным шагом все в порядке. Если вы замените свой route.rb на тот, что в моем ответе, а затем перезапустите локальный сервер, будет ли работать http://localhost:3000/ (без /leads)? - person Dan Wich; 01.04.2013
comment
Ok. Если вы затем регистрируетесь в route.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... просто к вашему сведению. - 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 ..... нам нужно нажать на новую базу данных и посмотреть, примет ли она изменения????? БОКОВОЕ ПРИМЕЧАНИЕ БОКОВОЕ ПРИМЕЧАНИЕ БОКОВОЕ ПРИМЕЧАНИЕ:::: Вы можете видеть из этого теста конфигурации кошки, что он не обновляет мои маршруты. Вероятно, это проблема, он не принимает толчок? решение для этого? - person Jeff Gray; 01.04.2013
comment
Ха-ха, я даже не заметил журнал активности Heroku, это полезно. Отсутствие push-уведомлений, безусловно, ваша проблема, вы можете видеть, что ваш файл route.rb на героку не имеет части 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
только что запустил хероку ps:scale web=1 ... перезапустил и ну у нас все равно ничего. - person Jeff Gray; 01.04.2013
comment
О, чувак, спасибо за db:migrate... На самом деле я думал, что это делается автоматически - не появлялся как шаг ни в одном из руководств, которые я смотрел. - person khiner; 27.09.2013

Вы используете Rails 4.0? Если да, то находится ли ваше приложение на ранних стадиях и все еще использует страницу приложения Rails по умолчанию в качестве домашней страницы/корня? Если это так, то в Rails 4 этой статической страницы больше не существует, и после переноса на Heroku она выдаст ошибку 404. Чтобы исправить это, вам нужно определить фактическую домашнюю страницу и установить корень в файле маршрутов.

person Joe Logan    schedule 11.08.2014