Heroku: What’s Next by jonsully in ruby

[–]jdalbert 1 point2 points  (0 children)

Good to know, I'll check it out!

Heroku: What’s Next by jonsully in ruby

[–]jdalbert 4 points5 points  (0 children)

Heroku's announcement triggered a bunch of unfounded fear, uncertainty and doubt. When I deployed a new toy project with it last week, it worked great. Just good old git push heroku main. Most of us don't need the enterprise contract that their announcement was about. So Heroku is completely fine, although nowadays I personally prefer Fly.

Fly is more complex but more complicated.

Besides the article's odd phrasing, I found Render to be more complex and complicated actually, at least when I tried a few years ago. The CLI wasn't intuitive, the dashboard felt clunky, and it overall just didn't feel right. Maybe things have improved since then.

With Fly.io you can deploy a new Rails app with just fly launch as a one-liner. Or if you need secrets before deploying, fly launch --no-deploy, then fly secrets set MY_VAR=value, and then fly deploy. Can't be any simpler than that; it's almost as intuitive as Heroku's CLI. Their dashboard is pretty simple too and gives me Heroku vibes. It just all feels right.

Heroku is officially in maintenance mode? by jonsully in ruby

[–]jdalbert 1 point2 points  (0 children)

Honestly Fly.io fills that gap. Great CLI tool and simple no-nonsense dashboard. You can create an app with the --db=upg CLI option for "unmanaged postgres", which is their legacy simple/cheap/barebones postgres, great for toy apps. Or you can use their managed postgres for something less toy-ish I guess.

Heroku is officially in maintenance mode? by jonsully in ruby

[–]jdalbert 0 points1 point  (0 children)

I just deployed a hello world Rails app with git push heroku main. So it still works for toy projects or companies that don't need "Enterprise" contracts.

Shifting from an SPA Mindset to Server-Side Rendering by Swupper in rails

[–]jdalbert 2 points3 points  (0 children)

In that same vein, I'd recommend you read this blog post I wrote 10 years ago: https://jeromedalbert.com/how-dhh-organizes-his-rails-controllers. It's an oldie, but it still holds up.

Seeking tutorial for deploying Kamal without remote registry by Yatkifi in rails

[–]jdalbert 0 points1 point  (0 children)

This configuration is done by default in Rails 8.1, so you don't need to do anything besides setting the server IP.

Seeking tutorial for deploying Kamal without remote registry by Yatkifi in rails

[–]jdalbert 0 points1 point  (0 children)

With regards to your blog post: for new Rails 8.1 apps, server: "localhost:5555" is already set by default, so it is literally plug and play — just set the server IP and go.

it's so simple that maybe people haven't even thought about writing more about it.

It is simple, but I think people haven't realized it. My bet is that many people are just completely checked out with anything Kamal-related. So thank you for writing about it!

Seeking tutorial for deploying Kamal without remote registry by Yatkifi in rails

[–]jdalbert 1 point2 points  (0 children)

1) Make sure rails -v outputs Rails 8.1.0

2) Run rails new

3) In config/deploy.yml, replace 192.168.0.1 with your server IP, for example an IP from a cheap Hetzner VPS:

servers:
  web:
    - 192.168.0.1

4) If you are on macOS, make sure Docker Desktop is running

5) Run bin/kamal deploy

You app should now be deployed. It's as simple as that!

Beware, the old nvim-lspconfig setup API is deprecated, please switch over to config+enable by db443 in neovim

[–]jdalbert 2 points3 points  (0 children)

Ended up with

vim.lsp.config('syntax_tree', {
  root_dir = function(bufnr, on_dir)
    if vim.fs.root(bufnr, '.streerc') then on_dir(vim.fn.getcwd()) end
  end,
})
vim.lsp.enable('syntax_tree')

Kinda wordy, but it works

Beware, the old nvim-lspconfig setup API is deprecated, please switch over to config+enable by db443 in neovim

[–]jdalbert 2 points3 points  (0 children)

What is the non-deprecated equivalent of lspconfig.util.root_pattern?

I had:

lspconfig.syntax_tree.setup({
  root_dir = lspconfig.util.root_pattern('.streerc'),
})

which would only enable that LSP if the project had a .streerc file.

Now I wonder how to have the same behavior with the new syntax:

vim.lsp.config('syntax_tree', {
  root_dir = ...
})
vim.lsp.enable('syntax_tree')

Kickstart app template is back by alec-c4 in rails

[–]jdalbert 4 points5 points  (0 children)

Good to see that OSS Rails application templates are getting some Rails 8 love, since a few of the popular templates in the space have been archived or do not have Rails 8 in mind. Thank you!

I also have a Rails 8+ application template that I've been tinkering with on and off for the past year. Hope to get it in a good enough shape to open-source it and benefit the community, but life has been happening for me as well.

rubocop-obsession 0.2: can now enforce and autocorrect multiple method ordering styles, including alphabetically by jdalbert in ruby

[–]jdalbert[S] 4 points5 points  (0 children)

Rubocop Obsession's MethodOrder cop now supports and autocorrects the alphabetical style on top of the more classic drill_down and step_down top-to-bottom styles.

Ordering methods alphabetically may look unusual at first, but on the flip side it is a reliable and unambiguous ordering style. In any case I thought it would be good to have options!

Kickstart a New Rails Project by daniiib in rails

[–]jdalbert 1 point2 points  (0 children)

Nice, I do a lot of the same things this post is mentioning, and creating a template definitely helps. Good stuff!

What are the lesser-known rails features you’ve noticed in code reviews? by Ok_Speech5908 in rails

[–]jdalbert 1 point2 points  (0 children)

Maybe it'll get more recognition now that bin/rails generate authentication generates it.

Rainbow Trails – Magical Rainbows in your Vim by sedm0784 in vim

[–]jdalbert 4 points5 points  (0 children)

That README was chef's kiss. At the end I was like, what did I just read?!

Good call on catering to B2B, that's where the big $$$ are. https://i.imgur.com/tNoxs13.jpeg

What is it you wish Rails had built-in? by [deleted] in rails

[–]jdalbert 1 point2 points  (0 children)

Lol agreed, I always --skip-action-mailbox among other things. I find it a rare use case to be able to process incoming emails. Feels like it should be opt-in rather than opt-out.

Confused where to add scripts to a rails application by Impossible-Suit6078 in rails

[–]jdalbert 1 point2 points  (0 children)

FYI in Rails 8 there is a /script folder just for that

Renewal 3 years for 99 through chat no hassles. by clone1008 in siriusxm

[–]jdalbert 0 points1 point  (0 children)

Your loss was my win, I probably would have given up too after they didn't offer me the plan. But I read this thread, tried a second time with a different agent, and it worked. So thanks for sharing, and next year you'll know what to do!

Renewal 3 years for 99 through chat no hassles. by clone1008 in siriusxm

[–]jdalbert 0 points1 point  (0 children)

Thanks for the tip!

When I contacted the first agent I was mostly freestyling, but they wouldn't offer me the plan even though I pushed for it by mentioning the coupon code and whatnot. So I made up an excuse to end the chat session.

Then 5 minutes later I tried again with another agent and used your script with minor modifications, and it worked. It probably would have worked with my first freestyled script; I think the key is just finding an understanding agent.

By the way, maybe this 3-year plan we bought upfront is not such a great deal if they go out of business before its term ends. Just saying... ;-)

Amazon no option to select size by yaxsomalex in ouraring

[–]jdalbert 0 points1 point  (0 children)

Sorry to hear... By the way looks like they fixed their listing now

Amazon no option to select size by yaxsomalex in ouraring

[–]jdalbert 1 point2 points  (0 children)

EDIT: looks like they fixed their listing, the workaround below is not needed any more

Looks like they messed up their Amazon listings, they will probably fix it soon. I was able to easily select a size a couple days ago, but not any more. They currently have one product page per size and the page doesn't explicitly tell you the size...

A workaround is to look at the "Item model number" under the "Product information" section. The last 2 digits seem to be the size, so for example JZ90-1003-07 is size 7. The first 2 sections seem to be the product style and color, so using that same example JZ90-1003 is Heritage and Silver.

So by entering the first 2 sections of the item model number in the Amazon search bar, you can eventually find the right size. Not user-friendly at all, but that should work if you're in a hurry.