When I try and run heroku db:push I get this error.
-bash: /usr/local/bin/heroku: /usr/bin/ruby1.8: bad interpreter: No such file or directory
Any ideas?
Heroku can't find Ruby. This is common if you're using RVM or something to manage your Ruby installations. How did you install Heroku, and how did you install Ruby?
Related
I'm having major issues with the heroku toolbelt. I'm using the cedar 14 stack and when I am trying to use a ruby version that isn't ruby 2.0.0-dev I get this error.
rbenv: heroku: command not found
The `heroku' command exists in these Ruby versions:
2.0.0-dev
I need heroku to be working with ruby 1.9.3 and I don't think cedar 14 supports that version of ruby. Can someone explain first, why I am only allowed to use heroku with ruby 2.0.0-dev and also how I can install a older stack that supports ruby 1.9.3?
The problem is that there are two heroku executables on your system: one in system paths such as /usr/local/bin/heroku (provided by Toolbelt), and one in rbenv's shims because Ruby 2.0.0-dev had "heroku" gem installed.
Because rbenv's shims directory usually have higher precedence, it will block invocation from ever executing the heroku executable provided by Toolbelt.
The solution is to uninstall any instance of "heroku" gem and relying solely on Toolbelt for all heroku usage on the command line:
for v in `rbenv whence heroku`; do RBENV_VERSION=$v gem uni heroku -ax; done
rbenv rehash
which heroku
You can use 1.9.3 on the cedar stack according to this. The heroku toolbelt is installed as a executable not a ruby gem. How are you trying to execute the command? You should be able to use it from the terminal such as heroku run rake db:migrate etc.
I'm running through a ruby on rails tutorial, and I just installed the Heroku toolkit.
My problem is that whenever I try "Heroku login", or whatever heroku command, I get :
ruby1.9.1: error while loading shared libraries: libruby-1.9.1.so.1.9: cannot open shared object file: No such file or directory
I remember having cleaned my ruby installations recently, so I wonder if I just miss some libs that I have deleted or something, but I haven't been able to find anything satisfying about that.
Do you have an idea how to get out of this situation, and be able to use Heroku ?
I managed to make heroku work by installing it with gem :
gem install heroku
instead of :
sudo apt-get heroku
It seems like heroku was trying to use a ruby version out of rvm (but i deleted the ruby version which was installed before rvm). Now the gem installation took care of that.
I am working with Heroku on a win 7 - 32 bit system where I don't have admin privileges.
I have downloaded and installed the heroku toolbelt following http://community.webfaction.com/questions/11803/heroku-toolbelt with
cd ~
curl http://assets.heroku.com/heroku-client/heroku-client.tgz | tar zx
export PATH=$HOME/heroku-client/bin/:$PATH
following Leo's advice ,I've added ruby to the windows path to fix this
Now when I run:
$ heroku run bash --app MYAPP
I get:
f:/heroku-client/lib/heroku/updater.rb:164:in `spawn': Exec format error - "m:/heroku-client/bin/heroku" update (Errno::ENOEXEC)
from f:/heroku-client/lib/heroku/updater.rb:164:in `background_update!'
from f:/heroku-client/lib/heroku/updater.rb:144:in `inject_libpath'
from f:/heroku-client/bin/heroku:19:in `<main>'
I have added to the windows env variable path:
F:/heroku-client/bin/;f:/heroku-client/lib/heroku/
How can I fix this?
I had the same issues initially with ROR on Windows. (Everyone suggested me to move to LINUX/UNIX)
Still I managed to install it on Windows. Rather than installing the Heroku Toolbet (which breaks ruby and rails which is already installed) install the heroku gem along with foreman gem.
gem install heroku
gem install foreman
Then u can use it easily.
Install the Windows Heroku Toolbelt. It's self-contained and should work out of the box for you.
i am deploying rails 3.2.6 application to engineyard from CLI
When i run command
ey deploy -e staging
following error occurs
ERROR: While executing gem ... (Gem::FilePermissionError)
You don't have write permissions into the /usr/lib/ruby/gems/1.8 directory.
any idea to solve this?
Are you using RVM? How did you install the engineyard gem? It appears that you may be trying to use the system Ruby in which case you may want to try sudo ey deploy.
Evan
I just started to learn Rails from railstutorial.org. After installing Rails I cerated an app, set up git, installed Heroku gem, and uploaded SSH key to heroku.
After that, I turned off my computer and a few hours later I came back to continue with the next steps. First I ran heroku create --stack cedar.
Then,
git push heroku master I get the following error message:
[~ (master)]$ git push heroku master
fatal: 'heroku' does not appear to be a git repository
fatal: The remote end hung up unexpectedly
Same thing is happening for commands like rails heroku gem etc.
Also, I cannot find neither Ruby or Rails in my system. When I ran ruby -v I get
The program 'ruby' can be found in the following packages:
* ruby1.8
* ruby1.9.1
Try: sudo apt-get install <selected package>
Is this happening because I am running Ruby 1.9.3p125? Please help.
just type
rvm gemset list
rvm use 1.9.3#(you_gemset) --default
EDIT: i've looked this tutorial, and there he's created gemset: rails3tutorial2ndEd
then just type: rvm use 1.9.3#rails3tutorial2ndEd --default
You probably haven't set ruby 1.9.3 as your default ruby with rvm. You can do this by typing in the command line:
rvm use 1.9.3 --default
This should solve your problem.