Toolbelt install: Could not find gem Heroku - heroku

I get an "Could not find RubyGem heroku (Gem::LoadError)" when I try to execute any Heroku commands from terminal in my app directory. Have tried wiping and reinstalling Toolbelt, as well as any previously installed Heroku gems.
Using the full path works and--app name works (/usr/bin/heroku config--app myapp-stage). Using OS X 10.8.1.
echo $PATH
/Users/johndoe/.rvm/gems/ruby-1.9.3-p194#llctlc/bin:/Users/johndoe/.rvm/gems/ruby-1.9.3 p194#global/bin:/Users/johndoe/.rvm/rubies/ruby-1.9.3-p194/bin:/Users/johndoe/.rvm/bin:/Users/johndoe/.gem/ruby/1.8/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/X11/bin:/usr/bin/heroku:/opt/local/sbin:/opt/local/bin:/usr/local/mysql/bin:/Users/johndoe/.ec2/bin:/usr/local/git/bin
$ heroku
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems.rb:777:in `report_activate_error': Could not find RubyGem heroku (>= 0) (Gem::LoadError)
from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems.rb:211:in `activate'
from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems.rb:1056:in `gem'
from /Users/johndoe/.gem/ruby/1.8/bin/heroku:18
Thanks in advance for any help or advice.

I had the same problem.
Uninstall the Gem gem uninstall heroku (Select 'All Versions').
Find your Ruby 'bin' path by running gem env (it's under 'EXECUTABLE DIRECTORY:')
cd to the bin folder.
Remove the Heroku executable rm heroku
Restart your shell (close Terminal tab and re-open)
Hit heroku version, you should now see something like:
heroku-toolbelt/2.33.1 (x86_64-darwin10.8.0) ruby/1.9.3
Now you can heroku login as per their instructions and get back to hacking :)

Related

Changing Heroku version from gem to toolbelt

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

Heroku: where did my gems go?

I have been deploying a Rails 3.2 application to heroku for several weeks now. I have also been executing rake tasks on the Cedar stack where my application is located.
One day after a deploy I noticed that rake was no longer working. I get, for example, the following:
$:~/dev/my_project$ heroku run rake -T
Running `rake -T` attached to terminal... up, run.7566
bundler: command not found: rake
Install missing gem executables with `bundle install`
Trying to run commands with bundle exec yields the same results.
What I've tried:
heroku run bundle install. This works and informs me that gems were installed into ./vendor/bundle. However, heroku run ls ./vendor/bundle yields only the following:
$:~/dev/my_project$ heroku run ls ./vendor/bundle/
Runningls ./vendor/bundle/attached to terminal... up, run.3458
bin ruby
bundle package. Although the deployment works it does not help my problem.
fiddling around with the rubygems-bundler gem (although I think this is now part of core bundler). This does not seem to have any effect.
On Heroku, gems are installed within the vendor/bundle/ruby/<version>/gems directory. I just checked my Heroku instance and confirmed this.
You are going to want to use bundle exec rake task because the gems are not in the users PATH.

bundle command not found heroku

I am trying to use ruby 1.8.7 in my heroku application but the application does not launch. Heroku shows following errors in the console:
2012-10-30T13:29:08+00:00 app[web.2]: bash: bundle: command not found
heroku run "bundle --version" also returns in command not found:
heroku run "bundle --version"
Running `bundle --version` attached to terminal... up, run.1
bash: bundle: command not found
Any ideas on what might be issue here ?
The code will look like this with the newest version:
heroku config:add GEM_PATH=vendor/bundle/1.8
Have you installed a new ruby version? Good chance that ruby version doesnt have bundler installed, use
heroku run 'gem install bundler'
after installing a new ruby!
You need to have the supported Ruby buildpack set:
heroku buildpacks:set heroku/ruby

Switch from heroku gem to heroku-api topolbelt

Heroku is so good at making things simple...but this...not so much. How do you switch from the heroku gem to the new tool belt? Here are the steps I have taken:
$ heroku version: heroku-gem/2.32.5 (x86_64-darwin11.4.1) ruby/1.9.3 autoupdate
removed 'gem "heroku"' from gem file
added 'gem "heroku-api"' to gemfile
deleted gemfile.lock
$ bundle install
installed toolbelt via the package installer
$ heroku login ... returns "Authentication successful"
$ heroku version: STILL RETURNS heroku-gem/2.32.5 (x86_64-darwin11.4.1) ruby/1.9.3 autoupdate
Two questions:
#1 Why is my version still using the heroku-gem after taking the steps above?
#2 Where do I put "heroku = Heroku::API.new(:api_key => API_KEY)" for use with the heroku-api gem?
Deleting the gemfile.lock file didn't cut it. I had to run gem uninstall heroku (which I had 9 version of)... After that, heroku version showed to tool belt.

heroku running problem

I am learning ruby from this guide http://ruby.railstutorial.org/ruby-on-rails-tutorial-book#sec:deploying, and I am trying to install and make heroku to work. I added heroku to the PATH variable, (I am using ubuntu) bun when i type #command: herokuit returns this:
"/usr/lib/ruby/1.8/rubygems.rb:779:in 'report_activate_error': Could not find RubyGem heroku (>=0) (Gem::LoadError)
from /usr/lib/ruby/1.8/rubygems.rb:214:in 'activate'
...
...
..."
Looks like you haven't installed the Heroku gem;
sudo gem install heroku

Resources