Table and track saws are great, but not everyone has the budget to buy them. Knowing how to make a rip cut with a circular saw is a skill you'll need until you add one or two other tools.
There are a few ways to achieve it, and they'll be accurate enough for most of your projects for all but the most precise of requirements (we're looking at you, cabinet maker).
Start with an accurate cutting line
You can have the prettiest perfect cut on top of the cutting line, but if it's in the wrong place, it won't help at all.
There are several ways to make your cutting lines accurate. One of the most basic methods is to mark your measurements on each end of the board and use the edge of the tape measure to trace the distance between them. You have to be fairly gentle as it's easy to bump and move the tape.
A more stable method is to place a ruler, T-square, or level to trace the connections between the marks.

If your board is longer than your ruler, you can mark your measurements incrementally and connect them one at a time until you reach the end.
You might want to use the edge of the board instead. This works, but you need to make sure the edges are perfectly straight, or you'll just end up with a line that travels with the edge of the board.
Using chalk lines is a very common way to draw lines quickly. Just make sure your hook is aligned exactly with one mark, then pull the thread taut over the mark on the other end before popping it out.

Buy a Track Ready Circular Saw

Some circular saws, such as Makita's XSH08, have track shoes that are compatible with that brand's track system. Just add track lengths to cover your cut lengths and use them when needed.
This is the most accurate way to make rip cuts with a circular saw without buying a track saw or table saw. Still, tracks can be expensive and add to your overall costs.
Freehand Rip Cut

Freehand rip cutting is certainly possible if you don't mind deviating from blade width or so. This requires the least amount of setup time, but tends to be the least accurate.
To do this, bring your saw to the board, then push the blade over your cutting line to check your starting position. Pull the saw back a bit and pull the trigger to spin the blade.
As you move the saw forward, go far enough to verify that you are cutting on your line. Once you know you're in, go ahead and start pushing the saw, keeping an eye on your blade and line.
A cutting wire blower is a great help as you will need to watch it throughout the cut.
If you are confident with the 0° and 45° notches on your saw, you can follow those notches instead of looking at the blade.
Rip cutting with a circular saw using the Rip Cut Fence

If you look at the base plate of a circular saw, almost every model has slots for mounting slitting fences (also known as edge rails). These are usually metal T-bars that slide on and lock with a thumbscrew.
After marking the material, hold the circular saw so that the blade touches the mark. Slide the fence into the shoe until it hits the side of the board and tighten the thumbscrew to lock it at the correct distance.
Pull the saw back a bit, rotate the blade up, and make the cut by pulling slightly from the side to keep the entire fence edge flat against the board.
The downside of using a circular saw and a rip fence for a rip cut is that it is as straight as the edge of the board. Most boards are usually fine, but gauge lumber isn't always that straight.
Another consideration is that fences can only go so far. If you're trying to cut 23" out of a 48" wide lumber, it won't cut it.
Clamps straight edges for slitting

One of the most common ways we do rip cuts with a circular saw is to clamp the straight edge. In order to do this accurately, you need to know the distance from the edge of the shoe to the blade.
From your cutting line, clamp the ends of the ruler to the distance you measured between the edge of the shoe and the blade. Slide the shoe onto the ruler and push the saw forward, making sure the blade touches the cut line.
If not, make small adjustments until you get it right. Remember that you need to move both ends the same amount to cut properly. Double check with a tape measure before starting to cut. Also, shake the ruler slightly to make sure it doesn't move.
In place of a ruler, a spirit level works well.
The nice thing about using this method of rift cutting with a circular saw is that you can set it anywhere on the material.
This can be a challenge if your material is longer than a ruler. It's a pain to stop halfway, reset the edge, and start over. We have 5 foot and 10 foot lengths on hand to make sure we have what we need.
Rift cutting with a circular saw using the additional rail system

In the past, the best way to make precise cuts with a circular saw was with a track saw. Most DIYers, even serious DIYers, and some professionals simply don't have the budget to add a professional saw like this. Fortunately, new products make it easier to achieve similar accuracy without breaking the bank.
One way is to use an add-on rail system such as the Kreg Rip Cut Circular Saw Edge Guide or Bora's NGX Clamp Edge Guide. These take almost any circular saw and clip a piece to the track, which then slides over the track. Simply use a set of track clips (often included) to secure the track and cut.
Easier to set up than with a ruler due to the sacrifice of edge. The first time you cut with the saw you will be using, it will cut away some of the edge material, showing you the exact path your saw blade will travel.
One downside is that it does take some time to set everything up the first time, and you may need to repeat the process if you take the saw out of the rail adapter. Some people choose to leave the saw in and reserve a second for freehand cutting.
Another downside is that it's still not as accurate as a dedicated track saw, and some models we've tested want to lean and create slight bevels. Still, it can come pretty close if you take your time during the setup phase and keep the saw level while cutting.
Make a Circular Saw Rip Cut Jig

It's not too much of a stretch to make your own circular saw cutting jig out of scrap. It's essentially a plywood fence and base. 3/4" plywood is perfect for the fence section, you just screw the 1/4" plywood to the bottom of it.
By making sure that the base part extends beyond the circular saw's blade, you'll create a precise blade path, similar to how the sacrificial material works with the railsaw's attached rails on the first cut.
The trick here is to make sure the scraps you use for the fence are straight and square. Unlike a rail system, you'll want to make sure the saw is resting against the fence as you cut.
Once built, line up the edge of the base with the cut line and clip it to the base. Then crop.
The upside is that it's an inexpensive way to make precise cuts with a circular saw. The wood you're using is already scrap from another project, a few wood screws won't cost you much. It also won't hold your saw to the rail adapter.
It's a consumable item, though, and more prone to damage and wear over time. If you're cutting scrap edges to keep the motor housing from hitting your base (see photo above), you're also introducing the possibility of a slight bevel if you don't keep the saw level.
final thoughts
None of these methods can replace a good table or track saw, but they can help you achieve excellent results until your budget allows for it.
Any tips or questions on how to use a circular saw for rip cutting? Feel free to share these in the comments below!