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 9307503
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 19, 20262026-06-19T00:24:26+00:00 2026-06-19T00:24:26+00:00

Before the migration, the website was totally ok. Now we have migrated to a

  • 0

Before the migration, the website was totally ok. Now we have migrated to a new server and the website started showing these kind of error for some links: http://babybum.proj.dev.doo.is/sao-paulo/planta

This is the definition of “area” in fair-controller

    def area
       @area_name = BB_MENU_AREAS_SLUG.select {|k, v| v == params[:area]}.keys.first
       if @area_name
          @area = Snippet.find_by_identifier([params[:fair_location], @area_name.to_s].join('-'))
       else
          redirect_to root_path
       end
    end

The snippet of BB_AREAS_SLUG

BB_AREAS = {
:about          => {:link => "quem somos", :slug => "quem-somos"},
:expositors     => {:link => "expositores",:slug => "expositores"},
:map            => {:link => "planta", :slug => "planta"},
:activities     => {:link => "atividades",:slug => "atividades"},
:address        => {:link => "como chegar",:slug => "como-chegar"},
:support        => {:link => "apoio", :slug => "apoio"},
:optin          => {:link => "cadastro",:slug => "cadastro"},
:how_expositors => {:link => "como expor",:slug => "como-expor"},
:press          => {:link => "imprensa",:slug => "imprensa"},
:contact        => {:link => "contato",:slug => "contato"},
}

BB_MENU_AREAS       = BB_AREAS.each_with_object({}) { |(k, v), h| h[k] = v[:link]}
BB_MENU_AREAS_SLUG  = BB_AREAS.each_with_object({}) { |(k, v), h| h[k] = v[:slug]}

Could someone help me?

Thank you

  • 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-06-19T00:24:27+00:00Added an answer on June 19, 2026 at 12:24 am

    Propably the problem is another Ruby version. I don’t have 1.8 to test it, but propably on old server you have 1.8.x and now is 1.9.x. You need to change

    @area_name = BB_MENU_AREAS_SLUG.select {|k, v| v == params[:area]}.keys.first
    

    to

    @area_name = Hash[BB_MENU_AREAS_SLUG.select {|k, v| v == params[:area]}].keys.first
    

    or even refractor it to:

    @area_name = BB_MENU_AREAS_SLUG.find { |_, v| v == params[:area] }.first
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have website working fine before. But now its not able to connect to
I have just started working with a new company in a very small IT
Before asking the question let me preface with the fact that I am new
Before asking my question, let me explain the context. CONTEXT: I have a web
(Before I start, yes I have asked a similar question before; unfortunately due to
Before saying anything I have to say that, albeit I'm an experienced programmer in
Before I ask the question let me state that I have attempted to google
I have recently migrated my MVC application from Visual Studio 2010 to Visual Studio
Before applying a migration in EF Code First, you can ask to see the
This migration seem to be really challenging. What i'm trying to do now is

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.