Ruby resources for messenger bot? - ruby-on-rails

We are creating a messenger bot with rails and are looking for some gens
We found Lita which looks nice but I wanted to know if there was any other cool ruby resources we might use for the project?
Thanks!

Here are a few.
Botstack is built on Rails with some pretty nice features like supporting webviews and help with web scraping.
https://github.com/davidmann4/botstack
I've built a messenger client that is pretty alpha but it is also fairly complete and I feel, nice to use.
https://github.com/pferdefleisch/messenger_client
Here is another pretty complete library that provides you with some request handlers as well as a messenger client. I believe it is used in botstack.
https://github.com/hyperoslo/facebook-messenger
This should get you started. I'm working on my own framework and will update the answer if I ever get it released.

Related

Rails and Websocket

So I want to be able to get a live stream of notifications for my users that are using my rails application. I heard that you are able to do this using web sockets but I haven't seen anything about it in rails.
Is there a way to do this in rails or am I able to use something else along side my application such as node.js ?
Okay I started searching for different terms and I was able to find Faye
This tutorial is great for it http://code.tutsplus.com/tutorials/how-to-use-faye-as-a-real-time-push-server-in-rails--net-22600
You can also use something like PubNub http://www.pubnub.com/
They support a good amount of languages/libraries such as AngularJS. Great customer service and documentation. Also many examples such as this one: http://www.pubnub.com/developers/data-streams/twitter-stream

Ruby on rails making an app for smartphone

I want to build an app that use in the backend Ruby on Rails. However my problem comes in the lack of information i found on it. My goals is not just to create a website but an application that interacts with it, like my android facebook app when pressing menu I get button like logout and so on.
I am wondering if their exists tutorial on how to build an application but using rails or should i scrap my entire website and do it in php. I am looking for guide and tutorial. Thanks in advance
You can build an app on any platform and make it interact with your Rails-based server using HTTP requests (like AJAX).
You can send information back and forth using JSON or XML; you would probably need to make a new set of actions for the app to use.
There is no reason to use PHP. ever.
A little unclear from your original question, but if you are looking to create a mobile app using Ruby (and a structure similar to Ruby on Rails) then you may be interested in Rhomobile. It is a cross-platform mobile application framework that uses Ruby for its backend code, and follows a structure similar to (older) Ruby on Rails versions.
From what I understand of your problem, you want to use the robustness of Ruby to develop a native app (not just another app that mirrors a website).
The best thing I know of for this is RubyMotion. The bummer is the cost ($200). But then you would get to accomplish your task.

Web App that uses Webcam...any Rails plugins/gems?

I;m a developer looking to make an app similar to chat roulette. I'm pretty comfortable with Ruby on Rails as my platform and would like to program it in that.
The downside is I have no idea about how to do anything using webcams.
Is there a plugin or gem for rails that integrates webcams easily?
Some quick browsing brought me to abobes site...but I haven't used it before, and though I dont mind learning new things, I'd like to get this out quickly so I'd rather stick to what I know.
What you do you use for webcams?
You would have to use a third-party plug-in to interface the webcam with the site. Rails takes care of things on the back-end (finding and connecting users) but you would need to use Flash or something similar to connect the web page with the camera.
This question is pretty old, but we've been able to use headshot gem in one of our apps.
https://github.com/diwadm/headshot

Getting started consuming web services in a Ruby on Rails 3 application

So I'm getting started learning Rails. Now that Rails 3 is out, I want to stick to learning the Rails 3 way of doing things. One of the things I want to learn how to do is how to consume web services / work with third party REST APIs / create "mashup" applications. I've only done minimal work like this with PHP and pre-built libraries.
Can someone please lead me to some resources, best practices, or give me a quick 101 lesson on how to start working with these types of APIs? What gems should I use? Some sample code to get me started would be much appreciated.
Update: I am specifically trying to use the Google Books API (non-authenticated). Since there is no client library for this API, I'm wondering how other Ruby/Rails developers are working with APIs that don't come with their own Ruby library. That's why I'm looking for a more generic solution to working with "fill in the blank" API.
Update: After some research, I noticed the Net::HTTP library. All the tutorials that talked about it were fairly old. Is this still the best library to use for consuming RESTful web services? Or is there a newer Gem that makes this easier? I just want to know which gem/library I should use, and how to work with the XML/JSON result that is returned.
Update: This presentation was really helpful. It mentions a bunch of different libraries and shows examples of some of the libraries mentioned below: http://www.slideshare.net/pengwynn/json-and-the-apinauts
I'm a pretty big fan of HTTParty.
It's an abstraction layer on top of Net::HTTP with a nice little DSL for consuming web services. Here's a good example of how easy it is to use.
It's not without some warts (lots of dependencies) but it's really the way to go if you're on the consuming side.
I'd recommend REST with Nokogiri:
http://railscasts.com/episodes/190-screen-scraping-with-nokogiri
Nokogiri works well with xml too, not just HTML.
Weary is a really neat DSL for consuming RESTful services.
Clearly inspired by HTTParty but a bit newer and a bit more concise.

HTML5 frameworks and tools?

If you were starting to build a relatively complex HTML5 app (for the iPad), what tools and frameworks would you look at using to make your life easier?
SproutCore looked like it might be useful if you could just use the front end UI on its own, but it has to be used with the Ruby server, which is no use to me.
Are there any libs like jQuery that simplify all the multitouch stuff?
I know that this is an old thread, but i would just like to add that sproutcore is entirely backend agnostic. It is in no way tied to a ruby server or any other specific backend.
Also, Sproutcore has very good touch support. Check out http://blog.sproutcore.com/post/531215199/introducing-sproutcore-touch
Yeah, definitely. There's http://www.jqtouch.com/, which I've heard good things about.
I wouldn't bother going for anything geared towards mobile web development for the backend -- it's the frontend you've got to worry about. The rest is pretty standard. For completeness, I'd use the Zend Framework.
For any late-comers to this question: jQuery Mobile is coming next month, and will include touch actions, though there aren't many details yet: http://forum.jquery.com/topic/touch-actions
There are other frameworks such as Sencha, Worklight (ibm), etc.
http://www.sencha.com/products/touch/
http://worklight.com

Resources