Chris Oliver

Joined

292,860 Experience
93 Lessons Completed
296 Questions Solved

Activity

As far as Heroku goes, I had to add the nodejs buildpack to my Rails app so it would properly compile Webpacker with Ruby. You basically end up with both the Ruby and Node buildpacks and that gives all the Ruby and Node/Yarn versions required to get things going.

Posted in Building A Hosting Platform in Ruby Discussion

It's actually completely custom. I exported my Disqus comments and imported them into the forum. Then extended the forum to have nesting. There are still a few warts here and there because it's doing double duty for comments and the forum, but I'm going to try to clean those up tomorrow.

Posted in Rails & Vue.js Trello Clone - Part 2 Discussion

Make sure you're using rails-ujs and have it included in your asset pipeline. It was introduced in one of the newer versions of Rails to remove jQuery. If you're on an older version of Rails you can either upgrade or change the Rails.ajax to jQuery's version.
Hey Jacob,

Those files are from the new bootsnap gem. They're caching your application's require paths and things in a binary format so your app boots WAY faster. You don't need them stored in your git repo. 

Posted in Building A Hosting Platform in Ruby Discussion

Just thought I would share this in case anyone is interested how Hatchbox.io works. 👍

Posted in Rails & Vue.js Trello Clone - Part 1 Discussion

I literally just rebuilt the comment system (replacing Disqus) so there are some bugs. 🤓

You can think of that approach as similar to binding your events in jQuery. I worked on a nice little wrapper for that which I need to release. And once I get a chance to check out this other approach, I'll let you know. Might be a better way to structure things. 

Posted in Rails & Vue.js Trello Clone - Part 1 Discussion

Hey Justin,

You can do multiple components on a page by creating multiple Vue apps. You'd basically just mount your different Vue apps to the appropriate tag, if you find them on the page. You won't necessarily have them on every page, so you'll need to conditionally check to set them up. 

This is what I do with the Vue-Turbolinks integration. You can see an example here that checks each turbolinks pageview for the components and then sets up the vue app. https://github.com/excid3/vue-turbolinks#running-vue-only-on-specific-pages

You'd just do the same thing basically. 

I also noticed that Laravel seems to have an interesting way of doing things that is using the whole server sided rendered HTML as the main component. It seems like it might be a really useful way of doing an even nicer middle ground.
Thanks Stephen! Good catch on the YouTube URL.

Thanks for sharing Neil!

Hahaha I noticed that too while editing. Forgot I was recording without power. :P

Posted in Hatch login Error

No problem! I just disabled it temporarily for you. You should be able to login without it. Let me know if that works!

Posted in Handle 404s Better Using Rescue_from Discussion

You can also use .none? to check the opposite as well. 👍

Posted in Stimulus JS Framework Introduction Discussion

Yes, you can definitely do that. Maybe I'd do that for different things like "admin" area components and so on.

Posted in Stimulus JS Framework Introduction Discussion

Basically just one controller per feature. You should never do page specific JS or CSS because that means you can't move your features to different pages on your site later on which inevitably always happens.

Posted in Setup MacOS 10.13 High Sierra Discussion

You should never use sudo to install gems. If you get permission denied, you didn't get Ruby installed correctly and should go through those steps again.

Posted in Stimulus JS Framework Introduction Discussion

This section in the docs mentions that you can only use hyphens in the controller name in your html. It maps to either a hyphenated or underscore controller.js filename though. https://github.com/stimulus...

And yeah I think this is a nice clean way of refactoring those CS classes. You no longer have to deal with managing event listeners and can purely focus on the code that runs for each event. 👍

Correct. The server doesn't have a clue who you are unless you give them a JWT or a session cookie. Your browser automatically sends cookies over in every request so it makes things easy that way. With JWTs, every request your code makes to the server must manually include it.

Yeah, Vagrant is probably what you'd want in this case. Docker is more for you to containerize your app so it could run anywhere, not necessarily for mimicking your existing production host.

You'd just want to install the same OS version as prodcution and the same packages in Vagrant.

Posted in Stimulus JS Framework Introduction Discussion

I get the feeling that Basecamp won't build out those kinds of features and will keep this generic, but it is the perfect opportunity to build a library on top of stimulus to make validations easy I would imagine.

Posted in Stimulus JS Framework Introduction Discussion

Hit me up with your questions! I'm still learning it too, but the good news is that it's pretty straightforward so there isn't _too_ much to learn.