Ruby console in website like www.rubymonk.com - ruby-on-rails

Maybe someone made this or knows how to make this?
How can I make console in website like http://www.rubymonk.com or http://tryruby.org/. The website will expect the user to write something to console and that will give back output with an error or the correct answer.
Thanks for the help!

Related

Ruby api errors in console - How to visualize in a better way?

Alright, kinda a weird question. But I'm gettis some random errors after I call a Ruby Api using AngularJs, as a response I get a big error in the console. Looks like the regular Ruby error screen but I would like to know if there is a better way to look at it.
Example>
Sorry if this is not the way to ask.
Thanks in advance.
Redo the request while the Network tab is open in Developers Tool. Click this request, i.e http://localhost:3000/users/sign_in.json,and then you can preview it on the right.

Twilio-Simple sms Form Box

Hi I apologize if this seems like a stupid question or if I am in the wrong section, but I am working for a startup company as their main web designer, but I was tasked with adding a simple referral code to the bottom of the page where all that is needed is where the user put their number in and they get a standard non random code outputed to their phone and if possible their number is databased and I'm just not sure where to start on this, I have followed some of their tutorials, but nothing seems to be following close to this, I have most of my experience in Javascript, CSS, and HTML and this is starting to get into some uncharted territory and I was wondering if anyone could guide me in the right way? Thank you very much for any help!

assistance with lua code in a wow

heres the problem
error T_T
its telling me that i have this problem cant figure it out. any help is appreciated
also not that great with lua but willing to try my best to figure it out. im try to rez this old addon which i really liked
okay heres that full "core.lua"
it is basically a addon for wow that talks and reponds (mostly yes / no questions)
i think its getting this error because, i read somewhere that they took arg1 out, so im not sure what to put there. might take it to a different website, just wasnt sure where to post it at first. i will go to wowace, wowprogramming.com and post there
pastebin(core.lua)
Try to delete line 608 :)
When started addon register a wisp event, and does not give parameters... If it is just a mistake or something, it'll work, but i can't just recode all of it =) Try to contact :
Stewart (01satkins#gmail.com) http://www.stewartatkins.org/
As said in code =)

Printing forms on Play Framework

I'm developing a web app, using Play framework and javascript, but exactly I don't know how to print a form (i.e. an invoice). I thought it has to be implemented on Javascript. but reading on web, I didn't find anything. I´m searching now if the implementation is on Server side (Java), but i dont have any idea.
That's a very weird question that you have here, I probably don't get it right..
What do you mean "Print a form" ?!
What about print page from your favorite browser ?
Must be missing something.
What about render the invoice in pdf format?If you are interested in doing something like that check this module:
http://www.playframework.org/modules/pdf
I think it is the best solution and that's what most companies do.Hope that helped

Ruby on Rails Mysterious Javascript Alert box with cookie information

I have a problem in a Ruby on Rails app that I am working on. I have been working on the app for months and I have never had this problem before and after a bit of Google searches I think that somehow someone is trying to steal cookies with javascript.
When I click on the link I get an alert box titled "the page at www.napkinboard.com says:" and contains the following message:
__utmz=217223433.1270652009.59.3.utmcsr=localhost:3000|utmccn=(referral)|utmcmd=referral|utmcct=/; __utma=217223433.2133018314.1265749085.1271097412.1271125626.63; __utmc=217223433; __utmb=217223433.11.10.1271125626
I checked the database and all data associated with this 'food_item' looks completely normal and does not contain any javascript at all.
How did this suddenly happen and how can I stop it? I appreciate any help. Thanks.
EDIT: Can't believe I forgot the URL: http://www.napkinboard.com/food_items/413
It sounds like you've found a link that exploits an XSS vulnerability using the query string.
Make sure to properly escape all of your output.
load up firefox and firebug, and see what the javascript and network stack trace show. That should give you an idea of where it's coming from, etc.

Resources