这个问题之前已经发布过,但答案没有奏效。我应该 proberley 提到我对 ruby 完全陌生。我在做教程时遇到了错误,
步骤如下:
[first_app (master)]$ gem install heroku
我明白了
Successfully installed heroku-2.24.0
但是当我尝试
[first_app (master)]$ heroku keys:add
我明白了
-bash: heroku: command not found
然后我尝试了一堆卸载 gem 更新包重新安装它,但这并没有帮助
$ bundle exec heroku
/Users/vng/.rbenv/versions/1.9.3-p125/lib/ruby/gems/1.9.1/gems/bundler-1.1.3/lib/bundler/rubygems_integration.rb:147:in
`block in replace_gem': heroku is not part of the bundle. Add it to Gemfile. (Gem::LoadError)
from /Users/vng/.rbenv/versions/1.9.3-p125/bin/heroku:18:in
'`
echo $PATH
/Users/vng/.rbenv/shims:/Users/vng/.rbenv/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin
我的宝石环境
RubyGems 环境:
- RUBYGEMS 版本:1.8.11
- RUBY 版本:1.9.3(2012-02-16 补丁级别 125)[x86_64-darwin11.3.0]
- 安装目录:/Users/vng/.rbenv/versions/1.9.3 -p125/lib/ruby/gems/1.9.1
- RUBY 可执行文件:/Users/vng/.rbenv/versions/1.9.3-p125/bin/ruby
- 可执行目录:/Users/vng/.rbenv/versions/1.9 .3-p125/bin
- RUBYGEMS 平台:
- ruby
- x86_64-darwin-11
- GEM 路径:
- /Users/vng/.rbenv/versions/1.9.3-p125/lib/ruby/gems/1.9.1
- /用户/vng/.gem/ruby/1.9.1
- GEM 配置:
- :update_sources => true
- :verbose => true
- :benchmark => 假
- :backtrace => 假
- :bulk_threshold => 1000
- 远程源:
- http://rubygems.org/
非常感谢您的帮助