0

I have a rails application deployed on heroku. There is a script inside the application in the following path

config/data/create.rb

On local I just have run the following in the app path:

ruby config/data/create.rb

and the script gets executed.

What needs to be done to execute the same on heroku ?

2
  • Already answered stackoverflow.com/questions/4543744/… Commented Oct 2, 2017 at 7:43
  • I followed one of the solution ran heroku run bash once done. I executed the file ruby config/data/create.rb. Then I get error saying config/data/create.rb:6:in read': No such file or directory @ rb_sysopen - routes.json (Errno::ENOENT)`. When actually the file does exist. Commented Oct 2, 2017 at 7:50

1 Answer 1

1

open terminal in your project folder on your local machine. Commit all the changes to git. Push the changes to Heroku using

git push heroku master

After pushing changes on the same terminal -

heroku run ruby config/data/create.rb
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.