Reputation: 359
Ug. I just moved from a Windows 7 installation to a Lion system. I'm attempting to teach myself Ruby on Rails, and whilst I like the language, the environment feels fragile and mysterious. I used the same command to install heroku on both systems, but the System X system is not happy with the install.
On System X I used rvm, which might be my problem.
What controls where Gems are installed?
How can I get heroku up and running? And what will prevent the next gem from getting lost?
$ sudo gem install heroku
...
$ heroku -v
~/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:247:in `to_specs': Could not find heroku (>= 0) amongst [minitest-1.6.0, rake-0.8.7, rdoc-2.5.8] (Gem::LoadError)
from /Users/aliwells26/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:256:in `to_spec'
from /Users/aliwells26/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems.rb:1210:in `gem'
from /Users/aliwells26/.rvm/gems/ruby-1.9.2-p290@rails3tutorial/bin/heroku:18:in `<main>'
$ gem environment
RubyGems Environment:
- RUBYGEMS VERSION: 1.8.11
- RUBY VERSION: 1.9.2 (2011-07-09 patchlevel 290) [x86_64-darwin11.2.0]
- INSTALLATION DIRECTORY: /Users/aliwells26/.rvm/gems/ruby-1.9.2-p290@rails3tutorial
- RUBY EXECUTABLE: /Users/aliwells26/.rvm/rubies/ruby-1.9.2-p290/bin/ruby
- EXECUTABLE DIRECTORY: /Users/aliwells26/.rvm/gems/ruby-1.9.2-p290@rails3tutorial/bin
- RUBYGEMS PLATFORMS:
- ruby
- x86_64-darwin-11
- GEM PATHS:
- /Users/aliwells26/.rvm/gems/ruby-1.9.2-p290@rails3tutorial
- /Users/aliwells26/.rvm/gems/ruby-1.9.2-p290@global
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :benchmark => false
- :backtrace => false
- :bulk_threshold => 1000
- REMOTE SOURCES:
- http://rubygems.org/
$ echo $PATH
/Users/aliwells26/.rvm/gems/ruby-1.9.2-p290@rails3tutorial/bin:/Users/aliwells26/.rvm/bin:/Users/aliwells26/.rvm/gems/ruby-1.9.2-p290/gems/rails-3.1.1/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/usr/local/git/bin:/usr/local/git/bin
Upvotes: 8
Views: 6937
Reputation: 31
I was running into the same issue (Mac OSX 10.10.3), and none of the solutions provided resolved it (I also tried Rob Cooper's linked answer).
I dug around on my hard drive (I tend to keep notes and such in text files) and was able to find notes to myself on installing the Heroku Toolbelt through Homebrew. Running these three lines in Terminal resolved the issue for me - hopefully they can be of use to someone else as well:
in a terminal window:
> brew install wget
> wget -qO- https://toolbelt.heroku.com/install.sh | sh
(may require superuser password to continue)
lastly:
> echo 'PATH="/usr/local/heroku/bin:$PATH"' >> ~/.profile
(add to PATH)
???
PROFIT!
...yeah, my notes to myself can be odd.
Upvotes: 0
Reputation: 91
Michael Kohl comment on the question resolved the issue: gem install heroku worked like a charm.
Thanks and Regards.
Upvotes: 0
Reputation: 28867
As per the Heroku blog, the gem is going to stop being maintained very soon.
Many people may come across this post since you may get a similar GemLoadError
when migrating from the gem to the Toolbelt.
I've posted the solution to this on this question: Toolbelt install: Could not find gem Heroku.
Upvotes: 3
Reputation: 168
I re-downloaded the Heroku Toolbelt, re=opened Terminal, then it worked.
get the tool belt here: https://toolbelt.heroku.com/
Upvotes: 2
Reputation: 10425
This might be useful. It worked on my environment.
rvmsudo gem install heroku
See: Could not find rails (>= 0) amongst [] (Gem::LoadError)
Upvotes: 18