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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T16:47:39+00:00 2026-05-30T16:47:39+00:00

I just installed a rails 3.0.3 project on a new machine and I’m getting

  • 0

I just installed a rails 3.0.3 project on a new machine and I’m getting some weird behavior related to the form_tag :remote => true. It seems the wrong Accept header is set in the request, so it doesn’t come in as an AJAX/JS request, but rather an HTML request. On my production server the Accept header is set correctly:

Accept:*/*;q=0.5, text/javascript, application/javascript, application/ecmascript, application/x-ecmascript

Specs:

ruby 1.8.7 (2010-08-16 patchlevel 302) [i686-linux]
Rails 3.0.3

However, on the new machine I’m setting up it looks like this:

Accept:text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8

Specs:

ruby 1.9.2p290 (2011-07-09 revision 32553) [x86_64-linux]
Rails 3.0.3

This is the code for generating the form (inside _request.html.erb)

<div id='request-translation'>
  <h2 class="tr-req left"><%= t( 'user.translation_requests.request' ) %></h2>
  <%= form_tag( request_translation_artist_song_path( @artist, @song ),
           :method => :post,
           :remote => true,
           :class => 'left',
           :style => 'margin-left: 20px;' ) %>
    <%= languages_combobox_large( @into_languages, 'language_id' ).html_safe %> 
  </form>
</div>

And of course in my controller I only respond to format.js, but the request comes in as format.html. I thought :remote => true took care of this. The generated HTML for the form looks good as well:

<form accept-charset="UTF-8" action="/xxx/request_translation" class="left" data-remote="true" format="js" method="post" style="margin-left: 20px">
  • 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-30T16:47:41+00:00Added an answer on May 30, 2026 at 4:47 pm

    Please ensure you are including jquery.js as well as *jquery_ujs.js* in your HTML header.

    jquery_ujs is responsible for sending forms via AJAX that have set the data-remote attribute. As it is unobtrusive the form will work without that as well. But it is sent via normal page request.

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

Sidebar

Related Questions

I just installed ruby on rails on windows. install mysql and created a new
We just installed Facebooker and Authlogic on a new Rails app, but the Canvas
I am new to ruby. I've just installed Ruby and Rails on my fresh
I just installed Rails, etc. on a Windows 7 machine. Created my first app,
I just installed aptana, and i have the repository for the rails project.. So
I tried out rails 3, and just started a new project. The following is
I just installed bundler for a rails 2.3.5 Spree project. After doing so, I
Hey, I am completely new to Rails and just started created my first Project,
Using VirtualBox inside of Windows7, it has Ubuntu. Just installed rails 3.1 and getting
I just installed ruby on rails on my new computer ( I was using

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.