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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T11:38:24+00:00 2026-06-09T11:38:24+00:00

In my rails app, I’m using Twitter bootstrap. Before, everything was working fine, but

  • 0

In my rails app, I’m using Twitter bootstrap.

Before, everything was working fine, but suddenly the modal start showing twice.
I have no idea what’s going on.. My code is like below.

devise/registrations/new.html.erb

<%= link_to "Terms of Service", terms_in_modal_path, {:class => "show-terms", :remote => true}

pages_controller

def terms_in_modal
  respond_to do |format|
    format.js
  end
end

terms_in_modal.js.erb

$("#signup-modal").html('<%= escape_javascript render(:partial => "terms_in_modal") %>');
$('#show-terms').modal('show');

_terms_in_modal.html.erb

<div id="show-terms" class="modal hide fade in">
...
</div>

After I click the link, two modals show up and the output html is like below.

<div id="signup-modal">
  <div id="show-terms" class="modal hide fade in" style="display: block; ">
    <div class="modal-header">
    ...
  </div>
</div>

<div class="modal-backdrop fade in"></div>
<div class="modal-backdrop fade in"></div>

<div id="show-terms" class="modal hide fade in" style="display: block; ">
    <div class="modal-header">
    ...
</div>

Edit1

In my staging app on Heroku, the modal work fine.
Weird thing is, I didn’t edit anything relate to modal and signup page after I push on heroku last time.
I recently change the OS to Mountain Lion, so it may relate to the OS.

Edit2

I did “git push staging master” and tried if the modal will work fine, and it is working fine.
Very weird..

  • 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-09T11:38:25+00:00Added an answer on June 9, 2026 at 11:38 am

    It does this in your local environment most likely because your compiled assets that you need for Heroku are conflicting with the assets Rails includes on the fly when your in a development environment. To prevent this, you most likely need to just rm -rf public/assets to remove your precompiled assets. You should make sure to recompile them before every push to Heroku.

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

Sidebar

Related Questions

my Rails app works fine locally. But once I put it on a server
My Rails app is starting to need complicated queries. Should I just start using
My Rails app runs fine in development mode (without caching) but in production has
My rails app runs fine on my local Ubuntu machine, but when I push
My rails app is working just fine when it is in development mode however
My Rails app works fine locally, but not on Heroku.. I can call heroku
My rails app is set up using a mysql database. When I do a
A rails app I'm working on features examples of quadratic equations. Obviously, these are
My Rails app uses the TMail plugin, but it requires a modification to Attachment.rb.
Our Rails app is using Restful Authentication for user/session management and it seems that

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.