Adding Email to my Rails app - ruby-on-rails

I currently Have an application that can sign up a subscriber. Everything is pretty basic at this point. The people I'm creating this app for would like the ability to send custom emails to everybody that is subscribed. I'm new to web development and I'm not sure what the capabilities of rails are and I'm not sure what the best way to handle this request is? My first thought is to try and integrate with the mailchimp api and when a user subscribes it automatically fills their email and name in the mailchimp list. So, now the owners of the app can send custom email through mailchimp. My question is - What is the best way to implement this feature in my rails app. What services are available and what tutorials will help me set it up? Any help would be great Thank You!

The pragmatic studio has a decent tutorial on how to set up ActionMailer. I would recommend watching it and then moving on to third-party tools for production.
How to Create, Preview, and Send email from your Rails app

Here is the gem I used to send emails from my rails app. https://github.com/mikel/mail . This gem has good documentation and I am sure you can handle your requirements using this.

Related

AI chatbot with 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.

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.

how to make two services share a Devise authentication system?

I have had a Rails app which authenticate users with Devise. It works well.
And my next task is to build a real-time chat room. Rails doesn't fit it, so I want to implement it on EventMachine.
But how to integrate the working devise authentication system into chat room? For example, in Rails I can get current user by simple:
current_user
How to implement it in another separate service(EM chat room in my case)? Of course, the backend of chat room can access Rails' database.
Why do you say "Rails doesn't fit it"? Try to keep it all under one roof. As #Bob mentioned, there are some tools that will do just that.
http://railscasts.com/episodes/316-private-pub but also
http://railscasts.com/episodes/260-messaging-with-faye
There are other ones as well that will integrate nicely with Rails. Otherwise, the question of EventMachine & Rails integration was asked before: How do EventMachine & Rails integrate?

RoR && "coming soon" page

I am looking for a simple way to implement simple "coming soon" (pre-launch) page for my project on Ruby on Rails.
User should be able to leave an email in order to be notified when project is launched.
Is there such a plugin\gem? Or I should do it myself...
Launching Soon is a rails plugin. It also integrates with MailChimp or Campaign monitor.
I hope people don't interpret this as shameless self-promotion but I've just implemented exactly that functionality in a web service. It's called ComingSoonApp http://comingsoonapp.com. Besides capturing the email addresses, it also embeds your google analytics code so that you can see how traffic is building to your site.
Here is a Ruby on Rails tutorial showing how to create a “beta launching soon” application for a startup prelaunch site with a signup page. You can clone the rails-prelaunch-signup repository for the complete example application on github. It uses Devise gem for authentication and user management, and you will learn a lot from following the tutorial.
Similar to Coming Soon like the other answer, I use a product (I don't work for them) called Prefinery. http://www.prefinery.com/. It lets you put up a form on your site (you just include some javascript) and beta testers can sign up.

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