bundle install -- path vendor/bundle
I edited the gemfile downloaded in and saved it over.
herokupush
However, editing is not reflected in the production environment.
How can I edit the gem and use it?
Additional information -------------
"Edit and use gem" does not mean "Edit Gemfile and use the desired gem, both locally and in the production environment", but rather edited the individual Gem that you have bundle installed.
ruby heroku rubygems
It's a little hard to understand what you want to do and what you're having trouble with because the usage of terms is strange (excuse me).
bundle install
is the command to install the Gem (Ruby's library) written in the Gemfile. (Gemfile is not downloaded.)bundle install
again.Otherwise, the gem will not be installed.heroku push
command. Do you mean git push heroku master
?For now, I will list the general work procedures.Assume that Rails will run in Heroku.
I think it's also useful to review basic development procedures from scratch using sites like Rails tutorial.
If it still doesn't work as expected, please add the following:
Gemfile
before and after the change (specifically what gem did you add)?Git push heroku master
displays all the outputherokurlogs
.By editing a gem, do you mean that you have rewritten the code for the gem?
If so, the local changes will not be reflected in Heroku.
This is because when you deploy to Heroku, it is newly downloaded from rubygems.org and so on.
If you want to change it on your own, fork the code of the desired gem into your github account, change the code, and push it to github.
In addition, Rails' Gemfile must be specified to use the gem in your github.
I think the content of this site is close to what I want.
http://higelog.brassworks.jp/?p=2212
However, I think Gem's fork is basically a last resort because of the problem of how to follow the original update.
So I try to avoid it as much as I can.
© 2024 OneMinuteCode. All rights reserved.