I uninstalled the heroku gem and installed the Heroku Toolbelt and am running into issues getting it working w/ RVM.
heroku version command works everywhere except my current project folder.
In my project folder I get
'/Users/cmalpeli/.rvm/gems/ruby-1.9.3-p194#global/gems/bundler-1.1.3/lib/bundler/rubygems_integration.rb:223:in 'block in replace_bin_path': can't find executable heroku (Gem::Exception)
from ./bundler_stubs/heroku:16:in`
Running which heroku in my project directory returns:
./bundler_stubs/heroku
everywhere else it returns
/usr/bin/heroku
I'm sure it has something to do w/ RVM - but I don't quite understand how that works, so would appreciate a bit of help.
Thanks!
make sure heroku is not part of your Gemfile - it should not be there.
then remove ./bundler_stubs/heroku:
rm -f ./bundler_stubs/heroku
it is possible that ./bundler_stubs/heroku is part of your project and was committed by one of your coworkers, the stubs should not be part of the project.
Related
I tried to install heroku because I was getting a legacy error. I went on the heroku site and tried to install it, but I kept getting the legacy warning. So I followed the instructions on the site that said this.
I think I followed the instructions correctly, and deleted the source file of heroku. I deleted the file named 'Heroku' in /Users/User/.rvm/gems/ruby-2.5.0/bin, but now when I try to reinstall Heroku, I get this warning:
Warning: heroku/brew/heroku 6.15.22 is already installed
However, when I type
heroku -v
I get an error
bash: /Users/User/.rvm/gems/ruby-2.5.0/bin/heroku: No such file or
directory
I tried uninstalling heroku with
rm -rf ~/.heroku sudo rm
and
-rf /usr/local/heroku /usr/bin/heroku
but when I tried to reinstall it after doing those commands, I get the same error as before, the 'No such file or directory' one. Can someone help me reinstall heroku?
Thanks!
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 have installed Cocoapods on OS X Mavericks using the --user-install option (to avoid having to use sudo for the installation) following the instructions at http://guides.cocoapods.org/using/getting-started.html#getting-started . I have also created a .profile file in my home directory with the following:
export GEM_HOME=$HOME/gems
export PATH=$GEM_HOME/bin:$PATH
Cocoapods successfully installs, but I am unable to run the pod command.
When running it from the command line it says No such file or directory. From what I understand, it should be installed into the /Users/me/gems/bin folder. However, this folder does not exist at all - the only Ruby related folder in my home directory is /Users/me/.gem.
I have tried running /Users/me/.gem/ruby/2.0.0/gems/cocoapods-0.29.0/bin/pod but that results in the following error:
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require': cannot load such file -- bundler/setup (LoadError)
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require'
from .gem/ruby/2.0.0/gems/cocoapods-0.29.0/bin/pod:14:in `<main>'
...but from what I understand, I shouldn't be running it from that location directly.
Any assistance for a Cocoapods newbie appreciated!
So after a lot of research and trying different things I have managed to get this working. I am not quite sure what eventually fixed the problem, or whether it was a combination of things, but for anyone else encountering this same problem here's what I did:
Installed the Xcode command line tools for Mavericks. The option to install this is no longer available in Xcode 5, so you need to download them from https://developer.apple.com/downloads . Some people seem to say they are already installed as part of Xcode 5 from the Mac App Store, whereas others say you need to manually install them. Either way, I figured that installing them again won't hurt.
The error message above talked about not being able to load bundler/setup. So, I (re?)installed the bundler ruby gem gem install bundler --user-install. Interestingly, when I then attempted to run the /Users/me/.gem/ruby/2.0.0/gems/cocoapods-0.29.0/bin/pod command again I got a different error: /Users/me/.gem/ruby/2.0.0/gems/cocoapods-0.29.0/Gemfile not found.
What was really handy is that after the installation of bundler a message appeared saying /Users/me/.gem/ruby/2.0.0/bin in your PATH, gem executables will not run. So, I checked out the contents of that folder and it contains the pod executable! Adding it to the PATH would certainly be handy, but I just ran it directly with the full path (after changing to my Xcode project folder containing the Podfile): /Users/me/.gem/ruby/2.0.0/bin/pod install and it all works!
When I ran pod install for the first time it showed a message saying Setting up CocoaPods master repo and stayed there for quite some time - I thought it had actually hung. However, it eventually completed. If you are unsure whether it is doing anything, or has hung, do ls -la ~/.cocoapods/repos/master/.git/objects/pack/ and look at the time modified/size of the file it is downloading (thanks to this comment for the hint).
Another tip for new players - when I tried to install a pod (in my case, BlocksKit) I got a message saying [!] The platform of the target Pods (iOS 4.3) is not compatible with BlocksKit (2.1.0) which has a minimum requirement of OS X 10.7 - iOS 5.0. This was a surprising message, since my project targets iOS 7.0. Apparently you don't need to specify the platform anymore, so I entirely removed the platform line from the Podfile and it all works.
Hope that this helps other people just getting started with CocoaPods!
After installing Mavericks, I got error with already installed cocoapods. So I ran this command to install the new updated cocoapods version, and it works now.
sudo gem install cocoapods
Thanks to the pointers in these answers, I found that the instructions for installing CocoaPods provided on the CocoaPods web site are incorrect, regarding the contents of the .profile file, specifically the path.
As Skoota noted in the question, the path $GEM_HOME/bin does not exist. A comment by Videre gives the important clue: the correct path is $GEM_HOME/ruby/2.0.0/bin.
The correct .profile contents, which works for me at least, is:
export GEM_HOME=$HOME/.gem
export PATH=$GEM_HOME/ruby/2.0.0/bin:$PATH
It is also worth noting that you must quit and relaunch the Terminal application for changes to the .profile file to take effect.
add:
export COCOAPODS_NO_BUNDLER=1
to your .zprofile or .bash_profile
FWIW - I ran into very similar problems. None of the above helped me so maybe others could benefit from my process.
Eventually just ran sudo gem uninstall cocoapods, deleting everything that I did before.
Followed the steps for creating the .profile file
For good measure, closed Terminal and rebooted everything.
Ran gem install cocoapods which somehow didn't run into errors this time
Checked the install by running gem which cocoapods which fortunately returned the correct path
ran pod setup which didn't raise any errors again .
Not entirely sure what actually worked and what didn't but maybe someone will find this useful.
I use homebrew to install cocapods
First install homebrew (paste this code in terminal and hit enter)
$ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
Second enter this
$ brew install cocoapods
I simply followed the getting started with nodejs tutorial from Heroku.
https://devcenter.heroku.com/articles/getting-started-with-nodejs#declare-process-types-with-procfile
But I get an error at the part "declare process types with procfile"
My problem is that my cmd (using windows 7) didn't find the command "foreman"
Any solutions ?
I downloaded/installed the heroku toolbelt, the login works fine, but foreman dont
I had the same problem on Windows7 64-bit, using git's bash. Here's what I did:
uninstall the toolbelt, Ruby, and Git using Control Panel's "Program and Features"
reinstall the toolbelt to C:\Heroku (see known issue for more info)
add C:\Program Files (x86)\git\bin;C:\Heroku\ruby-1.9.2\bin to the system PATH variable: Control Panel, System, Advanced system settings, Environment Variables..., System variables, Variable Path, Edit... (Change ruby-1.9.2 if a future version of the toolbelt includes a newer version of Ruby.)
open a git bash window and uninstall foreman version 0.63$ gem uninstall foreman
then install version 0.61 (see here for more info)$ gem install foreman -v 0.61
Now foreman worked for me:
$ foreman start
You can do this without uninstall/reinstall:
Open Environment Variables
Add C:\Program Files (x86)\Heroku\ruby-x.x.x\bin to system path (assuming that you installed heroku toolbelt in this directory).
You're done! try it by opening a new shell window and typing foreman start .
Foreman finished support for Windows. You can use forego instead. It is a foreman implementation in GO lang.
https://github.com/ddollar/forego
Adding C:\Program Files (x86)\Heroku\ruby-1.9.3\bin to the Environment variable PATH worked for me.
After installing Heroku toolbelt, I was getting weird errors about required modules when running foreman start. Adding the ruby bin directory to path, and reopening the shell window did not work for me. It seems that foreman was never installed! When I attempted to uninstall foreman, ruby told me it was not installed. So I ran gem install foreman, and 0.77 was installed. One gotcha, I had to open the shell to install the foreman gem as Administrator. Maybe that is how the Heroku toolbelt seems to not have installed properly the first time. Running foreman start seemed to do something after it was installed (naturally).
So I am just beginning to work with heroku (on an old MBP running osx 10.5.8) and I am having some issues with the toolbelt. The installation finished with no errors, however I am unable to run any of the heroku commands from my terminal. I am running ruby 1.9.3 through rvm (if that helps). The 'which heroku' command gives:
$ which heroku
/usr/bin/heroku
All other commands beginning with 'heroku' return the following error (using login as an example):
$ heroku login
dyld: unknown required load command 0x80000022
Trace/BPT trap
If anyone could shed some light on this for me, it would be greatly appreciated. Also let me know if I am leaving out any info. Thanks!
EDIT: Also, I did re-install the older version of git for osx 10.5.8 as suggested by many forums and here https://github.com/heroku/heroku/issues/324 (I know this specific post is pointed at git breaking, however it seemed to be the general answer on most forums that had anything remotely related to my problem)
Seems it was actually a simple fix. The Heroku gem itself was never installed by the toolbelt (I assume it should have been?). The fix was:
$ gem install heroku