2014-04-27 2 views
1

RoR 앱을 작성하여 배포하려고했습니다.HAML 및 ERB 렌더링 문제

그럼, 다음과 같은 문제가 내 Linode에 나타납니다. 브라우저 페이지에는 내가 생각한 페이지가 아닌 index.html.haml에 작성한 코드 만 표시됩니다. 대신 index.html을 사용하려고하면 유효한 렌더링 페이지가 나타납니다. index.html.erb를 사용하려고하면 부분적으로 렌더링됩니다 (예 : 입력, 렌더링,하지만 erb 코드와 CSS가없는 문자열이 많음)

동시에 내 로컬 서버 OS X)가 잘 작동하고 html 기반 페이지가 정상 렌더링 된 html 페이지로 표시됩니다. (나는 열매를 맺고 있습니다!)

해결 방법을 이해하도록 도와주세요.

우분투 12.04, 아파치 2.22, 루비 2.0.0, 3.2.12 레일, HAML 4.0.5, HAML 레일 사전에 0.4

감사합니다!

UPD Gemfile

source 'https://rubygems.org' 

gem 'rails', '3.2.12' 

# Bundle edge Rails instead: 
# gem 'rails', :git => 'git://github.com/rails/rails.git' 

gem 'mysql2' 
gem 'devise', '3.0.3' 
gem 'debugger' 


group :assets do 
    gem 'coffee-rails', '~> 3.2.1' 
    gem 'uglifier', '>= 1.0.3' 
    gem 'therubyracer', :platform => :ruby 
end 

gem 'less-rails', '~> 2.2.6' 
gem 'sass-rails', '~> 3.2.3' 
gem 'twitter-bootstrap-rails', '2.2.4' 
gem 'friendly_id', '~> 3.2' 

gem 'jquery-rails' 
gem 'haml', '~> 4.0.0' 
gem 'cancan' 
gem 'haml-rails' 
gem 'rails-i18n', '~> 3.0.0.pre' 
gem 'i18n-js' 
gem 'obscenity' 
gem 'thin' 
gem 'will_paginate-bootstrap' 
gem 'nifty-generators', :group => :development 
gem 'rails_12factor' 
gem 'mocha', :group => :test 

group :development do 
    gem 'sqlite3' 
    gem 'capistrano', '2.15.5' 
    #gem 'capistrano-rails' 
    #gem 'capistrano-bundler' 
    #gem 'capistrano-rvm' 
    #gem 'rvm1-capistrano3', :require => false 
end 

gem 'net-ssh', '2.7.0' 

gem 'foreman' 

아파치 설정은

<VirtualHost *:80> 
    # Admin email, Server Name (domain name), and any aliases 
    ServerAdmin [email protected] 
    ServerName www.mysite.com 
    ServerAlias mysite.com 
    Options Indexes ExecCGI FollowSymLinks 
    PassengerResolveSymlinksInDocumentRoot on 
    RailsEnv production 
    RailsBaseURI/

    # Index file and Document Root (where the public files are located) 
    DirectoryIndex index.html index.php index.html.erb index.html.haml 
    DocumentRoot /home/deploy/public/mysite.com/public/app/views/home 

    # Log file locations 
    LogLevel warn 
    ErrorLog /home/deploy/public/mysite.com/log/error.log 
    CustomLog /home/deploy/public/mysite.com/log/access.log combined 
</VirtualHost> 
+0

thin은 '있는 그대로'즉, 기본 구성을 수정하지 않았으며, Apache에도 로켓 과학이없고 초 단위로 구성을 게시합니다. – Maria

답변