James Devereux

Joined

770 Experience
7 Lessons Completed
0 Questions Solved

Activity

Posted in Deploy Ubuntu 22.04 Jammy Jellyfish Discussion

Thanks for this guide. It is really thorough but wasn't thorough enough for me. I wasted a day and a half trying to get my rails app on Ubuntu 22.04. Still haven't managed to do it and am considering pulling the plug at this point.

Several steps appear to be missing such as:

  • needing to add SSH key to the virtual machine and to your github for 'cap production deploy' to connect to github
  • Node needs a higher version of >=14 in order to work with @hotwired/turbo in Rails 7 (copy/pasting from your guide installed 12.22.9 for me)

It would also be amazing if you could add recommended rails versions for these systems or even some kind of guide to save people these headaches.

I built a lovely Navbar in Tailwind CSS in my rails app following a tutorial by Adam Wathan which uses Vue.js for the javascript behavior on dropdowns.

I added Vue.js the way Chris suggests here, by mounting it in a div with data-behavior which wraps the entire app: https://gorails.com/episodes/vuejs-components-in-rails-views?autoplay=1

I also added the Turbolinks Adapter for the setup as he recommends.

It's all working as expected but the problem with loading everything after turbolinks:load is that the navbar pops off the page when you navigate to another page. How can I solve this? I tried initialising the Vue component after different events but everything just leads to all my vue components breaking and disappearing off the page.

Posted in Action mailer rails 6

I'm having the same problem in Rails 6.0.2. After generating a mailer UserMailer, running it in console results the following:

irb(main):001:0> UserMailer
Traceback (most recent call last):
        1: from (irb):1
NameError (uninitialized constant UserMailer)

I've checked the file names and everything is named correction (user_mailer.rb and the class is UserMailer).

Oddly enough, running ApplicationMailer in the console is recognised.

irb(main):003:0> ApplicationMailer
=> ApplicationMailer

Has something changed since rails 5 where you can't run mailer actions from the console?