Written by James Britt
A designer sends over two files for a Ruby project: a maintenance page and an illustration. There’s a typo in the old drawing, just visible when you open it at full size. Both replacements need to go on staging for approval. Back on Windows, you’d know exactly where to go. But what do you open on the Mac?
According to the WinSCP client requirements, the official client runs on Microsoft Windows. The staging server can stay where it is. So can the account you use to reach it. Let’s follow the two files through a Mac-native client and see what happens if the designer opens the page and finds a blank space where the drawing should be.
What to Keep From WinSCP?
What did you use WinSCP for last week? If you picked a saved session and dragged a file across, you can do much the same thing in a graphical Mac client. If you had WinSCP run a scheduled script that compared two directories while you were at lunch, it’s worth examining that job separately. Who starts it? What gets deleted when a file disappears on one side? A successful manual copy tells you very little about either question.
For the maintenance page I’d keep the filenames on the Mac and the full path on staging in view at the same time. The corrected files go up. The existing copies come down in case the designer wants to revert. We’ll use the same SFTP connection later to retrieve a log.
Open a Staging Connection
The Commander One manager provides two independent file browsers side-by-side. Although you can experiment with having two local file browsers using the free version of Commander One, you will require access to remote connections in either the PRO edition or the PRO trial of Commander One for this walkthrough. This is important because after installing the free file manager, many users wonder where to enter a hostname.
Open Connections Manager, then click FTP & SFTP > SFTP for this connection. Enter the staging server hostname, port number and username provided by your host. Select the same type of authentication used by your user account. If that means using a key pair, send your administrator the public portion of your keypair and keep your private portion secure on your Mac. Before accepting a new host key, verify that the server’s host-key fingerprint matches the one your administrator provided via some trusted communication channel.
I would call this saved connection “Docs staging”. A login name like web could be shared by staging and production, and both servers may have a directory called public. Once connected, navigate to the directory designated by your hosting service for storing your maintenance page. In our example, it is a read-write directory that serves as static content. The Rails application itself follows its normal deployment processes.
Side-by-Side File Comparison
On the left, open the local folder containing maintenance.html, maintenance.svg and the designer’s source drawing. On the right, open the staging directory containing the previous version of the page. The SVG should be copied onto the server. The source drawing stays with the project even if it has the latest modification date. Selecting the two files individually is easier here than deciding which items to exclude from a whole-folder copy.
Do not drag anything yet. Select another local tab and create a dated backup folder. This will be used later. Copy the existing HTML and SVG from staging into that local backup folder. At this time you have the exact same versions of both files that staging is serving now, including any changes or corrections made by other members of your team after your last update. Switch back to the project tab on the left. The staging folder is still visible on the right panel.
Drag across a copy of the updated SVG, then copy the HTML file to the staging folder. Read the destination in any overwrite prompt. A “Permission Denied” prompt is always good to investigate at this stage. In some cases, copying these files into an adjacent writable folder can successfully complete the transfer process without updating the live public-facing webpage. Ask your host where the account has permission to write when the assigned path does not allow writing.
Verify What Your Browser Received
I’d watch the two copies in the operations queue before opening the browser. When the transfers are completed, refresh your remote directory and verify each file’s name and size against its local counterpart. Open the staging URL in your web-browser. Are you able to read the added sentence? Are you able to view the updated picture? Open the link to the picture displayed on your webpage if the picture is still absent.
This is one detail many developers miss. Even though the HTML requests maintenance.SVG, once you upload maintenance.svg, a case sensitive server could treat them as separate files. Although there may be very little difference to a user viewing your directory listing, a request for the uppercase name can return a missing-file error. You can determine whether you fixed this issue by opening the remote HTML in your viewer and searching for your image path. Use Quick Look to review your drawing on a Mac. The remote HTML viewer provides information about which filename the page tells the browser to request.
After making this fix in your local project, copy your HTML file again and reload your webpage. Commander One allows you to open and edit remote files, which makes it convenient for creating a simple text-based handoff note that exists only on staging. After completing this task, review your remote note and confirm that you have updated that specific section. For all items tracked within Git, update your repository before releasing.
Retrieve the log without losing your place
If your host exposes the site’s access logs to your SFTP account, open their directory in another remote tab. Leave the maintenance folder open in the first tab. Save a copy of the applicable log to a private folder on your Mac. Look through your local copy for the image path at roughly the time you opened the page. A 404 error for the uppercase version of the spelling and then a successful request for the lowercase version would clearly show what has changed.
Which log matters here? A web server can answer a static SVG request without calling Ruby. If the request makes it to Rails, follow the application’s output in the Rails debugging guide. Container deployments may send that output straight to a logging service. Open the team’s log viewer. There may be no production.log file under the SFTP directory at all.
Check the protocol and edition
SFTP runs over SSH. Plain FTP sends credentials and content over an unencrypted connection. FTPS uses TLS. FTPES refers to explicitly negotiating TLS. Commander One supports these options so use the protocol and port your host actually specifies. A rejected SFTP password is a good reason to review account details. Trying plain FTP will send those same details over a different kind of connection.
The listing on the Mac App Store offers a free download with in-app purchases. When choosing an edition be sure to view the paid feature list. One difference can be particularly relevant to developers who work from the shell. The direct PRO release includes a built-in Terminal emulator while the store build does not include it. If you already have Terminal open beside your editor this difference probably won’t make much of a difference in your choice.
Where Commander One fits
Saved connections & tabs pay off next month when you return to this job again. You’ll still be able to put the same two folders side by side. You’ll be able to move old illustrations into archives outside the served directory or rename and eventually delete retired assets once you’ve checked all references. Keep the backup HTML and SVG together. Restoring a page without its matching illustration could bring back the very problem you just fixed.
Ruby-Doc has a guide to deploying Rails with Kamal that covers another part of maintaining a server. Keep that release path and any established WinSCP sync jobs in mind when deciding what to transfer. For someone looking for a visual WinSCP alternative for Mac, the maintenance page makes a useful trial run. The job ends when the designer can open the staging URL and read the corrected lettering. If there’s still a blank space, you know where to look for the request and how to get the log back to your editor.
