Is there a way to install a dependency (listed in the requirements.txt) not from pypi but from a wheel saved in the git repo while deploying?
This question might sound odd at first, but it is simply due to the fact that I can not share the wheel on pypi.
First you deploy your application to Heroku then you can use Heroku Bash to install any requirements
run this command for start your bash on heroku
heroku run bash
Related
I'm trying to deploy a Flask webapp to Heroku and I have seen conflicting information as to which files I need to include in the git repository.
My webapp is built within a virtual environment (venv), so I have a Pipfile and a Pipfile.lock. Do I also need a requirements.txt? Will one supersede the other?
Another related question I have is what would occur if a certain package failed to install in the virtual environment: can I manually add it to the requirements.txt or Pipfile? Would this effectively do the same thing as pipenv install ... or is that doing something else beyond adding the package to the list of requirements (considering Heroku is installing the packages upon deployment).
You do not need requirements.txt.
The Pipfile and Pipfile.lock that Pipenv uses are designed to replace requirements.txt. If you include all three files, Heroku will ignore the requirements.txt and just use Pipenv.
If you have build issues with a particular library locally I urge you to dig into that and get everything working on your local machine. But this isn't technically required... as long as the Pipfile and Pipfile.lock contain the right information (including hashes), Heroku will try to install your dependencies.
I have Heroku installed in my machine and I can check the version just for verification as you can see in the picture.
So now, I want to install heroku toolbelt but I am having problems to do so.
Everytime I go to the link: https://toolbelt.heroku.com/windows. I get redirected to this link:https://devcenter.heroku.com/articles/heroku-cli which is just to install heroku.(which I already have installed).
Is there another way around I can use to intall toolbelt?
I need to get a classroom full of students to install git on their computers quickly and during a lecture. I've been inspired by the installation process of meteor to try and implement something similiar, i.e:
curl easy-install-git.com | sh
I know there already exist binaries and easy ways to install git, but those are all multi-step processes and this would be one simple command in terminal. How do I write an sh script to do this? (Or better yet, does one exist already?)
Any other easy ways to do a git install on a clean machine would also be appreciated.
5 years later, the easiest/fastest way to install Git on Mac is to type:
git --version
If you don’t have it installed already, it will prompt you to install it.
But that is an old Apple fork of Git (2.10 at most)
The git-osx-installer dmg files are up-to-date, with Git 2.18.
As seen in this script, it can be curl'd.
I am trying to install GitLab on a Debian Wheezy and experiencing an issue I don't understand.
Following the install guide for version 5.0:
step 1: was run as explained
step 2: I used rvm (multi-user install) instead (ruby-1.9.3-p392)
steps 3 to 5: were run as explained (MySQL chosen)
step 6: everything works fine until the "Install Gems" section, where I get the following error:
/home/git/gitlab$ sudo -u git -H bundle install --deployment --without development test postgres
sudo: unable to execute /usr/local/bin/bundle: No such file or directory
I run this as my normal user (in the sudo and rvm groups), and the git user is not a sudoer.
I think that the line sudo gem install bundler, in step 2, does not grant the git user to execute bundle properly, but I don't know how to fix this.
I probably did something wrong but cannot figure out what it is, as I tried to respect the standard instructions as close as possible.
Any clue about this? Thanks, I am losing hope...
For information, I have written to the GitLab mailing-list about this problem but did not get any answer. Moreover, last time I asked something similar on ServerFault, I have been advised to post on StackOverflow instead... hence this question :)
When I do $ which bundle, I get /usr/local/rvm/gems/ruby-1.9.3-p392/bin/bundle.
The git user has been created with the --disabled-login flag and thus I cannot login as git to run bundle.
When I do $ sudo -u git bundle, I get
sudo: unable to execute /usr/local/bin/bundle: No such file or directory
That means git user has not /usr/local/rvm/gems/ruby-1.9.3-p392/bin in its PATH, and you cannot modify its .profile or .bashrc because of the --disabled-login flag.
It seems that running sudo -i -u git bundle instead of sudo -u git bundle does the trick
That is the safest route, and will execute the command as git, but will simulate first an initial login, using the PATH defined in .profile and .bashrc of user root.
See "How does sudo search the path for executable?" for more.
On my local machine after upgrade from 6.4 to 7.7 I had such issue.
The compilation of ruby was made under root account.
So need permissions to read compiled ruby and installed bundle.
chmod ugo+rx /usr/local/bin/bundle
chmod -R ugo+rX /usr/local/lib/ruby/
In production mode You could be more strict.
Is this possible? If so how I do upgrade from Version XXX to Version XXXX?
I can't seem to find any docs on it.
Thanks!
No.
Heroku maintain imagemagick as part of the service so you'd have to convince them to upgrade it across the platform.
The way to upgrade ImageMagick on heroku now is by using a 'buildpack'.
If you search through the buildpacks on heroku: https://elements.heroku.com/search/buildpacks?utf8=%E2%9C%93&q=imagemagick you can see there are quite a few dedicated to updating ImageMagick.
You can install a custom buildpack by using the following command line call:
$ heroku buildpacks:set https://github.com/heroku/heroku-buildpack-erlang
Buildpack set. Next release on random-app-1234 will use https://github.com/heroku/heroku-buildpack-erlang.
Run `git push heroku master` to create a new release using this buildpack.
More information about buildpacks can be found here: https://devcenter.heroku.com/articles/buildpacks