2017-12-19 1 views
0

여기 Heroku에 밀어 넣은 후 여기에 내 Heroku 로그가 있습니다. "pg"로 데이터베이스를 구성하고 "Sqlite3"을 사용하여 개발했습니다. 내가 그것을 배치했을 때 나는 틀린 일을 했음에 틀림 없다.내 rails5 응용 프로그램이 성공적으로 배포되었지만 다른 페이지로 이동할 때 중단됩니다

###### WARNING: 
     Removing `Gemfile.lock` because it was generated on Windows. 
     Bundler will do a full resolve so native gems are handled properly. 
     This may result in unexpected gem versions being used in your app. 
     In rare occasions Bundler may not be able to resolve your dependencies at all. 
     https://devcenter.heroku.com/articles/bundler-windows-gemfile 
-----> Installing dependencies using bundler 1.15.2 
     Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 
     The dependency tzinfo-data (>= 0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby but the dependency is only for x86-mingw32, x86-mswin32, x64-mingw32, java. To add those platforms to the bundle, run `bundle lock --add-platform x86-mingw32 x86-mswin32 x64-mingw32 java`. 

###### WARNING: 
     Removing `vendor/bundle`. 
     Checking in `vendor/bundle` is not supported. Please remove this directory 
     and add it to your .gitignore. To vendor your gems with Bundler, use 
     `bundle pack` instead. 
###### WARNING: 
     Removing `Gemfile.lock` because it was generated on Windows. 
     Bundler will do a full resolve so native gems are handled properly. 
     This may result in unexpected gem versions being used in your app. 
     In rare occasions Bundler may not be able to resolve your dependencies at all. 
     https://devcenter.heroku.com/articles/bundler-windows-gemfile 
###### WARNING: 
     No Procfile detected, using the default web server. 
     We recommend explicitly declaring how to boot your server process via a Procfile. 
     https://devcenter.heroku.com/articles/ruby-default-web-server 
-----> Ruby app detected 
-----> Compiling Ruby/Rails 
-----> Using Ruby version: ruby-2.4.2 
###### WARNING: 
     You have the `.bundle/config` file checked into your repository 
     It contains local state like the location of the installed bundle 
     as well as configured git local gems, and other settings that should 
     not be shared between multiple checkouts of a single repo. Please 
     remove the `.bundle/` folder from your repo and add it to your `.gitignore` file. 
     https://devcenter.heroku.com/articles/bundler-configuration 
-----> Installing dependencies using bundler 1.15.2 
     Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 --deployment 

내 컨트롤러는 여기에 구문 오류가 있는지 잘 모르겠습니다. 누군가 컨트롤러를보고 힌트를 제공 할 수 있습니까? 고객 devise_for : 여기

class CustomersController < ApplicationController 
    before_action :set_customer, only: [:show, :edit, :update, :destroy] 


     def home 
     end 

     # GET /customers 
     # GET /customers.json 
     def index 
     if params[:refund].blank? 
      @customers = Customer.all 
     else 
      @refund_id = Refund.find_by(status: params[:refund]).id 
      @customers = Customer.where(:refund_id => @refund_id).order("created_at DESC") 
     end 
     end 

     # GET /customers/1 
     # GET /customers/1.json 
     def show 
     end 

     # GET /customers/new 
     def new 
     @customer = current_user.customers.build 
     @refund = Refund.all.map{ |c| [c.status, c.id]} 
     end 

     # GET /customers/1/edit 
     def edit 
     @refunds = Refund.all.map{ |c| [c.status, c.id]} 
     end 

     # POST /customers 
     # POST /customers.json 
     def create 
     respond_to do |format| 
      @refund = Refund.all.map{ |c| [c.status, c.id]} 
      @customer = current_user.customers.build(customer_params) 
      @customer.refund_id = params[:refund_id] 

      if @customer.save 
      format.html { redirect_to @customer, notice: "You have successfully added a refund for #{@customer.last_name}." } 
      format.json { render :show, status: :created, location: @customer } 
      else 
      format.html { render :new } 
      format.json { render json: @customer.errors, status: :unprocessable_entity } 
      end 
     end 
     end 

     # PATCH/PUT /customers/1 
     # PATCH/PUT /customers/1.json 
     def update 
     respond_to do |format| 
      if @customer.update(customer_params) 
      format.html { redirect_to @customer, notice: "You have successfully updated #{@customer.last_name}\'s refund."} 
      format.json { render :show, status: :ok, location: @customer } 
      else 
      format.html { render :edit } 
      format.json { render json: @customer.errors, status: :unprocessable_entity } 
      end 
     end 
     end 

     # DELETE /customers/1 
     # DELETE /customers/1.json 
     def destroy 
     @customer.destroy 
     respond_to do |format| 
      format.html { redirect_to customers_url, notice: "You have successfully deleted #{@customer.last_name}\'s refund." } 
      format.json { head :no_content } 
     end 
     end 



     private 
     # Use callbacks to share common setup or constraints between actions. 
     def set_customer 
      @customer = Customer.find(params[:id]) 
     end 

     # Never trust parameters from the scary internet, only allow the white list through. 
     def customer_params 
      params.require(:customer).permit(:first_name, :last_name, :phone_number, :amount, :note, :refund_id) 
     end 
    end 

내 route.rb 파일 Rails.application.routes.draw, http://guides.rubyonrails.org/routing.html GET '고객/집' 자원이 파일 내에서 사용 가능한 DSL에 대한 자세한 내용은 #를 참조 할 것입니다 : 사용자 루트 '고객 번호 지수' 끝

+0

를 제거해야합니다 포함 데이터베이스를? –

+0

'heroku run rails db : migrate'를 실행하여 마이그레이션을 실행했지만 다른 페이지를 방문 할 때도 중단됩니다. 다음은 https://a1plusfinancial.herokuapp.com/ –

+0

로그인 페이지가 작동하는 링크입니다. 고객 컨트롤러와 비슷한 것 같습니다. $ rake 경로의 출력과 고객 컨트롤러의 코드를 게시 할 수 있습니까? –

답변

0

난 당신이

당신의 Gemfile.lock를 수행 할 필요가 당신이에게 Heroku에 배포를 들어, Windows를 사용하는 생각 파일은 아마 당신은 또한 당신이 설정 마이그레이션을 실행 않은 사이트에 대한 링크를 제공 할 수 있습니다, 거기에 오류가 어딘가가

PLATFORMS 
    ruby 
    x86-mingw32 

당신은

x86-mingw32 

https://devcenter.heroku.com/articles/bundler-windows-gemfile

관련 문제