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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T14:06:37+00:00 2026-06-12T14:06:37+00:00

I was able to integrate stripe using Ryan Bates’ tutorial. Now, I’d like to

  • 0

I was able to integrate stripe using Ryan Bates’ tutorial. Now, I’d like to be able to allow users to update their Credit Card Information. I’ve set up a form, at change_plan_path, which sends A PUT request to users/update_card . However, when I click the Update Credit Card Button, I get the error :

Template is missing

Missing template users/update_card, application/update_card with {:locale=>[:en], :formats=>[:html], :handlers=>[:erb, :builder, :coffee]}. Searched in: * "C:/Sites/dentist/app/views"

Here’s the form I’m using to send the PUT Request :

    <%= form_tag("/users/update_card", :method => "put", :class => "edit_user", :id => "change_card" ) do %>
  <%= hidden_field_tag :stripe_card_token %>

  <div id="stripe_error" class="alert">   
      <noscript>JavaScript is not enabled and is required for this form. First enable it in your web browser settings.</noscript>
  </div>

    <div class="field">
      <%= label_tag :card_number, "Credit Card Number" %>
      <%= text_field_tag :card_number, nil, name: nil %>
    </div>
    <div class="field">
      <%= label_tag :card_code, "Security Code on Card (CVV)" %>
      <%= text_field_tag :card_code, nil, name: nil %>
    </div>
    <div class="field">
      <%= label_tag :card_month, "Card Expiration" %>
      <%= select_month nil, {add_month_numbers: true}, {name: nil, id: "card_month"} %>
      <%= select_year nil, {start_year: Date.today.year, end_year: Date.today.year+15}, {name: nil, id: "card_year"} %>
    </div>


  <%= submit_tag("Update My Credit Card", :class => "button") %>

Here’s my routes.rb file :

  put '/users/update_plan',  to: 'users#update_plan'
  put '/users/update_card',  to: 'users#update_card'
  resources :users
  resources :sessions, only: [:new, :create, :destroy]
  resources :phones, only: [:new, :create, :destroy]
  resources :find_numbers, only: [:new, :create]  

  match '/signup',  to: 'users#new'
  match '/login',  to: 'sessions#new'
  match '/signout', to: 'sessions#destroy', via: :delete
  match '/change_plan',  to: 'users#change_plan'
  match '/change_card',  to: 'users#change_card'

  root  to: 'static_pages#home'

  match '/product_demo', to: 'static_pages#product_demo'

  match '/pricing', to: 'plans#index'

  match '/contact', to: 'static_pages#contact'

And here’s the Stripe Coffescript I’m using. It doesn’t seem to even work yet, but maybe it has something to do with it. (Start with changecard.setupForm() )

jQuery ->
  Stripe.setPublishableKey($('meta[name="stripe-key"]').attr('content'))
  subscription.setupForm()

subscription =
  setupForm: ->
    $('#new_user').submit ->
      $('input[type=submit]').attr('disabled', true)
      if $('#card_number').length
        subscription.processCard()
        false
      else
        true

  processCard: ->
    card =
      number: $('#card_number').val()
      cvc: $('#card_code').val()
      expMonth: $('#card_month').val()
      expYear: $('#card_year').val()
    Stripe.createToken(card, subscription.handleStripeResponse)

  handleStripeResponse: (status, response) ->
    if status == 200
      $('#user_stripe_card_token').val(response.id)
      $('#new_user')[0].submit()
    else
      $('#stripe_error').text(response.error.message)
      $('input[type=submit]').attr('disabled', false)

 changecard.setupForm()

changecard =
  setupForm: ->
    $('#change_card').submit ->
      $('input[type=submit]').attr('disabled', true)
      if $('#card_number').length
        subscription.processCard()
        false
      else
        true

  processCard: ->
    card =
      number: $('#card_number').val()
      cvc: $('#card_code').val()
      expMonth: $('#card_month').val()
      expYear: $('#card_year').val()
    Stripe.createToken(card, subscription.handleStripeResponse)

  handleStripeResponse: (status, response) ->
    if status == 200
      $('#user_stripe_card_token').val(response.id)
      $('#change_card')[0].submit()
    else
      $('#stripe_error').text(response.error.message)
      $('input[type=submit]').attr('disabled', false) 
  • 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-12T14:06:38+00:00Added an answer on June 12, 2026 at 2:06 pm

    Usually when you get this error it’s after the controller action has executed and it’s trying to render something back to the browser. Unless you explicitly tell it what to render, it will try and serve a view based on the controller/action. Without knowing what your controller looks like, it’s hard to say exactly what you what to happen after the info has been updated. I would expect you’d either want to redirect to a new page, or render a page.

    If you want to redirect, you can do with with redirect_to and specify the path. In the following example, I’m assuming you want to redirect to the user show action:

    redirect_to user_url(current_user)
    

    If you want to render some content, you will need to create an html template for update_card.html.erb or render some arbitrary content like:

    render :text => "yay"
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using SQL Server 2008 FTS and I'd like to be able to integrate
I would like to integrate CXF with Google Guice. I am already using Guice
Hi I'm able to successfully integrate iphone app with facebook framework. But I need
I was cheating from a sample program to integrate with Flash. I able to
Not able to store all binary data values into sqlite3 table using QT. For
I am developing a video recording application and I would like to be able
I am just trying to integrate textarea in dhtml environment. I am able to
I know its possible to integrate jQuery within Firefox addons, but are we able
I am working on a site that will allow users to create an account.
I successfully integrate the face-book API and able to get all user profile but

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.