I am using RVM for my Ruby installations.
I recently encountered a problem installing the heroku toolbelt with it installing Ruby 1.9.1 on my actual system, which then rewriting environment variables, and breaking my ruby cli. I had to delete everything, reinstall RVM, reinstall gems, ect ect..
The point is, I wish to be able to use the heroku client, and possibly foreman, but I don't want the toolbelt trying to install git, and ruby 1.9.1 on my system.
I tried to do the gem install version, but it states that the gem is depreciated, and for me to install the toolbelt.
Any help will be greatly appreciated.
Thank you for all thoughtful answers.
Go to the Heroku CLI on github and download the tarball from the other setup. Extract the Tarball and move the resulting files under /usr/local/heroku. Add /usr/local/heroku/bin to your PATH. Ensure that Heroku gem is removed from any project gem files. Reload your terminal and the Heroku CLI should be working.
You can run which heroku from your project directory and you should get /usr/local/heroku/bin/heroku.
As it is self updating you should only need to do this once.
If you want Foreman just use the Gem version.
Git and Ruby will not be installed using this process.
Update: Heroku now have an install script for a standalone install of the Heroku Client without Foreman and Git.
On Windows, the Heroku Toolbelt installer offers a choice between Full Installation and Custom Installation. If you choose Custom, you can select which components you want to install.
Related
I have downloaded the Heroku toolbelt a few times but whenever I run
heroku version
I am getting
heroku-gem/1.6.3
I have tried to uninstall the heroku gem but I can't seem to use the heroku toolbelt. What's the correct process to use the toolbelt?
Thanks!
it's likely coming from a Gemfile that is including the heroku gem. Remove it from there.
Alternatively you could include the toolbelt higher in the PATH environment variable than your ruby gems.
I was having the same problem, this what I did:
Install the heroku-toolbelt from the webpage.
go to /usr/local/heroku/bin and run ./heroku version this will throw the version of the current bin, problably this is the version you want to use.
run which heroku this will throw you a path, if the path is diferent that /usr/local/heroku/bin then just: rm -rf path
restart your console/terminal run heroku version
if dosn't work probably you need to add /usr/local/heroku/ to your $PATH.
restart and thats all
I was using oh-my-zshell with the heroku plugin which gave me the error and this is how i solve it, hope work for you.
#UPDATE
I restart and suddenly I had the same error again :/ and I fixed by:
gem uninstall heroku and rbenv rehash
I am new to Ruby but I really enjoyed it.
I used Aptana Studio 3 as an IDE, but I feel it lacks support (even though I installed the undle). When I created a Ruby project, there were no files inside it.
I added a test.rb file and started playing with it.
Now I hav a simple project in which I needed to install some gems. To do so I opened the CMD, navigated to my project's folder and issued the command "gem install xxxx". On my test.rb I include the gems using require 'xxxx'.
What is the best practice to add gems?
If I ever wanted to deploy this application, I would need to add the gems to my production server. Is there any way I can list the required gems so that the server intalls it automatically when I run deploy the application?
thanks!
Put them in a Gemfile, it is used to manage the gem required by an application.
http://bundler.io/v1.3/gemfile.html
It might depend on where you are deploying to but I like to use Capistrano for deployment. Capistrano will install the gems for you by running bundler which reads your Gemfile.
Also checkout bundler. It will read your Gemfile (create one if you don't have one). To install your gems it is as simple as:
$ bundle install
Currently, my installation of heroku toolbelt creates a ruby version of 1.9.2
But having installed via railsinstaller, my ruby version is 1.9.3.
When I deploy using heroku, will there be potential conflicts, and how can I prevent/manage/bypass them?
The heroku command line tool is built in Ruby. Apparently they have done all of their testing on ruby-1.9.2.
This will not cause any compatibility issues with your application. If when you push to heroku, you notice that the application is using a different version other than ruby-1.9.3, add a .ruby-version file to the root of your application. That file should only have ruby-1.9.3 in it.
I know that there are closely related question to mine but they did not help me.
I'm learning the whole rails, gem, git, heroku concept and liking it a lot.
When I issued heroku command line actions (Ubuntu linux) I received warnings that the gem was deprecated and I should install the toolbelt.
I ran the full wget install of the tool belt:
wget -qO- https://toolbelt.heroku.com/install-ubuntu.sh | sh
But now when I use the heroku command line I still get the deprecated warning.
I suspect I have to get rid of the heroku gem but I'm not sure how to do that ? I want to be sure to do it correctly so it's not later loaded again via bundler.
Thank you.
The uninstall command will remove any gem. In this case, you want to use the following:
gem uninstall heroku
I had issues getting Toolbelt to work. I am running OSX so my solution may not work for your Ubuntu linux setup. I still thought I might share just in case. Here are the steps I used to get it to work:
Remove the heroku gem by running gem uninstall heroku. It did ask if I wanted to remove executables: heroku. Be sure to choose yes.
Go to [https://toolbelt.heroku.com/][1] and download / install the Toolbelt app.
On the Toolbelt page it mentioned that /usr/local/heroku/bin will be added to your PATH. I was not seeing this and was not sure if it is becuase I am running zsh instead of bash. I went ahead and opened my .zshrc file and added it to my PATH.
You probably just need to relaunch your shell.
This worked for me: (be sure to choose yes when it ask if you want to remove executable: heroku)
gem uninstall heroku --all
Source (last comment): http://johntwang.com/blog/2011/09/13/remove-heroku-toolkit/
I have a Rails project that is using heroku_san for deployment. I wanted to give heroku's new toolbelt a shot, so I installed it on my system, which is a Mac Os X, and ran heroku upgrade and I am getting this message:
heroku update is only available from Heroku Toolbelt.
Download and install from https://toolbelt.heroku.com
I already have it installed, though.
The following steps worked for me:
download and install toolbelt: https://toolbelt.heroku.com/
in terminal, "gem uninstall heroku", and then choose "all versions" if you have multiple.
you mentioned you have a gem that depends on the heroku gem, so I'm not sure what to tell you besides to try to eliminate that dependency.