twilio-rb gem prevents heroku_san's rake tasks from loading
ancamp opened this issue · 1 comments
ancamp commented
On a new rails 3.2 app with only twilio-rb and heroku_san gems added to the default Gemfile heroku_sans rake tasks do not load (are not available or visible with rake -T)
I do not know which gem is causing the conflict. I have created a related issue on the twilio-rb repo.
ancamp commented
Im new to Rails so please forgive any mistakes.
require 'railtie' if defined?(Rails) && Rails::VERSION::MAJOR >= 3
doesnt load the correct railtie.rb if the twilio_rb gem is loaded. Im guessing this is because twilio-rb also defines a railtie.rb file that appears before heroku_san in the load path. Other gems seem to use a pattern of using more explicit pathnames for requiring their railtie.rb
Examples:
# store railtie in subdirectory
require '[gemname]/railtie' if defined? Rails
# load by full path
require File.join(File.dirname(__FILE__), 'railtie.rb') if Object.const_defined?(:Rails) && Rails.version =~ /^3/
Using either of these method resolves the conflict.