M
M
Maxim Filippov2014-12-12 03:53:26
Ruby on Rails
Maxim Filippov, 2014-12-12 03:53:26

Automatic update of local gems?

I am working on two gems, I have three folders:
mygem1, mygem2, mygems_example
Inside the first two folders is the code of the gems, in the third one is a Rails application that serves to test these gems. The application's Gemfile mygems_example includes these 2 gems with their local path:

gem 'mygem1', path: '/path/to/mygem1'
gem 'mygem2', path: '/path/to/mygem2'

The problem is this: every time I make any changes to one of the gems, I have to restart the server to see the changes. Google suggested me such a solution , I don’t think for a long time inside mygem1/lib/mygem1.rb I write:
module MyGem1
    include ActiveSupport::Dependencies::Loadable
    unloadable
end

But it does not help, you still need to refresh the page.
What am I doing wrong?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey Makridenkov, 2014-12-18
@SergIIIth

Maybe it can't be done with Rails, I don't know for sure.
Try gem rerun. It will restart the server when files change.
The command will be like rerun 'rails s'

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question