Hi there,
I would say that I am an advanced beginner with ruby / rails dev, but I am mission some steps during set up a development environment ion OSX (10.14 in my case).
I went through the wiki pages and adapted the config/diaspora.yml. But on the certificate_authorities step I struggle:
What to fill in on OSX? What is a bundle? Can I export some CA from keychain?
The setup - documentation for OSX is somewhat missing in some steps. I do not plan to start a pod, I just like to start on my dev-machine.
As far as Iâm aware, you shouldnât need to do anything with certificate authorities for a development environment. CAs should only be needed for secure communication between nodes, which for most development work isnât necessary â unless the development youâre doing involves federation.
I take it youâve followed the installation instructions for Mac OS 10.13. If you havenât followed that step-by-step, itâs likely youâve done something wrong at some point.
Note that there is a not very obvious link after Bundler installation to Notes On Installing and Running Diaspora. You need to follow the instructions on that page to complete the installation, but to take note of the exceptions for Mac OS listed below that link on the Mac OS 10.13 installation page.
Bunder is a gem manager for Ruby. Once installed with sudo gem install bundler, you install (and later update) the gems you need to run diaspora* with bin/bundle install --full-index.
Iâm not a dev, so Iâd better leave it there for people more competent than I to help. But I hope it helps you find the missing steps from what you have so far done.
If youâve noted any differences there are between the installation instructions for OS 10.13 and what you had to do to install on 10.14, you could usefully help to create an installation guide for 10.14.
In config/diaspora.yml you need to setup a path to a certification bundle. On OSX there is no auch file.
But to launch RAILS_ENV=production bundle exec rake db:create db:migrate
diaspora need a path to a ca bundle file. A âFATAL: Diaspora doesnât know where your certificate authorities are. Please ensure they are set to a valid path in diaspora.ymlâ error appears.
To solve the problem you will need to install a ca-bundle file.
With rvm installed you can setup these steps:
Youâve stated that you want to set up a development environment. But RAILS_ENV=production is for a production environment (a working pod). You need to visit the Versions of this guide section of the Notes on installation page and choose the Development option under âRunning modeâ and choose which database software you are using. Youâll then get the correct instructions for that environment (which shouldnât include any CAs).
By the way, there is now a Docker image available for setting up a dev environment, which should make installation a lot easier. See this PR. This is now included in the core code base.
Thanks you are right. I just follwed the macOS instructions, went back to âNotes on installing Diasporaâ as advised and touched down on the âproductionâ page.
With bundle exec rake db:create db:migrate I was now able to setup diaspora on macOS 10.14 and get the welcome-page.
What is really needed is a clearer setup guide for macOS.
Thanks all for advise
Iâve set this up on Linux many times and will be setting this up on Mac for the first time this week. I can provide a side-by-side and maybe tweak things as necessary. One thing that jumps out at me immediately is that unlike the Linux guide (or the Ubuntu guide anyway), there arenât options for choosing Database type, dev vs. production, etc. So there could be some work to do there.
There are and there arenât. There are when you go to the âFollow this other guideâ part. There is not in the macOS one. For example, Iâm not interested in deploying MySQL yet the macOS guide only specifies that. Etc.
I just finished setting up development under macOS for the first time. I got everything working except jasmine:ci. Iâm not sure if thatâs because I need to have Chrome/Chromium installed or what. Having done dev setups several times I do notice some areas of improvements needed. Iâm capturing them here to fix later (or if someone else is doing that they can be on the lookout for them):
Need to have the database selection again. I was able to install Postgres via following another guide for installing it through brew. I have zero intention of install MySQL if I can avoid it ;).
It links to the âinstallation/backportâ guide but that guide doesnât discuss setting up the Ruby system or the database. Went to the Ubuntu guide for the steps for setting up RVM and the database.
I didnât need to de the arch x86_64 step at all. I think this may be an obsolete step.
I think we can redo this guide based on the same reference as the other install guides with the OS specific stuff grafted into the appropriate place. It will make it more consistent and easier to follow, I think.
In reply for the database part:
There is a postgresApp for macOS. PostgresApp.com which installs the Postgres database super easy on a Mac without the need for brew.
Maybe this can be added to the setup doc for new developers.
If you are thinking about spending time on the current macOS guides: please do not. The guides in the wiki are currently deprecated, and as macOS is a platform supported for development only, we will only support Docker-based setups in the future for mac, which will make the guide simpler, less prone to error, and everyone will be more happy. However, that guide is not done yet (I am working on it, so standby).
The guides in the wiki are deprecated? What are they being replaced with? Iâm focusing on it, and the guides in general, from the developer platform perspective.
Iâm not sure how I feel about that, but my initial reaction is to be uneasy about it. I do my work in RubyMine on a VM or bare metal. A lot of the setup steps are needed to make that happen. I can see skinnying the guides down to make it developer-centric but I canât imagine not needing a developer install guide at all.
âŚor is this referring just to the Mac not all install guides?
Fear not, @HankG! Dennis doesnât mean that youâve followed a broken guide. The ones in the wiki are still the ones to follow today, but Dennis is working on an improved set up installation guides. What he means, I think, is: please donât spend any time trying to improve the guides in the wiki, because that will very soon be superseded by the new guides heâs working on, so it would be wasted energy.
Thanks @goob, I got it working so not worried about that. I may have over-interpreted what he was saying that we wouldnât have guides except for using Docker setups. Overhauling the guides sounds good. Iâd be happy to help test them as well from a developer-centric perspective. Eliminating all guides except the Docker guide would be concerning to me.
On my post from earlier this morning, I wasnât planning on making any changes to the macOS guide in the short term anyway but didnât want to lose the hiccups I found either.