sdoc
solargraph
sdoc | solargraph | |
---|---|---|
21 | 16 | |
822 | 1,855 | |
0.2% | - | |
8.7 | 7.1 | |
19 days ago | 13 days ago | |
JavaScript | Ruby | |
GNU General Public License v3.0 or later | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
sdoc
- Who has the best documentation you’ve seen or like in 2023
-
How to start?
Once you feel comfortable with both Ruby and Rails, try building a few simple apps on your own by reading the Rails Guides and browsing the Rails API whenever you're stuck.
-
Examples on https://api.rubyonrails.org
Hi. I'm a self-taught Ruby on Rails programmer. I have a question about the documentation at https://api.rubyonrails.org. On many of the pages, you'll see methods and their details. Below that, you'll often see examples using different options. This is where I have a question. An example might look like this:
-
Thoughts on a `.=` operator like `+=`?
If a method isn't documented in https://api.rubyonrails.org/ it shouldn't be used as we reserve the right to remove or change them at any point.
-
Ask HN: Easiest and cheapest full-stack frameworks that you love?
Rails still holds the top spot in getting things out the door in the shortest amount of time. So many example projects and tons of amazing libraries that are available. They absolutely have the best developer docs in the industry as far as I'm concerned.
https://guides.rubyonrails.org/
https://api.rubyonrails.org/
Phoenix/Liveview is a close second. I would personally use Phoenix/Liveview at this point because since I know that stack pretty well, but it is definitely not as easy as Rails to learn. However, once past the learning phase I think there's distinct advantages especially with Liveview.
Fly.io has a free hosting tier currently. You can also get some free servers through Oracle Cloud.
-
Any advice for a beginner?
https://api.rubyonrails.org is your best friend. Check the docs before googling. Instant access to the source of functions. ApiDock is shit but continuously gets to the top of google search results.
- Good tutorial that dumbs things way down?
-
Books Recommendation for Beginners
For something more in-depth, besides the Rails Guides that have been mentioned already, you could also use the Rails API docs as a reference.
-
Why does VSCode have no intellisense for Ruby on Rails (or am I missing something?)
Yeah visit guides.rubyonrails.org if you want to see how to do a particular thing like validations and stuff and use this website https://api.rubyonrails.org/ for seeing method definitions their options etc.. These two websites pretty much conver everything. I specially use the second on pretty frequently. Also I think sublime text is better for ruby on rails than vs code but thats personal preference. The ruby doc website is pretty good to for documentation on rubies standard classes. Like if you are looking for some method to do something for a string you can just search string ruby and this comes up first, it contains all public methods for these classes and is pretty useful.
-
Is learning ruby on rails in 2022 worth it?
If you mean the Rails API Documentation, I mainly use it when I use a method I'm not familiar with (eg trying to adapt a StackOverflow suggestion).
solargraph
-
A few words on Ruby's type annotations state
My favorite typing solution so far in ruby is Solargraph https://solargraph.org/.
-
Nice Ruby IDEs
Solagraph: https://solargraph.org
-
Using SyntaxSuggest with Solargraph LSP!
Yay! For those who don’t know solargraph provides a language server protocol (LSP) for Ruby so that your IDE (like vscode) can know more about the code you’re writing https://solargraph.org/.
-
Ruby Delights Built into the Language: No Gems Required
If you're looking for IDE-level language assistance, I can't help you, but since you mentioned nvim: I use regular vim with CoC / Conquer of Completion (vim plugin; LSP server, may not strictly be necessary for nvim), Solargraph (Ruby Gem; language server), and Rubocop (also a Gem) for linting. I previously/still use ALE (vim plugin; Asynchronous Lint Engine) because I haven't gotten CoC+Solargraph to play nice with Rubocop, probably due to something silly.
https://github.com/neoclide/coc.nvim
https://solargraph.org/
https://rubocop.org/
https://github.com/dense-analysis/ale
My impression with all of this running under MacVim... it's plenty responsive. It can take a while for Solargraph to index everything on startup if you're working in a big project; once it loads, it's snappy. (There's probably a way to cache that startup scan.)
-
I need help with lsp-mode setup
I am trying to use lsp-mode for ruby via solargraph and for Rails era templates using web-mode via lsp-tailwindcss and both seems to kinda sorta work but neither one is really giving me all the features that I see that others have.
-
State of the Ruby language server (LSP) ecosystem / looking for suggestions
https://github.com/castwide/solargraph Seems to be the most mature/developed one. Slow on my system, bad documentation. Language docs are shipped as "cores" you imperatively download that float around in your home directory; this is messy and prone to failure. Doesn't have any docs for versions of ruby past 2.7.
-
Trouble With Solargraph Completions
I have recently installed Solargraph and can see that when I open a Ruby file that the LSP is attached to my buffer via `LspInfo`. However whenever I am trying to do some very basic completions or see what kind of methods are available for an object, literally nothing happens. What I am aiming for is something like on the official Solargraph website: https://solargraph.org/
-
Linting and Auto-formatting Ruby Code With RuboCop
If you use Vim or Neovim, you can display RuboCop's diagnostics through coc.nvim. You need to install the Solargraph language server (gem install solargraph), followed by the coc-solargraph extension (:CocInstall coc-solargraph). Afterwards, configure your coc-settings.json file as shown below:
-
anyone here using neovim for ruby on rails projects?
The builtin LSP works well with solargraph to provide autocompletion.
-
Sorbet: Stripe's Type Checker for Ruby
Sorbet and/or RBS seems like they may be the future given how popular typescript is with JS programmers these days. There are some other projects that assist programmers without relying on formal type definitions in the source or shadow typing files:
Solargraph combines inference and insight from YARD docs (standard for many gems, plus Castwide has written more YARD for the standard library) to make some pretty good guesses. Crucially it has plugins that add the insights from popular gems with static analysis (e.g. reek, rubocop). I maintain solargraph-rails, which parses your Ruby to make guesses about (surprise) Rails.
The typeprof gem can help IDE plugins make typing guesses based on your tests. This project is interesting to me because it's going into Ruby 3.1 so I think it reflects awareness from the core ruby team that many programmers are not ready to add types to their code.
solargraph: https://github.com/castwide/solargraph
What are some alternatives?
rux - A jsx-inspired way to render view components in Ruby.
ruby-lsp - An opinionated language server for Ruby
Knock - Seamless JWT authentication for Rails API
sorbet - A fast, powerful type checker designed for Ruby
graphql - Ruby implementation of GraphQL
steep - Static type checker for Ruby
super-bombinhas - A 2D platformer written in Ruby.
vscode-ruby - Provides Ruby language and debugging support for Visual Studio Code
ruby - Exercism exercises in Ruby.
Roda - Routing Tree Web Toolkit
meteor-mysql - Reactive MySQL for Meteor
TypeORM - ORM for TypeScript and JavaScript. Supports MySQL, PostgreSQL, MariaDB, SQLite, MS SQL Server, Oracle, SAP Hana, WebSQL databases. Works in NodeJS, Browser, Ionic, Cordova and Electron platforms.