Fix generating the template with URL is NOT working. #70
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
ISSUE: #64, #66
What happened
This PR fix when generating the template using URL. It shows the error that cannot that cannot find files that required in
rails-docker.rb
because template generator will use URL as path inrequire_relative
so it won't work.Solved by using
apply
instead ofrequire_relative
that work withsource_path
that we added and bothapply
,source_path
is provided byThor
.Also, fix
.env
file name that breaks the when generating application from template.Insight
Here is refrence for how
apply
andsource_path
work.Proof Of Work
Using this command
rails new rails-test -m https://raw.githubusercontent.com/nimbl3/rails-templates/bug/fix-require-from-url/rails_docker.rb -T
to generate rails application.Rails application generated properly