I’m authoring a gem and would like to copy template files that are packaged in my gem into the local directory that the gem is being called from.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Create an install script (place it to ‘bin’ directory of your gem), that will copy template files to user specified directory.
From the comments below, to get your path to copy files:
will show you path of your installation script (that will be ‘bin’ directory of your gem).
is the path to the directory from where user runs your script.