Multiple Accounts on Heroku - ruby-on-rails

I've a rails project which I want to deploy on Heroku. I am using the link https://github.com/ddollar/heroku-accounts for managing multiple accounts on heroku. But whenever i am running the command heroku accounts:set personal It is showing an error like that
warning: Insecure world writable dir /usr/local/bin in PATH, mode 040777
! Heroku client internal error.
! Search for help at: https://help.heroku.com
! Or report a bug at: https://github.com/heroku/heroku/issues/new
Error: undefined method `each' for nil:NilClass (NoMethodError)
Backtrace: /Users/sumitkalra1984/.heroku/plugins/heroku- accounts/lib/accounts/heroku/command/accounts.rb:111:in `set'
/Users/sumitkalra1984/.heroku/client/lib/heroku/command.rb:213:in `run'
/Users/sumitkalra1984/.heroku/client/lib/heroku/cli.rb:28:in `start'
/usr/bin/heroku:24:in `<main>'
Command: heroku accounts:set personal
Plugins: heroku-accounts
Version: heroku-toolbelt/3.0.0 (x86_64-darwin10.8.0) ruby/1.9.3

I bet the you found a solution to your problem, but just in case (and for other like me) you just have to init a git repo. If you try this command in a directory without git repo you will get this error.
Cheers !

Related

Heroku Rails build failing due to Bootsnap and Rake issues

I'm trying to follow along with the Rails Tutorial and can't seem to get builds working on Heroku.
My build log is here:
https://pastebin.com/pBnGkBXe
Here are the errors I've tried debugging so far:
! Could not detect rake tasks
! ensure you can run `$ bundle exec rake -P` against your app
! and using the production group of your Gemfile.
Running bundle exec rake -P locally does work on my repository.
! /tmp/build_5f6ec788/config/boot.rb:4:in `require': cannot load such file -- bootsnap/setup (LoadError)
! from /tmp/build_5f6ec788/config/boot.rb:4:in `<top (required)>'
! from /tmp/build_5f6ec788/bin/rake:3:in `require_relative'
! from /tmp/build_5f6ec788/bin/rake:3:in `<main>'
I wasn't able to figure out what was happening here.
I tried running this with both the Rails Default Gemfile and the Rails Tutorial Gemfile and it resulted in the same Bootsnap error.
Can anyone make suggestions on how to get this Heroku deployment working?
Thank you!
Figured it out.
I was running Ruby v2.6.3. Upgrade to 2.7.2 and fixing that in the Gemfile resulted in a successful deploy to Heroku.

How do I debug failing git push to flynn?

I am trying to push a Ruby on Rails projekt to my Flynn remote. I am getting this error:
-----> Discovering process types
remote: -e:1:in `<main>': undefined method `keys' for false:FalseClass (NoMethodError)
remote: ERROR: Build failed: exec: job exited with status 1
I have no 'keys' in any ruby file, and I am not even sure if that is what is meant with this error. Is there any logs with further information about the error? The project is working fine locally using Foreman, and an older version is also working fine at Flynn.
This is likely a configuration error and you will need to make sure your environment variables that you've set locally are available in your Flynn environment,
You can set your environment variables on Flynn with the CLI.

Updating gems and aws deploy error ruby on rails

My application is running fine over Elasticbeanstalk. as i have connected my repo with gemnasium, so it said about outdated gems and i updated them.
1: First i just ran the bundle update command then deployed i got error
Creating application version archive "app-51c4-160115_105334".
Uploading evercam-admin-live/app-51c4-160115_105334.zip to S3. This may take a while.
Upload Complete.
INFO: Environment update is starting.
INFO: Deploying new version to instance(s).
ERROR: [Instance: i-40adb5c9] Command failed on instance. Return code: 1 Output: (TRUNCATED)...ror: cannot load such file -- bundler/setup
/var/app/ondeck/config/boot.rb:3:in `<top (required)>'
/var/app/ondeck/config/application.rb:1:in `<top (required)>'
/var/app/ondeck/Rakefile:4:in `<top (required)>'
(See full trace by running task with --trace).
container_command 01seed in .ebextensions/seed.config failed. For more detail, check /var/log/eb-activity.log using console or EB CLI.
INFO: Command execution completed on all instances. Summary: [Successful: 0, Failed: 1].
ERROR: Unsuccessful command execution on instance id(s) 'i-40adb5c9'. Aborting the operation.
ERROR: Failed to deploy application.
ERROR: Failed to deploy application.
After searching around over stackoverflow i found out that updating each gem separately will be better and did the same.
Gems with no version number. i did bundle update gemname and for those who are with version number i updated version number in gemfile and again did the the same bundle update gemname
2: it updated the gem as well. and then i deployed that branch again.
and got the EXACT same error again.
anyhelp will be appreciated thanks

Heroku Error when running heroku commands

Hi everytime I try to run a heroku command ex. heroku run rails c --app <appname> I am getting this error:
! Heroku client internal error.
! Search for help at: https://help.heroku.com
! Or report a bug at: https://github.com/heroku/heroku/issues/new
Error: SSL_connect returned=1 errno=0 state=SSLv3 read server hello A: sslv3 alert handshake failure (OpenSSL::SSL::SSLError)
(Exc
n::Errors::SocketError)
Backtrace: C:/Program Files (x86)/Heroku/vendor/gems/excon-0.16.1/lib/excon/ssl_socket.rb:83:in
connect'
C:/Program Files (x86)/Heroku/vendor/gems/excon-0.16.1/lib/excon/ssl_socket.rb:83:in
initialize'
C:/Program Files (x86)/Heroku/vendor/gems/excon-0.16.1/lib/excon/connection.rb:344:in
new'
C:/Program Files (x86)/Heroku/vendor/gems/excon-0.16.1/lib/excon/connection.rb:344:in
socket'
C:/Program Files (x86)/Heroku/vendor/gems/excon-0.16.1/lib/excon/connection.rb:175:in
request_kernel'
C:/Program Files (x86)/Heroku/vendor/gems/excon-0.16.1/lib/excon/connection.rb:101:in
request'
C:/Program Files (x86)/Heroku/vendor/gems/heroku-api-0.3.4/lib/heroku/api.rb:61:in
request'
C:/Program Files (x86)/Heroku/vendor/gems/heroku-api-0.3.4/lib/heroku/api/login.rb:9:in
post_login'
C:/Program Files (x86)/Heroku/lib/heroku/auth.rb:76:in api_key'
C:/Program Files (x86)/Heroku/lib/heroku/auth.rb:185:inask_for_credentials'
C:/Program Files (x86)/Heroku/lib/heroku/auth.rb:217:in ask_for_and_save_credentials'
C:/Program Files (x86)/Heroku/lib/heroku/auth.rb:80:inget_credentials'
C:/Program Files (x86)/Heroku/lib/heroku/auth.rb:70:in password'
C:/Program Files (x86)/Heroku/lib/heroku/auth.rb:17:inapi'
C:/Program Files (x86)/Heroku/lib/heroku/command/base.rb:40:in api'
C:/Program Files (x86)/Heroku/lib/heroku/command/config.rb:26:inindex'
C:/Program Files (x86)/Heroku/lib/heroku/command.rb:193:in run'
C:/Program Files (x86)/Heroku/lib/heroku/cli.rb:25:instart'
C:/Program Files (x86)/Heroku/bin/heroku:25:in `'
Command: heroku config
Version: heroku-toolbelt/2.30.3 (i386-mingw32) ruby/1.9.2
What is the problem with this?
I got the same probleme, and the reason seems be the same: Your heroku toolbelt is outdated. Check it out: https://github.com/heroku/heroku/issues/1235
Get the current version in: https://toolbelt.heroku.com/windows
From your command its seems like you want to run Console not application. If you have multiple environments (staging / production / etc) you need this command:
heroku run -a app-name console
If you only have a single environment and never setup staging or other environments you can just run:
heroku run console
For more details please check this https://github.com/nemrow/rails_app_cheatsheet/blob/master/heroku.rdoc
Heroku only runs in one environment at a time, which is configured by the RAILS_ENV and RACK_ENV environments variables.
Note: Make sure that it is not in your .gitignore file. Commit and then push the changes to Heroku.
Heroku (along with many other responsible API providers) disabled its support for SSLv3 as of last Thursday: https://status.heroku.com/incidents/678

Problem with deploying rails app to heroku while running "heroku create" command

Has anyone seen this problem before?
When I try to run the command "heroku create", I get long error with directories related to ruby.
C:\Rails\Waterloop3>heroku create
Creating severe-samurai-489.... done
Created http://severe-samurai-489.heroku.com/ | git#heroku.com:severe-samurai-48
9.git
C:/Ruby192/lib/ruby/gems/1.9.1/gems/heroku-1.14.10/lib/heroku/helpers.rb:78:in ``': No such file or directory - git remote (Errno::ENOENT)
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/heroku-1.14.10/lib/heroku/helpe
rs.rb:78:in `block in shell'
from C:/Ruby192/lib/ruby/1.9.1/fileutils.rb:121:in `chdir'
from C:/Ruby192/lib/ruby/1.9.1/fileutils.rb:121:in `cd'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/heroku-1.14.10/lib/heroku/helpe
rs.rb:78:in `shell'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/heroku-1.14.10/lib/heroku/comma
nds/app.rb:265:in `create_git_remote'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/heroku-1.14.10/lib/heroku/comma
nds/app.rb:49:in `create'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/heroku-1.14.10/lib/heroku/comma
nd.rb:48:in `run_internal'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/heroku-1.14.10/lib/heroku/comma
nd.rb:20:in `run'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/heroku-1.14.10/bin/heroku:13:in
`'
from C:/Ruby192/bin/heroku:19:in `load'
from C:/Ruby192/bin/heroku:19:in `<main>'
This line:
C:/Ruby192/lib/ruby/gems/1.9.1/gems/heroku-1.14.10/lib/heroku/helpers.rb:78:in ``': No such file or directory - git remote (Errno::ENOENT)
Says that the heroku gem is try to run git and can't find it. Do you have git installed and running from the command line? It is a requirement, since it is what Heroku uses to manage deployments.

Resources