Chris Oliver

Joined

290,710 Experience
86 Lessons Completed
298 Questions Solved

Activity

Posted in How do I store audio files in production?

I would definitely recommend uploading with Shrine directly to S3 and then serving the files up through Cloudfront CDN. That way the downloads will be quick as possible which is what you want when streaming.

If you can, you could certainly just have hosting somewhere else like Anchor if they have a way to embed the episodes. It's nice if you can have someone else manage the RSS feed, file storage and serving. We host RemoteRuby on Transistor and I will probably just embed their player if I build a custom site for it at some point.

Posted in Introduction to Stimulus Reflex Discussion

It can with just a little extra code. We'll be covering that soon, but here's how you'd do it: https://expo.stimulusreflex.com/demos/chat

Posted in Sending Emails with SMTP and Sendgrid Discussion

Yep! Devise just uses whatever email host you have configured with Actionmailer.

Posted in Multiple Users with Devise

Yeah, I'd probably do an additional model. User has_one :student_profile and you can create that after they register or something.

You can always include the host: option in your url helpers, but I always forget which default_url_options it looks for when that error comes up.

I would think it would be the routes default_url_options.

Posted in Deploy with problems

Hey Cristian,

On Dreamhost, you'll need to figure out how to run with RAILS_ENV=production so it will use the production entry in config/database.yml and so on.

If it's a VPS server you're using on Dreamhost, try this guide to get you setup: https://gorails.com/deploy/ubuntu/18.04

Posted in [SOLVED] Decrypt S/MIME 'file.xml.p7m' with OpenSSL

Awesome, thanks for posting your solution. I'm sure at some point when I need to use OpenSSL directly, this will come in handy!

Posted in Problem installing Capistrano

Strange, maybe try bundle exec cap install STAGES=production?

Posted in Pro

Hey Ricardo,

Sure, you'd just sign up for the monthly plan and cancel in 3 months. 👍

Posted in Group Chat with ActionCable: Part 6 Discussion

I'm going to update this series for Rails 6 really soon. Basically you just need to use a Javascript import to import the channel from if you're calling it from another file.

Posted in Introduction to Stimulus Reflex Discussion

Yep! I've got some fixes incoming for that. I just didn't have a better SVG to work with for the check at the moment and I wanted to ship what I've got.

Posted in Introduction to Stimulus Reflex Discussion

Yep, of course. Anything you can do server-side you can use here.

Posted in Introduction to Stimulus Reflex Discussion

I agree! Just didn't have a better SVG to work with at the moment. Also going to add some tooltips.

Posted in [SOLVED] Decrypt S/MIME 'file.xml.p7m' with OpenSSL

I haven't used it, but I would ask for some help on the GitHub issues.

Posted in [SOLVED] Decrypt S/MIME 'file.xml.p7m' with OpenSSL

There's a Ruby package for OpenSSL you can use so you don't have to run shell commands. https://github.com/ruby/openssl

Devise has an user.update_without_password(params) method you can use. Might do what you need.

The defaults are also manipulated by the load_defaults method which can tell Rails to use the defaults from a specific version of Rails. Could be something with that maybe, I'm not sure. https://guides.rubyonrails.org/configuring.html#results-of-config-load-defaults

Posted in GoRails Design

Hey Rajan, no plans currently. Mostly for a static template you would just extract out the layout into application.html.erb and then replace static portions with ERB code to make them render what's in the database. Nothing too special.

Posted in CSS Beginner Need Help

You also have a triple ... which may be a typo and you meant ..

In the asset pipeline, you have to reference files using the asset helpers so they can be found in production. You would do image-url('bgimage.jpg')

https://guides.rubyonrails.org/asset_pipeline.html#css-and-sass

Posted in New website design!

Thanks guys!

@Matthias, the main reason to move away from Bootstrap is that while it's good to get something up quick, it's really hard to undo all their styles to build something custom with it. At a certain point you might as well build it from scratch. Since Tailwind works in reverse, you can implement virtually any design without having to write custom CSS which is nice. Check out Adam Wathan's videos on YouTube where he re-implements several popular sites like Coinbase in like an hour with Tailwind. Really great tool if you want to implement your own designs. TailwindUI is great for kind of bridging the gap between Bootstrap and Tailwind. That's what I used here.