Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 984333
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T04:59:55+00:00 2026-05-16T04:59:55+00:00

I’m trying to deploy my RoR app. It seems to be working fine on

  • 0

I’m trying to deploy my RoR app. It seems to be working fine on my development machine when RAILS_ENV is set to development. However, when I put it on the production server and set it into production mode I get the following error after navigating to the start page:

=> Booting Mongrel
=> Rails 2.3.8 application starting on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server


Processing PagesController#show (for 173.79.8.203 at 2010-08-09 20:17:21) [GET]
  Parameters: {"slug"=>[], "action"=>"show", "controller"=>"pages"}

NoMethodError (undefined method `view_paths' for #<Liquid::Template:0x7fc6f8b5f8a8>):




Processing ApplicationController#show (for 173.79.8.203 at 2010-08-09 20:17:21) [GET]
  Parameters: {"slug"=>[], "action"=>"show", "controller"=>"pages"}

NoMethodError (undefined method `view_paths' for #<Liquid::Template:0x7fc6f8b5f8a8>):


Rendering /home/flavorpulse/sites/public.flavorpulse.com/public/500.html (500 Internal Server Error)

The weird part is that in my development environment I do get a similar output but I don’t get redirected to 500.html. The similar output on my dev machine is:

=> Booting Mongrel
=> Rails 2.3.8 application starting on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
  SQL (0.1ms)   SET NAMES 'utf8'
  SQL (0.1ms)   SET SQL_AUTO_IS_NULL=0


Processing PagesController#show (for 127.0.0.1 at 2010-08-09 16:07:50) [GET]
  Parameters: {"slug"=>[], "action"=>"show", "controller"=>"pages"}
  Domain Columns (1.4ms)   SHOW FIELDS FROM `domains`
  Domain Load (45.8ms)   SELECT * FROM `domains` WHERE (`domains`.`domain_name` = 'localhost') LIMIT 1
  Account Columns (1.6ms)   SHOW FIELDS FROM `accounts`
  Account Load (0.8ms)   SELECT * FROM `accounts` WHERE (`accounts`.`id` = 1) 
  CACHE (0.0ms)   SELECT * FROM `accounts` WHERE (`accounts`.`id` = 1) 
  Theme Columns (2.0ms)   SHOW FIELDS FROM `themes`
  Theme Load (0.8ms)   SELECT * FROM `themes` WHERE (`themes`.`id` = 1) 
  PageTemplate Columns (1.4ms)   SHOW FIELDS FROM `page_templates`
  PageTemplate Load (0.3ms)   SELECT * FROM `page_templates` WHERE (`page_templates`.`name` = 'index') AND (`page_templates`.theme_id = 1) LIMIT 1
  CACHE (0.0ms)   SELECT * FROM `domains` WHERE (`domains`.`domain_name` = 'localhost') LIMIT 1
  CACHE (0.0ms)   SELECT * FROM `accounts` WHERE (`accounts`.`id` = 1) 
  CACHE (0.0ms)   SELECT * FROM `accounts` WHERE (`accounts`.`id` = 1) 
  CACHE (0.0ms)   SELECT * FROM `themes` WHERE (`themes`.`id` = 1) 
  PageLayout Load (0.4ms)   SELECT * FROM `page_layouts` WHERE (`page_layouts`.theme_id = 1) LIMIT 1
  PageLayout Columns (1.4ms)   SHOW FIELDS FROM `page_layouts`
  CACHE (0.0ms)   SELECT * FROM `domains` WHERE (`domains`.`domain_name` = 'localhost') LIMIT 1
  CACHE (0.0ms)   SELECT * FROM `accounts` WHERE (`accounts`.`id` = 1) 
  CACHE (0.0ms)   SELECT * FROM `accounts` WHERE (`accounts`.`id` = 1) 
  Page Load (0.3ms)   SELECT * FROM `pages` WHERE (`pages`.`show_in_navigation` = 1) AND (`pages`.account_id = 1) 

NoMethodError (undefined method `view_paths' for #<Liquid::Template:0x10337ef98>):


Rendering rescues/layout (internal_server_error)

But you can see the major difference is that on the production server it doesn’t look like any calls are being made to the database.

Updated 2010/08/09 @ 17:41 EST:

Here’s my controller code which shows I’m not doing anything with an instance variable named template:

class PagesController < ApplicationController
  def show
    if params[:slug].blank?
      # show homepage
      page = current_account.theme.page_templates.find_by_name("index")
    else
      # show the right page
      #TODO: This doesn't support slashes in the slug. This URL will make this barf: about/us/us/us/us/about-us.html
      page = Page.first(:conditions => ["account_id = :account_id AND slug = :slug", { :account_id =>  current_account.id, :slug => params[:slug] }])
    end

    if page.nil?
      #TODO: Render a better 404 page.
      content = "4oh4 - File Not Found"
    else
      content = page.content      
    end

    assigns = {
    }
    render_page(content, assigns)
  end
end
  • 1 1 Answer
  • 1 View
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T04:59:57+00:00Added an answer on May 16, 2026 at 4:59 am

    don’t use @template. Use this (performance may suck though … you may have to optimize that later):

    final_render = Liquid::Template.parse(page_layout)  # Parses and compiles the template
    final = final_render.render(assigns)
    
    render :text => final
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

No related questions found

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.