Heroku不读取application.html.haml

时间:2013-01-08 21:33:05

标签: ruby-on-rails ruby-on-rails-3 heroku haml

我有一个简单的“联系我们”网站,本地服务器正确显示。

它有一个带有小页眉和页脚的视图/布局中的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

%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)

1 个答案:

答案 0 :(得分:0)

不再重要了。

我创建了一个新的rails项目复制代码并且工作了。

由于