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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T23:04:50+00:00 2026-05-26T23:04:50+00:00

This is a very strange problem. I’ve got a rails app in which I

  • 0

This is a very strange problem. I’ve got a rails app in which I am replacing one partial on the page with another using UJS. Recently, it stopped worked, so I started logging throughout the process to see where it broke. Here’s what I found:

  • After the link is clicked, the rails console tells me that everything rendered, including all the partials, and returns 200 OK.
  • A puts in the controller actions returns fine
  • A puts in the respond.do block returns fine
  • A puts in the .js.erb file returns fine

This means it’s getting all the way to running the .js.erb file and evaluating the ruby with no errors. But here’s what’s weird – none of the javascript is executing. When I run an alert(‘hello?’) in the .js.erb file, it’s not executing.

Has anyone ever run into this problem before? It seems exceedingly strange that it would run the erb evaluation but not the js. And no errors appear in the js console either.

For the record I have: cleared the cache, restarted the browser, restarted the rails app, and nothing changed.

Sample code:

# view
link_to 'example', some_path, :remote => true

# controller
respond_to do |format|
  format.js
end

# .js.erb file
alert('this never shows up');
<% puts 'this shows up in the rails console' %>

Thanks soo much to anyone who can shed a bit of light on this strange problem!

  • 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-26T23:04:51+00:00Added an answer on May 26, 2026 at 11:04 pm

    Any chance there is an error in the js? The ajax request doesn’t show up normally in the js console. http://www.alfajango.com/blog/rails-js-erb-remote-response-not-executing/

    (A similar environment runs fine on my machine)

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

Sidebar

Related Questions

I got very strange problem. I have one php website which is running in
Got a very strange problem. I've got a working copy which is from a
I'm experiencing a very strange problem with Rails and ajax using jQuery (although I
I have this very strange problem on a big flex app where it would
This is a very strange problem, and I just hope that I can clearly
This problem is very strange and I'm hoping someone can help me. For the
I have this very strange problem while compiling the project. MOC seems to be
This is a very strange problem, when my program asks the user for the
I have a very strange problem in a Flex 3.4 Datagrid. One of the
I've currently go a very strange problem. I'm using an asp.net wizard to upload

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.