2013-01-08 5 views
0

로컬 서버에서 올바르게 표시되는 간단한 '문의하기'사이트가 있습니다.Heroku가 application.html.haml을 읽지 않습니다.

작은 header와 footer가있는 view/layout 내부에 application.html.haml이 있습니다. 이것은 '문의'섹션이있는 컨테이너를 '산출'합니다.

문제는 Heroku에 업로드 할 때 연락처 섹션 만 표시된다는 것입니다. 머리글 없음, 바닥 글 없음.

나는 로켓 과학이 아니지만 그것을 이해할 수 없다고 확신한다.

도움 주셔서 감사합니다. http://hik-offline.herokuapp.com/

routes.rb

#force the url to work with under WWW 
    constraints(:host => "hikultura.com") do 
     match "(*x)" => redirect { |params, request| 
     URI.parse(request.url).tap { |x| x.host = "www.hikultura.com" }.to_s 
     } 
    end 

    # Defines all the routes under the language locale 
    scope "(:locale)", :locale => /es|eu|fr|en/ do 
    resources :messages 
    end 

    # Routes that work with no locale 
    match '/?locale=es' => 'messages#new' 
    match '/?locale=eu' => 'messages#new' 
    match '/?locale=fr' => 'messages#new' 
    match '/?locale=en' => 'messages#new' 

application.html.haml

<!DOCTYPE html> 


%html{:xmlns => "http://www.w3.org/1999/xhtml", :lang => "en", "xml:lang" => "en"} 

    %head 
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 
    <meta name="csrf-param" content="authenticity_token"/> 
    <meta name="keywords" content="turismo pais vasco, euskal herriko, escapadas fin de semnana pais vasco, jaia, pays basque agenda, cultura euskadi, cultura pais vasco, what to do basque country, eventos euskadi, ocio pais vasco" /> 
    <link rel="shortcut icon" href="/favicon.ico" /> 
    = title :site => "HiKultura" 

    = stylesheet_link_tag "application" 

    = javascript_include_tag "application" 
    = csrf_meta_tags 


    %body{:class => "#{controller.controller_name} container"} 
    .container 
     #header 
     .wrap 
      #logo 

      - logo_tag = image_tag("hikultura_paisvasco_euskadi_jaia_cultura_small.png", :alt => "HiKultura Logo HiKultura.com", :class => "logo_size") 
      = link_to logo_tag, root_path 
      #slogan.capital 
       =t :slogan 

      #header_right 
      #login 
       #lang 
       - [:es, :eu, :fr, :en].each do |locale| 
        %li= link_to locale, url_for(locale: locale) 

     #main 
     #cubo 
      #formulario 
      = yield 
      #info 
      =t :info 
      %br/ 
      %br/ 
      =t :info2 
      #arrow 
     #message.capital 
      #notice= notice 

     #linea 

같이 조작/메시지/new.html.haml :

은 도움이 경우 URL입니다

%h2.capital 
    =t :contact_us 

= form_for @message do |f| 
    -if @message.errors.any? 
    .error_messages 
     %h2 
     = pluralize(@message.errors.count, "error") 
     prohibited this message from being saved: 
     %ul 
      - @message.errors.full_messages.each do |msg| 
      %li 
       = msg 
    .field.capital 
    = f.label t(:name) 
    %br/ 
    = f.text_field :name, :size => 46 
    .field.capital 
    = f.label t :email 
    %br/ 
    = f.email_field :email, :size => 46 
    .field.capital 
    = f.label :content, t(:message) 
    %br/ 
    = f.text_area :content, :rows => 5, :width => 45 
    .actions.capital.theFont 
    = f.submit t(:send_message) 

답변

0

더 이상 중요하지 않습니다.

나는 새로운 레일 프로젝트를 작성하여 코드를 복사하고 작업했습니다.

감사합니다.

관련 문제