Skip to content

Instantly share code, notes, and snippets.

@mattjstar
Created June 8, 2015 22:07
Show Gist options
  • Save mattjstar/b8e51e5a0abba79a02b3 to your computer and use it in GitHub Desktop.
Save mattjstar/b8e51e5a0abba79a02b3 to your computer and use it in GitHub Desktop.
Spoof Rails IP
# Set up gems listed in the Gemfile.
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
require 'bundler/setup' if File.exist?(ENV['BUNDLE_GEMFILE'])
require 'rails/commands/server'
module Rails
class Server
def default_options
if Rails.env.development?
super.merge!(Host: '208.113.83.165', Port: (ENV['PORT'] || 5001))
else
super
end
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment