AI chatbot with Ruby on Rails - ruby-on-rails

I would like to develop a chatbot directly inside my Rails app (maybe whatsapp/messenger in the future, but let's begin within my app first).
I've checked online but I find a lot of different ressources and I am not sure which tools I should use.
The chatbot is not for marketing purposes only, it should be able to interact with my controllers and give back some content to the user.
For exemple, I want the user to be able to ask "what is my balance?" or "show me my last transaction" or "how many bills do I have to pay this month?"
In the future I would like to use ML to make the bot "smarter" and make suggestions to the user, but that's not a priority.
What tools and what steps would you recommend to follow in order to achieve this?
Any gems you recommend? Any tutorial that could help?
Is it possible to do this inside my rails app and using Ruby?
I am ready to try by myself but the content I find on Google is messy and I want to know the best way to do this so I don't lose hours with software that are not really good..
Thanks for your help

You cannot configure bot inside your rails app but you can create separate rack for creating bot. stealth is good one.
Read doc for configuring it with rails.

Related

Customizing Shopify Themes

E-commerce intermediate, Shopify and Ruby on Rails newbie.
How does one go about customizing Shopify files? I have a purchased a theme but want to make some changes to the .liquid files.
Do I have to I unzip, edit, re-zip and upload in the Shopify admin section? is this supported? What are best practices for customizing themes?
You can get started with the instructions here, which can be done straight from the admin interface.
Once you've gained some experience there (try some of the shopify/liquid tutorials), you can take a more comprehensive/custom approach. And btw, you don't need to know Rails, just the Ruby language. In fact, you can even hack away at the liquid codebase if you want.
Good luck!
In addition to #davidchappy s answer:
Would also recommend checking out ThemeKit and Slate so that you don't have to develop from the admin.
Would highly suggest that you sign up for a Shopify Partner account. That would allow you to create development stores. Meaning that you wouldn't have to pay an active monthly subscription before you are ready to actually receive money.
Would also give you a great dev store to work on directly with ThemeKit so you can test everything before using ThemeKit to deploy to your production (live) webshop.
All you need to do is set up a private app that allows you to read/write to theme files.

integrating a discourse message board with an existing rails site

I'm looking at integrating a message board for a site I'm developing in rails. The new discourse board looks interesting http://www.discourse.org/ but there isn't much information about integrating into another site either via oauth2 or sso or perhaps using a rails engine type system. Has anyone succesfully set this up with an app like this?
thx
edit t
Is there a roadmap for how this integration could take place in the future? Parts of it look really intriguing but would like some more info on how this use case could be handled.
edit 2
Since this question is getting a fair amout of traffic, I want to add this post http://meta.discourse.org/t/integrating-discourse-with-current-user-database/6669 which goes over the SSO attempts going on at discourse currently. I have also been in contact with the people at thougtbot about their implementation.
I was interested in the same issue but here's what I found on Github issues:
The easiest way to get it running would be to install Discourse
outside of your app. We do offer the full source code if you want to
integrate with your existing login system, but I imagine it would be a
fair amount of work at this point.
Right now we haven't focused much on production deployments since
we're pre-beta and want to make sure people have a super easy upgrade
system in place to stay on top of security holes.
Not done any app with Discourse, but if their site does not provide a lot of info did you browse the Git Repository https://github.com/discourse/discourse it provides plenty of information and resources links like these ones :
Discourse Developer Install Guide (Vagrant) :
https://github.com/discourse/discourse/blob/master/docs/VAGRANT.md
Developer Advanced :
https://github.com/discourse/discourse/blob/master/docs/DEVELOPER-ADVANCED.md
Admin quick Start : https://github.com/discourse/discourse/wiki/The-Discourse-Admin-Quick-Start-Guide
Hope it can be of some help for you
Cheers

Flex and Ruby on Rails start up

I'm new at Ruby on Rails, but already developed a start project.
Now I figure out that I have to use flash for it, and the best way as I see is Flex.
The problem is that I didn't find no start up guide how to combine these two things. Should I use RubyAMF or WebORB? or both? And will such combination will work fine on Heroku cloud?
For sum up, I'm Looking for some basic info or a short guide for combining RoR and Flex.
Well, here is a really good book on the subject: "Flexible Rails". It has a ton of good info for the combo.
For me, I have done this with a lot of success. I use RoR to develop my RESTfull service and I put the Flex app in the public folder of the Rails app. Of course, an Air app can connect to the service the same way.
I then publish the app using Heroku. The entire end-to-end story is quite solid... assuming, of course, that a Flex-based web app is what you want. I also like a HTML/Coffeescript/Backbone client that does the same thing... but that is a different story all together :)
Good luck. This is certainly a fun combo to be developing with.

How to structure Ruby on Rails website

I'm curious to learn Ruby and Ruby on Rails. I have previous experience with PHP and some basic C/Objective C and Java.
I have done a couple of 'Get started with Rails' tutorials and want to try do create a complete site now. I do have some questions.
Is the entire website an app? I mean, sure, the simple 'blog-with-comments' examples fit in a single app. But what if you want more? Say, a forum, a blog, community, shop, task manager and so on (only random examples here... :) ).
Should I split these things into different 'apps' or not? I would still need them to communicate with each other and share user data and so on...
Any ideas?
Regards
Linus
In general, your core competency as a rails app -- that which you provide the most value for your users. You can then supplement from there, so your support section might be GetSatisfaction and live on support.yourdomain.com.
Your online shop could be a link to your shopify page at shop.yourdomain.com, etc.

Is there a bulk email plugin for Rails apps?

Does anyone know of a plugin or something that can be used to send bulk emails for a Rails app?
Specifically, I'd like to be able to pass an HTML email file to a rake task or something and have it emailed out to everyone who has signed up to my site and checked the "please send me info about XXX" box.
I wrote kind of a hacked-together version for myself, but I'd like something that throttles itself somewhat smartly and can pick up where it left off if interrupted.
Update: I eventually broke down and got out my credit card and signed up for a real bulk email service, and damn was that the right choice. The resulting emails are very professional, they have built-in analytics, also integrate with Google Analytics, and it's awesome for a ton of other reasons.
If you're looking to do bulk emails with Rails, I would suggest using the Mailchimp service (here's my affiliate link that has a bonus on signup) along with the hominid gem. This will allow you to sync all your user emails from your database to Mailchimp, then use a real bulk service instead of some crappy patched together one.
Another Update: I heard about Maktoub today, and it's pretty much exactly what I was describing. Disclaimer: I have never used it and would still probably steer clear and go with a paid service, but it's still probably better than rolling you own.
I couldn't find one so I wrote it myself. It's not pretty (at this stage), but should serve as a good starting point for anyone with similar needs.
Please send me a pull request if you make any beneficial changes and I'll make sure to give you credit.
Mailcar - Ruby on Rails mass / bulk email plugin
Update - I highly recommend using a service. Rolling your own is a real pain and it will be difficult to manage once your list becomes reasonably large at all.
I don't know that this is the kind of thing that can be covered by a plugin as there are whole sites/applications dedicated to this kind of thing. If you wanted to use one of those then there is www.campaignmonitor.com, it's pretty good and it has an api that you can hook into from your application.
You might want to take a look at postageapp.com
Not aware of any plugins for this and I don't know how rake could be used to do this, if at all.
Since you're using Rails, I assume you're using MySQL as your database so this may not be useful to you, but SQL Answers Mail for SQL Server sends bulk email directly from SQL Server. You could try searching for a tool that does something similar for the database you're using.
There's also a tutorial here and here on creating your own mailer.
use ActionMailer(tutorial) (docs), it comes with Rails and you should be able to rig it to run from a rake task.
There's a relatively new project called Maktoub which claims to be a Rails engine for email newsletters. I haven't tried it yet, but it looks promising.

Resources