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

  • Home
  • SEARCH
  • 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 6926101
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T10:52:28+00:00 2026-05-27T10:52:28+00:00

Hi guys I remove /page from high_voltage gem with this answer. Remove page/ of

  • 0

Hi guys I remove /page from high_voltage gem with this answer.

Remove page/ of High Voltage for statics page rails

I have in my routes for high_voltage this:

match '/:id' => 'high_voltage/pages#show', :as => :static, :via => :get

For maintenance page 404 in rails 3.1 I follow this fix http://techoctave.com/c7/posts/36-rails-3-0-rescue-from-routing-error-solution with errors_controller.rb with the next code:

def routing
  render :file => "#{Rails.root}/public/404.html", :status => 404, :layout => false
 end

Then I add to routes.rb the next code for maintenance page 404 in rails

match '*a', :to => 'errors#routing'

The problem is that if I put in browser http://www.mydomain.com/sdfs dont working 404 system error and show No such page: sdfs

but however if I put http://www.mydomain.com/a_controller/action/sdfs yes working fine the fix for error 404 page.

I think that problem is my routes.rb

  • 1 1 Answer
  • 0 Views
  • 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-27T10:52:29+00:00Added an answer on May 27, 2026 at 10:52 am

    Thank you kevinthopson for mi this dont working fine :(.

    I have in my routes.rb:

    match '/:id' => 'pages#show', :as => :static, :via => :get
    

    I have added this in pages_controller.rb

    class PagesController < HighVoltage::PagesController
      rescue_from ActionView::MissingTemplate do |exception|
        render_not_found
      end
    end
    

    I have added this code to aplication_controller.rb:

    def render_not_found
       render :file => "#{Rails.root}/public/404.html", :status => 404, :layout => false
      end
    

    Working fine if you put now:

    localhost:3000/dfadsfadsf

    The problem now is that if you put for example that routes in navigation bar:

    localhost:3000/users_or_static_page/asdfadfadfa

    Dont working for me :(.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

guys i have arrays in which i have to match this kind of text
Python: How to remove all duplicate items from a list Hey guys I have
Hey guys quick question, I have an add remove script that will add a
Hi guys I wrote this code and i have two errors. Invalid rank specifier:
Hallo guys. I'm trying to remove first 3 lines and last 4 from all
Hey guys I am trying to authenticate my solution from another website I have
In zend framework, how do you guys remove the optgroup from a select element?
Guys i have a html string like below; <html> <head><title></title></head> <body>i wanna remove <span
Guys, I've came across this problem I can't resolve myselg, I'm pretty sure I
Guys, I HAVE tried reading tons of stuff about EJB. And I don't get

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.