Last active
July 3, 2020 13:04
-
-
Save phoet/f66610890b1f5ff7f4b7e636b05f73ed to your computer and use it in GitHub Desktop.
run a script with bundler/inline on heroku
This file contains hidden or 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
# heroku expects all gems to be vendored. | |
# bundler/inline has some quirks that don't play nice with it | |
# so the best alternative is to just do a fresh install every time, dyno time is cheap! | |
require 'bundler' | |
require 'bundler/inline' | |
if ENV['DYNO'] | |
# on heroku, we don't care about their bundler config! | |
# alternatively, you could `rm -rf /app/.bundle` the bundler config before loading it | |
Bundler.settings.instance_variable_set(:@local_config, {}) | |
Bundler.settings.instance_variable_set(:@global_config, {}) | |
end | |
gemfile do | |
source 'https://rubygems.org' | |
gem 'webflow-ruby' | |
gem 'nokogiri' | |
end | |
puts "hello world" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment