Joe Guerra

Joined

400 Experience
0 Lessons Completed
0 Questions Solved

Activity

Posted in How to use Devise with Hotwire & Turbo.js Discussion

I've got a few devise controllers I've inherited from ( to add some breadcrumbs, etc). They don't like the turbocontroller.
Do I also need to inherit that as well?

Posted in Suggestion for a new episode

How about Rails + React?

Posted in RuntimeError (can't modify frozen String)

it should add / category / + category title to my breadcrumb.

Posted in RuntimeError (can't modify frozen String)

yes, i'm using that gem. Just stopped liking the way I concatenated the breadcrumb.

Posted in RuntimeError (can't modify frozen String)

got this runtime error on heroku, it had been working fine...

I traced it down to this

add_breadcrumb 'category / ' << @title, categories_path

in my category controller (I've commented it out for now). Is there an alternative way to concat this so it doesn't cause an error?

Posted in i'd like to replace ransack with elasticsearch.

Great, i do have the local elastic search engine running. I tried to get kibana to work too, but something wasn't working.

I noticed bonsai elasticsearch has it's own gem. I'll try it out tomorrow.

Posted in i'd like to replace ransack with elasticsearch.

How would I go about that? There are plenty of elasticsearch gems, I don't know if i need something specific or can use a generic elasticsearch gem. I'm going to use the Bonsai Elasticsearch addon on heroku,

Thanks,
Joe

Posted in how to setup elasticsearch on Heroku?

What I've noticed is that bonsai elastic search (sandbox plan on heroku) once added to your pipeline and hooked up to your application does not use port :9200.

If you get to your environment settings , and take a look at the bonzai url, you'll see there is no port on it.

https://medium.com/@thecolorfulcrayon/configuring-elasticsearch-on-rails-8bcbe973e9e7

according to this, by creating a yaml file with the production url, it should work? (testing it now)

Posted in just ran into some strange validation problem.

hmm, ok must have missed that. I've commented out the whole thing.
Definitely, don't need an upper limit either.

hmm, maybe that's why it was in there initially. I didn't want to add a product to the inventory unless it was qty > 0. and when I went to remove all the qty from the product, it gave me that validation error.

Posted in just ran into some strange validation problem.

Can't remember why I added this to my product model.

validates_numericality_of :qty, less_than_or_equal_to: 10, greater_than: 0

but it was causing activerecord errors when I was removing it from Qty. (ie adding it to my cart)

I thought that the validations in the model only affect records when being created (on the new / create method?)

Anyways, i removed that from my model.
Thanks,
Joe

Posted in how do I troubleshoot my app?

oh, i've got my code in the wrong place. I'll have to move it around until it works.

Posted in how do I troubleshoot my app?

oh, lol. ok.

Posted in how do I troubleshoot my app?

is the only option to include a binding.pry and find out what's going on in my code (thru the console)?

Posted in I got an error

try to restart the server with rails s

Posted in How to Add Pagination with Pagy Discussion

Pagy is awesome, I've included it on my site.

Posted in Search Filters/Report Generator

hmm, try ransack.

https://www.youtube.com/watch?v=Vht9iCw8ApE

I'm using it , it's great if you don't want to go to the expensive of setting up a elastic search server.

Posted in Setting Up Rails 4 with MongoDB and Mongoid Discussion

Very nice, how would you go about connecting it to Mongo Atlas?

Posted in BDD in a real project

How about T&E development? (Trial & Error) lol.

Posted in Setup Ubuntu 18.10 Cosmic Canimal Discussion

I've got ROR install on ubuntu in a virtual box. After getting a new PC (AMD Ryzen 5 2600) , it has virtually crawled to a snails pace on the vm.

Posted in Creating reports in Rails

try the wicked pdf gem

https://github.com/mileszs/wicked_pdf

Screencast tutorials to help you learn Ruby on Rails, Javascript, Hotwire, Turbo, Stimulus.js, PostgreSQL, MySQL, Ubuntu, and more.

© 2024 GoRails, LLC. All rights reserved.