Skip to content

Instantly share code, notes, and snippets.

@Chocksy
Created June 3, 2020 12:34
Show Gist options
  • Save Chocksy/5b749a1a423199e6b29457fb68ac3a85 to your computer and use it in GitHub Desktop.
Save Chocksy/5b749a1a423199e6b29457fb68ac3a85 to your computer and use it in GitHub Desktop.
Use Gemfile.local for puma-dev implementation
#!/usr/bin/env bash
echo "-- .powconfig file load"
if [ -f Gemfile.local ]
then
echo "-- We found a Gemfile.local so we are going to make Bundle use that."
# use the base Gemfile the local version.
export BUNDLE_GEMFILE=Gemfile.local
fi
if [ -z "${rvm_path:-}" ] && [ -x "${HOME:-}/.rvm/bin/rvm" ]
then rvm_path="${HOME:-}/.rvm"
fi
if [ -z "${rvm_path:-}" ] && [ -x "/usr/local/rvm/bin/rvm" ]
then rvm_path="/usr/local/rvm"
fi
# load environment of current project ruby
if
[ -n "${rvm_path:-}" ] &&
[ -x "${rvm_path:-}/bin/rvm" ] &&
rvm_project_environment=`"${rvm_path:-}/bin/rvm" . do rvm env --path 2>/dev/null` &&
[ -n "${rvm_project_environment:-}" ] &&
[ -s "${rvm_project_environment:-}" ]
then
echo "-- RVM loading: ${rvm_project_environment:-}"
\. "${rvm_project_environment:-}"
else
echo "-- RVM project not found at: $PWD"
fi
if test -e Gemfile && bundle exec puma -V &>/dev/null; then
echo "-- We have Gemfile and puma check"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment