-
-
Save davexunit/64e19a70b4eb1419386c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Create a Guix container that shares the host's network devices, SSH | |
# config, and MySQL socket directory. The container includes all of | |
# the software that is needed to build the gem set with Bundler. | |
guix environment --container --network --share=$HOME/.ssh --share=/run/mysqld \ | |
--ad-hoc ruby bundler mysql imagemagick libxml2 libxslt gcc-toolchain \ | |
make git coreutils openssh libffi pkg-config which sed gawk openssl | |
# Tweak the environment such that Ruby gems end up in the right place | |
# and their binaries can be found. | |
export GEM_HOME=$PWD/.gems | |
export PATH=$GEM_HOME/bin:$PATH | |
# Create /usr/bin/env so Ruby scripts work. | |
mkdir -p /usr/bin && ln -s $(which env) /usr/bin/env | |
# Bundle! | |
bundle config build.nokogiri --use-system-libraries --with-xml2-include=$C_INCLUDE_PATH/libxml2 && bundle | |
# Start the server! | |
rails server |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment