ruby - Test local version of gem in Rails project -
my rails site uses gem not good. every time need new end having spend time adding features gem adding code actual rails project. don't mind, , have gemfile set point github fork of gem (i tried submitting prs, maintainer seems have stepped down).
the problem haven't found sane way of testing new things add gem. it'd nice test within rails c
, ways can think of doing a) changing ~/.rvm/gems/.../foo.rb
, doesn't seem right or b) bumping version, pushing github, , running bundle up
, in addition being time-consuming disaster since don't know sure whether commits make right or not.
i'd happy standard irb
. various permutations of require lib/foo
within gem's directory don't work.
so what's best practice here?
if using gem , working on @ same time, best way use bundler , provide local path:
gem 'my_bad_gem', path: '../my_bad_gem/'
this gem under given (relative in case) path. option use local git repositories (see http://bundler.io/v1.3/git.html).
Comments
Post a Comment