TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Rails Cheat Sheet

240 点作者 joemasilotti大约 2 年前

13 条评论

s4i大约 2 年前
In my last job I encountered my first Ruby&#x2F;Rails codebase ever (mostly REST APIs but a few server-rendered views as well). Despite the initial chaotic impression of the codebase (it was a startup after all) with all the Rails magic on top, I really fell in love with the framework after a more experienced Rails dev introduced a few key conventions and helpful libraries to the codebase.<p>Out of those, I’d at least add the RuboCop [1] linter and the BetterSpecs [2] guidelines to this list. Both eliminated bikeshedding in the team and freed up brainpower to solve actual problems: the first one helps you learn intricacies of Ruby bit by bit right in the IDE and the latter one pushes you to write test in a specific style that’s easy to maintain and trust.<p>[1] <a href="https:&#x2F;&#x2F;github.com&#x2F;rubocop&#x2F;rubocop">https:&#x2F;&#x2F;github.com&#x2F;rubocop&#x2F;rubocop</a><p>[2] <a href="https:&#x2F;&#x2F;www.betterspecs.org&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.betterspecs.org&#x2F;</a>
评论 #35930114 未加载
Tronno大约 2 年前
I went all in on Rails a couple of years ago. Although the overall feature set is amazing, code discoverability has been a frustrating stumbling block from day one.<p>The &quot;magic&quot; (convention over configuration, autoloading, metaprogramming, etc) makes it difficult to know what methods are available to use. I end up over-relying on the official docs, which are of inconsistent quality. One example: api.rubyonrails.org lacks code examples, doesn&#x27;t usually state what a given method returns, and many entries are outright blank.<p>Editor integration could help, but feels lackluster. With TypeScript in VS Code, hints come up as I write. I can hover anything to see its type, methods, and source code. With Rails, I can poorly approximate this behavior with a collection of half-functional community extensions, or I can buy and use the slow, bloated RubyMine IDE.<p>Rails enabled me to build my product, but my experience doesn&#x27;t match the love I hear from other devs. I wish I knew how to make it click.
评论 #35929270 未加载
评论 #35929548 未加载
评论 #35943047 未加载
评论 #35931487 未加载
评论 #35934259 未加载
Bergrebell大约 2 年前
Thats a good point and nice to see that the rails community is starting to work to consider new engineers more. The whole JS and also PHP&#x2F;Laravel ecosystem is doing this already since quite some time. Rails is still the best option imo when you want to be productive as a small team - but the learning resource don’t keep up with other frameworks&#x2F;languages.
评论 #35934332 未加载
评论 #35936234 未加载
评论 #35928075 未加载
trilbyglens大约 2 年前
I think one of the things that sort of stopped rails from becoming mainstream was that when WebApps really took off everything switched to SPA apps. Now that&#x27;s shifting back a bit (a good thing imo) as many people are starting to recognize the downsides of frontend apps. Next.js is basically one giant workaround for the shortcomings of spa apps.
评论 #35928609 未加载
评论 #35929268 未加载
评论 #35928652 未加载
gymbeaux大约 2 年前
I always hear good things about Ruby on Rails, yet it remains relatively niche. I first heard about Ruby + Rails in 2013, and ten years later it seems to be just as niche. Loved by those who use it, but niche. Why does it continue to struggle in this way when more recent languages like Go are booming?
评论 #35928364 未加载
评论 #35928042 未加载
评论 #35928712 未加载
评论 #35928062 未加载
评论 #35928030 未加载
评论 #35928326 未加载
评论 #35928307 未加载
评论 #35928098 未加载
评论 #35927999 未加载
评论 #35928188 未加载
bdcravens大约 2 年前
&quot;The Railscasts Pro videos were recently made free by the author because the videos are dated.&quot;<p>Six years ago (2017), not recently.<p><a href="http:&#x2F;&#x2F;railscasts.com&#x2F;announcements&#x2F;13" rel="nofollow">http:&#x2F;&#x2F;railscasts.com&#x2F;announcements&#x2F;13</a>
评论 #35929539 未加载
xyztimm大约 2 年前
My impression (from years past) is that Ruby is what developers loved. It was my first “real” programming language and the reason I fell in love with coding. These days I’m mostly writing in JS and Node for work. Rails is the money-maker, but the philosophy of convention over configuration is why it really off IMO, and something that is both underrated and missing in the JS world.
theflyinghorse大约 2 年前
Rails made me more confused than Spring did. The amount of magic makes it really hard to reason about what&#x27;s going on.
评论 #35930950 未加载
revskill大约 2 年前
The fact that people love Ruby proved that Human hated parentheses and semicolons.
mberning大约 2 年前
Great collection of resources.
fallingmeat大约 2 年前
1 point by fallingmeat 1 minute ago | next | edit | delete [–]<p>Why do similar articles or headlines seem to come up at the same time on front page? e.g. there is another article on Rails that happens to be front page right now that is seemingly otherwise unrelated (the other article is called The Rails Doctrine).
评论 #35928895 未加载
评论 #35933590 未加载
random_acc大约 2 年前
It’s always so odd when these type of posts pop up and I scroll through and see comments about how people love Ruby&#x2F;Rails. Mainly because I can’t stand the language and framework. I absolutely hate any time I have to read through Ruby&#x2F;Rails code or write something in it.
评论 #35930048 未加载
评论 #35932108 未加载
sage76大约 2 年前
Ruby has the worst, most complex syntax I have ever used.
评论 #35928608 未加载
评论 #35928047 未加载
评论 #35928386 未加载
评论 #35928165 未加载
评论 #35928107 未加载
评论 #35928133 未加载
评论 #35928068 未加载