Skip to content

Instantly share code, notes, and snippets.

@phoet
Last active July 3, 2020 13:04
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save phoet/f66610890b1f5ff7f4b7e636b05f73ed to your computer and use it in GitHub Desktop.
Save phoet/f66610890b1f5ff7f4b7e636b05f73ed to your computer and use it in GitHub Desktop.
run a script with bundler/inline on heroku
# 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