Melanie

Joined

1,520 Experience
6 Lessons Completed
0 Questions Solved

Activity

Posted in Direct File Uploads to S3: Part 3 Discussion

Chris - I'm a donkey. I just restarted the console and its fine now. I don't understand that, but moving on. Thanks so much again. :)

Posted in Direct File Uploads to S3: Part 3 Discussion

Thanks a lot Chris. It's so strange. I copied your file exactly, but my chrome console inspect shows an error that says: Uncaught SyntaxError: missing ) after argument list in this file. I've just finished the javascript course on code school, but still not clever enough to see where the ')' belongs.

Posted in Direct File Uploads to S3: Part 3 Discussion

Do you think there are no missing ; or ) in your source code file? When I try to use that (in JS Hint) I get 8 missing ; and one missing ). Please can you outline the rules for how to fix the js errors so that the file type error goes away too?

Posted in Direct File Uploads to S3: Part 3 Discussion

OK, well the extra ) and ; were inserted because JS hint says they were missing. I was getting js console errors showing errors when I used the code from the video. If I remove the new ) and ;, the file type error goes away but the JS errors return. I can't see how to fix the JS errors (except for following the JS hint advice).

Posted in Direct File Uploads to S3: Part 3 Discussion

Hi - it is in the application.js and I only started getting the error after I added the extra ; and ) in the upload.js file.

Posted in Direct File Uploads to S3: Part 3 Discussion

Hi Chris, I'm trying to get this working and following along with your files. I didn't do your final step of converting from JSON to js (so I can't copy/paste your source code file). However, when I try to use what we made with your video, I get js errors showing in the console. After I put the code in JSHint, it tells me to add semi-colons on the end of some of the lines, and an extra ")" on the end of the second last line (so it has 2 "))"), I then get an error that says: uploads.self-a6843c1….js?body=1:2 Uncaught TypeError: "[type=file]".fileupload is not a function(…). I'm not very good at understand js or the console output. Can you see if there might be a problem with that line? Thanks a lot :)

Posted in Direct File Uploads to S3: Part 3 Discussion

Thanks Chris. This has been really good. I'd like to learn more about what I can do with Shrine.

Posted in Direct File Uploads to S3: Part 2 Discussion

Cool, thanks Chris! Now I have an error: The AWS Access Key Id you provided does not exist in our records. I'm using figaro on heroku so not using secrets.yml, but the key is correct. I'm going for a walk before I come back and give it another go.

Posted in Direct File Uploads to S3: Part 2 Discussion

Hi Chris, I have 3 problems at this point.

1. At timestamp 11.55 you are showing how to enable the 'make-public' setting. I am trying to follow along, but my bucket is empty whereas yours has items listed for cache and store. How did you get those items into your bucket?

2. I have the same problem as Shawn Wilson below. I have a socket error when I attempt to save my form with the file upload. I'm trying to use the sydney region in my bucket. Is there something specific to the US west coast that needs to be worked around. It seems Shawn needed to use that region to get this working.

3. In the first video where you overview shrine, we added a hidden form field called "f.object.cached_avatar_data". I had to remove that when I was trying to render the form. Maybe that's because something we've just done with the plugins requires a different setting (I'll stay tuned to see if that comes up later.

Thanks a lot for these videos. :)

Posted in Direct File Uploads to S3: Part 2 Discussion

I get this error too. Does this only work if you use us-west region? I'm currently using Sydney region

Posted in Authorization with Pundit Discussion

Hi Chris, please could you do another podcast that goes deeper than this. I'm struggling big time (current issues outlined here: http://stackoverflow.com/qu... ). It would be great to see you set scopes based on who the current user is and the conditions attaching to the record. I've been trying for 2 years to figure this out now and need some help. Do you think you could show how to use the scope and resolve methods in detail. Thank you

Posted in Sending Emails with SMTP and Sendgrid Discussion

So grateful for this help. Thank you!

Posted in Migrate away from Mandrill?

I am so grateful for this recording. THANK YOU! And so fast.

Posted in Migrate away from Mandrill?

Hi Chris,

I've had another 24 go at trying to figure out how to get started with Sendgrid. These are my current challenges:

Issue Summary

I'm struggling to understand the documentation for how to get started using WebAPI v3.

The authentication section of the getting started section says " To use keys, you must set a plain text header named “Authorization” with the contents of the header being “Bearer XXX” where XXX is your API Secret Key." https://sendgrid.com/docs/API_Reference/Web_API_v3/How_To_Use_The_Web_API_v3/authentication.html

Q1: Where & how do I set this text header? Is this a reference to making a TXT record in my DNS?

The transactional templates overview says "Including the template ID in the templates parameter of the Web API v3 Mail Send endpoint" This page has a link to Ruby libraries, which in turn links to this gem.

Q2: Where and how do I include a template ID in the endpoint?

The sendgrid-ruby gem documentation has an example for various ways to use the gem. The examples for General v3 Web API Usage distinguish between cases where fluent influence is or is not used. I can't find anything to tell me what fluent influence is or does.

Q3: What is fluent influence? How do I determine whether or not I should be using it?

If I do pick a General v3 Web API Usage option,

where in my app do I write these lines?

require 'sendgrid-ruby'
sg = SendGrid::API.new(api_key: ENV['SENDGRID_API_KEY'])
response = sg.client._("suppression/bounces").get()
puts response.status_code
puts response.body
puts response.headers

Once I've figured out how and where to write the above lines, how do I ask my app to send a template email that I have made in Sendgrid's transactional templates section?

Technical details:

gem 'sendgrid-ruby'
gem 'sendgrid-rails', '~> 2.0'
gem 'mail'
ruby "2.3.0"

Do you know of any resources or tutorials that might help to solve these problems?

Posted in Migrate away from Mandrill?

Hi Chris. Thanks for the reply. I'm really struggling. I've been combing through the Sendgrid documentation since your note (all night last night). I can't make sense of it. The getting started guide linked in the documents on the sendgrid-rails gem is broken. The getting started guide on the sendgrid site refers to a ruby gem. The documentation for that gem is incomprehensible. I found a sendgrid add-on for heroku but I can't seem to get any functionality out of that either (whilst it gives code examples - it doesnt identify where those bits of code need to be placed).

I can make a template in sendgrid for devise confirmation email but I can't figure out how to give that template the confirmation token from the rails app.

Also, I can't make sense of conflicting documentation: if I make an initialiser called mail.rb (which I have - following the instructions on the sendgrid website) - I set the domain as my domain name (my_app.com). When I look at the heroku add on sendgrid instructions, it says to set the domain as heroku.com. I don't know whether or how to reconcile them. There are a lot of stack overflow posts describing instructions to set up "config.action_mailer.default_url_options = { host: config.app_domain }, config.action_mailer.smtp_settings = {..." in production.rb - but do I need this if I make a mail.rb initializer file?

I can't seem to find instructions that work for people who just aren't clever enough to make sense of the documentation. I've been struggling for years to grasp the basics- I think coding might be beyond me. I am also very confused by all of the options that Sendgrid needs in order to get an API key from its website. It's also confusing for me -I've now tried to setup campaign monitor/createsend gem; postmark; mailjet without any success - the documents for each of them talk about things I can't figure out- but in each of those other cases (as well as mandrill) I had to add a TXT record to my DNS to be able to send mails. The sendgrid documentation doesnt ask me to do that. Is there a reason for that?

Please, please can you do a tutorial showing how to setup a mailer (any one other than mandrill) so that I can get it working with devise.

Thank you.

Posted in Migrate away from Mandrill?

Hi Chris, please can you do a video showing how to setup transactional email in one of these. I've tried Campaign Monitor, Postmark and Sendgrid but I can't find instructions that show how to install it to work in rails. I'm stuck with campaign monitor (the gem 'createsend' talks a lot about omniauth authentication - -I don't know why that's relevant to sending a devise confirmation email. The postmark gem instructions tell me to initialise something, but don't show how to do it. I'm not learning very well - I can't follow the conceptual instructions for these gems because I just can't figure out what they mean. Please can you show how to setup one of these alternatives to Mandrill. Thank you

Posted in Message Templates Discussion

super keen to see this the other way - so you pick the inputs before generating the template. Thanks Chris

Hi Chris, I'm trying to figure out how to get this line of a template working in rails. I've tried using the asset-url helper and I've also tried the image tag but I can't find a way to get this line working so that I can replace the data-background class with the image reference that I have in my assets images file. Can you see how to do it? this line is in the show page

<div class="hero-section parallax-bg dark-layer" data-background="images/background2.jpg">

Posted in Get started with Rolify for roles

Thanks very much!

Posted in Admin Interfaces with Administrate Discussion

Hi Chris, Thanks very much for this overview. I'm trying to use this, except I'm running into a problem, which I think is related to have objects for which there is no controller.

I am currently getting this error:

NameError in Admin::Users#show

Showing /Users/mm/.rvm/gems/ruby-2.2.2/gems/administrate-0.1.3/app/views/fields/has_many/_show.html.erb where line #24 raised:

uninitialized constant Mailboxer::MessageDashboard

I think the problem might be that it can't make a space in the dashboard if there is no controller action. Do you have any ideas for how to solve this?

Thanks very much.

Also, if it helps others, if errors come up when you try to run the installer, try deleting the routes, running 'spring stop' in your terminal and re-running the installer.

logo Created with Sketch.

Ruby on Rails tutorials, guides, and screencasts for web developers learning Ruby, Rails, Javascript, Turbolinks, Stimulus.js, Vue.js, and more. Icons by Icons8

© 2020 GoRails, LLC. All rights reserved.