Ruby on Rails

Pierre, French
@Pierre@mastodon.gougere.fr avatar
railsconf,
@railsconf@ruby.social avatar

Meet our keynote speaker @tenderlove, Ruby Core, Rails core, Senior Staff Engineer at Shopify ✨

He is a dynamic & core team member and Sr Staff Engineer at @Shopify! When not innovating in tech, he loves whipping up culinary delights, cuddling with feline friends, and crafting quirky software.

Learn more: https://buff.ly/3W3S0BH

Floppy,
@Floppy@mastodon.me.uk avatar

Long shot: Any devs know of a method to add a lang attribute on any text that's missing a translation, so has had to fall back to the default locale? I suspect I might need to write my own i18n backend, but I'd love to find something already out there.

Boosts for reach appreciated!

https://github.com/manyfold3d/manyfold/issues/2096

Floppy,
@Floppy@mastodon.me.uk avatar

If I do end up writing my own version of the I18n::Fallback backend, I'll try to get it merged upstream into Rails core; accessibility by default is best accessibility.

veganstraightedge,
@veganstraightedge@ruby.social avatar

buildpack question

AFAIK, my app doesn't want/need

How do I tell Heroku to not install install the buildpack at all?

(and remediate this WARNING on every deploy)


WARNING:

Installing a default version (20.9.0) of Node.js.
This version is not pinned and can change over time, causing unexpected failures.
Heroku recommends placing the heroku/nodejs buildpack in front of
heroku/ruby to install a specific version of node

joeldrapper,
@joeldrapper@ruby.social avatar

We just released 1.10.0! 🚀

🔎 Selective Rendering
🎒 Component Kits
🗃️ CSV Views
🚀 Up to 7× Faster
🚿 New Streaming Tools
🪶 No Runtime Dependencies

We’ll release a new version of Phlex with Phlex 1.10 compatibility soon. 🔜
https://github.com/phlex-ruby/phlex/releases/tag/1.10.0

dominucco,
@dominucco@mastodon.social avatar

RSpec is great, but I have a soft spot for . And let's be honest, it's a really great and valid choice for What do you think?

https://dominickm.com/1658-2/

garrettdimon,
@garrettdimon@ruby.social avatar

Quick and dirty custom assertion to streamline ensuring valid syntax in generated Ruby files when testing custom generators.

  1. Accounts for destination_root
  2. Runs ruby -c to check a file's syntax
  3. Displays the full path (including destination_root) to the offending file if it fails

It works, but something tells me there's likely a better way to do some or all of this?

benediktdeicke,
@benediktdeicke@mastodon.social avatar

@garrettdimon I really like the simplicity of it!

It sounds like a great use case for the new Prism parser, though. I think the plan is to eventually ship it with Ruby itself? 🤔

In any case, it would allow you to show the list of syntax errors right there.

But yeah, it’s an additional dependency and more code to write 🙃

stevenharman,
@stevenharman@ruby.social avatar

A neat idea for preventing DB access within the scope of a block, from another of my too smart coworkers. https://discuss.rubyonrails.org/t/proposal-prevent-activerecord-access/85322

garrettdimon,
@garrettdimon@ruby.social avatar

Ready to save time with Rails Generators? Soft-launching Frictionless Generators for you great folks today. (The "proper" launch shouldn't be too far off.)

Still a few resources to finish up for the premium version, but the content is complete, and the main cheat sheets and quick reference sheets are included.

Already bought it? Make sure to download the latest updates! And if you have any kind words for testimonials, please pass them along.

https://store.garrettdimon.com/checkout/buy/4d74ef58-451e-4569-909c-3911b3cb6fd6

Odaeus,
@Odaeus@vivaldi.net avatar

@tenderlove hi Aaron, thanks for your work on the recent security announcements.

It turns out that I thought was unusually secure in 2023 but instead the RoR security mailing list has been silently(?) discontinued. (https://groups.google.com/g/rubyonrails-security)

I'm hopefully not the only geriatric millennial Rails dev still subscribed to that list. Perhaps you could send out a final message to say that the forum is the new official source?

tenderlove,
@tenderlove@mastodon.social avatar

@Odaeus yes that's a good idea, I'll send an email today

NeadReport,
@NeadReport@vivaldi.net avatar
canleaf,
@canleaf@mastodon.social avatar

@NeadReport There should be trains, no idea, the idea might be neat. But when we have railway infrastructure in use, it needs to be upkept. This has a feeling like a gadgetbahn. So many branch lines are not in use in Europe. Some lines were converted into cycle tracks. So are abandonned for the past 30 years and would need a refurbishment. Why not the real deal?

NeadReport,
@NeadReport@vivaldi.net avatar

@canleaf
A very similar situation with unused rail lines here in the states.
I think it really boils down to volume of users for either mode.
There are no lines when you order an Uber ride. It comes to you. A rail cab ride into the next small town to shop or dine? I'm obviously a romantic when it comes to this idea :)

benoit, French
@benoit@ruby.social avatar

I observe devs in my company bringing back the "schema.rb" file from production into the Git repository.

I am uncertain about this practice. Modifying directly the schema.rb file has consistently been problematic for me. Perhaps it's less of an issue if you solely use schema:load, but I remain skeptical.

I would prefer a re-entering migration to rectify the schema, such as using 'create index if not exists.' This way, changes are propagated across all databases in various environments.

jamie,
@jamie@ruby.social avatar

@byroot @benoit I live in slight fear that our schema.rb does not actually match our production schema, even though theoretically it should. So this sort of back porting it from production is attractive at least as a sanity/anxiety check

benediktdeicke,
@benediktdeicke@mastodon.social avatar

@jamie @byroot @benoit Face your fears: DATABASE_URL=$(heroku config:get DATABASE_URL) rake db:schema:dump 😄

nickharrison,
SussexGeoff_UK,
@SussexGeoff_UK@pixelfed.social avatar
collin,
@collin@ruby.social avatar

If you are launching a app, I really can’t recommend Hatchbox enough. It’s like having the ease of Heroku at the price of AWS/Digital Ocean, because that’s what it is.

I also love that we aren’t locked into anything since if Hatchbox vanished tomorrow, we’d just be left with properly configured servers on AWS that we could run ourselves the old fashioned way.

collin,
@collin@ruby.social avatar

@harpaa01 haha. I mean, that’s their business. Mine would be totally fine. But yeah, I don’t see much risk of that. We set up a load balancer and an app server and deployed in like 10 minutes with Hatchbox. I’m pretty sure that would’ve taken me two days and I probably would’ve fucked part of it up.

jamiemccarthy,
@jamiemccarthy@ruby.social avatar

@collin I’ve been meaning to try duplicating my DigitalOcean setup with Hatchbox and your post may have tipped me over into doing it this weekend :)

nickharrison,
jbzfn,
@jbzfn@mastodon.social avatar

⚡Don't make me think, or why I switched to Rails from JavaScript SPAs
ᐅ Vadim Demedes

「 I still enjoy React, but why is it so much harder to create apps in the JavaScript ecosystem, compared to Rails? We have all the necessary tools after all.

I think it all comes down to this. When I start a new JavaScript app, I have to make a lot of decisions on my own. I don't want to, but reality is, I have to 」

https://vadimdemedes.com/posts/dont-make-me-think-or-why-i-switched-to-rails-from-javascript-spas

caleb,
@caleb@calebhearth.com avatar

I’m really loving building these “one-off” pages. They all live in my StaticController and have a single route, which makes for very low barrier to adding them. They also tend to have pretty distinct styles. :keeprubyweird: :ruby: :whyfox:

Here’s my blog posting stats from inspired by @robb (like many other posts and pages on my site).

📈📊 https://calebhearth.com/statistics

adam,
@adam@ruby.social avatar

I deployed the new search experience I've been building on Hardcover yesterday 🥳

This will lower our search costs from $400/month (Algolia) to $70/month (Typesense Cloud)!

There's still more to clean it up and improve results, but this was a huge change. Trying to optimize the React to prevent re-renders has been a little tough too 😅

Any feedback on search is welcome!

https://hardcover.app

Advanced search page with filtering by pages, rating, publication year and bunch more.

adam,
@adam@ruby.social avatar

Looking into ways of lowering our hosting costs for Hardcover. Currently we're running at about $1,300/month.

Our largest expense is Algolia - which we use for instant search. It's been amazing, but at almost $400/month it's expensive. If we were to index Authors, Users, Characters and Discussions the cost would triple.

I'd rather not use ElasticSearch. Right now I'm leaning towards Typesense - which has a Rails gem with the same interface (!).

https://typesense.org/typesense-vs-algolia-vs-elasticsearch-vs-meilisearch/

tcannonfodder,

Today, I FINALLY got fed up with the subtle bugs that come with lvh.me being such as short domain name; such as Rails' domains: :all not working by default (it's documented behavior! This sucks! https://api.rubyonrails.org/classes/ActionDispatch/Cookies.html)

So I registered local-loopback-wildcard.com. No matter what you throw, it always resolves to 127.0.0.1. So you can test against subdomains without TLD hacks. Your testing environment matches production; as it should be.

thomasfuchs,
@thomasfuchs@hachyderm.io avatar
vmbrasseur,
@vmbrasseur@social.vmbrasseur.com avatar
ProPublica,
@ProPublica@newsie.social avatar

Union Pacific Fired Him Rather Than Heed His Warnings of Dangerous Rail Conditions

Time and again, Johnny Taylor’s duty to keep the #rails safe from disaster conflicted with his employer’s desire to keep its #trains running as fast and as frequently as possible, putting his career and #family in peril.

#Railroad #Safety #UnionPacific #Railroads #Louisiana #News #Workers #Lawsuits

https://www.propublica.org/article/union-pacific-railroad-dangerous-conditions-warnings-fired-employee?utm_medium=social&utm_source=mastodon&utm_campaign=mastodon-post

Laukidh,

@ProPublica FTA: he knew he “owned” the 120-mile network of tracks and would get blamed for anything that went wrong. He also didn’t want anyone to get hurt on his watch.

Priorities, I guess.

Laukidh,

@ProPublica I’m reminded that railroad workers were going to strike because they had zero sick days, and Union Joe got involved to make a deal that kept the system unsafe.

johnl,
@johnl@mastodon.social avatar

Do I know any Ruby/Rails devs that would be interested in smallish jobs to maintain some old rails apps. We have customers who occasionally ask us for dev help and the people who we usually refer them to are no longer generally available. Would ideally be in UK/EU. email/dm me!

Tijn,
@Tijn@dosgame.club avatar
berkes,
@berkes@mastodon.nl avatar

Doing some freelancing lately. After mostly work for a year, development is slow.

The lack of compiler and types- feedback is slowing me down terribly.

It often takes me hours or minutes to find out I made a stupid typo, or wrong assumption. With the LSP (or just a cargo check) shows it immediate. In Ruby/Rails it takes a full run of the test-suite and often manual testing.

Static typing is a tool to speed up development. Don't believe the people who tell you otherwise.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • rails
  • slotface
  • kavyap
  • thenastyranch
  • everett
  • tacticalgear
  • rosin
  • Durango
  • DreamBathrooms
  • mdbf
  • magazineikmin
  • InstantRegret
  • Youngstown
  • khanakhh
  • ethstaker
  • JUstTest
  • ngwrru68w68
  • cisconetworking
  • modclub
  • tester
  • osvaldo12
  • cubers
  • GTA5RPClips
  • normalnudes
  • Leos
  • provamag3
  • anitta
  • megavids
  • lostlight
  • All magazines