Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve instructions for setting up the development environment #1181

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

jhp0tter
Copy link

@jhp0tter jhp0tter commented Mar 3, 2023

This is another attempt at #1024, because I think there is still some room for improvement after @trwnh's edits.

Changes:

  • Fix commands and clarify instructions.
  • Add some tips for operating system-specific quirks.
  • Remove typographic quotes.
  • Add a trailing newline.

@vercel
Copy link

vercel bot commented Mar 3, 2023

@jhp0tter is attempting to deploy a commit to the Mastodon Team on Vercel.

A member of the Team first needs to authorize it.

@@ -49,31 +49,41 @@ You can follow the [pre-requisites instructions from the production guide]({{<re
Run the following commands in the project directory:

```sh
bundle config set --local path vendor/bundle
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this necessary? i don't remember having to do this

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just went through the dev setup instructions myself (hence the drive-by comments, sorry 😅) and didn't have to do this either.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Running bundle install on Fedora 37 with the rubygem-bundler package gives:

image

@trwnh @nuztalgia Were you using RVM or rbenv? Perhaps that's why it wasn't necessary

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

don't the prereqs say to use rbenv?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@trwnh But the Vagrantfile uses RVM 🤔

Also, I think rbenv/RVM Bundler still installs the gems globally, it just doesn't require root since rbenv/RVM install Ruby per-user in the home directory. I was thinking that it's better to isolate the gems per-project, which AFAIK rbenv/RVM don't do by default, unless you use gemsets or something?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unfortunately i do not know enough about the ruby ecosystem to have an informed opinion on this ^_^; but i guess it might be worth making a more general statement about how dependencies have to be installed in a non-root way, and then suggest using one of rbenv, rvm, or setting the bundle local path. or, based on some quick googling, i see that other people might recommend chruby for this? not really sure if any of these approaches are "best", or what the industry standards might be

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@trwnh Does ddfd3e8 look OK? Thanks for your help by the way 😄

content/en/dev/setup.md Outdated Show resolved Hide resolved
Copy link

This pull request has merge conflicts that must be resolved before it can be merged.

@vmstan
Copy link
Sponsor Contributor

vmstan commented Dec 5, 2023

@jhp0tter can you please rebase?

@jhp0tter
Copy link
Author

@vmstan Does this work?

Copy link

This pull request has resolved merge conflicts and is ready for review.

{{</hint>}}

{{<hint style="info">}}
On some operating systems, such as Debian and Fedora, `yarn` has been renamed to `yarnpkg`. On these systems, run `yarnpkg` instead of `yarn`.
Copy link
Sponsor Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fedora isn't covered by the prerequisites page, and on Debian yarn will come as part of installing Node.js via Nodesource.

@@ -50,30 +50,37 @@ Run the following commands in the project directory:

```sh
bundle install
yarn install
yarn
Copy link
Sponsor Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would prefer this stay as-is, unless there's a justification?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants