14 ms·
Rails 7.1 Released
- thrillgore 3y agoAre they gonna change the governance at the last minute like with Turbo?
- roboben 3y agoWhat happened? I missed the drama.
- deleted 3y ago[deleted]
- padjo 3y agoDHH removed TS from Turbo, posted a pretty inflammatory blog post about it and then got surprised when people reacted badly to it. Classic DHH stuff really.
- frou_dh 3y agoA significant part of that ""reacted badly"" was a bunch of kids and YouTuber idiots spamming GitHub with meaningless comments, issues and PRs. Those people don't come out of it looking respectable, regardless of DHH's approach.
- padjo 3y agoI mean yeah sure but DHH does seem to enjoy the controversy a bit. Either that or he’s really good at unintentionally courting it.
- gabeidx 3y agoThere's nothing unintentional about it, it's a strategy they employ since 2006/7. They have an entire chapter about it in their first book "Getting Real"[0]: > […] One bonus you get from having an enemy is a very clear marketing message. People are stoked by conflict. And they also understand a product by comparing it to others. With a chosen enemy, you’re feeding people a story they want to hear. Not only will they understand your product better and faster, they’ll take sides. And that’s a sure-fire way to get attention and ignite passion. [0] https://basecamp.com/gettingreal/02.5-have-an-enemy https://basecamp.com/gettingreal/02.5-have-an-enemy
- roboben 3y agoCurrently stuck on a fairly large code base on rails 6 with a ton of react and trying to upgrade to the new “non”-JS way with Hotwire. Wish me luck Rails is great when you stick with the defaults and a land of pain as soon as you leave them.
- yxhuvud 3y agoDon't upgrade your architecture all at once. First bump yourself to rails 7 (including any other gems you can upgrade), then do any other changes you want.
- FBISurveillance 3y agoI've been doing Rails since 2005 and love it, but - and that's just my personal preference! - I wish they'd have a stable release cadence (calver like vscode maybe?) and a clearer roadmap/governance. Maybe it's just me but I just don't like DHH's governance lately. Not in a bad way, but following him on Twitter I just no longer respect him.
- itake 3y agoCoding in rails since 2012 here. I lost faith in rails at 5.2. Active storage was so terrible.
- roboben 3y agoLooking forward to see if and how it evolved in rails 7. In 6 it was really bad too and my tests are flaky because of some weird active storage async stuff. Can't find the id of blobs I have no idea
- nerdwaller 3y agoWhat is terrible about active storage?
- itake 3y agoMy memory is fuzzy, but... 1. all data flow through the rails app (no pre-signed s3 upload or download links for direct uploading). 2. no support for CDNs (I think newer rails versions added support) 3. blobs and attachments were unnecessary abstractions. 3a. Querying was annoying (extra joins) and easy to add n+1 queries. 3b. In my app, images are moderated and it was unclear where to put the moderation metadata (on blobs? attachments? create a new table? why so many tables?) or `deleted_at` type columns. 4. GraphQL gem didn't support it: https://github.com/rmosolgo/graphql-ruby/issues/1777 https://github.com/rmosolgo/graphql-ruby/issues/1777
- mountaineer 3y agoA friend of mine joked a couple weeks ago that if a Rails release is announced but I hadn't submitted a PR (to upgrade), has it really happened? Well, here we go, PR coming up. Even if it has to stack behind the 7.0 one that's been sitting there for months.
- ulizzle 3y agoRails on the backend doesn’t get the credit it deserves. On the front-end it’s been a mess for a really long while now though
- roboben 3y agoI agree. What are options here? Rails in API-only mode?
- Pungsnigel 3y agoYeah, that’s one approach. Works great
- crystaln 3y agoBut why? So many more performant frameworks for this in strongly typed languages to boot.
- roboben 3y agoWhich ones? Never saw another one which comes with the same comfort of batteries included like rails. For example having database migrations built in etc.
- ulizzle 3y agoYeah exactly. All that boilerplate stuff is such a pain to write or maintain long term.
- ssijak 3y agoBoilerplate is 1% of time, rest is solving real domain problems
- gomoboo 3y agoASP.NET (C#) has migrations: https://learn.microsoft.com/en-us/ef/core/managing-schemas/migrations/?tabs=dotnet-core-cli https://learn.microsoft.com/en-us/ef/core/managing-schemas/m...
- conorh 3y agoThe official announcement here: https://rubyonrails.org/2023/10/5/Rails-7-1-0-has-been-released https://rubyonrails.org/2023/10/5/Rails-7-1-0-has-been-relea... has a few more high level details. Looking forward to using some of these new changes (some of the new async query methods will be very useful for some quick performance wins).
- desireco42 3y agoI really like Rails and for a long time I used it and lived fairly well off of it. I used to make good money doing upgrades from one version to another as well... I hear your gripes here... I think with Rails if you run into problems, this is because you created (or someone in your org) them for you.
- RomanPushkin 3y agoI hope to see the Hotwire dependency dropped one day. I love Rails and Hotwire, but I wish the latter were also a community tool. When TypeScript support was discontinued, DHH commented: > This project has been founded, funded, and maintained predominantly by the resources and investment of 37signals. We will set the direction as we see fit... With TensorFlow recently discontinuing support for Windows, it's very concerning to me that one day one person or organization decides that "we will set the direction". They don't even try to use nicer language. Don't get me wrong, I respect the work and effort. But 37signals are no saints. There was a scandal, and employee exodus not so long ago. Hotwire is so deeply integrated into Rails, so Rails is even more 37signals' tool than ever before. Before we had webpack, and JavaScript libraries that sometimes were not easy to use. Now things are easier, but instead of JS libraries we've gotten 37signals dependency, which is VERY concerning.
- gherkinnn 3y agoThe Turbo incident was none. It just wasn’t. I would not have dropped TS but the change barely matters. I have only ever seen it used in a script tag and the code reads well enough in vanilla. The actual incident was a horde of morons piling on top of that repo in the days that followed.
- RomanPushkin 3y agoNone? They ignored multiple instances of community feedback. Broke countless current PRs and upstream libraries. And moreover, going forward I expect another surprise from them. Another surprise that I ain't gonna like. Rails backend is in a good shape, but I don't like being dependent on a dictator's decisions on the frontend. I don't understand why Rails team don't understand that. But from the other side I'm thankful to DHH, because now I use more Elixir, and Crystal. Those are awesome tools, and 37signals-free world feels so much better. It's not toxic.
- mokkol 3y agoFor me it made a lot of sense. Ruby developers don't like types as much as in other languages. By far the majority of Javascript made by Ruby/Rails developers is vanilla. Turbo is a library used mostly by Ruby/Rails developers. As a Rails developer myself, it was much harder to contribute to Turbo. I had to learn Typescript before doing so, which makes the bridge too high. 90+% of the people who were complaining didn't even know Turbo existed. Could it be communicated a bit better? Yeah sure, I give you that. Is it bad moving forward? Maybe initially as there were broken PRs but I think eventually it is in a much better place. In my opinion.
- crystaln 3y agoWould anyone start a new project with Rails today? If someone suggested using Rails for a new project to me today, I would show them the door. There are so many more mature frameworks in more robust and performant languages. IMO the only reason to use Rails today is if you’re too uncurious to learn something better.
- roboben 3y agoPlease name a few with the same comfort of having most things built-in. One example: database migrations. In the JS world it is knex all over and it is much less comfortable than ActiveRecord.
- arrowsmith 3y agoPhoenix
- michaelteter 3y agoWith Ash, even more attractive.
- arrowsmith 3y agoI really need to check Ash out, it seems be a rising star!
- Rapzid 3y agoPersonally I would rather use Fastify+MikroORM. Or Asp.Net. Or Flask with SqlAlchemy + the migration and validation libs(marshmallow?) Or whatever is good in Golang.
- fredrikholm 3y ago> Or whatever is good in Golang. There is no such thing in Go and most likely will never be given the perspectives held by the greater Go community (less is more). Comparatively, the Ruby community is the complete inverse: any perceived friction can and should be abstracted to be (subjectively) nicer. It's why some people love the language, and it's also why some people dislike the language.
- kitsune_ 3y agoIn my experience many teams have problems establishing a clean code base with ActiveRecord.
- steve_gh 3y agoDon't get me wrong, I love Rails, and have been using it off and on since Rails 2. It's a really good framework, and for someone like me who needs to stand up a website from time to time it really is the path of least resistance. What bugs me is the pain of setting up a new laptop to run Rails. I need node, which means npm. I'm a backend guy, I don't understand how to set up node, what order to do things in, etc. I do it rarely enough that it always seems a fight. Eventually I get it done, but I'm never sure why it finally all comes together. An installer that puts together all the requirements so my rails just works would be great. The rvm installer will set up rails on top of ruby but won't set up the node system underneath it.
- jgilias 3y agoHave you used nvm? It’s pretty painless in my experience.
- JamesBrooks 3y agoIf you opt to use import-maps I think you can get away without needing node these days, though then you're using import maps and have to deal with that can of worms.
- roboben 3y agothats the whole premise of rails7: dropping the node dependency...
- abigail95 3y agoWhat are you comparing Node to? Other typical back ends are more complicated (except Go) Java, C#, Python for example
- lolinder 3y agoFor Java, sdkman is great—essentially as convenient as nvm. Python is a disaster.
- metaltyphoon 3y agodotnet new webapi - for apis dotnet new webapp - for crud dotnet new react - using react How is that complicated?
- 0xblinq 3y agoRails is great, and better than ever. I've spent most of my early years in the field working with Django and Laravel, then moved to frontend doing [all the usual stuff we do nowadays] and this year I was assigned back to a Rails + Hotwire project. I'm truly amazed how much simpler things are. I feel sad most of us have forgotten how easier things could be, and I'm terrified about new people joining this industry that will never know about how easier things could be because they'll never experience that (as things are right now, who knows the future...). If you're reading this and never tried Rails, or discarded it because you listened somebody say the usual "PHP is ugly/Rails is dead/JavaScript is messy" give it a try with an open mind and ignore what others say for a moment. I can't recommend it enough. It might not be the best tool if you have 1k engineers working on the same repository, but as a small team it has no competitors, it's just miles ahead everything else (well, honestly, maybe Laravel is as good).
- fredrikholm 3y agoI'd like to throw in Phoenix LiveView here. Rails wins every battle for initial development speed, as the conventions are so thorough and well thought out that nothing even remotely comes close. Laravel is creeping in, but it's not there yet IMO. LiveView however, scales better (in every sense of the word). It also comes with batteries included (auth, database access, jobs, mailer, complete testing kit etc), little-to-no-DIY-JS, and one of the finest VMs there is (BEAM). If nothing else, I'm happy that these projects all fight the "let's take a step back"-fight. At $DAYJOB I write React with Relay and the amount of hoops one needs to jump through is exhausting, even though I've been writing frontend JS for many years now and consider myself half decent in it.
- 12907835202 3y agoOther than learning for fun. Is there enough of a benefit to learning Elixir if you would already consider yourself an expert at PHP/Laravel and JS/Vue ? At a glance it's hard to see the value or believe that it has the same longevity or $$$ value.
- 3y ago
- deleted 3y ago[deleted]
- damir 3y agoDon't beat me, but still on rails 4.2 and happy... Gives me everything I need for no/low JS backend SaaS stuff I do for my self and B2B companies, running on low end VPSs... If you have time to answer - why would I upgrade?
- thinkingemote 3y agoI also use older versions. Firstly make sure you can upgrade to the latest patch/minor version. The main thing with older versions is vulnerabilities in associated gems, e.g. nokogiri which you can't upgrade without a major rails upgrade. However most apps don't do fancy XML parsing for example so most vulns are not applicable. So there is a bit of maintaining to ensure things are safe. Often you might add in a monkey patch to cover a bug. Upgrading therefore makes it more secure and lowers maintenance time. However there's the cost of the non stop upgrades to factor in. Another factor might be faster Ruby support in newer versions. (Generally when I make a rails app I use the latest release but I don't upgrade the rails version afterwards unless it's popular or the app is very old and stuff doesn't work on newer systems)
- shimonamit 3y agoFor security.
- dinoreic 3y agoI am Rails dev, and I don't like the fact that Rails in every new version has to REINVENT ALL THE WHEELS, ALL THE TIME. That creates huge problems for Rails devs and stakeholders. Rails is based on Ruby, which is backend language, and Rails should stay more on backend. That means - session management - routing and controllers - many API options (REST, json-rpc, ...) + JSON object exporters - ORM, Mailing, etc - server template renders (ViewCells are still not part of Rails) - tasks, logging and other helpers In the same way Rails adopted rake gem as default task runner, without re-inventing it as "ActiveCliTasks", they could have created standardised connector layer that will exchange objects between backend and frontend. So no Stimulus, TurboLinks, HotWire and other stuff one HAS TO learn and re-learn between versions. Svelte, Vue and React should have been officially supported with thin connectors. Rails server render layer can easily be integrated in any existing frontend tech, as alternative to React server components insanity. Also, there is no reason to have to have socket connection to pass HTML between server and client, good old RPC is just fine as 99% of big app scaling problems are Database problems, no need for another layers of complexity one has to ensure it works. I think, in that way Rails could "shine" far into the future, using its strong points but adopting new frontend stuff on the way, not re-inventing it all the time.
- michaelteter 3y agoAnd chances are, new Rails projects will just be API backends with React frontends. Also, if trying to do lightweight Javascripty frontends within the framework is important, we might as well just move to Phoenix. Phoenix is arguably better already... it just requires a moderate jump to learn Elixir (which unfortunately looks very much like Ruby but requires a very different approach to writing).
- dinoreic 3y agoPhoenix is super fun, but it is in completely different realm than rails :) What about all the gems Ruby has, does one really have all he needs inside Elixir/Erlang? More complex stuff like NokoGiri, Haml, etc., that works well and is maintained.
- gls2ro 3y ago
- nickjj 3y agoI took a 13,000 line Rails 7.0 app and updated it to 7.1. I had to change 1 line of test configuration code to make everything work beyond the diff between 7.0 and 7.1[0]. I would say that's a success for having an easy upgrade path. Now the fun part is going back to refactor some of the code to use the new features in 7.1. If anyone is curious, I updated my Rails / Docker example app to use 7.1 too https://github.com/nickjj/docker-rails-example https://github.com/nickjj/docker-rails-example. Even though Rails 7.1 comes with a Dockerfile, there's still a lot of opinions you can add such as using Docker Compose to have a fully working out of the box experience that works in development and production -- complete with Postgres, Redis, Action Cable, Sidekiq and more. [0]: https://railsdiff.org/7.0.8/7.1.0 https://railsdiff.org/7.0.8/7.1.0
- Draiken 3y agoI am hoping for a renaissance of Rails + HTMX with some sprinkles of JS on very interactive pages. Using Rails with Slim/HAML is an absolute bliss. If you prefer there are also libraries like `ViewComponents` that can facilitate partial rendering even further. Add in some web components and you can build very interactive pages with it. Even use React if you really need it in specific pages. HATEOAS cuts the complexity of applications drastically. And if you still need APIs, it's extremely easy to respond to different mime types and even have the same endpoints if you desire. IME the majority of applications that use React don't need it at all. They use React for a couple of menus that have to pop ups. So hopefully once some larger apps start popping up with no React (or only sprinkles of it), it finally clicks for some people how unnecessarily complex our applications are today. But I already read comments saying they need to switch to React because everyone else uses it. SMH. One can dream!