Skip to content

Instantly share code, notes, and snippets.

@shmidt
Last active January 4, 2022 01:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shmidt/b9454450bef130badc8ddcdc319fe8aa to your computer and use it in GitHub Desktop.
Save shmidt/b9454450bef130badc8ddcdc319fe8aa to your computer and use it in GitHub Desktop.
Installing Ruby on Rails on Fedora 34 via Homebrew
sudo dnf group install "C Development Tools and Libraries" "Development Tools" -y
sudo dnf install ruby-devel zlib-devel -y
sudo dnf install procps-ng curl file git libxcrypt-compat -y

install brew from https://brew.sh

echo 'eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"' >> $HOME/.bash_profile

For the fish shell

fisher install oh-my-fish/plugin-linuxbrew

For the bash shell: edit bash profile to add ruby paths

nano ~/.bashrc

Paste following:

export HOMEBREW_PREFIX="/home/linuxbrew/.linuxbrew"

# Ruby
sudo dnf install ruby -y
# Ruby Gems
export GEM_HOME="$HOME/gems"
export PATH="$HOME/gems/bin:$PATH"
nano $HOME/.config/fish/config.fish

Paste following

set -x HOMEBREW_PREFIX="/home/linuxbrew/.linuxbrew"

if status is-interactive
    # Commands to run in interactive sessions can go here
    eval ($HOMEBREW_PREFIX/bin/brew shellenv)
end

fish_add_path $HOMEBREW_PREFIX/bin
fish_add_path $HOMEBREW_PREFIX/sbin

abbr confish 'nano $HOME/.config/fish/config.fish'
abbr fishcon 'nano $HOME/.config/fish/config.fish'

# Ruby gems
set -x GEM_HOME="$HOME/gems"
fish_add_path $GEM_HOME/bin

Reload bash and fish

exec bash
exec fish

Install NodeJS and Yarn

sudo dnf install nodejs -y
npm install --global yarn

Install rails

gem install rails

Optional:

Change shell to fish

sudo dnf install util-linux-user
chsh -s /usr/bin/fish 

Install React globally

npm install -g typescript
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment