Activity
Posted in bash to zsh
Oh yeah! I forgot about that change recently for Catalina. You probably want to use ~/.zshrc
instead now.
Sounds like you're simply missing the RAILS_MASTER_KEY env var. Set that up so that Rails can decrypt the credentials and you will be set.
Posted in Configure ruby projects of old version
You can do:
gem install rails -v 5.1.7
rails _5.1.7_ new myapp
Here's a gist that contains Reddit's popularity algorithm that you could use. It's pretty simple and just uses upvote, but you could add in comments and impressions to the calculation too. https://gist.github.com/nanosplit/db42e507c5d1d984b664868db10a3669
This is another approach that you should check out. https://www.akitaonrails.com/2016/10/31/ruby-on-rails-implementation-of-a-proper-ranking-popularity-system
Posted in Is Gorails's jumpstart worth the price?
There was a good little discussion Reddit about it. I also posted some notes about it there as well to help explain the difference between the free and pro versions: https://www.reddit.com/r/rails/comments/drl0q2/is_gorailss_jumpstart_worth_the_price/
Hope that helps, but if you have any other questions I'm happy to help!
Posted in Ruby on Rails ActionMailer Images Issue
Hey Maximilian!
I haven't actually done this before, but it looks like you're mostly on the right path. I found this on Stack Overflow that looks very similar. https://stackoverflow.com/a/25810153
Does the email have the image as an attachment and it's just not showing inline?
Sounds like you missed the exec $SHELL
step.
Posted in Can not use toast of bootstrap in rails
Sounds like you missed a step. I just updated the repository to include toasts in the example and they work just fine.
Compare your code with the repository and see what you missed.
Sounds like you missed a step. I just updated the repository to include toasts in the example and they work just fine.
Compare your code with the repository and see what you missed.
Still waiting on them to release those Ruby versions. You can use a Ruby Docker image instead or compile and cache Ruby as part of the steps. Other than that, we just have to wait for 2.6.5 support to use setup-ruby. :(
Sounds like you probably missed a step somewhere. I just installed Rails 6.0.2.rc1 and went through the screencast. Everything works correctly.
Posted in Ruby 3x3 Performance
Ruby 3 will have both Fibers and Guilds. Matz talked about it in the Rubyconf keynote this year: https://www.youtube.com/watch?v=2g9R7PUCEXo
Posted in Use the helper methods that are declared in controller and has default params in view spec ?
Controller methods are not available in the view unless you expose them with helper_method :sort_column
Posted in How do I get avatar.variant(resize: “200x200”) on Rails 5 to work using aws on production?
Yeah, that would probably work fine for now. I'm not sure when Rails 6.1 will come out but it might be a little while so you'll probably need a solution like this until then. This basically replicates what Shrine would do for you.
Does it render a different layout? And if so, have you included the stylesheet tag in that layout?
Passenger is an Ubuntu Linux package, it will install any dependencies required automatically. You don't have to worry about them.
You can just skip to the install NGINX + Passenger step if you don't want to install Rails for whatever reason.
Posted in What makes you like Ruby/Rails?
I personally love Ruby because the language is designed for humans first and foremost. You don't have to jump through hoops to make the computer understand it, so you can spend your time thinking about how to communicate ideas in your code. That saves a ton of time in development, and humans are typically the most slow and expensive part of software development.
Rails takes advantage of that and assumes you know the basics of web development and does as much as it can for you. You don't have to worry about the different between GET and POST params, they're just available to you in one spot. There are tons and tons of situations where Rails has already got tools for something I wanted before I knew I wanted it. That's amazing.
The downside is it isn't cool anymore, but if you're doing things just because it's cool, you'll probably be wasting lots of your time. 😜
Yep, you can do that. Or if they have a node package, you can use that instead.
Just import it in app/javascripts/packs/application.js
import "../myfile"
And put your code in app/javascripts/myfile.js
Also check out https://gorails.com/episodes/webpacker-javascript-in-rails-6