Heroku stop`ed working after linux virtual machine crashed - heroku

Hi I have my Linux as a virtual machine. When I was making heroku run rake db:seed it creshed and was shut down. After I run it again when I try to seed heroku I get:
saasbook#saasbook:~/rails_pro/vofr$ heroku run
! Error in heroku-run:
! Cannot read property 'filter' of undefined
! See /home/saasbook/.heroku/error.log for more info.
And this is my error-log:
2016/02/29 17:23:27 heroku-cli: Installing core plugins...
NULNULNULNULNULNUL.....NUL
29 21:26:16 Error during run:null
2016/02/29 21:26:16 TypeError: Cannot read property 'filter' of undefined
at [eval]:36:28
at Object.exports.runInThisContext (vm.js:54:17)
at Object.<anonymous> ([eval]-wrapper:6:22)
at Module._compile (module.js:413:34)
at node.js:544:27
at _combinedTickCallback (node.js:370:9)
at process._tickCallback (node.js:401:11)

In the end I ended with totally removing the heroku.
sudo apt-get --purge remove heroku
sudo apt-get --purge remove heroku-toolbelt
rm -rf /usr/local/heroku
rm -rf ~/.heroku
and then :
wget -O- https://toolbelt.heroku.com/install-ubuntu.sh | sh
heroku --version

Related

How to update Heroku?

how do I update my Heroku , my windows terminal shows the following :
» Warning: heroku update available from 7.47.7 to 7.52.0.
please help
You have to run
heroku update
in the terminal to update the CLI.
If that doesn't work, this means you have the CLI app as an npm or an apt package, in that case you have to run
apt installation:
sudo apt-get update && sudo apt-get upgrade heroku
npm:
npm upgrade -g heroku
yarn:
yarn global upgrade heroku
Refer to the article here for more information.

Yarn error "no such option" with --dev flag

ignite-ir-boilerplate was not able to be installed. Is it a valid NPM module?
Command failed: yarn add ignite-ir-boilerplate --dev
Usage: yarn [options]
yarn: error: no such option: --dev
You probably installed yarn using this:
$ apt install cmdtest
Use this instead:
$ npm install --global yarn
Add sudo before, works for me,
sudo yarn add --dev babel-plugin-module-resolver

Heroku CLI install failing Mac OSX

Randomly my heroku toolbelt stopped working. I'm not sure why, but when I execute any heroku action, for example heroku -v this happens:
➜ Homebrew heroku -v
heroku-cli: Adding dependencies... 2.57 MB/2.57 MB
2016/04/26 12:13:42 running npm from /Users/cowan/.heroku: /Users/cowan/.heroku/node-5.10.1-darwin-amd64/node /Users/cowan/.heroku/npm-3.8.5/cli.js -v --loglevel=info
ERROR: expected npm to equal v5.10.1
Note this particular example is after I used homebrew to uninstall and reinstall heroku.
Solution in 2 steps:
Fresh install from https://toolbelt.heroku.com/osx
Restart bash/zsh

Errno::EACCES: Permission denied when installing gems via gitlab

I'm trying to setup gitlab and thus install some gems from another user account using sudo,
but I'm constantly getting Permission denied error.
sudo -u gitlab -H bundle install --deployment --without development test postgres
> Using ... ( a lot of successful gems there )
> Using pygments.rb (0.3.2) from https://github.com/gitlabhq/pygments.rb.git (at master)
> Errno::EACCES: Permission denied - pygments.rb-0.3.2.gem
> An error occurred while installing pygments.rb (0.3.2), and Bundler cannot continue.
> Make sure that `gem install pygments.rb -v '0.3.2'` succeeds before bundling.\
sudo -u gitlab -H gem install pygments.rb -v '0.3.2'
> Successfully installed pygments.rb-0.3.2
> 1 gem installed
> Installing ri documentation for pygments.rb-0.3.2...
> Installing RDoc documentation for pygments.rb-0.3.2...
# no matter how many times I run this command, I always get the same output
# as if the gem installation doesn't stick
# I've tried to chmod
chmod 777 -R /usr/local/lib/ruby
# then Again
sudo -u gitlab -H bundle install --deployment --without development test postgres
# same result, Errno::EACCES: Permission denied - pygments.rb-0.3.2.gem
Lain suggested to try to install the bundles into another sub directory. When that worked out, it became clear the problem was about permissions in the current directory.
Executing chown -R gitlab:gitlab . has solved the problem.
In the gitlab installation guide there is a gem install command preceding our story that was ran as root and probably the gemfile or some other file had permissions change during that.
This is a permissions bug in ruby-2.0.0-p195 rvm with bundle install
are you using rvm? did you try chmod with sudo?
chmod 755 (or 777) ~/.rvm/gems/ruby-2.0.0-p195/build_info/
I did the following and got things working.
I changed the permission for the Gemfile. i.e. chmod 755 Gemfile
Then I did a sudo bundle install. This got things working and all the gems got installed. I could then start my app by rails server
Make sure your Gemfile.lock is owned by the user running the command
Although Alex's answer is correct,this worked for me as well
sudo chown -R git:git /path/to/external/volume
I'm using Digital Ocean's Gitlab Image

Migrating from a Shared Database to Heroku Postgres /

ON MAC OS X 1.7.2
I tried following the instructions https://devcenter.heroku.com/articles/migrating-from-shared-database-to-heroku-postgres
So I tried running the command on my-app:
$ heroku addons:add heroku-postgresql:dev -a my-app
-----> Adding heroku-postgresql:dev to test-biowatts... failed
! You're running an outdated version of the Heroku gem/toolbelt that cannot perform the requested action. Please update your client and try again.
So I tried to update Heroku
$ heroku update
! update is not a heroku command. See 'heroku help'.
Where
$ heroku version
heroku-gem/2.4.0
QUESTION UPDATE 1 - Heroku update now gives a different message
$ heroku update
! `heroku update` is only available from Heroku Toolbelt.
! Download and install from https://toolbelt.heroku.com
so I downloaded and installed toolbelt but the heroku update still gives the same message
QUESTION UPDATE 2 - Removed heroku installed TOOLBELT - RESOLVED
sudo rm -rf /usr/local/heroku
sudo rm -rf /usr/bin/heroku
gem uninstall heroku
then installed https://toolbelt.heroku.com/
Restarted terminal
AND IT WORKED!
Cheers,
joel
Have you tried gem update heroku?
If you are using Mac OSX mountain lion. Maybe you should better use heroku toolbelt. I had almost same issue, and it fixed after I installed Heroku toolbelt.

Resources