problems with stripe and coffeescript

Hi! So I have followed the etsy tutorial to validate card details. Once i have put the coffeescript in i am getting the following error.... ExecJS::RuntimeError in Devise::Sessions#new SyntaxError: [stdin]:6:22: reserved word "function" (in /Users/Emma01/Sincuru/new/site/app/assets/javascripts/orders.js.coffee) Extracted source (around line #6): 3 4 5 6 7 8 9 <head> <title>Site</title> <%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true %> <%= javascript_include_tag 'application', 'data-turbolinks-track' => true %> <%= javascript_include_tag "https://js.stripe.com/v2/" %> <%= csrf_meta_tags %> <%= tag :meta, :name => "stripe-key", :content => ENV["STRIPE_PUBLIC_KEY"] %> Any suggestions?

Posted over 5 years ago by Emma
Posted over 5 years ago by Alex Yang

Try downloading nodejs here: http://nodejs.org/download/. Restart your computer and try it again. Let me know if it works!

0
Posted over 5 years ago by Emma

I think it might have been a problem with indentation because when i deleted and tried again it worked?!

0
Posted over 5 years ago by Alex Yang

Ah sorry, just saw your comment. CoffeeScript is indentation-sensitive, so make sure you indent properly!

0