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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T07:11:13+00:00 2026-05-26T07:11:13+00:00

Using: Rails 3.0.3 Friendly_id: 4.0.0.beta11 I have create a fully working development version of

  • 0

Using: Rails 3.0.3
Friendly_id: 4.0.0.beta11

I have create a fully working development version of an application where I got everything working, including friendly_id url:s like domain.com/cars/mitsubishi

Now I am deploying the application on Heroku but I can’t get the friendly_id to work for some reason.

Problem: When I deploy it on Heroku it gives me “name” as friendly_id and not slug_en or slug_se. Calculation.first.friendly_id gives for example “I am a calculation” as opposed to “i-am-a-calculation” which would be the content of slug_en.

Model (Calculation)

  extend FriendlyId
  friendly_id :name, :use => :slugged, :use => I18n

Migration (Calculation):

        t.string :slug_en
        t.string :slug_se

Migratiotion2:

add_index :calculations, :slug_en, :unique => true
add_index :calculations, :slug_se, :unique => true 

The problem is that I need to push (heroku db:push) my local database to Heroku (since it is filled with data) and thus I am not sure how much I can trust the migrations. As far as I understand, they get overwritten with db:push.

Now, that shouldn’t really matter since it works fine locally. If I use I18n.locale = :se it will give me the slug_se as id and slug_en for :en.

Worth to mention is that Heroku uses postgre and I use mysql locally, if that matters.

My questions:

  1. What could typically be the problem if I get the name-attribute as friendly_id instead of the slug_en or slug_se
  2. Is there anything wrong with the code that I have submitted here?
  3. Could postgre / mysql-differences cause this?
  4. Is it a matter of indices not being created on my Heroku installation?

Thanks!

  • 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-26T07:11:13+00:00Added an answer on May 26, 2026 at 7:11 am

    It seemed like the problem lies in that when I upload the files to Heroku. Heroku uses friendly_id 4.0.0.beta8 and it is first in 4.0.0.beta11 where the slug_en/slug_se appears (if I understand it correctly).

    So, the problem is still not fixed but changed to quite a different type of problem that is not really related to the question posed in this ticket.

    FYI: The new problem is “Why is the version of friendly_id being changed to an earlier version”.

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

Sidebar

Related Questions

I have a Rails blog using friendly_id for creating custom urls. The blog has
I have friendly_id and ActiveScaffold installed for my Rails application. Because not all of
Using Rails v2.1, lets say you have an action for a controller that is
I am working on a project using rails 2.1.1. With the new release of
I'm kinda new to using Rails, and an app I am working on is
I am currently trying to program my first ajax interface using Rails. The application
I would like to make my application somewhat REST compliant. I am using Rails
I upgraded a Rails application from 2.1.0 to 2.2.2 using rake rails:update . This
I've been trying to make my Rails create URLs to show records by using
I used to have PHP websites and using url rewriting on picture to have

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.