Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix generating the template with URL is NOT working. #70

Merged
merged 4 commits into from
Nov 6, 2018

Conversation

hanam1ni
Copy link
Contributor

@hanam1ni hanam1ni commented Nov 2, 2018

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 in require_relative so it won't work.

Solved by using apply instead of require_relative that work with source_path that we added and both apply, source_path is provided by Thor.

Also, fix .env file name that breaks the when generating application from template.

Insight

Here is refrence for how apply and source_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
rails-test_ micky_mickys-macbook-pro -zsh _212x61

@hanam1ni hanam1ni self-assigned this Nov 2, 2018
Copy link
Member

@olivierobert olivierobert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@yutna yutna left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants